com.google.cloud.dialogflow.cx.v3.ResponseMessage 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-cx-v3 Show documentation
Show all versions of proto-google-cloud-dialogflow-cx-v3 Show documentation
PROTO library for proto-google-cloud-dialogflow-cx-v3
/*
* 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/response_message.proto
package com.google.cloud.dialogflow.cx.v3;
/**
*
*
*
* Represents a response message that can be returned by a conversational agent.
* Response messages are also used for output audio synthesis. The approach is
* as follows:
* * If at least one OutputAudioText response is present, then all
* OutputAudioText responses are linearly concatenated, and the result is used
* for output audio synthesis.
* * If the OutputAudioText responses are a mixture of text and SSML, then the
* concatenated result is treated as SSML; otherwise, the result is treated as
* either text or SSML as appropriate. The agent designer should ideally use
* either text or SSML consistently throughout the bot design.
* * Otherwise, all Text responses are linearly concatenated, and the result is
* used for output audio synthesis.
* This approach allows for more sophisticated user experience scenarios, where
* the text displayed to the user may differ from what is heard.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage}
*/
public final class ResponseMessage extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage)
ResponseMessageOrBuilder {
private static final long serialVersionUID = 0L;
// Use ResponseMessage.newBuilder() to construct.
private ResponseMessage(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ResponseMessage() {}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new ResponseMessage();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private ResponseMessage(
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:
{
com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.Builder subBuilder = null;
if (messageCase_ == 1) {
subBuilder =
((com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text) message_).toBuilder();
}
message_ =
input.readMessage(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.parser(),
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text) message_);
message_ = subBuilder.buildPartial();
}
messageCase_ = 1;
break;
}
case 18:
{
com.google.protobuf.Struct.Builder subBuilder = null;
if (messageCase_ == 2) {
subBuilder = ((com.google.protobuf.Struct) message_).toBuilder();
}
message_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.protobuf.Struct) message_);
message_ = subBuilder.buildPartial();
}
messageCase_ = 2;
break;
}
case 66:
{
com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.Builder subBuilder =
null;
if (messageCase_ == 8) {
subBuilder =
((com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText) message_)
.toBuilder();
}
message_ =
input.readMessage(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.parser(),
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText) message_);
message_ = subBuilder.buildPartial();
}
messageCase_ = 8;
break;
}
case 74:
{
com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess.Builder
subBuilder = null;
if (messageCase_ == 9) {
subBuilder =
((com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess)
message_)
.toBuilder();
}
message_ =
input.readMessage(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess
.parser(),
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess)
message_);
message_ = subBuilder.buildPartial();
}
messageCase_ = 9;
break;
}
case 82:
{
com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.Builder
subBuilder = null;
if (messageCase_ == 10) {
subBuilder =
((com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff) message_)
.toBuilder();
}
message_ =
input.readMessage(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.parser(),
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff) message_);
message_ = subBuilder.buildPartial();
}
messageCase_ = 10;
break;
}
case 90:
{
com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.Builder subBuilder =
null;
if (messageCase_ == 11) {
subBuilder =
((com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) message_)
.toBuilder();
}
message_ =
input.readMessage(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.parser(),
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) message_);
message_ = subBuilder.buildPartial();
}
messageCase_ = 11;
break;
}
case 98:
{
com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.Builder subBuilder = null;
if (messageCase_ == 12) {
subBuilder =
((com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) message_)
.toBuilder();
}
message_ =
input.readMessage(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.parser(),
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) message_);
message_ = subBuilder.buildPartial();
}
messageCase_ = 12;
break;
}
case 106:
{
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Builder subBuilder =
null;
if (messageCase_ == 13) {
subBuilder =
((com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) message_)
.toBuilder();
}
message_ =
input.readMessage(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.parser(),
extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) message_);
message_ = subBuilder.buildPartial();
}
messageCase_ = 13;
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.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.class,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder.class);
}
public interface TextOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.Text)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Required. A collection of text responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return A list containing the text.
*/
java.util.List getTextList();
/**
*
*
*
* Required. A collection of text responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The count of text.
*/
int getTextCount();
/**
*
*
*
* Required. A collection of text responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @param index The index of the element to return.
* @return The text at the given index.
*/
java.lang.String getText(int index);
/**
*
*
*
* Required. A collection of text responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @param index The index of the value to return.
* @return The bytes of the text at the given index.
*/
com.google.protobuf.ByteString getTextBytes(int index);
/**
*
*
*
* Output only. Whether the playback of this message can be interrupted by the end
* user's speech and the client can then starts the next Dialogflow
* request.
*
*
* bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The allowPlaybackInterruption.
*/
boolean getAllowPlaybackInterruption();
}
/**
*
*
*
* The text response message.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.Text}
*/
public static final class Text extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.Text)
TextOrBuilder {
private static final long serialVersionUID = 0L;
// Use Text.newBuilder() to construct.
private Text(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Text() {
text_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Text();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private Text(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
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();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
text_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
text_.add(s);
break;
}
case 16:
{
allowPlaybackInterruption_ = 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 {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
text_ = text_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_Text_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_Text_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.class,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.Builder.class);
}
public static final int TEXT_FIELD_NUMBER = 1;
private com.google.protobuf.LazyStringList text_;
/**
*
*
*
* Required. A collection of text responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return A list containing the text.
*/
public com.google.protobuf.ProtocolStringList getTextList() {
return text_;
}
/**
*
*
*
* Required. A collection of text responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The count of text.
*/
public int getTextCount() {
return text_.size();
}
/**
*
*
*
* Required. A collection of text responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @param index The index of the element to return.
* @return The text at the given index.
*/
public java.lang.String getText(int index) {
return text_.get(index);
}
/**
*
*
*
* Required. A collection of text responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @param index The index of the value to return.
* @return The bytes of the text at the given index.
*/
public com.google.protobuf.ByteString getTextBytes(int index) {
return text_.getByteString(index);
}
public static final int ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER = 2;
private boolean allowPlaybackInterruption_;
/**
*
*
*
* Output only. Whether the playback of this message can be interrupted by the end
* user's speech and the client can then starts the next Dialogflow
* request.
*
*
* bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The allowPlaybackInterruption.
*/
@java.lang.Override
public boolean getAllowPlaybackInterruption() {
return allowPlaybackInterruption_;
}
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 {
for (int i = 0; i < text_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_.getRaw(i));
}
if (allowPlaybackInterruption_ != false) {
output.writeBool(2, allowPlaybackInterruption_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < text_.size(); i++) {
dataSize += computeStringSizeNoTag(text_.getRaw(i));
}
size += dataSize;
size += 1 * getTextList().size();
}
if (allowPlaybackInterruption_ != false) {
size +=
com.google.protobuf.CodedOutputStream.computeBoolSize(2, allowPlaybackInterruption_);
}
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.ResponseMessage.Text)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text other =
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text) obj;
if (!getTextList().equals(other.getTextList())) return false;
if (getAllowPlaybackInterruption() != other.getAllowPlaybackInterruption()) 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();
if (getTextCount() > 0) {
hash = (37 * hash) + TEXT_FIELD_NUMBER;
hash = (53 * hash) + getTextList().hashCode();
}
hash = (37 * hash) + ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowPlaybackInterruption());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text 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.ResponseMessage.Text parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text 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.ResponseMessage.Text parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text 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.ResponseMessage.Text 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.ResponseMessage.Text 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.ResponseMessage.Text 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.ResponseMessage.Text 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.ResponseMessage.Text 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.ResponseMessage.Text 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.ResponseMessage.Text 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 text response message.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.Text}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.Text)
com.google.cloud.dialogflow.cx.v3.ResponseMessage.TextOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_Text_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_Text_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.class,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.Builder.class);
}
// Construct using com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.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();
text_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
allowPlaybackInterruption_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_Text_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text build() {
com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text buildPartial() {
com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text result =
new com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) != 0)) {
text_ = text_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.text_ = text_;
result.allowPlaybackInterruption_ = allowPlaybackInterruption_;
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.ResponseMessage.Text) {
return mergeFrom((com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text other) {
if (other == com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.getDefaultInstance())
return this;
if (!other.text_.isEmpty()) {
if (text_.isEmpty()) {
text_ = other.text_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureTextIsMutable();
text_.addAll(other.text_);
}
onChanged();
}
if (other.getAllowPlaybackInterruption() != false) {
setAllowPlaybackInterruption(other.getAllowPlaybackInterruption());
}
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.ResponseMessage.Text parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.LazyStringList text_ =
com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureTextIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
text_ = new com.google.protobuf.LazyStringArrayList(text_);
bitField0_ |= 0x00000001;
}
}
/**
*
*
*
* Required. A collection of text responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return A list containing the text.
*/
public com.google.protobuf.ProtocolStringList getTextList() {
return text_.getUnmodifiableView();
}
/**
*
*
*
* Required. A collection of text responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The count of text.
*/
public int getTextCount() {
return text_.size();
}
/**
*
*
*
* Required. A collection of text responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @param index The index of the element to return.
* @return The text at the given index.
*/
public java.lang.String getText(int index) {
return text_.get(index);
}
/**
*
*
*
* Required. A collection of text responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @param index The index of the value to return.
* @return The bytes of the text at the given index.
*/
public com.google.protobuf.ByteString getTextBytes(int index) {
return text_.getByteString(index);
}
/**
*
*
*
* Required. A collection of text responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @param index The index to set the value at.
* @param value The text to set.
* @return This builder for chaining.
*/
public Builder setText(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureTextIsMutable();
text_.set(index, value);
onChanged();
return this;
}
/**
*
*
*
* Required. A collection of text responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The text to add.
* @return This builder for chaining.
*/
public Builder addText(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureTextIsMutable();
text_.add(value);
onChanged();
return this;
}
/**
*
*
*
* Required. A collection of text responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @param values The text to add.
* @return This builder for chaining.
*/
public Builder addAllText(java.lang.Iterable values) {
ensureTextIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, text_);
onChanged();
return this;
}
/**
*
*
*
* Required. A collection of text responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearText() {
text_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Required. A collection of text responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes of the text to add.
* @return This builder for chaining.
*/
public Builder addTextBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureTextIsMutable();
text_.add(value);
onChanged();
return this;
}
private boolean allowPlaybackInterruption_;
/**
*
*
*
* Output only. Whether the playback of this message can be interrupted by the end
* user's speech and the client can then starts the next Dialogflow
* request.
*
*
* bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The allowPlaybackInterruption.
*/
@java.lang.Override
public boolean getAllowPlaybackInterruption() {
return allowPlaybackInterruption_;
}
/**
*
*
*
* Output only. Whether the playback of this message can be interrupted by the end
* user's speech and the client can then starts the next Dialogflow
* request.
*
*
* bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The allowPlaybackInterruption to set.
* @return This builder for chaining.
*/
public Builder setAllowPlaybackInterruption(boolean value) {
allowPlaybackInterruption_ = value;
onChanged();
return this;
}
/**
*
*
*
* Output only. Whether the playback of this message can be interrupted by the end
* user's speech and the client can then starts the next Dialogflow
* request.
*
*
* bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return This builder for chaining.
*/
public Builder clearAllowPlaybackInterruption() {
allowPlaybackInterruption_ = 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.ResponseMessage.Text)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.Text)
private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text();
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Text parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Text(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.ResponseMessage.Text getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface LiveAgentHandoffOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Custom metadata for your handoff procedure. Dialogflow doesn't impose
* any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*
* @return Whether the metadata field is set.
*/
boolean hasMetadata();
/**
*
*
*
* Custom metadata for your handoff procedure. Dialogflow doesn't impose
* any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*
* @return The metadata.
*/
com.google.protobuf.Struct getMetadata();
/**
*
*
*
* Custom metadata for your handoff procedure. Dialogflow doesn't impose
* any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*/
com.google.protobuf.StructOrBuilder getMetadataOrBuilder();
}
/**
*
*
*
* Indicates that the conversation should be handed off to a live agent.
* Dialogflow only uses this to determine which conversations were handed off
* to a human agent for measurement purposes. What else to do with this signal
* is up to you and your handoff procedures.
* You may set this, for example:
* * In the [entry_fulfillment][google.cloud.dialogflow.cx.v3.Page.entry_fulfillment] of a [Page][google.cloud.dialogflow.cx.v3.Page] if
* entering the page indicates something went extremely wrong in the
* conversation.
* * In a webhook response when you determine that the customer issue can only
* be handled by a human.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff}
*/
public static final class LiveAgentHandoff extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff)
LiveAgentHandoffOrBuilder {
private static final long serialVersionUID = 0L;
// Use LiveAgentHandoff.newBuilder() to construct.
private LiveAgentHandoff(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LiveAgentHandoff() {}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new LiveAgentHandoff();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private LiveAgentHandoff(
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:
{
com.google.protobuf.Struct.Builder subBuilder = null;
if (metadata_ != null) {
subBuilder = metadata_.toBuilder();
}
metadata_ =
input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(metadata_);
metadata_ = subBuilder.buildPartial();
}
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.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_LiveAgentHandoff_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_LiveAgentHandoff_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.class,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.Builder.class);
}
public static final int METADATA_FIELD_NUMBER = 1;
private com.google.protobuf.Struct metadata_;
/**
*
*
*
* Custom metadata for your handoff procedure. Dialogflow doesn't impose
* any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*
* @return Whether the metadata field is set.
*/
@java.lang.Override
public boolean hasMetadata() {
return metadata_ != null;
}
/**
*
*
*
* Custom metadata for your handoff procedure. Dialogflow doesn't impose
* any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*
* @return The metadata.
*/
@java.lang.Override
public com.google.protobuf.Struct getMetadata() {
return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_;
}
/**
*
*
*
* Custom metadata for your handoff procedure. Dialogflow doesn't impose
* any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*/
@java.lang.Override
public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() {
return getMetadata();
}
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 (metadata_ != null) {
output.writeMessage(1, getMetadata());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (metadata_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMetadata());
}
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.ResponseMessage.LiveAgentHandoff)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff other =
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff) obj;
if (hasMetadata() != other.hasMetadata()) return false;
if (hasMetadata()) {
if (!getMetadata().equals(other.getMetadata())) 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();
if (hasMetadata()) {
hash = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + getMetadata().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff 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.ResponseMessage.LiveAgentHandoff parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff 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.ResponseMessage.LiveAgentHandoff parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff 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.ResponseMessage.LiveAgentHandoff 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.ResponseMessage.LiveAgentHandoff 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.ResponseMessage.LiveAgentHandoff
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.ResponseMessage.LiveAgentHandoff
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.ResponseMessage.LiveAgentHandoff 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.ResponseMessage.LiveAgentHandoff 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.ResponseMessage.LiveAgentHandoff 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;
}
/**
*
*
*
* Indicates that the conversation should be handed off to a live agent.
* Dialogflow only uses this to determine which conversations were handed off
* to a human agent for measurement purposes. What else to do with this signal
* is up to you and your handoff procedures.
* You may set this, for example:
* * In the [entry_fulfillment][google.cloud.dialogflow.cx.v3.Page.entry_fulfillment] of a [Page][google.cloud.dialogflow.cx.v3.Page] if
* entering the page indicates something went extremely wrong in the
* conversation.
* * In a webhook response when you determine that the customer issue can only
* be handled by a human.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff)
com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoffOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_LiveAgentHandoff_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_LiveAgentHandoff_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.class,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.Builder.class);
}
// Construct using
// com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.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();
if (metadataBuilder_ == null) {
metadata_ = null;
} else {
metadata_ = null;
metadataBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_LiveAgentHandoff_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff build() {
com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff buildPartial() {
com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff result =
new com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff(this);
if (metadataBuilder_ == null) {
result.metadata_ = metadata_;
} else {
result.metadata_ = metadataBuilder_.build();
}
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.ResponseMessage.LiveAgentHandoff) {
return mergeFrom(
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff other) {
if (other
== com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff
.getDefaultInstance()) return this;
if (other.hasMetadata()) {
mergeMetadata(other.getMetadata());
}
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.ResponseMessage.LiveAgentHandoff parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff)
e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.Struct metadata_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct,
com.google.protobuf.Struct.Builder,
com.google.protobuf.StructOrBuilder>
metadataBuilder_;
/**
*
*
*
* Custom metadata for your handoff procedure. Dialogflow doesn't impose
* any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*
* @return Whether the metadata field is set.
*/
public boolean hasMetadata() {
return metadataBuilder_ != null || metadata_ != null;
}
/**
*
*
*
* Custom metadata for your handoff procedure. Dialogflow doesn't impose
* any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*
* @return The metadata.
*/
public com.google.protobuf.Struct getMetadata() {
if (metadataBuilder_ == null) {
return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_;
} else {
return metadataBuilder_.getMessage();
}
}
/**
*
*
*
* Custom metadata for your handoff procedure. Dialogflow doesn't impose
* any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*/
public Builder setMetadata(com.google.protobuf.Struct value) {
if (metadataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
metadata_ = value;
onChanged();
} else {
metadataBuilder_.setMessage(value);
}
return this;
}
/**
*
*
*
* Custom metadata for your handoff procedure. Dialogflow doesn't impose
* any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*/
public Builder setMetadata(com.google.protobuf.Struct.Builder builderForValue) {
if (metadataBuilder_ == null) {
metadata_ = builderForValue.build();
onChanged();
} else {
metadataBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Custom metadata for your handoff procedure. Dialogflow doesn't impose
* any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*/
public Builder mergeMetadata(com.google.protobuf.Struct value) {
if (metadataBuilder_ == null) {
if (metadata_ != null) {
metadata_ =
com.google.protobuf.Struct.newBuilder(metadata_).mergeFrom(value).buildPartial();
} else {
metadata_ = value;
}
onChanged();
} else {
metadataBuilder_.mergeFrom(value);
}
return this;
}
/**
*
*
*
* Custom metadata for your handoff procedure. Dialogflow doesn't impose
* any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*/
public Builder clearMetadata() {
if (metadataBuilder_ == null) {
metadata_ = null;
onChanged();
} else {
metadata_ = null;
metadataBuilder_ = null;
}
return this;
}
/**
*
*
*
* Custom metadata for your handoff procedure. Dialogflow doesn't impose
* any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*/
public com.google.protobuf.Struct.Builder getMetadataBuilder() {
onChanged();
return getMetadataFieldBuilder().getBuilder();
}
/**
*
*
*
* Custom metadata for your handoff procedure. Dialogflow doesn't impose
* any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*/
public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() {
if (metadataBuilder_ != null) {
return metadataBuilder_.getMessageOrBuilder();
} else {
return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_;
}
}
/**
*
*
*
* Custom metadata for your handoff procedure. Dialogflow doesn't impose
* any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct,
com.google.protobuf.Struct.Builder,
com.google.protobuf.StructOrBuilder>
getMetadataFieldBuilder() {
if (metadataBuilder_ == null) {
metadataBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct,
com.google.protobuf.Struct.Builder,
com.google.protobuf.StructOrBuilder>(
getMetadata(), getParentForChildren(), isClean());
metadata_ = null;
}
return metadataBuilder_;
}
@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.ResponseMessage.LiveAgentHandoff)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff)
private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff();
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LiveAgentHandoff parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new LiveAgentHandoff(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.ResponseMessage.LiveAgentHandoff
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ConversationSuccessOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Custom metadata. Dialogflow doesn't impose any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*
* @return Whether the metadata field is set.
*/
boolean hasMetadata();
/**
*
*
*
* Custom metadata. Dialogflow doesn't impose any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*
* @return The metadata.
*/
com.google.protobuf.Struct getMetadata();
/**
*
*
*
* Custom metadata. Dialogflow doesn't impose any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*/
com.google.protobuf.StructOrBuilder getMetadataOrBuilder();
}
/**
*
*
*
* Indicates that the conversation succeeded, i.e., the bot handled the issue
* that the customer talked to it about.
* Dialogflow only uses this to determine which conversations should be
* counted as successful and doesn't process the metadata in this message in
* any way. Note that Dialogflow also considers conversations that get to the
* conversation end page as successful even if they don't return
* [ConversationSuccess][google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess].
* You may set this, for example:
* * In the [entry_fulfillment][google.cloud.dialogflow.cx.v3.Page.entry_fulfillment] of a [Page][google.cloud.dialogflow.cx.v3.Page] if
* entering the page indicates that the conversation succeeded.
* * In a webhook response when you determine that you handled the customer
* issue.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess}
*/
public static final class ConversationSuccess extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess)
ConversationSuccessOrBuilder {
private static final long serialVersionUID = 0L;
// Use ConversationSuccess.newBuilder() to construct.
private ConversationSuccess(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ConversationSuccess() {}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new ConversationSuccess();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private ConversationSuccess(
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:
{
com.google.protobuf.Struct.Builder subBuilder = null;
if (metadata_ != null) {
subBuilder = metadata_.toBuilder();
}
metadata_ =
input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(metadata_);
metadata_ = subBuilder.buildPartial();
}
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.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_ConversationSuccess_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_ConversationSuccess_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess.class,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess.Builder.class);
}
public static final int METADATA_FIELD_NUMBER = 1;
private com.google.protobuf.Struct metadata_;
/**
*
*
*
* Custom metadata. Dialogflow doesn't impose any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*
* @return Whether the metadata field is set.
*/
@java.lang.Override
public boolean hasMetadata() {
return metadata_ != null;
}
/**
*
*
*
* Custom metadata. Dialogflow doesn't impose any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*
* @return The metadata.
*/
@java.lang.Override
public com.google.protobuf.Struct getMetadata() {
return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_;
}
/**
*
*
*
* Custom metadata. Dialogflow doesn't impose any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*/
@java.lang.Override
public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() {
return getMetadata();
}
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 (metadata_ != null) {
output.writeMessage(1, getMetadata());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (metadata_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getMetadata());
}
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.ResponseMessage.ConversationSuccess)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess other =
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess) obj;
if (hasMetadata() != other.hasMetadata()) return false;
if (hasMetadata()) {
if (!getMetadata().equals(other.getMetadata())) 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();
if (hasMetadata()) {
hash = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + getMetadata().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess 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.ResponseMessage.ConversationSuccess parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess 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.ResponseMessage.ConversationSuccess parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess 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.ResponseMessage.ConversationSuccess 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.ResponseMessage.ConversationSuccess 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.ResponseMessage.ConversationSuccess
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.ResponseMessage.ConversationSuccess
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.ResponseMessage.ConversationSuccess 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.ResponseMessage.ConversationSuccess 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.ResponseMessage.ConversationSuccess 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;
}
/**
*
*
*
* Indicates that the conversation succeeded, i.e., the bot handled the issue
* that the customer talked to it about.
* Dialogflow only uses this to determine which conversations should be
* counted as successful and doesn't process the metadata in this message in
* any way. Note that Dialogflow also considers conversations that get to the
* conversation end page as successful even if they don't return
* [ConversationSuccess][google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess].
* You may set this, for example:
* * In the [entry_fulfillment][google.cloud.dialogflow.cx.v3.Page.entry_fulfillment] of a [Page][google.cloud.dialogflow.cx.v3.Page] if
* entering the page indicates that the conversation succeeded.
* * In a webhook response when you determine that you handled the customer
* issue.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess)
com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccessOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_ConversationSuccess_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_ConversationSuccess_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess.class,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess.Builder
.class);
}
// Construct using
// com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess.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();
if (metadataBuilder_ == null) {
metadata_ = null;
} else {
metadata_ = null;
metadataBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_ConversationSuccess_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess build() {
com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess buildPartial() {
com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess result =
new com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess(this);
if (metadataBuilder_ == null) {
result.metadata_ = metadata_;
} else {
result.metadata_ = metadataBuilder_.build();
}
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.ResponseMessage.ConversationSuccess) {
return mergeFrom(
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess other) {
if (other
== com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess
.getDefaultInstance()) return this;
if (other.hasMetadata()) {
mergeMetadata(other.getMetadata());
}
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.ResponseMessage.ConversationSuccess parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess)
e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.protobuf.Struct metadata_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct,
com.google.protobuf.Struct.Builder,
com.google.protobuf.StructOrBuilder>
metadataBuilder_;
/**
*
*
*
* Custom metadata. Dialogflow doesn't impose any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*
* @return Whether the metadata field is set.
*/
public boolean hasMetadata() {
return metadataBuilder_ != null || metadata_ != null;
}
/**
*
*
*
* Custom metadata. Dialogflow doesn't impose any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*
* @return The metadata.
*/
public com.google.protobuf.Struct getMetadata() {
if (metadataBuilder_ == null) {
return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_;
} else {
return metadataBuilder_.getMessage();
}
}
/**
*
*
*
* Custom metadata. Dialogflow doesn't impose any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*/
public Builder setMetadata(com.google.protobuf.Struct value) {
if (metadataBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
metadata_ = value;
onChanged();
} else {
metadataBuilder_.setMessage(value);
}
return this;
}
/**
*
*
*
* Custom metadata. Dialogflow doesn't impose any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*/
public Builder setMetadata(com.google.protobuf.Struct.Builder builderForValue) {
if (metadataBuilder_ == null) {
metadata_ = builderForValue.build();
onChanged();
} else {
metadataBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Custom metadata. Dialogflow doesn't impose any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*/
public Builder mergeMetadata(com.google.protobuf.Struct value) {
if (metadataBuilder_ == null) {
if (metadata_ != null) {
metadata_ =
com.google.protobuf.Struct.newBuilder(metadata_).mergeFrom(value).buildPartial();
} else {
metadata_ = value;
}
onChanged();
} else {
metadataBuilder_.mergeFrom(value);
}
return this;
}
/**
*
*
*
* Custom metadata. Dialogflow doesn't impose any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*/
public Builder clearMetadata() {
if (metadataBuilder_ == null) {
metadata_ = null;
onChanged();
} else {
metadata_ = null;
metadataBuilder_ = null;
}
return this;
}
/**
*
*
*
* Custom metadata. Dialogflow doesn't impose any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*/
public com.google.protobuf.Struct.Builder getMetadataBuilder() {
onChanged();
return getMetadataFieldBuilder().getBuilder();
}
/**
*
*
*
* Custom metadata. Dialogflow doesn't impose any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*/
public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() {
if (metadataBuilder_ != null) {
return metadataBuilder_.getMessageOrBuilder();
} else {
return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_;
}
}
/**
*
*
*
* Custom metadata. Dialogflow doesn't impose any structure on this.
*
*
* .google.protobuf.Struct metadata = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct,
com.google.protobuf.Struct.Builder,
com.google.protobuf.StructOrBuilder>
getMetadataFieldBuilder() {
if (metadataBuilder_ == null) {
metadataBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct,
com.google.protobuf.Struct.Builder,
com.google.protobuf.StructOrBuilder>(
getMetadata(), getParentForChildren(), isClean());
metadata_ = null;
}
return metadataBuilder_;
}
@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.ResponseMessage.ConversationSuccess)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess)
private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess();
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ConversationSuccess parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ConversationSuccess(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.ResponseMessage.ConversationSuccess
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface OutputAudioTextOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* The raw text to be synthesized.
*
*
* string text = 1;
*
* @return Whether the text field is set.
*/
boolean hasText();
/**
*
*
*
* The raw text to be synthesized.
*
*
* string text = 1;
*
* @return The text.
*/
java.lang.String getText();
/**
*
*
*
* The raw text to be synthesized.
*
*
* string text = 1;
*
* @return The bytes for text.
*/
com.google.protobuf.ByteString getTextBytes();
/**
*
*
*
* The SSML text to be synthesized. For more information, see
* [SSML](/speech/text-to-speech/docs/ssml).
*
*
* string ssml = 2;
*
* @return Whether the ssml field is set.
*/
boolean hasSsml();
/**
*
*
*
* The SSML text to be synthesized. For more information, see
* [SSML](/speech/text-to-speech/docs/ssml).
*
*
* string ssml = 2;
*
* @return The ssml.
*/
java.lang.String getSsml();
/**
*
*
*
* The SSML text to be synthesized. For more information, see
* [SSML](/speech/text-to-speech/docs/ssml).
*
*
* string ssml = 2;
*
* @return The bytes for ssml.
*/
com.google.protobuf.ByteString getSsmlBytes();
/**
*
*
*
* Output only. Whether the playback of this message can be interrupted by the end
* user's speech and the client can then starts the next Dialogflow
* request.
*
*
* bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The allowPlaybackInterruption.
*/
boolean getAllowPlaybackInterruption();
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.SourceCase
getSourceCase();
}
/**
*
*
*
* A text or ssml response that is preferentially used for TTS output audio
* synthesis, as described in the comment on the ResponseMessage message.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText}
*/
public static final class OutputAudioText extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText)
OutputAudioTextOrBuilder {
private static final long serialVersionUID = 0L;
// Use OutputAudioText.newBuilder() to construct.
private OutputAudioText(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private OutputAudioText() {}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new OutputAudioText();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private OutputAudioText(
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();
sourceCase_ = 1;
source_ = s;
break;
}
case 18:
{
java.lang.String s = input.readStringRequireUtf8();
sourceCase_ = 2;
source_ = s;
break;
}
case 24:
{
allowPlaybackInterruption_ = 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.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_OutputAudioText_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_OutputAudioText_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.class,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.Builder.class);
}
private int sourceCase_ = 0;
private java.lang.Object source_;
public enum SourceCase
implements
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
TEXT(1),
SSML(2),
SOURCE_NOT_SET(0);
private final int value;
private SourceCase(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 SourceCase valueOf(int value) {
return forNumber(value);
}
public static SourceCase forNumber(int value) {
switch (value) {
case 1:
return TEXT;
case 2:
return SSML;
case 0:
return SOURCE_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public SourceCase getSourceCase() {
return SourceCase.forNumber(sourceCase_);
}
public static final int TEXT_FIELD_NUMBER = 1;
/**
*
*
*
* The raw text to be synthesized.
*
*
* string text = 1;
*
* @return Whether the text field is set.
*/
public boolean hasText() {
return sourceCase_ == 1;
}
/**
*
*
*
* The raw text to be synthesized.
*
*
* string text = 1;
*
* @return The text.
*/
public java.lang.String getText() {
java.lang.Object ref = "";
if (sourceCase_ == 1) {
ref = source_;
}
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (sourceCase_ == 1) {
source_ = s;
}
return s;
}
}
/**
*
*
*
* The raw text to be synthesized.
*
*
* string text = 1;
*
* @return The bytes for text.
*/
public com.google.protobuf.ByteString getTextBytes() {
java.lang.Object ref = "";
if (sourceCase_ == 1) {
ref = source_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
if (sourceCase_ == 1) {
source_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SSML_FIELD_NUMBER = 2;
/**
*
*
*
* The SSML text to be synthesized. For more information, see
* [SSML](/speech/text-to-speech/docs/ssml).
*
*
* string ssml = 2;
*
* @return Whether the ssml field is set.
*/
public boolean hasSsml() {
return sourceCase_ == 2;
}
/**
*
*
*
* The SSML text to be synthesized. For more information, see
* [SSML](/speech/text-to-speech/docs/ssml).
*
*
* string ssml = 2;
*
* @return The ssml.
*/
public java.lang.String getSsml() {
java.lang.Object ref = "";
if (sourceCase_ == 2) {
ref = source_;
}
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (sourceCase_ == 2) {
source_ = s;
}
return s;
}
}
/**
*
*
*
* The SSML text to be synthesized. For more information, see
* [SSML](/speech/text-to-speech/docs/ssml).
*
*
* string ssml = 2;
*
* @return The bytes for ssml.
*/
public com.google.protobuf.ByteString getSsmlBytes() {
java.lang.Object ref = "";
if (sourceCase_ == 2) {
ref = source_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
if (sourceCase_ == 2) {
source_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER = 3;
private boolean allowPlaybackInterruption_;
/**
*
*
*
* Output only. Whether the playback of this message can be interrupted by the end
* user's speech and the client can then starts the next Dialogflow
* request.
*
*
* bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The allowPlaybackInterruption.
*/
@java.lang.Override
public boolean getAllowPlaybackInterruption() {
return allowPlaybackInterruption_;
}
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 (sourceCase_ == 1) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, source_);
}
if (sourceCase_ == 2) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, source_);
}
if (allowPlaybackInterruption_ != false) {
output.writeBool(3, allowPlaybackInterruption_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (sourceCase_ == 1) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, source_);
}
if (sourceCase_ == 2) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, source_);
}
if (allowPlaybackInterruption_ != false) {
size +=
com.google.protobuf.CodedOutputStream.computeBoolSize(3, allowPlaybackInterruption_);
}
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.ResponseMessage.OutputAudioText)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText other =
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText) obj;
if (getAllowPlaybackInterruption() != other.getAllowPlaybackInterruption()) return false;
if (!getSourceCase().equals(other.getSourceCase())) return false;
switch (sourceCase_) {
case 1:
if (!getText().equals(other.getText())) return false;
break;
case 2:
if (!getSsml().equals(other.getSsml())) return false;
break;
case 0:
default:
}
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) + ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowPlaybackInterruption());
switch (sourceCase_) {
case 1:
hash = (37 * hash) + TEXT_FIELD_NUMBER;
hash = (53 * hash) + getText().hashCode();
break;
case 2:
hash = (37 * hash) + SSML_FIELD_NUMBER;
hash = (53 * hash) + getSsml().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText 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.ResponseMessage.OutputAudioText parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText 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.ResponseMessage.OutputAudioText parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText 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.ResponseMessage.OutputAudioText 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.ResponseMessage.OutputAudioText 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.ResponseMessage.OutputAudioText
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.ResponseMessage.OutputAudioText
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.ResponseMessage.OutputAudioText 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.ResponseMessage.OutputAudioText 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.ResponseMessage.OutputAudioText 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;
}
/**
*
*
*
* A text or ssml response that is preferentially used for TTS output audio
* synthesis, as described in the comment on the ResponseMessage message.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText)
com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioTextOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_OutputAudioText_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_OutputAudioText_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.class,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.Builder.class);
}
// Construct using
// com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.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();
allowPlaybackInterruption_ = false;
sourceCase_ = 0;
source_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_OutputAudioText_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText build() {
com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText buildPartial() {
com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText result =
new com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText(this);
if (sourceCase_ == 1) {
result.source_ = source_;
}
if (sourceCase_ == 2) {
result.source_ = source_;
}
result.allowPlaybackInterruption_ = allowPlaybackInterruption_;
result.sourceCase_ = sourceCase_;
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.ResponseMessage.OutputAudioText) {
return mergeFrom(
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText other) {
if (other
== com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText
.getDefaultInstance()) return this;
if (other.getAllowPlaybackInterruption() != false) {
setAllowPlaybackInterruption(other.getAllowPlaybackInterruption());
}
switch (other.getSourceCase()) {
case TEXT:
{
sourceCase_ = 1;
source_ = other.source_;
onChanged();
break;
}
case SSML:
{
sourceCase_ = 2;
source_ = other.source_;
onChanged();
break;
}
case SOURCE_NOT_SET:
{
break;
}
}
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.ResponseMessage.OutputAudioText parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText)
e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int sourceCase_ = 0;
private java.lang.Object source_;
public SourceCase getSourceCase() {
return SourceCase.forNumber(sourceCase_);
}
public Builder clearSource() {
sourceCase_ = 0;
source_ = null;
onChanged();
return this;
}
/**
*
*
*
* The raw text to be synthesized.
*
*
* string text = 1;
*
* @return Whether the text field is set.
*/
@java.lang.Override
public boolean hasText() {
return sourceCase_ == 1;
}
/**
*
*
*
* The raw text to be synthesized.
*
*
* string text = 1;
*
* @return The text.
*/
@java.lang.Override
public java.lang.String getText() {
java.lang.Object ref = "";
if (sourceCase_ == 1) {
ref = source_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (sourceCase_ == 1) {
source_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The raw text to be synthesized.
*
*
* string text = 1;
*
* @return The bytes for text.
*/
@java.lang.Override
public com.google.protobuf.ByteString getTextBytes() {
java.lang.Object ref = "";
if (sourceCase_ == 1) {
ref = source_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
if (sourceCase_ == 1) {
source_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The raw text to be synthesized.
*
*
* string text = 1;
*
* @param value The text to set.
* @return This builder for chaining.
*/
public Builder setText(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
sourceCase_ = 1;
source_ = value;
onChanged();
return this;
}
/**
*
*
*
* The raw text to be synthesized.
*
*
* string text = 1;
*
* @return This builder for chaining.
*/
public Builder clearText() {
if (sourceCase_ == 1) {
sourceCase_ = 0;
source_ = null;
onChanged();
}
return this;
}
/**
*
*
*
* The raw text to be synthesized.
*
*
* string text = 1;
*
* @param value The bytes for text to set.
* @return This builder for chaining.
*/
public Builder setTextBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
sourceCase_ = 1;
source_ = value;
onChanged();
return this;
}
/**
*
*
*
* The SSML text to be synthesized. For more information, see
* [SSML](/speech/text-to-speech/docs/ssml).
*
*
* string ssml = 2;
*
* @return Whether the ssml field is set.
*/
@java.lang.Override
public boolean hasSsml() {
return sourceCase_ == 2;
}
/**
*
*
*
* The SSML text to be synthesized. For more information, see
* [SSML](/speech/text-to-speech/docs/ssml).
*
*
* string ssml = 2;
*
* @return The ssml.
*/
@java.lang.Override
public java.lang.String getSsml() {
java.lang.Object ref = "";
if (sourceCase_ == 2) {
ref = source_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (sourceCase_ == 2) {
source_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The SSML text to be synthesized. For more information, see
* [SSML](/speech/text-to-speech/docs/ssml).
*
*
* string ssml = 2;
*
* @return The bytes for ssml.
*/
@java.lang.Override
public com.google.protobuf.ByteString getSsmlBytes() {
java.lang.Object ref = "";
if (sourceCase_ == 2) {
ref = source_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
if (sourceCase_ == 2) {
source_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The SSML text to be synthesized. For more information, see
* [SSML](/speech/text-to-speech/docs/ssml).
*
*
* string ssml = 2;
*
* @param value The ssml to set.
* @return This builder for chaining.
*/
public Builder setSsml(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
sourceCase_ = 2;
source_ = value;
onChanged();
return this;
}
/**
*
*
*
* The SSML text to be synthesized. For more information, see
* [SSML](/speech/text-to-speech/docs/ssml).
*
*
* string ssml = 2;
*
* @return This builder for chaining.
*/
public Builder clearSsml() {
if (sourceCase_ == 2) {
sourceCase_ = 0;
source_ = null;
onChanged();
}
return this;
}
/**
*
*
*
* The SSML text to be synthesized. For more information, see
* [SSML](/speech/text-to-speech/docs/ssml).
*
*
* string ssml = 2;
*
* @param value The bytes for ssml to set.
* @return This builder for chaining.
*/
public Builder setSsmlBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
sourceCase_ = 2;
source_ = value;
onChanged();
return this;
}
private boolean allowPlaybackInterruption_;
/**
*
*
*
* Output only. Whether the playback of this message can be interrupted by the end
* user's speech and the client can then starts the next Dialogflow
* request.
*
*
* bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The allowPlaybackInterruption.
*/
@java.lang.Override
public boolean getAllowPlaybackInterruption() {
return allowPlaybackInterruption_;
}
/**
*
*
*
* Output only. Whether the playback of this message can be interrupted by the end
* user's speech and the client can then starts the next Dialogflow
* request.
*
*
* bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The allowPlaybackInterruption to set.
* @return This builder for chaining.
*/
public Builder setAllowPlaybackInterruption(boolean value) {
allowPlaybackInterruption_ = value;
onChanged();
return this;
}
/**
*
*
*
* Output only. Whether the playback of this message can be interrupted by the end
* user's speech and the client can then starts the next Dialogflow
* request.
*
*
* bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return This builder for chaining.
*/
public Builder clearAllowPlaybackInterruption() {
allowPlaybackInterruption_ = 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.ResponseMessage.OutputAudioText)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText)
private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText();
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public OutputAudioText parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new OutputAudioText(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.ResponseMessage.OutputAudioText
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface EndInteractionOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction)
com.google.protobuf.MessageOrBuilder {}
/**
*
*
*
* Indicates that interaction with the Dialogflow agent has ended.
* This message is generated by Dialogflow only and not supposed to be
* defined by the user.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction}
*/
public static final class EndInteraction extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction)
EndInteractionOrBuilder {
private static final long serialVersionUID = 0L;
// Use EndInteraction.newBuilder() to construct.
private EndInteraction(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private EndInteraction() {}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new EndInteraction();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private EndInteraction(
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;
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.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.class,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.Builder.class);
}
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 {
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
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.ResponseMessage.EndInteraction)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction other =
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) obj;
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 = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction 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.ResponseMessage.EndInteraction parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction 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.ResponseMessage.EndInteraction parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction 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.ResponseMessage.EndInteraction 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.ResponseMessage.EndInteraction 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.ResponseMessage.EndInteraction
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.ResponseMessage.EndInteraction
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.ResponseMessage.EndInteraction 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.ResponseMessage.EndInteraction 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.ResponseMessage.EndInteraction 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;
}
/**
*
*
*
* Indicates that interaction with the Dialogflow agent has ended.
* This message is generated by Dialogflow only and not supposed to be
* defined by the user.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction)
com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteractionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.class,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.Builder.class);
}
// Construct using
// com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.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();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_EndInteraction_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction build() {
com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction buildPartial() {
com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction result =
new com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction(this);
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.ResponseMessage.EndInteraction) {
return mergeFrom(
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction other) {
if (other
== com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction
.getDefaultInstance()) return this;
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.ResponseMessage.EndInteraction parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction)
e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
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.ResponseMessage.EndInteraction)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction)
private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction();
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public EndInteraction parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new EndInteraction(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.ResponseMessage.EndInteraction
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface PlayAudioOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Required. URI of the audio clip. Dialogflow does not impose any validation on this
* value. It is specific to the client that reads it.
*
*
* string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The audioUri.
*/
java.lang.String getAudioUri();
/**
*
*
*
* Required. URI of the audio clip. Dialogflow does not impose any validation on this
* value. It is specific to the client that reads it.
*
*
* string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for audioUri.
*/
com.google.protobuf.ByteString getAudioUriBytes();
/**
*
*
*
* Output only. Whether the playback of this message can be interrupted by the end
* user's speech and the client can then starts the next Dialogflow
* request.
*
*
* bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The allowPlaybackInterruption.
*/
boolean getAllowPlaybackInterruption();
}
/**
*
*
*
* Specifies an audio clip to be played by the client as part of the response.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio}
*/
public static final class PlayAudio extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio)
PlayAudioOrBuilder {
private static final long serialVersionUID = 0L;
// Use PlayAudio.newBuilder() to construct.
private PlayAudio(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PlayAudio() {
audioUri_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new PlayAudio();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private PlayAudio(
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();
audioUri_ = s;
break;
}
case 16:
{
allowPlaybackInterruption_ = 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.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.class,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.Builder.class);
}
public static final int AUDIO_URI_FIELD_NUMBER = 1;
private volatile java.lang.Object audioUri_;
/**
*
*
*
* Required. URI of the audio clip. Dialogflow does not impose any validation on this
* value. It is specific to the client that reads it.
*
*
* string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The audioUri.
*/
@java.lang.Override
public java.lang.String getAudioUri() {
java.lang.Object ref = audioUri_;
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();
audioUri_ = s;
return s;
}
}
/**
*
*
*
* Required. URI of the audio clip. Dialogflow does not impose any validation on this
* value. It is specific to the client that reads it.
*
*
* string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for audioUri.
*/
@java.lang.Override
public com.google.protobuf.ByteString getAudioUriBytes() {
java.lang.Object ref = audioUri_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
audioUri_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER = 2;
private boolean allowPlaybackInterruption_;
/**
*
*
*
* Output only. Whether the playback of this message can be interrupted by the end
* user's speech and the client can then starts the next Dialogflow
* request.
*
*
* bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The allowPlaybackInterruption.
*/
@java.lang.Override
public boolean getAllowPlaybackInterruption() {
return allowPlaybackInterruption_;
}
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 (!getAudioUriBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, audioUri_);
}
if (allowPlaybackInterruption_ != false) {
output.writeBool(2, allowPlaybackInterruption_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getAudioUriBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, audioUri_);
}
if (allowPlaybackInterruption_ != false) {
size +=
com.google.protobuf.CodedOutputStream.computeBoolSize(2, allowPlaybackInterruption_);
}
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.ResponseMessage.PlayAudio)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio other =
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) obj;
if (!getAudioUri().equals(other.getAudioUri())) return false;
if (getAllowPlaybackInterruption() != other.getAllowPlaybackInterruption()) 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) + AUDIO_URI_FIELD_NUMBER;
hash = (53 * hash) + getAudioUri().hashCode();
hash = (37 * hash) + ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowPlaybackInterruption());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio 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.ResponseMessage.PlayAudio parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio 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.ResponseMessage.PlayAudio parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio 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.ResponseMessage.PlayAudio 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.ResponseMessage.PlayAudio 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.ResponseMessage.PlayAudio 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.ResponseMessage.PlayAudio 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.ResponseMessage.PlayAudio 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.ResponseMessage.PlayAudio 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.ResponseMessage.PlayAudio 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;
}
/**
*
*
*
* Specifies an audio clip to be played by the client as part of the response.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio)
com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudioOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.class,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.Builder.class);
}
// Construct using com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.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();
audioUri_ = "";
allowPlaybackInterruption_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_PlayAudio_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio build() {
com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio buildPartial() {
com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio result =
new com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio(this);
result.audioUri_ = audioUri_;
result.allowPlaybackInterruption_ = allowPlaybackInterruption_;
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.ResponseMessage.PlayAudio) {
return mergeFrom((com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio other) {
if (other
== com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.getDefaultInstance())
return this;
if (!other.getAudioUri().isEmpty()) {
audioUri_ = other.audioUri_;
onChanged();
}
if (other.getAllowPlaybackInterruption() != false) {
setAllowPlaybackInterruption(other.getAllowPlaybackInterruption());
}
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.ResponseMessage.PlayAudio parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio)
e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object audioUri_ = "";
/**
*
*
*
* Required. URI of the audio clip. Dialogflow does not impose any validation on this
* value. It is specific to the client that reads it.
*
*
* string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The audioUri.
*/
public java.lang.String getAudioUri() {
java.lang.Object ref = audioUri_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
audioUri_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. URI of the audio clip. Dialogflow does not impose any validation on this
* value. It is specific to the client that reads it.
*
*
* string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for audioUri.
*/
public com.google.protobuf.ByteString getAudioUriBytes() {
java.lang.Object ref = audioUri_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
audioUri_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. URI of the audio clip. Dialogflow does not impose any validation on this
* value. It is specific to the client that reads it.
*
*
* string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The audioUri to set.
* @return This builder for chaining.
*/
public Builder setAudioUri(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
audioUri_ = value;
onChanged();
return this;
}
/**
*
*
*
* Required. URI of the audio clip. Dialogflow does not impose any validation on this
* value. It is specific to the client that reads it.
*
*
* string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearAudioUri() {
audioUri_ = getDefaultInstance().getAudioUri();
onChanged();
return this;
}
/**
*
*
*
* Required. URI of the audio clip. Dialogflow does not impose any validation on this
* value. It is specific to the client that reads it.
*
*
* string audio_uri = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for audioUri to set.
* @return This builder for chaining.
*/
public Builder setAudioUriBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
audioUri_ = value;
onChanged();
return this;
}
private boolean allowPlaybackInterruption_;
/**
*
*
*
* Output only. Whether the playback of this message can be interrupted by the end
* user's speech and the client can then starts the next Dialogflow
* request.
*
*
* bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The allowPlaybackInterruption.
*/
@java.lang.Override
public boolean getAllowPlaybackInterruption() {
return allowPlaybackInterruption_;
}
/**
*
*
*
* Output only. Whether the playback of this message can be interrupted by the end
* user's speech and the client can then starts the next Dialogflow
* request.
*
*
* bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The allowPlaybackInterruption to set.
* @return This builder for chaining.
*/
public Builder setAllowPlaybackInterruption(boolean value) {
allowPlaybackInterruption_ = value;
onChanged();
return this;
}
/**
*
*
*
* Output only. Whether the playback of this message can be interrupted by the end
* user's speech and the client can then starts the next Dialogflow
* request.
*
*
* bool allow_playback_interruption = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return This builder for chaining.
*/
public Builder clearAllowPlaybackInterruption() {
allowPlaybackInterruption_ = 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.ResponseMessage.PlayAudio)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio)
private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio();
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PlayAudio parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new PlayAudio(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.ResponseMessage.PlayAudio getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface MixedAudioOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Segments this audio response is composed of.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1;
*
*/
java.util.List
getSegmentsList();
/**
*
*
*
* Segments this audio response is composed of.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1;
*
*/
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment getSegments(int index);
/**
*
*
*
* Segments this audio response is composed of.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1;
*
*/
int getSegmentsCount();
/**
*
*
*
* Segments this audio response is composed of.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1;
*
*/
java.util.List<
? extends com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder>
getSegmentsOrBuilderList();
/**
*
*
*
* Segments this audio response is composed of.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1;
*
*/
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder
getSegmentsOrBuilder(int index);
}
/**
*
*
*
* Represents an audio message that is composed of both segments
* synthesized from the Dialogflow agent prompts and ones hosted externally
* at the specified URIs.
* The external URIs are specified via
* [play_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.play_audio].
* This message is generated by Dialogflow only and not supposed to be
* defined by the user.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio}
*/
public static final class MixedAudio extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio)
MixedAudioOrBuilder {
private static final long serialVersionUID = 0L;
// Use MixedAudio.newBuilder() to construct.
private MixedAudio(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private MixedAudio() {
segments_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new MixedAudio();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private MixedAudio(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
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:
{
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
segments_ =
new java.util.ArrayList<
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment>();
mutable_bitField0_ |= 0x00000001;
}
segments_.add(
input.readMessage(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment
.parser(),
extensionRegistry));
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 {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
segments_ = java.util.Collections.unmodifiableList(segments_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.class,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Builder.class);
}
public interface SegmentOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Raw audio synthesized from the Dialogflow agent's response using
* the output config specified in the request.
*
*
* bytes audio = 1;
*
* @return Whether the audio field is set.
*/
boolean hasAudio();
/**
*
*
*
* Raw audio synthesized from the Dialogflow agent's response using
* the output config specified in the request.
*
*
* bytes audio = 1;
*
* @return The audio.
*/
com.google.protobuf.ByteString getAudio();
/**
*
*
*
* Client-specific URI that points to an audio clip accessible to the
* client. Dialogflow does not impose any validation on it.
*
*
* string uri = 2;
*
* @return Whether the uri field is set.
*/
boolean hasUri();
/**
*
*
*
* Client-specific URI that points to an audio clip accessible to the
* client. Dialogflow does not impose any validation on it.
*
*
* string uri = 2;
*
* @return The uri.
*/
java.lang.String getUri();
/**
*
*
*
* Client-specific URI that points to an audio clip accessible to the
* client. Dialogflow does not impose any validation on it.
*
*
* string uri = 2;
*
* @return The bytes for uri.
*/
com.google.protobuf.ByteString getUriBytes();
/**
*
*
*
* Output only. Whether the playback of this segment can be interrupted by the end
* user's speech and the client should then start the next Dialogflow
* request.
*
*
* bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The allowPlaybackInterruption.
*/
boolean getAllowPlaybackInterruption();
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.ContentCase
getContentCase();
}
/**
*
*
*
* Represents one segment of audio.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment}
*/
public static final class Segment extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment)
SegmentOrBuilder {
private static final long serialVersionUID = 0L;
// Use Segment.newBuilder() to construct.
private Segment(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Segment() {}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Segment();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private Segment(
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:
{
contentCase_ = 1;
content_ = input.readBytes();
break;
}
case 18:
{
java.lang.String s = input.readStringRequireUtf8();
contentCase_ = 2;
content_ = s;
break;
}
case 24:
{
allowPlaybackInterruption_ = 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.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_Segment_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_Segment_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.class,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder.class);
}
private int contentCase_ = 0;
private java.lang.Object content_;
public enum ContentCase
implements
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
AUDIO(1),
URI(2),
CONTENT_NOT_SET(0);
private final int value;
private ContentCase(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 ContentCase valueOf(int value) {
return forNumber(value);
}
public static ContentCase forNumber(int value) {
switch (value) {
case 1:
return AUDIO;
case 2:
return URI;
case 0:
return CONTENT_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public ContentCase getContentCase() {
return ContentCase.forNumber(contentCase_);
}
public static final int AUDIO_FIELD_NUMBER = 1;
/**
*
*
*
* Raw audio synthesized from the Dialogflow agent's response using
* the output config specified in the request.
*
*
* bytes audio = 1;
*
* @return Whether the audio field is set.
*/
@java.lang.Override
public boolean hasAudio() {
return contentCase_ == 1;
}
/**
*
*
*
* Raw audio synthesized from the Dialogflow agent's response using
* the output config specified in the request.
*
*
* bytes audio = 1;
*
* @return The audio.
*/
@java.lang.Override
public com.google.protobuf.ByteString getAudio() {
if (contentCase_ == 1) {
return (com.google.protobuf.ByteString) content_;
}
return com.google.protobuf.ByteString.EMPTY;
}
public static final int URI_FIELD_NUMBER = 2;
/**
*
*
*
* Client-specific URI that points to an audio clip accessible to the
* client. Dialogflow does not impose any validation on it.
*
*
* string uri = 2;
*
* @return Whether the uri field is set.
*/
public boolean hasUri() {
return contentCase_ == 2;
}
/**
*
*
*
* Client-specific URI that points to an audio clip accessible to the
* client. Dialogflow does not impose any validation on it.
*
*
* string uri = 2;
*
* @return The uri.
*/
public java.lang.String getUri() {
java.lang.Object ref = "";
if (contentCase_ == 2) {
ref = content_;
}
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (contentCase_ == 2) {
content_ = s;
}
return s;
}
}
/**
*
*
*
* Client-specific URI that points to an audio clip accessible to the
* client. Dialogflow does not impose any validation on it.
*
*
* string uri = 2;
*
* @return The bytes for uri.
*/
public com.google.protobuf.ByteString getUriBytes() {
java.lang.Object ref = "";
if (contentCase_ == 2) {
ref = content_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
if (contentCase_ == 2) {
content_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER = 3;
private boolean allowPlaybackInterruption_;
/**
*
*
*
* Output only. Whether the playback of this segment can be interrupted by the end
* user's speech and the client should then start the next Dialogflow
* request.
*
*
* bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The allowPlaybackInterruption.
*/
@java.lang.Override
public boolean getAllowPlaybackInterruption() {
return allowPlaybackInterruption_;
}
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 (contentCase_ == 1) {
output.writeBytes(1, (com.google.protobuf.ByteString) content_);
}
if (contentCase_ == 2) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, content_);
}
if (allowPlaybackInterruption_ != false) {
output.writeBool(3, allowPlaybackInterruption_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (contentCase_ == 1) {
size +=
com.google.protobuf.CodedOutputStream.computeBytesSize(
1, (com.google.protobuf.ByteString) content_);
}
if (contentCase_ == 2) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, content_);
}
if (allowPlaybackInterruption_ != false) {
size +=
com.google.protobuf.CodedOutputStream.computeBoolSize(3, allowPlaybackInterruption_);
}
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.ResponseMessage.MixedAudio.Segment)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment other =
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) obj;
if (getAllowPlaybackInterruption() != other.getAllowPlaybackInterruption()) return false;
if (!getContentCase().equals(other.getContentCase())) return false;
switch (contentCase_) {
case 1:
if (!getAudio().equals(other.getAudio())) return false;
break;
case 2:
if (!getUri().equals(other.getUri())) return false;
break;
case 0:
default:
}
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) + ALLOW_PLAYBACK_INTERRUPTION_FIELD_NUMBER;
hash =
(53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowPlaybackInterruption());
switch (contentCase_) {
case 1:
hash = (37 * hash) + AUDIO_FIELD_NUMBER;
hash = (53 * hash) + getAudio().hashCode();
break;
case 2:
hash = (37 * hash) + URI_FIELD_NUMBER;
hash = (53 * hash) + getUri().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment 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.ResponseMessage.MixedAudio.Segment parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment 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.ResponseMessage.MixedAudio.Segment parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment 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.ResponseMessage.MixedAudio.Segment 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.ResponseMessage.MixedAudio.Segment 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.ResponseMessage.MixedAudio.Segment
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.ResponseMessage.MixedAudio.Segment
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.ResponseMessage.MixedAudio.Segment 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.ResponseMessage.MixedAudio.Segment 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.ResponseMessage.MixedAudio.Segment 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;
}
/**
*
*
*
* Represents one segment of audio.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment)
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_Segment_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_Segment_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.class,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder
.class);
}
// Construct using
// com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.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();
allowPlaybackInterruption_ = false;
contentCase_ = 0;
content_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_Segment_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment build() {
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment buildPartial() {
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment result =
new com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment(this);
if (contentCase_ == 1) {
result.content_ = content_;
}
if (contentCase_ == 2) {
result.content_ = content_;
}
result.allowPlaybackInterruption_ = allowPlaybackInterruption_;
result.contentCase_ = contentCase_;
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.ResponseMessage.MixedAudio.Segment) {
return mergeFrom(
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment other) {
if (other
== com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment
.getDefaultInstance()) return this;
if (other.getAllowPlaybackInterruption() != false) {
setAllowPlaybackInterruption(other.getAllowPlaybackInterruption());
}
switch (other.getContentCase()) {
case AUDIO:
{
setAudio(other.getAudio());
break;
}
case URI:
{
contentCase_ = 2;
content_ = other.content_;
onChanged();
break;
}
case CONTENT_NOT_SET:
{
break;
}
}
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.ResponseMessage.MixedAudio.Segment parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment)
e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int contentCase_ = 0;
private java.lang.Object content_;
public ContentCase getContentCase() {
return ContentCase.forNumber(contentCase_);
}
public Builder clearContent() {
contentCase_ = 0;
content_ = null;
onChanged();
return this;
}
/**
*
*
*
* Raw audio synthesized from the Dialogflow agent's response using
* the output config specified in the request.
*
*
* bytes audio = 1;
*
* @return Whether the audio field is set.
*/
public boolean hasAudio() {
return contentCase_ == 1;
}
/**
*
*
*
* Raw audio synthesized from the Dialogflow agent's response using
* the output config specified in the request.
*
*
* bytes audio = 1;
*
* @return The audio.
*/
public com.google.protobuf.ByteString getAudio() {
if (contentCase_ == 1) {
return (com.google.protobuf.ByteString) content_;
}
return com.google.protobuf.ByteString.EMPTY;
}
/**
*
*
*
* Raw audio synthesized from the Dialogflow agent's response using
* the output config specified in the request.
*
*
* bytes audio = 1;
*
* @param value The audio to set.
* @return This builder for chaining.
*/
public Builder setAudio(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
contentCase_ = 1;
content_ = value;
onChanged();
return this;
}
/**
*
*
*
* Raw audio synthesized from the Dialogflow agent's response using
* the output config specified in the request.
*
*
* bytes audio = 1;
*
* @return This builder for chaining.
*/
public Builder clearAudio() {
if (contentCase_ == 1) {
contentCase_ = 0;
content_ = null;
onChanged();
}
return this;
}
/**
*
*
*
* Client-specific URI that points to an audio clip accessible to the
* client. Dialogflow does not impose any validation on it.
*
*
* string uri = 2;
*
* @return Whether the uri field is set.
*/
@java.lang.Override
public boolean hasUri() {
return contentCase_ == 2;
}
/**
*
*
*
* Client-specific URI that points to an audio clip accessible to the
* client. Dialogflow does not impose any validation on it.
*
*
* string uri = 2;
*
* @return The uri.
*/
@java.lang.Override
public java.lang.String getUri() {
java.lang.Object ref = "";
if (contentCase_ == 2) {
ref = content_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (contentCase_ == 2) {
content_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Client-specific URI that points to an audio clip accessible to the
* client. Dialogflow does not impose any validation on it.
*
*
* string uri = 2;
*
* @return The bytes for uri.
*/
@java.lang.Override
public com.google.protobuf.ByteString getUriBytes() {
java.lang.Object ref = "";
if (contentCase_ == 2) {
ref = content_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
if (contentCase_ == 2) {
content_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Client-specific URI that points to an audio clip accessible to the
* client. Dialogflow does not impose any validation on it.
*
*
* string uri = 2;
*
* @param value The uri to set.
* @return This builder for chaining.
*/
public Builder setUri(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
contentCase_ = 2;
content_ = value;
onChanged();
return this;
}
/**
*
*
*
* Client-specific URI that points to an audio clip accessible to the
* client. Dialogflow does not impose any validation on it.
*
*
* string uri = 2;
*
* @return This builder for chaining.
*/
public Builder clearUri() {
if (contentCase_ == 2) {
contentCase_ = 0;
content_ = null;
onChanged();
}
return this;
}
/**
*
*
*
* Client-specific URI that points to an audio clip accessible to the
* client. Dialogflow does not impose any validation on it.
*
*
* string uri = 2;
*
* @param value The bytes for uri to set.
* @return This builder for chaining.
*/
public Builder setUriBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
contentCase_ = 2;
content_ = value;
onChanged();
return this;
}
private boolean allowPlaybackInterruption_;
/**
*
*
*
* Output only. Whether the playback of this segment can be interrupted by the end
* user's speech and the client should then start the next Dialogflow
* request.
*
*
* bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The allowPlaybackInterruption.
*/
@java.lang.Override
public boolean getAllowPlaybackInterruption() {
return allowPlaybackInterruption_;
}
/**
*
*
*
* Output only. Whether the playback of this segment can be interrupted by the end
* user's speech and the client should then start the next Dialogflow
* request.
*
*
* bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The allowPlaybackInterruption to set.
* @return This builder for chaining.
*/
public Builder setAllowPlaybackInterruption(boolean value) {
allowPlaybackInterruption_ = value;
onChanged();
return this;
}
/**
*
*
*
* Output only. Whether the playback of this segment can be interrupted by the end
* user's speech and the client should then start the next Dialogflow
* request.
*
*
* bool allow_playback_interruption = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return This builder for chaining.
*/
public Builder clearAllowPlaybackInterruption() {
allowPlaybackInterruption_ = 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.ResponseMessage.MixedAudio.Segment)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment)
private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment();
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Segment parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Segment(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.ResponseMessage.MixedAudio.Segment
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int SEGMENTS_FIELD_NUMBER = 1;
private java.util.List
segments_;
/**
*
*
*
* Segments this audio response is composed of.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1;
*
*/
@java.lang.Override
public java.util.List
getSegmentsList() {
return segments_;
}
/**
*
*
*
* Segments this audio response is composed of.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1;
*
*/
@java.lang.Override
public java.util.List<
? extends com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder>
getSegmentsOrBuilderList() {
return segments_;
}
/**
*
*
*
* Segments this audio response is composed of.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1;
*
*/
@java.lang.Override
public int getSegmentsCount() {
return segments_.size();
}
/**
*
*
*
* Segments this audio response is composed of.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment getSegments(
int index) {
return segments_.get(index);
}
/**
*
*
*
* Segments this audio response is composed of.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder
getSegmentsOrBuilder(int index) {
return segments_.get(index);
}
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 {
for (int i = 0; i < segments_.size(); i++) {
output.writeMessage(1, segments_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < segments_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, segments_.get(i));
}
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.ResponseMessage.MixedAudio)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio other =
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) obj;
if (!getSegmentsList().equals(other.getSegmentsList())) 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();
if (getSegmentsCount() > 0) {
hash = (37 * hash) + SEGMENTS_FIELD_NUMBER;
hash = (53 * hash) + getSegmentsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio 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.ResponseMessage.MixedAudio parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio 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.ResponseMessage.MixedAudio parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio 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.ResponseMessage.MixedAudio 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.ResponseMessage.MixedAudio 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.ResponseMessage.MixedAudio 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.ResponseMessage.MixedAudio 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.ResponseMessage.MixedAudio 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.ResponseMessage.MixedAudio 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.ResponseMessage.MixedAudio 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;
}
/**
*
*
*
* Represents an audio message that is composed of both segments
* synthesized from the Dialogflow agent prompts and ones hosted externally
* at the specified URIs.
* The external URIs are specified via
* [play_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.play_audio].
* This message is generated by Dialogflow only and not supposed to be
* defined by the user.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio)
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudioOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.class,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Builder.class);
}
// Construct using com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getSegmentsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (segmentsBuilder_ == null) {
segments_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
segmentsBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_MixedAudio_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio build() {
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio buildPartial() {
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio result =
new com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio(this);
int from_bitField0_ = bitField0_;
if (segmentsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
segments_ = java.util.Collections.unmodifiableList(segments_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.segments_ = segments_;
} else {
result.segments_ = segmentsBuilder_.build();
}
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.ResponseMessage.MixedAudio) {
return mergeFrom((com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio other) {
if (other
== com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.getDefaultInstance())
return this;
if (segmentsBuilder_ == null) {
if (!other.segments_.isEmpty()) {
if (segments_.isEmpty()) {
segments_ = other.segments_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureSegmentsIsMutable();
segments_.addAll(other.segments_);
}
onChanged();
}
} else {
if (!other.segments_.isEmpty()) {
if (segmentsBuilder_.isEmpty()) {
segmentsBuilder_.dispose();
segmentsBuilder_ = null;
segments_ = other.segments_;
bitField0_ = (bitField0_ & ~0x00000001);
segmentsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getSegmentsFieldBuilder()
: null;
} else {
segmentsBuilder_.addAllMessages(other.segments_);
}
}
}
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.ResponseMessage.MixedAudio parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio)
e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List
segments_ = java.util.Collections.emptyList();
private void ensureSegmentsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
segments_ =
new java.util.ArrayList<
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment>(segments_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder>
segmentsBuilder_;
/**
*
*
*
* Segments this audio response is composed of.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1;
*
*/
public java.util.List
getSegmentsList() {
if (segmentsBuilder_ == null) {
return java.util.Collections.unmodifiableList(segments_);
} else {
return segmentsBuilder_.getMessageList();
}
}
/**
*
*
*
* Segments this audio response is composed of.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1;
*
*/
public int getSegmentsCount() {
if (segmentsBuilder_ == null) {
return segments_.size();
} else {
return segmentsBuilder_.getCount();
}
}
/**
*
*
*
* Segments this audio response is composed of.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1;
*
*/
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment getSegments(
int index) {
if (segmentsBuilder_ == null) {
return segments_.get(index);
} else {
return segmentsBuilder_.getMessage(index);
}
}
/**
*
*
*
* Segments this audio response is composed of.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1;
*
*/
public Builder setSegments(
int index, com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment value) {
if (segmentsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSegmentsIsMutable();
segments_.set(index, value);
onChanged();
} else {
segmentsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Segments this audio response is composed of.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1;
*
*/
public Builder setSegments(
int index,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder
builderForValue) {
if (segmentsBuilder_ == null) {
ensureSegmentsIsMutable();
segments_.set(index, builderForValue.build());
onChanged();
} else {
segmentsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Segments this audio response is composed of.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1;
*
*/
public Builder addSegments(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment value) {
if (segmentsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSegmentsIsMutable();
segments_.add(value);
onChanged();
} else {
segmentsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Segments this audio response is composed of.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1;
*
*/
public Builder addSegments(
int index, com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment value) {
if (segmentsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSegmentsIsMutable();
segments_.add(index, value);
onChanged();
} else {
segmentsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Segments this audio response is composed of.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1;
*
*/
public Builder addSegments(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder
builderForValue) {
if (segmentsBuilder_ == null) {
ensureSegmentsIsMutable();
segments_.add(builderForValue.build());
onChanged();
} else {
segmentsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Segments this audio response is composed of.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1;
*
*/
public Builder addSegments(
int index,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder
builderForValue) {
if (segmentsBuilder_ == null) {
ensureSegmentsIsMutable();
segments_.add(index, builderForValue.build());
onChanged();
} else {
segmentsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Segments this audio response is composed of.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1;
*
*/
public Builder addAllSegments(
java.lang.Iterable<
? extends com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment>
values) {
if (segmentsBuilder_ == null) {
ensureSegmentsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, segments_);
onChanged();
} else {
segmentsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Segments this audio response is composed of.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1;
*
*/
public Builder clearSegments() {
if (segmentsBuilder_ == null) {
segments_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
segmentsBuilder_.clear();
}
return this;
}
/**
*
*
*
* Segments this audio response is composed of.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1;
*
*/
public Builder removeSegments(int index) {
if (segmentsBuilder_ == null) {
ensureSegmentsIsMutable();
segments_.remove(index);
onChanged();
} else {
segmentsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Segments this audio response is composed of.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1;
*
*/
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder
getSegmentsBuilder(int index) {
return getSegmentsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Segments this audio response is composed of.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1;
*
*/
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder
getSegmentsOrBuilder(int index) {
if (segmentsBuilder_ == null) {
return segments_.get(index);
} else {
return segmentsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Segments this audio response is composed of.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1;
*
*/
public java.util.List<
? extends
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder>
getSegmentsOrBuilderList() {
if (segmentsBuilder_ != null) {
return segmentsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(segments_);
}
}
/**
*
*
*
* Segments this audio response is composed of.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1;
*
*/
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder
addSegmentsBuilder() {
return getSegmentsFieldBuilder()
.addBuilder(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment
.getDefaultInstance());
}
/**
*
*
*
* Segments this audio response is composed of.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1;
*
*/
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder
addSegmentsBuilder(int index) {
return getSegmentsFieldBuilder()
.addBuilder(
index,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment
.getDefaultInstance());
}
/**
*
*
*
* Segments this audio response is composed of.
*
*
*
* repeated .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment segments = 1;
*
*/
public java.util.List<
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder>
getSegmentsBuilderList() {
return getSegmentsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder>
getSegmentsFieldBuilder() {
if (segmentsBuilder_ == null) {
segmentsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Segment.Builder,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.SegmentOrBuilder>(
segments_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
segments_ = null;
}
return segmentsBuilder_;
}
@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.ResponseMessage.MixedAudio)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio)
private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio();
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public MixedAudio parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new MixedAudio(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.ResponseMessage.MixedAudio
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int messageCase_ = 0;
private java.lang.Object message_;
public enum MessageCase
implements
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
TEXT(1),
PAYLOAD(2),
CONVERSATION_SUCCESS(9),
OUTPUT_AUDIO_TEXT(8),
LIVE_AGENT_HANDOFF(10),
END_INTERACTION(11),
PLAY_AUDIO(12),
MIXED_AUDIO(13),
MESSAGE_NOT_SET(0);
private final int value;
private MessageCase(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 MessageCase valueOf(int value) {
return forNumber(value);
}
public static MessageCase forNumber(int value) {
switch (value) {
case 1:
return TEXT;
case 2:
return PAYLOAD;
case 9:
return CONVERSATION_SUCCESS;
case 8:
return OUTPUT_AUDIO_TEXT;
case 10:
return LIVE_AGENT_HANDOFF;
case 11:
return END_INTERACTION;
case 12:
return PLAY_AUDIO;
case 13:
return MIXED_AUDIO;
case 0:
return MESSAGE_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public MessageCase getMessageCase() {
return MessageCase.forNumber(messageCase_);
}
public static final int TEXT_FIELD_NUMBER = 1;
/**
*
*
*
* Returns a text response.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text = 1;
*
* @return Whether the text field is set.
*/
@java.lang.Override
public boolean hasText() {
return messageCase_ == 1;
}
/**
*
*
*
* Returns a text response.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text = 1;
*
* @return The text.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text getText() {
if (messageCase_ == 1) {
return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text) message_;
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.getDefaultInstance();
}
/**
*
*
*
* Returns a text response.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text = 1;
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.TextOrBuilder getTextOrBuilder() {
if (messageCase_ == 1) {
return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text) message_;
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.getDefaultInstance();
}
public static final int PAYLOAD_FIELD_NUMBER = 2;
/**
*
*
*
* Returns a response containing a custom, platform-specific payload.
*
*
* .google.protobuf.Struct payload = 2;
*
* @return Whether the payload field is set.
*/
@java.lang.Override
public boolean hasPayload() {
return messageCase_ == 2;
}
/**
*
*
*
* Returns a response containing a custom, platform-specific payload.
*
*
* .google.protobuf.Struct payload = 2;
*
* @return The payload.
*/
@java.lang.Override
public com.google.protobuf.Struct getPayload() {
if (messageCase_ == 2) {
return (com.google.protobuf.Struct) message_;
}
return com.google.protobuf.Struct.getDefaultInstance();
}
/**
*
*
*
* Returns a response containing a custom, platform-specific payload.
*
*
* .google.protobuf.Struct payload = 2;
*/
@java.lang.Override
public com.google.protobuf.StructOrBuilder getPayloadOrBuilder() {
if (messageCase_ == 2) {
return (com.google.protobuf.Struct) message_;
}
return com.google.protobuf.Struct.getDefaultInstance();
}
public static final int CONVERSATION_SUCCESS_FIELD_NUMBER = 9;
/**
*
*
*
* Indicates that the conversation succeeded.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess conversation_success = 9;
*
*
* @return Whether the conversationSuccess field is set.
*/
@java.lang.Override
public boolean hasConversationSuccess() {
return messageCase_ == 9;
}
/**
*
*
*
* Indicates that the conversation succeeded.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess conversation_success = 9;
*
*
* @return The conversationSuccess.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess
getConversationSuccess() {
if (messageCase_ == 9) {
return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess) message_;
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess
.getDefaultInstance();
}
/**
*
*
*
* Indicates that the conversation succeeded.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess conversation_success = 9;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccessOrBuilder
getConversationSuccessOrBuilder() {
if (messageCase_ == 9) {
return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess) message_;
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess
.getDefaultInstance();
}
public static final int OUTPUT_AUDIO_TEXT_FIELD_NUMBER = 8;
/**
*
*
*
* A text or ssml response that is preferentially used for TTS output audio
* synthesis, as described in the comment on the ResponseMessage message.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText output_audio_text = 8;
*
*
* @return Whether the outputAudioText field is set.
*/
@java.lang.Override
public boolean hasOutputAudioText() {
return messageCase_ == 8;
}
/**
*
*
*
* A text or ssml response that is preferentially used for TTS output audio
* synthesis, as described in the comment on the ResponseMessage message.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText output_audio_text = 8;
*
*
* @return The outputAudioText.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText getOutputAudioText() {
if (messageCase_ == 8) {
return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText) message_;
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.getDefaultInstance();
}
/**
*
*
*
* A text or ssml response that is preferentially used for TTS output audio
* synthesis, as described in the comment on the ResponseMessage message.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText output_audio_text = 8;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioTextOrBuilder
getOutputAudioTextOrBuilder() {
if (messageCase_ == 8) {
return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText) message_;
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.getDefaultInstance();
}
public static final int LIVE_AGENT_HANDOFF_FIELD_NUMBER = 10;
/**
*
*
*
* Hands off conversation to a human agent.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff live_agent_handoff = 10;
*
*
* @return Whether the liveAgentHandoff field is set.
*/
@java.lang.Override
public boolean hasLiveAgentHandoff() {
return messageCase_ == 10;
}
/**
*
*
*
* Hands off conversation to a human agent.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff live_agent_handoff = 10;
*
*
* @return The liveAgentHandoff.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff getLiveAgentHandoff() {
if (messageCase_ == 10) {
return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff) message_;
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.getDefaultInstance();
}
/**
*
*
*
* Hands off conversation to a human agent.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff live_agent_handoff = 10;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoffOrBuilder
getLiveAgentHandoffOrBuilder() {
if (messageCase_ == 10) {
return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff) message_;
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.getDefaultInstance();
}
public static final int END_INTERACTION_FIELD_NUMBER = 11;
/**
*
*
*
* Output only. A signal that indicates the interaction with the Dialogflow agent has
* ended.
* This message is generated by Dialogflow only when the conversation
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
* It's guaranteed that there is at most one such message in each response.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction end_interaction = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the endInteraction field is set.
*/
@java.lang.Override
public boolean hasEndInteraction() {
return messageCase_ == 11;
}
/**
*
*
*
* Output only. A signal that indicates the interaction with the Dialogflow agent has
* ended.
* This message is generated by Dialogflow only when the conversation
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
* It's guaranteed that there is at most one such message in each response.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction end_interaction = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The endInteraction.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction getEndInteraction() {
if (messageCase_ == 11) {
return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) message_;
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.getDefaultInstance();
}
/**
*
*
*
* Output only. A signal that indicates the interaction with the Dialogflow agent has
* ended.
* This message is generated by Dialogflow only when the conversation
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
* It's guaranteed that there is at most one such message in each response.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction end_interaction = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteractionOrBuilder
getEndInteractionOrBuilder() {
if (messageCase_ == 11) {
return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) message_;
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.getDefaultInstance();
}
public static final int PLAY_AUDIO_FIELD_NUMBER = 12;
/**
*
*
*
* Signal that the client should play an audio clip hosted at a
* client-specific URI. Dialogflow uses this to construct
* [mixed_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.mixed_audio]. However, Dialogflow itself
* does not try to read or process the URI in any way.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio play_audio = 12;
*
* @return Whether the playAudio field is set.
*/
@java.lang.Override
public boolean hasPlayAudio() {
return messageCase_ == 12;
}
/**
*
*
*
* Signal that the client should play an audio clip hosted at a
* client-specific URI. Dialogflow uses this to construct
* [mixed_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.mixed_audio]. However, Dialogflow itself
* does not try to read or process the URI in any way.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio play_audio = 12;
*
* @return The playAudio.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio getPlayAudio() {
if (messageCase_ == 12) {
return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) message_;
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.getDefaultInstance();
}
/**
*
*
*
* Signal that the client should play an audio clip hosted at a
* client-specific URI. Dialogflow uses this to construct
* [mixed_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.mixed_audio]. However, Dialogflow itself
* does not try to read or process the URI in any way.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio play_audio = 12;
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudioOrBuilder
getPlayAudioOrBuilder() {
if (messageCase_ == 12) {
return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) message_;
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.getDefaultInstance();
}
public static final int MIXED_AUDIO_FIELD_NUMBER = 13;
/**
*
*
*
* Output only. An audio response message composed of both the synthesized Dialogflow
* agent responses and responses defined via
* [play_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.play_audio].
* This message is generated by Dialogflow only and not supposed to be
* defined by the user.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio mixed_audio = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the mixedAudio field is set.
*/
@java.lang.Override
public boolean hasMixedAudio() {
return messageCase_ == 13;
}
/**
*
*
*
* Output only. An audio response message composed of both the synthesized Dialogflow
* agent responses and responses defined via
* [play_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.play_audio].
* This message is generated by Dialogflow only and not supposed to be
* defined by the user.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio mixed_audio = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The mixedAudio.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio getMixedAudio() {
if (messageCase_ == 13) {
return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) message_;
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.getDefaultInstance();
}
/**
*
*
*
* Output only. An audio response message composed of both the synthesized Dialogflow
* agent responses and responses defined via
* [play_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.play_audio].
* This message is generated by Dialogflow only and not supposed to be
* defined by the user.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio mixed_audio = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudioOrBuilder
getMixedAudioOrBuilder() {
if (messageCase_ == 13) {
return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) message_;
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.getDefaultInstance();
}
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 (messageCase_ == 1) {
output.writeMessage(1, (com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text) message_);
}
if (messageCase_ == 2) {
output.writeMessage(2, (com.google.protobuf.Struct) message_);
}
if (messageCase_ == 8) {
output.writeMessage(
8, (com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText) message_);
}
if (messageCase_ == 9) {
output.writeMessage(
9, (com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess) message_);
}
if (messageCase_ == 10) {
output.writeMessage(
10, (com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff) message_);
}
if (messageCase_ == 11) {
output.writeMessage(
11, (com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) message_);
}
if (messageCase_ == 12) {
output.writeMessage(
12, (com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) message_);
}
if (messageCase_ == 13) {
output.writeMessage(
13, (com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) message_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (messageCase_ == 1) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
1, (com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text) message_);
}
if (messageCase_ == 2) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
2, (com.google.protobuf.Struct) message_);
}
if (messageCase_ == 8) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
8, (com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText) message_);
}
if (messageCase_ == 9) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
9, (com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess) message_);
}
if (messageCase_ == 10) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
10, (com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff) message_);
}
if (messageCase_ == 11) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
11, (com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) message_);
}
if (messageCase_ == 12) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
12, (com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) message_);
}
if (messageCase_ == 13) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
13, (com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) message_);
}
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.ResponseMessage)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.cx.v3.ResponseMessage other =
(com.google.cloud.dialogflow.cx.v3.ResponseMessage) obj;
if (!getMessageCase().equals(other.getMessageCase())) return false;
switch (messageCase_) {
case 1:
if (!getText().equals(other.getText())) return false;
break;
case 2:
if (!getPayload().equals(other.getPayload())) return false;
break;
case 9:
if (!getConversationSuccess().equals(other.getConversationSuccess())) return false;
break;
case 8:
if (!getOutputAudioText().equals(other.getOutputAudioText())) return false;
break;
case 10:
if (!getLiveAgentHandoff().equals(other.getLiveAgentHandoff())) return false;
break;
case 11:
if (!getEndInteraction().equals(other.getEndInteraction())) return false;
break;
case 12:
if (!getPlayAudio().equals(other.getPlayAudio())) return false;
break;
case 13:
if (!getMixedAudio().equals(other.getMixedAudio())) return false;
break;
case 0:
default:
}
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();
switch (messageCase_) {
case 1:
hash = (37 * hash) + TEXT_FIELD_NUMBER;
hash = (53 * hash) + getText().hashCode();
break;
case 2:
hash = (37 * hash) + PAYLOAD_FIELD_NUMBER;
hash = (53 * hash) + getPayload().hashCode();
break;
case 9:
hash = (37 * hash) + CONVERSATION_SUCCESS_FIELD_NUMBER;
hash = (53 * hash) + getConversationSuccess().hashCode();
break;
case 8:
hash = (37 * hash) + OUTPUT_AUDIO_TEXT_FIELD_NUMBER;
hash = (53 * hash) + getOutputAudioText().hashCode();
break;
case 10:
hash = (37 * hash) + LIVE_AGENT_HANDOFF_FIELD_NUMBER;
hash = (53 * hash) + getLiveAgentHandoff().hashCode();
break;
case 11:
hash = (37 * hash) + END_INTERACTION_FIELD_NUMBER;
hash = (53 * hash) + getEndInteraction().hashCode();
break;
case 12:
hash = (37 * hash) + PLAY_AUDIO_FIELD_NUMBER;
hash = (53 * hash) + getPlayAudio().hashCode();
break;
case 13:
hash = (37 * hash) + MIXED_AUDIO_FIELD_NUMBER;
hash = (53 * hash) + getMixedAudio().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage 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.ResponseMessage parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage 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.ResponseMessage parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage 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.ResponseMessage 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.ResponseMessage 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.ResponseMessage 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.ResponseMessage 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.ResponseMessage 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.ResponseMessage 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.ResponseMessage 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;
}
/**
*
*
*
* Represents a response message that can be returned by a conversational agent.
* Response messages are also used for output audio synthesis. The approach is
* as follows:
* * If at least one OutputAudioText response is present, then all
* OutputAudioText responses are linearly concatenated, and the result is used
* for output audio synthesis.
* * If the OutputAudioText responses are a mixture of text and SSML, then the
* concatenated result is treated as SSML; otherwise, the result is treated as
* either text or SSML as appropriate. The agent designer should ideally use
* either text or SSML consistently throughout the bot design.
* * Otherwise, all Text responses are linearly concatenated, and the result is
* used for output audio synthesis.
* This approach allows for more sophisticated user experience scenarios, where
* the text displayed to the user may differ from what is heard.
*
*
* Protobuf type {@code google.cloud.dialogflow.cx.v3.ResponseMessage}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.ResponseMessage)
com.google.cloud.dialogflow.cx.v3.ResponseMessageOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.class,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.Builder.class);
}
// Construct using com.google.cloud.dialogflow.cx.v3.ResponseMessage.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();
messageCase_ = 0;
message_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessageProto
.internal_static_google_cloud_dialogflow_cx_v3_ResponseMessage_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage getDefaultInstanceForType() {
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage build() {
com.google.cloud.dialogflow.cx.v3.ResponseMessage result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage buildPartial() {
com.google.cloud.dialogflow.cx.v3.ResponseMessage result =
new com.google.cloud.dialogflow.cx.v3.ResponseMessage(this);
if (messageCase_ == 1) {
if (textBuilder_ == null) {
result.message_ = message_;
} else {
result.message_ = textBuilder_.build();
}
}
if (messageCase_ == 2) {
if (payloadBuilder_ == null) {
result.message_ = message_;
} else {
result.message_ = payloadBuilder_.build();
}
}
if (messageCase_ == 9) {
if (conversationSuccessBuilder_ == null) {
result.message_ = message_;
} else {
result.message_ = conversationSuccessBuilder_.build();
}
}
if (messageCase_ == 8) {
if (outputAudioTextBuilder_ == null) {
result.message_ = message_;
} else {
result.message_ = outputAudioTextBuilder_.build();
}
}
if (messageCase_ == 10) {
if (liveAgentHandoffBuilder_ == null) {
result.message_ = message_;
} else {
result.message_ = liveAgentHandoffBuilder_.build();
}
}
if (messageCase_ == 11) {
if (endInteractionBuilder_ == null) {
result.message_ = message_;
} else {
result.message_ = endInteractionBuilder_.build();
}
}
if (messageCase_ == 12) {
if (playAudioBuilder_ == null) {
result.message_ = message_;
} else {
result.message_ = playAudioBuilder_.build();
}
}
if (messageCase_ == 13) {
if (mixedAudioBuilder_ == null) {
result.message_ = message_;
} else {
result.message_ = mixedAudioBuilder_.build();
}
}
result.messageCase_ = messageCase_;
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.ResponseMessage) {
return mergeFrom((com.google.cloud.dialogflow.cx.v3.ResponseMessage) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.ResponseMessage other) {
if (other == com.google.cloud.dialogflow.cx.v3.ResponseMessage.getDefaultInstance())
return this;
switch (other.getMessageCase()) {
case TEXT:
{
mergeText(other.getText());
break;
}
case PAYLOAD:
{
mergePayload(other.getPayload());
break;
}
case CONVERSATION_SUCCESS:
{
mergeConversationSuccess(other.getConversationSuccess());
break;
}
case OUTPUT_AUDIO_TEXT:
{
mergeOutputAudioText(other.getOutputAudioText());
break;
}
case LIVE_AGENT_HANDOFF:
{
mergeLiveAgentHandoff(other.getLiveAgentHandoff());
break;
}
case END_INTERACTION:
{
mergeEndInteraction(other.getEndInteraction());
break;
}
case PLAY_AUDIO:
{
mergePlayAudio(other.getPlayAudio());
break;
}
case MIXED_AUDIO:
{
mergeMixedAudio(other.getMixedAudio());
break;
}
case MESSAGE_NOT_SET:
{
break;
}
}
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.ResponseMessage parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage =
(com.google.cloud.dialogflow.cx.v3.ResponseMessage) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int messageCase_ = 0;
private java.lang.Object message_;
public MessageCase getMessageCase() {
return MessageCase.forNumber(messageCase_);
}
public Builder clearMessage() {
messageCase_ = 0;
message_ = null;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.Builder,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.TextOrBuilder>
textBuilder_;
/**
*
*
*
* Returns a text response.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text = 1;
*
* @return Whether the text field is set.
*/
@java.lang.Override
public boolean hasText() {
return messageCase_ == 1;
}
/**
*
*
*
* Returns a text response.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text = 1;
*
* @return The text.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text getText() {
if (textBuilder_ == null) {
if (messageCase_ == 1) {
return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text) message_;
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.getDefaultInstance();
} else {
if (messageCase_ == 1) {
return textBuilder_.getMessage();
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.getDefaultInstance();
}
}
/**
*
*
*
* Returns a text response.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text = 1;
*/
public Builder setText(com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text value) {
if (textBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
message_ = value;
onChanged();
} else {
textBuilder_.setMessage(value);
}
messageCase_ = 1;
return this;
}
/**
*
*
*
* Returns a text response.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text = 1;
*/
public Builder setText(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.Builder builderForValue) {
if (textBuilder_ == null) {
message_ = builderForValue.build();
onChanged();
} else {
textBuilder_.setMessage(builderForValue.build());
}
messageCase_ = 1;
return this;
}
/**
*
*
*
* Returns a text response.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text = 1;
*/
public Builder mergeText(com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text value) {
if (textBuilder_ == null) {
if (messageCase_ == 1
&& message_
!= com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.getDefaultInstance()) {
message_ =
com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.newBuilder(
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text) message_)
.mergeFrom(value)
.buildPartial();
} else {
message_ = value;
}
onChanged();
} else {
if (messageCase_ == 1) {
textBuilder_.mergeFrom(value);
}
textBuilder_.setMessage(value);
}
messageCase_ = 1;
return this;
}
/**
*
*
*
* Returns a text response.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text = 1;
*/
public Builder clearText() {
if (textBuilder_ == null) {
if (messageCase_ == 1) {
messageCase_ = 0;
message_ = null;
onChanged();
}
} else {
if (messageCase_ == 1) {
messageCase_ = 0;
message_ = null;
}
textBuilder_.clear();
}
return this;
}
/**
*
*
*
* Returns a text response.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text = 1;
*/
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.Builder getTextBuilder() {
return getTextFieldBuilder().getBuilder();
}
/**
*
*
*
* Returns a text response.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text = 1;
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.TextOrBuilder getTextOrBuilder() {
if ((messageCase_ == 1) && (textBuilder_ != null)) {
return textBuilder_.getMessageOrBuilder();
} else {
if (messageCase_ == 1) {
return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text) message_;
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.getDefaultInstance();
}
}
/**
*
*
*
* Returns a text response.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.Text text = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.Builder,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.TextOrBuilder>
getTextFieldBuilder() {
if (textBuilder_ == null) {
if (!(messageCase_ == 1)) {
message_ = com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.getDefaultInstance();
}
textBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text.Builder,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.TextOrBuilder>(
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.Text) message_,
getParentForChildren(),
isClean());
message_ = null;
}
messageCase_ = 1;
onChanged();
;
return textBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct,
com.google.protobuf.Struct.Builder,
com.google.protobuf.StructOrBuilder>
payloadBuilder_;
/**
*
*
*
* Returns a response containing a custom, platform-specific payload.
*
*
* .google.protobuf.Struct payload = 2;
*
* @return Whether the payload field is set.
*/
@java.lang.Override
public boolean hasPayload() {
return messageCase_ == 2;
}
/**
*
*
*
* Returns a response containing a custom, platform-specific payload.
*
*
* .google.protobuf.Struct payload = 2;
*
* @return The payload.
*/
@java.lang.Override
public com.google.protobuf.Struct getPayload() {
if (payloadBuilder_ == null) {
if (messageCase_ == 2) {
return (com.google.protobuf.Struct) message_;
}
return com.google.protobuf.Struct.getDefaultInstance();
} else {
if (messageCase_ == 2) {
return payloadBuilder_.getMessage();
}
return com.google.protobuf.Struct.getDefaultInstance();
}
}
/**
*
*
*
* Returns a response containing a custom, platform-specific payload.
*
*
* .google.protobuf.Struct payload = 2;
*/
public Builder setPayload(com.google.protobuf.Struct value) {
if (payloadBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
message_ = value;
onChanged();
} else {
payloadBuilder_.setMessage(value);
}
messageCase_ = 2;
return this;
}
/**
*
*
*
* Returns a response containing a custom, platform-specific payload.
*
*
* .google.protobuf.Struct payload = 2;
*/
public Builder setPayload(com.google.protobuf.Struct.Builder builderForValue) {
if (payloadBuilder_ == null) {
message_ = builderForValue.build();
onChanged();
} else {
payloadBuilder_.setMessage(builderForValue.build());
}
messageCase_ = 2;
return this;
}
/**
*
*
*
* Returns a response containing a custom, platform-specific payload.
*
*
* .google.protobuf.Struct payload = 2;
*/
public Builder mergePayload(com.google.protobuf.Struct value) {
if (payloadBuilder_ == null) {
if (messageCase_ == 2 && message_ != com.google.protobuf.Struct.getDefaultInstance()) {
message_ =
com.google.protobuf.Struct.newBuilder((com.google.protobuf.Struct) message_)
.mergeFrom(value)
.buildPartial();
} else {
message_ = value;
}
onChanged();
} else {
if (messageCase_ == 2) {
payloadBuilder_.mergeFrom(value);
}
payloadBuilder_.setMessage(value);
}
messageCase_ = 2;
return this;
}
/**
*
*
*
* Returns a response containing a custom, platform-specific payload.
*
*
* .google.protobuf.Struct payload = 2;
*/
public Builder clearPayload() {
if (payloadBuilder_ == null) {
if (messageCase_ == 2) {
messageCase_ = 0;
message_ = null;
onChanged();
}
} else {
if (messageCase_ == 2) {
messageCase_ = 0;
message_ = null;
}
payloadBuilder_.clear();
}
return this;
}
/**
*
*
*
* Returns a response containing a custom, platform-specific payload.
*
*
* .google.protobuf.Struct payload = 2;
*/
public com.google.protobuf.Struct.Builder getPayloadBuilder() {
return getPayloadFieldBuilder().getBuilder();
}
/**
*
*
*
* Returns a response containing a custom, platform-specific payload.
*
*
* .google.protobuf.Struct payload = 2;
*/
@java.lang.Override
public com.google.protobuf.StructOrBuilder getPayloadOrBuilder() {
if ((messageCase_ == 2) && (payloadBuilder_ != null)) {
return payloadBuilder_.getMessageOrBuilder();
} else {
if (messageCase_ == 2) {
return (com.google.protobuf.Struct) message_;
}
return com.google.protobuf.Struct.getDefaultInstance();
}
}
/**
*
*
*
* Returns a response containing a custom, platform-specific payload.
*
*
* .google.protobuf.Struct payload = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct,
com.google.protobuf.Struct.Builder,
com.google.protobuf.StructOrBuilder>
getPayloadFieldBuilder() {
if (payloadBuilder_ == null) {
if (!(messageCase_ == 2)) {
message_ = com.google.protobuf.Struct.getDefaultInstance();
}
payloadBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct,
com.google.protobuf.Struct.Builder,
com.google.protobuf.StructOrBuilder>(
(com.google.protobuf.Struct) message_, getParentForChildren(), isClean());
message_ = null;
}
messageCase_ = 2;
onChanged();
;
return payloadBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess.Builder,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccessOrBuilder>
conversationSuccessBuilder_;
/**
*
*
*
* Indicates that the conversation succeeded.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess conversation_success = 9;
*
*
* @return Whether the conversationSuccess field is set.
*/
@java.lang.Override
public boolean hasConversationSuccess() {
return messageCase_ == 9;
}
/**
*
*
*
* Indicates that the conversation succeeded.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess conversation_success = 9;
*
*
* @return The conversationSuccess.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess
getConversationSuccess() {
if (conversationSuccessBuilder_ == null) {
if (messageCase_ == 9) {
return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess) message_;
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess
.getDefaultInstance();
} else {
if (messageCase_ == 9) {
return conversationSuccessBuilder_.getMessage();
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess
.getDefaultInstance();
}
}
/**
*
*
*
* Indicates that the conversation succeeded.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess conversation_success = 9;
*
*/
public Builder setConversationSuccess(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess value) {
if (conversationSuccessBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
message_ = value;
onChanged();
} else {
conversationSuccessBuilder_.setMessage(value);
}
messageCase_ = 9;
return this;
}
/**
*
*
*
* Indicates that the conversation succeeded.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess conversation_success = 9;
*
*/
public Builder setConversationSuccess(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess.Builder
builderForValue) {
if (conversationSuccessBuilder_ == null) {
message_ = builderForValue.build();
onChanged();
} else {
conversationSuccessBuilder_.setMessage(builderForValue.build());
}
messageCase_ = 9;
return this;
}
/**
*
*
*
* Indicates that the conversation succeeded.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess conversation_success = 9;
*
*/
public Builder mergeConversationSuccess(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess value) {
if (conversationSuccessBuilder_ == null) {
if (messageCase_ == 9
&& message_
!= com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess
.getDefaultInstance()) {
message_ =
com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess.newBuilder(
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess)
message_)
.mergeFrom(value)
.buildPartial();
} else {
message_ = value;
}
onChanged();
} else {
if (messageCase_ == 9) {
conversationSuccessBuilder_.mergeFrom(value);
}
conversationSuccessBuilder_.setMessage(value);
}
messageCase_ = 9;
return this;
}
/**
*
*
*
* Indicates that the conversation succeeded.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess conversation_success = 9;
*
*/
public Builder clearConversationSuccess() {
if (conversationSuccessBuilder_ == null) {
if (messageCase_ == 9) {
messageCase_ = 0;
message_ = null;
onChanged();
}
} else {
if (messageCase_ == 9) {
messageCase_ = 0;
message_ = null;
}
conversationSuccessBuilder_.clear();
}
return this;
}
/**
*
*
*
* Indicates that the conversation succeeded.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess conversation_success = 9;
*
*/
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess.Builder
getConversationSuccessBuilder() {
return getConversationSuccessFieldBuilder().getBuilder();
}
/**
*
*
*
* Indicates that the conversation succeeded.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess conversation_success = 9;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccessOrBuilder
getConversationSuccessOrBuilder() {
if ((messageCase_ == 9) && (conversationSuccessBuilder_ != null)) {
return conversationSuccessBuilder_.getMessageOrBuilder();
} else {
if (messageCase_ == 9) {
return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess) message_;
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess
.getDefaultInstance();
}
}
/**
*
*
*
* Indicates that the conversation succeeded.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess conversation_success = 9;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess.Builder,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccessOrBuilder>
getConversationSuccessFieldBuilder() {
if (conversationSuccessBuilder_ == null) {
if (!(messageCase_ == 9)) {
message_ =
com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess
.getDefaultInstance();
}
conversationSuccessBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess.Builder,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccessOrBuilder>(
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.ConversationSuccess) message_,
getParentForChildren(),
isClean());
message_ = null;
}
messageCase_ = 9;
onChanged();
;
return conversationSuccessBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.Builder,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioTextOrBuilder>
outputAudioTextBuilder_;
/**
*
*
*
* A text or ssml response that is preferentially used for TTS output audio
* synthesis, as described in the comment on the ResponseMessage message.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText output_audio_text = 8;
*
*
* @return Whether the outputAudioText field is set.
*/
@java.lang.Override
public boolean hasOutputAudioText() {
return messageCase_ == 8;
}
/**
*
*
*
* A text or ssml response that is preferentially used for TTS output audio
* synthesis, as described in the comment on the ResponseMessage message.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText output_audio_text = 8;
*
*
* @return The outputAudioText.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText getOutputAudioText() {
if (outputAudioTextBuilder_ == null) {
if (messageCase_ == 8) {
return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText) message_;
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText
.getDefaultInstance();
} else {
if (messageCase_ == 8) {
return outputAudioTextBuilder_.getMessage();
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText
.getDefaultInstance();
}
}
/**
*
*
*
* A text or ssml response that is preferentially used for TTS output audio
* synthesis, as described in the comment on the ResponseMessage message.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText output_audio_text = 8;
*
*/
public Builder setOutputAudioText(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText value) {
if (outputAudioTextBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
message_ = value;
onChanged();
} else {
outputAudioTextBuilder_.setMessage(value);
}
messageCase_ = 8;
return this;
}
/**
*
*
*
* A text or ssml response that is preferentially used for TTS output audio
* synthesis, as described in the comment on the ResponseMessage message.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText output_audio_text = 8;
*
*/
public Builder setOutputAudioText(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.Builder builderForValue) {
if (outputAudioTextBuilder_ == null) {
message_ = builderForValue.build();
onChanged();
} else {
outputAudioTextBuilder_.setMessage(builderForValue.build());
}
messageCase_ = 8;
return this;
}
/**
*
*
*
* A text or ssml response that is preferentially used for TTS output audio
* synthesis, as described in the comment on the ResponseMessage message.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText output_audio_text = 8;
*
*/
public Builder mergeOutputAudioText(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText value) {
if (outputAudioTextBuilder_ == null) {
if (messageCase_ == 8
&& message_
!= com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText
.getDefaultInstance()) {
message_ =
com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.newBuilder(
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText) message_)
.mergeFrom(value)
.buildPartial();
} else {
message_ = value;
}
onChanged();
} else {
if (messageCase_ == 8) {
outputAudioTextBuilder_.mergeFrom(value);
}
outputAudioTextBuilder_.setMessage(value);
}
messageCase_ = 8;
return this;
}
/**
*
*
*
* A text or ssml response that is preferentially used for TTS output audio
* synthesis, as described in the comment on the ResponseMessage message.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText output_audio_text = 8;
*
*/
public Builder clearOutputAudioText() {
if (outputAudioTextBuilder_ == null) {
if (messageCase_ == 8) {
messageCase_ = 0;
message_ = null;
onChanged();
}
} else {
if (messageCase_ == 8) {
messageCase_ = 0;
message_ = null;
}
outputAudioTextBuilder_.clear();
}
return this;
}
/**
*
*
*
* A text or ssml response that is preferentially used for TTS output audio
* synthesis, as described in the comment on the ResponseMessage message.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText output_audio_text = 8;
*
*/
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.Builder
getOutputAudioTextBuilder() {
return getOutputAudioTextFieldBuilder().getBuilder();
}
/**
*
*
*
* A text or ssml response that is preferentially used for TTS output audio
* synthesis, as described in the comment on the ResponseMessage message.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText output_audio_text = 8;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioTextOrBuilder
getOutputAudioTextOrBuilder() {
if ((messageCase_ == 8) && (outputAudioTextBuilder_ != null)) {
return outputAudioTextBuilder_.getMessageOrBuilder();
} else {
if (messageCase_ == 8) {
return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText) message_;
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText
.getDefaultInstance();
}
}
/**
*
*
*
* A text or ssml response that is preferentially used for TTS output audio
* synthesis, as described in the comment on the ResponseMessage message.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText output_audio_text = 8;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.Builder,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioTextOrBuilder>
getOutputAudioTextFieldBuilder() {
if (outputAudioTextBuilder_ == null) {
if (!(messageCase_ == 8)) {
message_ =
com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText
.getDefaultInstance();
}
outputAudioTextBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText.Builder,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioTextOrBuilder>(
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.OutputAudioText) message_,
getParentForChildren(),
isClean());
message_ = null;
}
messageCase_ = 8;
onChanged();
;
return outputAudioTextBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.Builder,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoffOrBuilder>
liveAgentHandoffBuilder_;
/**
*
*
*
* Hands off conversation to a human agent.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff live_agent_handoff = 10;
*
*
* @return Whether the liveAgentHandoff field is set.
*/
@java.lang.Override
public boolean hasLiveAgentHandoff() {
return messageCase_ == 10;
}
/**
*
*
*
* Hands off conversation to a human agent.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff live_agent_handoff = 10;
*
*
* @return The liveAgentHandoff.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff
getLiveAgentHandoff() {
if (liveAgentHandoffBuilder_ == null) {
if (messageCase_ == 10) {
return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff) message_;
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff
.getDefaultInstance();
} else {
if (messageCase_ == 10) {
return liveAgentHandoffBuilder_.getMessage();
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff
.getDefaultInstance();
}
}
/**
*
*
*
* Hands off conversation to a human agent.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff live_agent_handoff = 10;
*
*/
public Builder setLiveAgentHandoff(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff value) {
if (liveAgentHandoffBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
message_ = value;
onChanged();
} else {
liveAgentHandoffBuilder_.setMessage(value);
}
messageCase_ = 10;
return this;
}
/**
*
*
*
* Hands off conversation to a human agent.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff live_agent_handoff = 10;
*
*/
public Builder setLiveAgentHandoff(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.Builder
builderForValue) {
if (liveAgentHandoffBuilder_ == null) {
message_ = builderForValue.build();
onChanged();
} else {
liveAgentHandoffBuilder_.setMessage(builderForValue.build());
}
messageCase_ = 10;
return this;
}
/**
*
*
*
* Hands off conversation to a human agent.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff live_agent_handoff = 10;
*
*/
public Builder mergeLiveAgentHandoff(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff value) {
if (liveAgentHandoffBuilder_ == null) {
if (messageCase_ == 10
&& message_
!= com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff
.getDefaultInstance()) {
message_ =
com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.newBuilder(
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff) message_)
.mergeFrom(value)
.buildPartial();
} else {
message_ = value;
}
onChanged();
} else {
if (messageCase_ == 10) {
liveAgentHandoffBuilder_.mergeFrom(value);
}
liveAgentHandoffBuilder_.setMessage(value);
}
messageCase_ = 10;
return this;
}
/**
*
*
*
* Hands off conversation to a human agent.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff live_agent_handoff = 10;
*
*/
public Builder clearLiveAgentHandoff() {
if (liveAgentHandoffBuilder_ == null) {
if (messageCase_ == 10) {
messageCase_ = 0;
message_ = null;
onChanged();
}
} else {
if (messageCase_ == 10) {
messageCase_ = 0;
message_ = null;
}
liveAgentHandoffBuilder_.clear();
}
return this;
}
/**
*
*
*
* Hands off conversation to a human agent.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff live_agent_handoff = 10;
*
*/
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.Builder
getLiveAgentHandoffBuilder() {
return getLiveAgentHandoffFieldBuilder().getBuilder();
}
/**
*
*
*
* Hands off conversation to a human agent.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff live_agent_handoff = 10;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoffOrBuilder
getLiveAgentHandoffOrBuilder() {
if ((messageCase_ == 10) && (liveAgentHandoffBuilder_ != null)) {
return liveAgentHandoffBuilder_.getMessageOrBuilder();
} else {
if (messageCase_ == 10) {
return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff) message_;
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff
.getDefaultInstance();
}
}
/**
*
*
*
* Hands off conversation to a human agent.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff live_agent_handoff = 10;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.Builder,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoffOrBuilder>
getLiveAgentHandoffFieldBuilder() {
if (liveAgentHandoffBuilder_ == null) {
if (!(messageCase_ == 10)) {
message_ =
com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff
.getDefaultInstance();
}
liveAgentHandoffBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff.Builder,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoffOrBuilder>(
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.LiveAgentHandoff) message_,
getParentForChildren(),
isClean());
message_ = null;
}
messageCase_ = 10;
onChanged();
;
return liveAgentHandoffBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.Builder,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteractionOrBuilder>
endInteractionBuilder_;
/**
*
*
*
* Output only. A signal that indicates the interaction with the Dialogflow agent has
* ended.
* This message is generated by Dialogflow only when the conversation
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
* It's guaranteed that there is at most one such message in each response.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction end_interaction = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the endInteraction field is set.
*/
@java.lang.Override
public boolean hasEndInteraction() {
return messageCase_ == 11;
}
/**
*
*
*
* Output only. A signal that indicates the interaction with the Dialogflow agent has
* ended.
* This message is generated by Dialogflow only when the conversation
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
* It's guaranteed that there is at most one such message in each response.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction end_interaction = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The endInteraction.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction getEndInteraction() {
if (endInteractionBuilder_ == null) {
if (messageCase_ == 11) {
return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) message_;
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction
.getDefaultInstance();
} else {
if (messageCase_ == 11) {
return endInteractionBuilder_.getMessage();
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction
.getDefaultInstance();
}
}
/**
*
*
*
* Output only. A signal that indicates the interaction with the Dialogflow agent has
* ended.
* This message is generated by Dialogflow only when the conversation
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
* It's guaranteed that there is at most one such message in each response.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction end_interaction = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setEndInteraction(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction value) {
if (endInteractionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
message_ = value;
onChanged();
} else {
endInteractionBuilder_.setMessage(value);
}
messageCase_ = 11;
return this;
}
/**
*
*
*
* Output only. A signal that indicates the interaction with the Dialogflow agent has
* ended.
* This message is generated by Dialogflow only when the conversation
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
* It's guaranteed that there is at most one such message in each response.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction end_interaction = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setEndInteraction(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.Builder builderForValue) {
if (endInteractionBuilder_ == null) {
message_ = builderForValue.build();
onChanged();
} else {
endInteractionBuilder_.setMessage(builderForValue.build());
}
messageCase_ = 11;
return this;
}
/**
*
*
*
* Output only. A signal that indicates the interaction with the Dialogflow agent has
* ended.
* This message is generated by Dialogflow only when the conversation
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
* It's guaranteed that there is at most one such message in each response.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction end_interaction = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder mergeEndInteraction(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction value) {
if (endInteractionBuilder_ == null) {
if (messageCase_ == 11
&& message_
!= com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction
.getDefaultInstance()) {
message_ =
com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.newBuilder(
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) message_)
.mergeFrom(value)
.buildPartial();
} else {
message_ = value;
}
onChanged();
} else {
if (messageCase_ == 11) {
endInteractionBuilder_.mergeFrom(value);
}
endInteractionBuilder_.setMessage(value);
}
messageCase_ = 11;
return this;
}
/**
*
*
*
* Output only. A signal that indicates the interaction with the Dialogflow agent has
* ended.
* This message is generated by Dialogflow only when the conversation
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
* It's guaranteed that there is at most one such message in each response.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction end_interaction = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder clearEndInteraction() {
if (endInteractionBuilder_ == null) {
if (messageCase_ == 11) {
messageCase_ = 0;
message_ = null;
onChanged();
}
} else {
if (messageCase_ == 11) {
messageCase_ = 0;
message_ = null;
}
endInteractionBuilder_.clear();
}
return this;
}
/**
*
*
*
* Output only. A signal that indicates the interaction with the Dialogflow agent has
* ended.
* This message is generated by Dialogflow only when the conversation
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
* It's guaranteed that there is at most one such message in each response.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction end_interaction = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.Builder
getEndInteractionBuilder() {
return getEndInteractionFieldBuilder().getBuilder();
}
/**
*
*
*
* Output only. A signal that indicates the interaction with the Dialogflow agent has
* ended.
* This message is generated by Dialogflow only when the conversation
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
* It's guaranteed that there is at most one such message in each response.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction end_interaction = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteractionOrBuilder
getEndInteractionOrBuilder() {
if ((messageCase_ == 11) && (endInteractionBuilder_ != null)) {
return endInteractionBuilder_.getMessageOrBuilder();
} else {
if (messageCase_ == 11) {
return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) message_;
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction
.getDefaultInstance();
}
}
/**
*
*
*
* Output only. A signal that indicates the interaction with the Dialogflow agent has
* ended.
* This message is generated by Dialogflow only when the conversation
* reaches `END_SESSION` page. It is not supposed to be defined by the user.
* It's guaranteed that there is at most one such message in each response.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction end_interaction = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.Builder,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteractionOrBuilder>
getEndInteractionFieldBuilder() {
if (endInteractionBuilder_ == null) {
if (!(messageCase_ == 11)) {
message_ =
com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.getDefaultInstance();
}
endInteractionBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction.Builder,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteractionOrBuilder>(
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.EndInteraction) message_,
getParentForChildren(),
isClean());
message_ = null;
}
messageCase_ = 11;
onChanged();
;
return endInteractionBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.Builder,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudioOrBuilder>
playAudioBuilder_;
/**
*
*
*
* Signal that the client should play an audio clip hosted at a
* client-specific URI. Dialogflow uses this to construct
* [mixed_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.mixed_audio]. However, Dialogflow itself
* does not try to read or process the URI in any way.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio play_audio = 12;
*
* @return Whether the playAudio field is set.
*/
@java.lang.Override
public boolean hasPlayAudio() {
return messageCase_ == 12;
}
/**
*
*
*
* Signal that the client should play an audio clip hosted at a
* client-specific URI. Dialogflow uses this to construct
* [mixed_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.mixed_audio]. However, Dialogflow itself
* does not try to read or process the URI in any way.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio play_audio = 12;
*
* @return The playAudio.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio getPlayAudio() {
if (playAudioBuilder_ == null) {
if (messageCase_ == 12) {
return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) message_;
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.getDefaultInstance();
} else {
if (messageCase_ == 12) {
return playAudioBuilder_.getMessage();
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.getDefaultInstance();
}
}
/**
*
*
*
* Signal that the client should play an audio clip hosted at a
* client-specific URI. Dialogflow uses this to construct
* [mixed_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.mixed_audio]. However, Dialogflow itself
* does not try to read or process the URI in any way.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio play_audio = 12;
*/
public Builder setPlayAudio(com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio value) {
if (playAudioBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
message_ = value;
onChanged();
} else {
playAudioBuilder_.setMessage(value);
}
messageCase_ = 12;
return this;
}
/**
*
*
*
* Signal that the client should play an audio clip hosted at a
* client-specific URI. Dialogflow uses this to construct
* [mixed_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.mixed_audio]. However, Dialogflow itself
* does not try to read or process the URI in any way.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio play_audio = 12;
*/
public Builder setPlayAudio(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.Builder builderForValue) {
if (playAudioBuilder_ == null) {
message_ = builderForValue.build();
onChanged();
} else {
playAudioBuilder_.setMessage(builderForValue.build());
}
messageCase_ = 12;
return this;
}
/**
*
*
*
* Signal that the client should play an audio clip hosted at a
* client-specific URI. Dialogflow uses this to construct
* [mixed_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.mixed_audio]. However, Dialogflow itself
* does not try to read or process the URI in any way.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio play_audio = 12;
*/
public Builder mergePlayAudio(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio value) {
if (playAudioBuilder_ == null) {
if (messageCase_ == 12
&& message_
!= com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio
.getDefaultInstance()) {
message_ =
com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.newBuilder(
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) message_)
.mergeFrom(value)
.buildPartial();
} else {
message_ = value;
}
onChanged();
} else {
if (messageCase_ == 12) {
playAudioBuilder_.mergeFrom(value);
}
playAudioBuilder_.setMessage(value);
}
messageCase_ = 12;
return this;
}
/**
*
*
*
* Signal that the client should play an audio clip hosted at a
* client-specific URI. Dialogflow uses this to construct
* [mixed_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.mixed_audio]. However, Dialogflow itself
* does not try to read or process the URI in any way.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio play_audio = 12;
*/
public Builder clearPlayAudio() {
if (playAudioBuilder_ == null) {
if (messageCase_ == 12) {
messageCase_ = 0;
message_ = null;
onChanged();
}
} else {
if (messageCase_ == 12) {
messageCase_ = 0;
message_ = null;
}
playAudioBuilder_.clear();
}
return this;
}
/**
*
*
*
* Signal that the client should play an audio clip hosted at a
* client-specific URI. Dialogflow uses this to construct
* [mixed_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.mixed_audio]. However, Dialogflow itself
* does not try to read or process the URI in any way.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio play_audio = 12;
*/
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.Builder
getPlayAudioBuilder() {
return getPlayAudioFieldBuilder().getBuilder();
}
/**
*
*
*
* Signal that the client should play an audio clip hosted at a
* client-specific URI. Dialogflow uses this to construct
* [mixed_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.mixed_audio]. However, Dialogflow itself
* does not try to read or process the URI in any way.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio play_audio = 12;
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudioOrBuilder
getPlayAudioOrBuilder() {
if ((messageCase_ == 12) && (playAudioBuilder_ != null)) {
return playAudioBuilder_.getMessageOrBuilder();
} else {
if (messageCase_ == 12) {
return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) message_;
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.getDefaultInstance();
}
}
/**
*
*
*
* Signal that the client should play an audio clip hosted at a
* client-specific URI. Dialogflow uses this to construct
* [mixed_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.mixed_audio]. However, Dialogflow itself
* does not try to read or process the URI in any way.
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio play_audio = 12;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.Builder,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudioOrBuilder>
getPlayAudioFieldBuilder() {
if (playAudioBuilder_ == null) {
if (!(messageCase_ == 12)) {
message_ =
com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.getDefaultInstance();
}
playAudioBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio.Builder,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudioOrBuilder>(
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.PlayAudio) message_,
getParentForChildren(),
isClean());
message_ = null;
}
messageCase_ = 12;
onChanged();
;
return playAudioBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Builder,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudioOrBuilder>
mixedAudioBuilder_;
/**
*
*
*
* Output only. An audio response message composed of both the synthesized Dialogflow
* agent responses and responses defined via
* [play_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.play_audio].
* This message is generated by Dialogflow only and not supposed to be
* defined by the user.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio mixed_audio = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the mixedAudio field is set.
*/
@java.lang.Override
public boolean hasMixedAudio() {
return messageCase_ == 13;
}
/**
*
*
*
* Output only. An audio response message composed of both the synthesized Dialogflow
* agent responses and responses defined via
* [play_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.play_audio].
* This message is generated by Dialogflow only and not supposed to be
* defined by the user.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio mixed_audio = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The mixedAudio.
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio getMixedAudio() {
if (mixedAudioBuilder_ == null) {
if (messageCase_ == 13) {
return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) message_;
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.getDefaultInstance();
} else {
if (messageCase_ == 13) {
return mixedAudioBuilder_.getMessage();
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.getDefaultInstance();
}
}
/**
*
*
*
* Output only. An audio response message composed of both the synthesized Dialogflow
* agent responses and responses defined via
* [play_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.play_audio].
* This message is generated by Dialogflow only and not supposed to be
* defined by the user.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio mixed_audio = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setMixedAudio(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio value) {
if (mixedAudioBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
message_ = value;
onChanged();
} else {
mixedAudioBuilder_.setMessage(value);
}
messageCase_ = 13;
return this;
}
/**
*
*
*
* Output only. An audio response message composed of both the synthesized Dialogflow
* agent responses and responses defined via
* [play_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.play_audio].
* This message is generated by Dialogflow only and not supposed to be
* defined by the user.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio mixed_audio = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setMixedAudio(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Builder builderForValue) {
if (mixedAudioBuilder_ == null) {
message_ = builderForValue.build();
onChanged();
} else {
mixedAudioBuilder_.setMessage(builderForValue.build());
}
messageCase_ = 13;
return this;
}
/**
*
*
*
* Output only. An audio response message composed of both the synthesized Dialogflow
* agent responses and responses defined via
* [play_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.play_audio].
* This message is generated by Dialogflow only and not supposed to be
* defined by the user.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio mixed_audio = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder mergeMixedAudio(
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio value) {
if (mixedAudioBuilder_ == null) {
if (messageCase_ == 13
&& message_
!= com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio
.getDefaultInstance()) {
message_ =
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.newBuilder(
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) message_)
.mergeFrom(value)
.buildPartial();
} else {
message_ = value;
}
onChanged();
} else {
if (messageCase_ == 13) {
mixedAudioBuilder_.mergeFrom(value);
}
mixedAudioBuilder_.setMessage(value);
}
messageCase_ = 13;
return this;
}
/**
*
*
*
* Output only. An audio response message composed of both the synthesized Dialogflow
* agent responses and responses defined via
* [play_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.play_audio].
* This message is generated by Dialogflow only and not supposed to be
* defined by the user.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio mixed_audio = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder clearMixedAudio() {
if (mixedAudioBuilder_ == null) {
if (messageCase_ == 13) {
messageCase_ = 0;
message_ = null;
onChanged();
}
} else {
if (messageCase_ == 13) {
messageCase_ = 0;
message_ = null;
}
mixedAudioBuilder_.clear();
}
return this;
}
/**
*
*
*
* Output only. An audio response message composed of both the synthesized Dialogflow
* agent responses and responses defined via
* [play_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.play_audio].
* This message is generated by Dialogflow only and not supposed to be
* defined by the user.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio mixed_audio = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Builder
getMixedAudioBuilder() {
return getMixedAudioFieldBuilder().getBuilder();
}
/**
*
*
*
* Output only. An audio response message composed of both the synthesized Dialogflow
* agent responses and responses defined via
* [play_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.play_audio].
* This message is generated by Dialogflow only and not supposed to be
* defined by the user.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio mixed_audio = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudioOrBuilder
getMixedAudioOrBuilder() {
if ((messageCase_ == 13) && (mixedAudioBuilder_ != null)) {
return mixedAudioBuilder_.getMessageOrBuilder();
} else {
if (messageCase_ == 13) {
return (com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) message_;
}
return com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.getDefaultInstance();
}
}
/**
*
*
*
* Output only. An audio response message composed of both the synthesized Dialogflow
* agent responses and responses defined via
* [play_audio][google.cloud.dialogflow.cx.v3.ResponseMessage.play_audio].
* This message is generated by Dialogflow only and not supposed to be
* defined by the user.
*
*
*
* .google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio mixed_audio = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Builder,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudioOrBuilder>
getMixedAudioFieldBuilder() {
if (mixedAudioBuilder_ == null) {
if (!(messageCase_ == 13)) {
message_ =
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.getDefaultInstance();
}
mixedAudioBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio.Builder,
com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudioOrBuilder>(
(com.google.cloud.dialogflow.cx.v3.ResponseMessage.MixedAudio) message_,
getParentForChildren(),
isClean());
message_ = null;
}
messageCase_ = 13;
onChanged();
;
return mixedAudioBuilder_;
}
@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.ResponseMessage)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.ResponseMessage)
private static final com.google.cloud.dialogflow.cx.v3.ResponseMessage DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.ResponseMessage();
}
public static com.google.cloud.dialogflow.cx.v3.ResponseMessage getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ResponseMessage parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ResponseMessage(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.ResponseMessage getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy