Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.google.cloud.dialogflow.v2.Intent Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/dialogflow/v2/intent.proto
package com.google.cloud.dialogflow.v2;
/**
*
* Represents an intent.
* Intents convert a number of user expressions or patterns into an action. An
* action is an extraction of a user command or sentence semantics.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent}
*/
public final class Intent extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent)
IntentOrBuilder {
private static final long serialVersionUID = 0L;
// Use Intent.newBuilder() to construct.
private Intent(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Intent() {
name_ = "";
displayName_ = "";
webhookState_ = 0;
priority_ = 0;
isFallback_ = false;
mlDisabled_ = false;
inputContextNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
events_ = com.google.protobuf.LazyStringArrayList.EMPTY;
trainingPhrases_ = java.util.Collections.emptyList();
action_ = "";
outputContexts_ = java.util.Collections.emptyList();
resetContexts_ = false;
parameters_ = java.util.Collections.emptyList();
messages_ = java.util.Collections.emptyList();
defaultResponsePlatforms_ = java.util.Collections.emptyList();
rootFollowupIntentName_ = "";
parentFollowupIntentName_ = "";
followupIntentInfo_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Intent(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
displayName_ = s;
break;
}
case 24: {
priority_ = input.readInt32();
break;
}
case 32: {
isFallback_ = input.readBool();
break;
}
case 48: {
int rawValue = input.readEnum();
webhookState_ = rawValue;
break;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
inputContextNames_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000040;
}
inputContextNames_.add(s);
break;
}
case 66: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) {
events_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000080;
}
events_.add(s);
break;
}
case 74: {
if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
trainingPhrases_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000100;
}
trainingPhrases_.add(
input.readMessage(com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.parser(), extensionRegistry));
break;
}
case 82: {
java.lang.String s = input.readStringRequireUtf8();
action_ = s;
break;
}
case 90: {
if (!((mutable_bitField0_ & 0x00000400) == 0x00000400)) {
outputContexts_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000400;
}
outputContexts_.add(
input.readMessage(com.google.cloud.dialogflow.v2.Context.parser(), extensionRegistry));
break;
}
case 96: {
resetContexts_ = input.readBool();
break;
}
case 106: {
if (!((mutable_bitField0_ & 0x00001000) == 0x00001000)) {
parameters_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00001000;
}
parameters_.add(
input.readMessage(com.google.cloud.dialogflow.v2.Intent.Parameter.parser(), extensionRegistry));
break;
}
case 114: {
if (!((mutable_bitField0_ & 0x00002000) == 0x00002000)) {
messages_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00002000;
}
messages_.add(
input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.parser(), extensionRegistry));
break;
}
case 120: {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00004000) == 0x00004000)) {
defaultResponsePlatforms_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00004000;
}
defaultResponsePlatforms_.add(rawValue);
break;
}
case 122: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00004000) == 0x00004000)) {
defaultResponsePlatforms_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00004000;
}
defaultResponsePlatforms_.add(rawValue);
}
input.popLimit(oldLimit);
break;
}
case 130: {
java.lang.String s = input.readStringRequireUtf8();
rootFollowupIntentName_ = s;
break;
}
case 138: {
java.lang.String s = input.readStringRequireUtf8();
parentFollowupIntentName_ = s;
break;
}
case 146: {
if (!((mutable_bitField0_ & 0x00020000) == 0x00020000)) {
followupIntentInfo_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00020000;
}
followupIntentInfo_.add(
input.readMessage(com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo.parser(), extensionRegistry));
break;
}
case 152: {
mlDisabled_ = input.readBool();
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_ & 0x00000040) == 0x00000040)) {
inputContextNames_ = inputContextNames_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) {
events_ = events_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) {
trainingPhrases_ = java.util.Collections.unmodifiableList(trainingPhrases_);
}
if (((mutable_bitField0_ & 0x00000400) == 0x00000400)) {
outputContexts_ = java.util.Collections.unmodifiableList(outputContexts_);
}
if (((mutable_bitField0_ & 0x00001000) == 0x00001000)) {
parameters_ = java.util.Collections.unmodifiableList(parameters_);
}
if (((mutable_bitField0_ & 0x00002000) == 0x00002000)) {
messages_ = java.util.Collections.unmodifiableList(messages_);
}
if (((mutable_bitField0_ & 0x00004000) == 0x00004000)) {
defaultResponsePlatforms_ = java.util.Collections.unmodifiableList(defaultResponsePlatforms_);
}
if (((mutable_bitField0_ & 0x00020000) == 0x00020000)) {
followupIntentInfo_ = java.util.Collections.unmodifiableList(followupIntentInfo_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.class, com.google.cloud.dialogflow.v2.Intent.Builder.class);
}
/**
*
* Represents the different states that webhooks can be in.
*
*
* Protobuf enum {@code google.cloud.dialogflow.v2.Intent.WebhookState}
*/
public enum WebhookState
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* Webhook is disabled in the agent and in the intent.
*
*
* WEBHOOK_STATE_UNSPECIFIED = 0;
*/
WEBHOOK_STATE_UNSPECIFIED(0),
/**
*
* Webhook is enabled in the agent and in the intent.
*
*
* WEBHOOK_STATE_ENABLED = 1;
*/
WEBHOOK_STATE_ENABLED(1),
/**
*
* Webhook is enabled in the agent and in the intent. Also, each slot
* filling prompt is forwarded to the webhook.
*
*
* WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2;
*/
WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING(2),
UNRECOGNIZED(-1),
;
/**
*
* Webhook is disabled in the agent and in the intent.
*
*
* WEBHOOK_STATE_UNSPECIFIED = 0;
*/
public static final int WEBHOOK_STATE_UNSPECIFIED_VALUE = 0;
/**
*
* Webhook is enabled in the agent and in the intent.
*
*
* WEBHOOK_STATE_ENABLED = 1;
*/
public static final int WEBHOOK_STATE_ENABLED_VALUE = 1;
/**
*
* Webhook is enabled in the agent and in the intent. Also, each slot
* filling prompt is forwarded to the webhook.
*
*
* WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2;
*/
public static final int WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static WebhookState valueOf(int value) {
return forNumber(value);
}
public static WebhookState forNumber(int value) {
switch (value) {
case 0: return WEBHOOK_STATE_UNSPECIFIED;
case 1: return WEBHOOK_STATE_ENABLED;
case 2: return WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
WebhookState> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public WebhookState findValueByNumber(int number) {
return WebhookState.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.Intent.getDescriptor().getEnumTypes().get(0);
}
private static final WebhookState[] VALUES = values();
public static WebhookState valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private WebhookState(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.v2.Intent.WebhookState)
}
public interface TrainingPhraseOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.TrainingPhrase)
com.google.protobuf.MessageOrBuilder {
/**
*
* Required. The unique identifier of this training phrase.
*
*
* string name = 1;
*/
java.lang.String getName();
/**
*
* Required. The unique identifier of this training phrase.
*
*
* string name = 1;
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
* Required. The type of the training phrase.
*
*
* .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2;
*/
int getTypeValue();
/**
*
* Required. The type of the training phrase.
*
*
* .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2;
*/
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type getType();
/**
*
* Required. The collection of training phrase parts (can be annotated).
* Fields: `entity_type`, `alias` and `user_defined` should be populated
* only for the annotated parts of the training phrase.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3;
*/
java.util.List
getPartsList();
/**
*
* Required. The collection of training phrase parts (can be annotated).
* Fields: `entity_type`, `alias` and `user_defined` should be populated
* only for the annotated parts of the training phrase.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3;
*/
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part getParts(int index);
/**
*
* Required. The collection of training phrase parts (can be annotated).
* Fields: `entity_type`, `alias` and `user_defined` should be populated
* only for the annotated parts of the training phrase.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3;
*/
int getPartsCount();
/**
*
* Required. The collection of training phrase parts (can be annotated).
* Fields: `entity_type`, `alias` and `user_defined` should be populated
* only for the annotated parts of the training phrase.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3;
*/
java.util.List extends com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.PartOrBuilder>
getPartsOrBuilderList();
/**
*
* Required. The collection of training phrase parts (can be annotated).
* Fields: `entity_type`, `alias` and `user_defined` should be populated
* only for the annotated parts of the training phrase.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3;
*/
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.PartOrBuilder getPartsOrBuilder(
int index);
/**
*
* Optional. Indicates how many times this example or template was added to
* the intent. Each time a developer adds an existing sample by editing an
* intent or training, this counter is increased.
*
*
* int32 times_added_count = 4;
*/
int getTimesAddedCount();
}
/**
*
* Represents an example or template that the agent is trained on.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.TrainingPhrase}
*/
public static final class TrainingPhrase extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.TrainingPhrase)
TrainingPhraseOrBuilder {
private static final long serialVersionUID = 0L;
// Use TrainingPhrase.newBuilder() to construct.
private TrainingPhrase(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TrainingPhrase() {
name_ = "";
type_ = 0;
parts_ = java.util.Collections.emptyList();
timesAddedCount_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private TrainingPhrase(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 16: {
int rawValue = input.readEnum();
type_ = rawValue;
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
parts_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
parts_.add(
input.readMessage(com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.parser(), extensionRegistry));
break;
}
case 32: {
timesAddedCount_ = input.readInt32();
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_ & 0x00000004) == 0x00000004)) {
parts_ = java.util.Collections.unmodifiableList(parts_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_TrainingPhrase_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_TrainingPhrase_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.class, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Builder.class);
}
/**
*
* Represents different types of training phrases.
*
*
* Protobuf enum {@code google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type}
*/
public enum Type
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* Not specified. This value should never be used.
*
*
* TYPE_UNSPECIFIED = 0;
*/
TYPE_UNSPECIFIED(0),
/**
*
* Examples do not contain @-prefixed entity type names, but example parts
* can be annotated with entity types.
*
*
* EXAMPLE = 1;
*/
EXAMPLE(1),
/**
*
* Templates are not annotated with entity types, but they can contain
* @-prefixed entity type names as substrings.
*
*
* TEMPLATE = 2;
*/
TEMPLATE(2),
UNRECOGNIZED(-1),
;
/**
*
* Not specified. This value should never be used.
*
*
* TYPE_UNSPECIFIED = 0;
*/
public static final int TYPE_UNSPECIFIED_VALUE = 0;
/**
*
* Examples do not contain @-prefixed entity type names, but example parts
* can be annotated with entity types.
*
*
* EXAMPLE = 1;
*/
public static final int EXAMPLE_VALUE = 1;
/**
*
* Templates are not annotated with entity types, but they can contain
* @-prefixed entity type names as substrings.
*
*
* TEMPLATE = 2;
*/
public static final int TEMPLATE_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Type valueOf(int value) {
return forNumber(value);
}
public static Type forNumber(int value) {
switch (value) {
case 0: return TYPE_UNSPECIFIED;
case 1: return EXAMPLE;
case 2: return TEMPLATE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Type> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Type findValueByNumber(int number) {
return Type.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.getDescriptor().getEnumTypes().get(0);
}
private static final Type[] VALUES = values();
public static Type valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private Type(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type)
}
public interface PartOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part)
com.google.protobuf.MessageOrBuilder {
/**
*
* Required. The text corresponding to the example or template,
* if there are no annotations. For
* annotated examples, it is the text for one of the example's parts.
*
*
* string text = 1;
*/
java.lang.String getText();
/**
*
* Required. The text corresponding to the example or template,
* if there are no annotations. For
* annotated examples, it is the text for one of the example's parts.
*
*
* string text = 1;
*/
com.google.protobuf.ByteString
getTextBytes();
/**
*
* Optional. The entity type name prefixed with `@`. This field is
* required for the annotated part of the text and applies only to
* examples.
*
*
* string entity_type = 2;
*/
java.lang.String getEntityType();
/**
*
* Optional. The entity type name prefixed with `@`. This field is
* required for the annotated part of the text and applies only to
* examples.
*
*
* string entity_type = 2;
*/
com.google.protobuf.ByteString
getEntityTypeBytes();
/**
*
* Optional. The parameter name for the value extracted from the
* annotated part of the example.
*
*
* string alias = 3;
*/
java.lang.String getAlias();
/**
*
* Optional. The parameter name for the value extracted from the
* annotated part of the example.
*
*
* string alias = 3;
*/
com.google.protobuf.ByteString
getAliasBytes();
/**
*
* Optional. Indicates whether the text was manually annotated by the
* developer.
*
*
* bool user_defined = 4;
*/
boolean getUserDefined();
}
/**
*
* Represents a part of a training phrase.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part}
*/
public static final class Part extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part)
PartOrBuilder {
private static final long serialVersionUID = 0L;
// Use Part.newBuilder() to construct.
private Part(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Part() {
text_ = "";
entityType_ = "";
alias_ = "";
userDefined_ = false;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Part(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
text_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
entityType_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
alias_ = s;
break;
}
case 32: {
userDefined_ = input.readBool();
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.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_TrainingPhrase_Part_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_TrainingPhrase_Part_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.class, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.Builder.class);
}
public static final int TEXT_FIELD_NUMBER = 1;
private volatile java.lang.Object text_;
/**
*
* Required. The text corresponding to the example or template,
* if there are no annotations. For
* annotated examples, it is the text for one of the example's parts.
*
*
* string text = 1;
*/
public java.lang.String getText() {
java.lang.Object ref = text_;
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();
text_ = s;
return s;
}
}
/**
*
* Required. The text corresponding to the example or template,
* if there are no annotations. For
* annotated examples, it is the text for one of the example's parts.
*
*
* string text = 1;
*/
public com.google.protobuf.ByteString
getTextBytes() {
java.lang.Object ref = text_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
text_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ENTITY_TYPE_FIELD_NUMBER = 2;
private volatile java.lang.Object entityType_;
/**
*
* Optional. The entity type name prefixed with `@`. This field is
* required for the annotated part of the text and applies only to
* examples.
*
*
* string entity_type = 2;
*/
public java.lang.String getEntityType() {
java.lang.Object ref = entityType_;
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();
entityType_ = s;
return s;
}
}
/**
*
* Optional. The entity type name prefixed with `@`. This field is
* required for the annotated part of the text and applies only to
* examples.
*
*
* string entity_type = 2;
*/
public com.google.protobuf.ByteString
getEntityTypeBytes() {
java.lang.Object ref = entityType_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
entityType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ALIAS_FIELD_NUMBER = 3;
private volatile java.lang.Object alias_;
/**
*
* Optional. The parameter name for the value extracted from the
* annotated part of the example.
*
*
* string alias = 3;
*/
public java.lang.String getAlias() {
java.lang.Object ref = alias_;
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();
alias_ = s;
return s;
}
}
/**
*
* Optional. The parameter name for the value extracted from the
* annotated part of the example.
*
*
* string alias = 3;
*/
public com.google.protobuf.ByteString
getAliasBytes() {
java.lang.Object ref = alias_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
alias_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int USER_DEFINED_FIELD_NUMBER = 4;
private boolean userDefined_;
/**
*
* Optional. Indicates whether the text was manually annotated by the
* developer.
*
*
* bool user_defined = 4;
*/
public boolean getUserDefined() {
return userDefined_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getTextBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_);
}
if (!getEntityTypeBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, entityType_);
}
if (!getAliasBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, alias_);
}
if (userDefined_ != false) {
output.writeBool(4, userDefined_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getTextBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_);
}
if (!getEntityTypeBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, entityType_);
}
if (!getAliasBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, alias_);
}
if (userDefined_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(4, userDefined_);
}
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.v2.Intent.TrainingPhrase.Part)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part other = (com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part) obj;
boolean result = true;
result = result && getText()
.equals(other.getText());
result = result && getEntityType()
.equals(other.getEntityType());
result = result && getAlias()
.equals(other.getAlias());
result = result && (getUserDefined()
== other.getUserDefined());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TEXT_FIELD_NUMBER;
hash = (53 * hash) + getText().hashCode();
hash = (37 * hash) + ENTITY_TYPE_FIELD_NUMBER;
hash = (53 * hash) + getEntityType().hashCode();
hash = (37 * hash) + ALIAS_FIELD_NUMBER;
hash = (53 * hash) + getAlias().hashCode();
hash = (37 * hash) + USER_DEFINED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getUserDefined());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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 part of a training phrase.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part)
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.PartOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_TrainingPhrase_Part_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_TrainingPhrase_Part_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.class, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
text_ = "";
entityType_ = "";
alias_ = "";
userDefined_ = false;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_TrainingPhrase_Part_descriptor;
}
public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.getDefaultInstance();
}
public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part build() {
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part buildPartial() {
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part result = new com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part(this);
result.text_ = text_;
result.entityType_ = entityType_;
result.alias_ = alias_;
result.userDefined_ = userDefined_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part) {
return mergeFrom((com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part other) {
if (other == com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.getDefaultInstance()) return this;
if (!other.getText().isEmpty()) {
text_ = other.text_;
onChanged();
}
if (!other.getEntityType().isEmpty()) {
entityType_ = other.entityType_;
onChanged();
}
if (!other.getAlias().isEmpty()) {
alias_ = other.alias_;
onChanged();
}
if (other.getUserDefined() != false) {
setUserDefined(other.getUserDefined());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object text_ = "";
/**
*
* Required. The text corresponding to the example or template,
* if there are no annotations. For
* annotated examples, it is the text for one of the example's parts.
*
*
* string text = 1;
*/
public java.lang.String getText() {
java.lang.Object ref = text_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
text_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Required. The text corresponding to the example or template,
* if there are no annotations. For
* annotated examples, it is the text for one of the example's parts.
*
*
* string text = 1;
*/
public com.google.protobuf.ByteString
getTextBytes() {
java.lang.Object ref = text_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
text_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Required. The text corresponding to the example or template,
* if there are no annotations. For
* annotated examples, it is the text for one of the example's parts.
*
*
* string text = 1;
*/
public Builder setText(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
text_ = value;
onChanged();
return this;
}
/**
*
* Required. The text corresponding to the example or template,
* if there are no annotations. For
* annotated examples, it is the text for one of the example's parts.
*
*
* string text = 1;
*/
public Builder clearText() {
text_ = getDefaultInstance().getText();
onChanged();
return this;
}
/**
*
* Required. The text corresponding to the example or template,
* if there are no annotations. For
* annotated examples, it is the text for one of the example's parts.
*
*
* string text = 1;
*/
public Builder setTextBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
text_ = value;
onChanged();
return this;
}
private java.lang.Object entityType_ = "";
/**
*
* Optional. The entity type name prefixed with `@`. This field is
* required for the annotated part of the text and applies only to
* examples.
*
*
* string entity_type = 2;
*/
public java.lang.String getEntityType() {
java.lang.Object ref = entityType_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
entityType_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional. The entity type name prefixed with `@`. This field is
* required for the annotated part of the text and applies only to
* examples.
*
*
* string entity_type = 2;
*/
public com.google.protobuf.ByteString
getEntityTypeBytes() {
java.lang.Object ref = entityType_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
entityType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Optional. The entity type name prefixed with `@`. This field is
* required for the annotated part of the text and applies only to
* examples.
*
*
* string entity_type = 2;
*/
public Builder setEntityType(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
entityType_ = value;
onChanged();
return this;
}
/**
*
* Optional. The entity type name prefixed with `@`. This field is
* required for the annotated part of the text and applies only to
* examples.
*
*
* string entity_type = 2;
*/
public Builder clearEntityType() {
entityType_ = getDefaultInstance().getEntityType();
onChanged();
return this;
}
/**
*
* Optional. The entity type name prefixed with `@`. This field is
* required for the annotated part of the text and applies only to
* examples.
*
*
* string entity_type = 2;
*/
public Builder setEntityTypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
entityType_ = value;
onChanged();
return this;
}
private java.lang.Object alias_ = "";
/**
*
* Optional. The parameter name for the value extracted from the
* annotated part of the example.
*
*
* string alias = 3;
*/
public java.lang.String getAlias() {
java.lang.Object ref = alias_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
alias_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional. The parameter name for the value extracted from the
* annotated part of the example.
*
*
* string alias = 3;
*/
public com.google.protobuf.ByteString
getAliasBytes() {
java.lang.Object ref = alias_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
alias_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Optional. The parameter name for the value extracted from the
* annotated part of the example.
*
*
* string alias = 3;
*/
public Builder setAlias(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
alias_ = value;
onChanged();
return this;
}
/**
*
* Optional. The parameter name for the value extracted from the
* annotated part of the example.
*
*
* string alias = 3;
*/
public Builder clearAlias() {
alias_ = getDefaultInstance().getAlias();
onChanged();
return this;
}
/**
*
* Optional. The parameter name for the value extracted from the
* annotated part of the example.
*
*
* string alias = 3;
*/
public Builder setAliasBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
alias_ = value;
onChanged();
return this;
}
private boolean userDefined_ ;
/**
*
* Optional. Indicates whether the text was manually annotated by the
* developer.
*
*
* bool user_defined = 4;
*/
public boolean getUserDefined() {
return userDefined_;
}
/**
*
* Optional. Indicates whether the text was manually annotated by the
* developer.
*
*
* bool user_defined = 4;
*/
public Builder setUserDefined(boolean value) {
userDefined_ = value;
onChanged();
return this;
}
/**
*
* Optional. Indicates whether the text was manually annotated by the
* developer.
*
*
* bool user_defined = 4;
*/
public Builder clearUserDefined() {
userDefined_ = false;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part)
private static final com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part();
}
public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Part parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Part(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
* Required. The unique identifier of this training phrase.
*
*
* string name = 1;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
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();
name_ = s;
return s;
}
}
/**
*
* Required. The unique identifier of this training phrase.
*
*
* string name = 1;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TYPE_FIELD_NUMBER = 2;
private int type_;
/**
*
* Required. The type of the training phrase.
*
*
* .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2;
*/
public int getTypeValue() {
return type_;
}
/**
*
* Required. The type of the training phrase.
*
*
* .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2;
*/
public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type getType() {
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type result = com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type.valueOf(type_);
return result == null ? com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type.UNRECOGNIZED : result;
}
public static final int PARTS_FIELD_NUMBER = 3;
private java.util.List parts_;
/**
*
* Required. The collection of training phrase parts (can be annotated).
* Fields: `entity_type`, `alias` and `user_defined` should be populated
* only for the annotated parts of the training phrase.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3;
*/
public java.util.List getPartsList() {
return parts_;
}
/**
*
* Required. The collection of training phrase parts (can be annotated).
* Fields: `entity_type`, `alias` and `user_defined` should be populated
* only for the annotated parts of the training phrase.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3;
*/
public java.util.List extends com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.PartOrBuilder>
getPartsOrBuilderList() {
return parts_;
}
/**
*
* Required. The collection of training phrase parts (can be annotated).
* Fields: `entity_type`, `alias` and `user_defined` should be populated
* only for the annotated parts of the training phrase.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3;
*/
public int getPartsCount() {
return parts_.size();
}
/**
*
* Required. The collection of training phrase parts (can be annotated).
* Fields: `entity_type`, `alias` and `user_defined` should be populated
* only for the annotated parts of the training phrase.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3;
*/
public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part getParts(int index) {
return parts_.get(index);
}
/**
*
* Required. The collection of training phrase parts (can be annotated).
* Fields: `entity_type`, `alias` and `user_defined` should be populated
* only for the annotated parts of the training phrase.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3;
*/
public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.PartOrBuilder getPartsOrBuilder(
int index) {
return parts_.get(index);
}
public static final int TIMES_ADDED_COUNT_FIELD_NUMBER = 4;
private int timesAddedCount_;
/**
*
* Optional. Indicates how many times this example or template was added to
* the intent. Each time a developer adds an existing sample by editing an
* intent or training, this counter is increased.
*
*
* int32 times_added_count = 4;
*/
public int getTimesAddedCount() {
return timesAddedCount_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (type_ != com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type.TYPE_UNSPECIFIED.getNumber()) {
output.writeEnum(2, type_);
}
for (int i = 0; i < parts_.size(); i++) {
output.writeMessage(3, parts_.get(i));
}
if (timesAddedCount_ != 0) {
output.writeInt32(4, timesAddedCount_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (type_ != com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type.TYPE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, type_);
}
for (int i = 0; i < parts_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, parts_.get(i));
}
if (timesAddedCount_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(4, timesAddedCount_);
}
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.v2.Intent.TrainingPhrase)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase other = (com.google.cloud.dialogflow.v2.Intent.TrainingPhrase) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && type_ == other.type_;
result = result && getPartsList()
.equals(other.getPartsList());
result = result && (getTimesAddedCount()
== other.getTimesAddedCount());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
if (getPartsCount() > 0) {
hash = (37 * hash) + PARTS_FIELD_NUMBER;
hash = (53 * hash) + getPartsList().hashCode();
}
hash = (37 * hash) + TIMES_ADDED_COUNT_FIELD_NUMBER;
hash = (53 * hash) + getTimesAddedCount();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.TrainingPhrase prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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 example or template that the agent is trained on.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.TrainingPhrase}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.TrainingPhrase)
com.google.cloud.dialogflow.v2.Intent.TrainingPhraseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_TrainingPhrase_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_TrainingPhrase_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.class, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getPartsFieldBuilder();
}
}
public Builder clear() {
super.clear();
name_ = "";
type_ = 0;
if (partsBuilder_ == null) {
parts_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
} else {
partsBuilder_.clear();
}
timesAddedCount_ = 0;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_TrainingPhrase_descriptor;
}
public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.getDefaultInstance();
}
public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase build() {
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase buildPartial() {
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase result = new com.google.cloud.dialogflow.v2.Intent.TrainingPhrase(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.name_ = name_;
result.type_ = type_;
if (partsBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004)) {
parts_ = java.util.Collections.unmodifiableList(parts_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.parts_ = parts_;
} else {
result.parts_ = partsBuilder_.build();
}
result.timesAddedCount_ = timesAddedCount_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent.TrainingPhrase) {
return mergeFrom((com.google.cloud.dialogflow.v2.Intent.TrainingPhrase)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.TrainingPhrase other) {
if (other == com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (other.type_ != 0) {
setTypeValue(other.getTypeValue());
}
if (partsBuilder_ == null) {
if (!other.parts_.isEmpty()) {
if (parts_.isEmpty()) {
parts_ = other.parts_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensurePartsIsMutable();
parts_.addAll(other.parts_);
}
onChanged();
}
} else {
if (!other.parts_.isEmpty()) {
if (partsBuilder_.isEmpty()) {
partsBuilder_.dispose();
partsBuilder_ = null;
parts_ = other.parts_;
bitField0_ = (bitField0_ & ~0x00000004);
partsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getPartsFieldBuilder() : null;
} else {
partsBuilder_.addAllMessages(other.parts_);
}
}
}
if (other.getTimesAddedCount() != 0) {
setTimesAddedCount(other.getTimesAddedCount());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.dialogflow.v2.Intent.TrainingPhrase) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
* Required. The unique identifier of this training phrase.
*
*
* string name = 1;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Required. The unique identifier of this training phrase.
*
*
* string name = 1;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Required. The unique identifier of this training phrase.
*
*
* string name = 1;
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* Required. The unique identifier of this training phrase.
*
*
* string name = 1;
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* Required. The unique identifier of this training phrase.
*
*
* string name = 1;
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private int type_ = 0;
/**
*
* Required. The type of the training phrase.
*
*
* .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2;
*/
public int getTypeValue() {
return type_;
}
/**
*
* Required. The type of the training phrase.
*
*
* .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2;
*/
public Builder setTypeValue(int value) {
type_ = value;
onChanged();
return this;
}
/**
*
* Required. The type of the training phrase.
*
*
* .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2;
*/
public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type getType() {
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type result = com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type.valueOf(type_);
return result == null ? com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type.UNRECOGNIZED : result;
}
/**
*
* Required. The type of the training phrase.
*
*
* .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2;
*/
public Builder setType(com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type value) {
if (value == null) {
throw new NullPointerException();
}
type_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Required. The type of the training phrase.
*
*
* .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2;
*/
public Builder clearType() {
type_ = 0;
onChanged();
return this;
}
private java.util.List parts_ =
java.util.Collections.emptyList();
private void ensurePartsIsMutable() {
if (!((bitField0_ & 0x00000004) == 0x00000004)) {
parts_ = new java.util.ArrayList(parts_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.Builder, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.PartOrBuilder> partsBuilder_;
/**
*
* Required. The collection of training phrase parts (can be annotated).
* Fields: `entity_type`, `alias` and `user_defined` should be populated
* only for the annotated parts of the training phrase.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3;
*/
public java.util.List getPartsList() {
if (partsBuilder_ == null) {
return java.util.Collections.unmodifiableList(parts_);
} else {
return partsBuilder_.getMessageList();
}
}
/**
*
* Required. The collection of training phrase parts (can be annotated).
* Fields: `entity_type`, `alias` and `user_defined` should be populated
* only for the annotated parts of the training phrase.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3;
*/
public int getPartsCount() {
if (partsBuilder_ == null) {
return parts_.size();
} else {
return partsBuilder_.getCount();
}
}
/**
*
* Required. The collection of training phrase parts (can be annotated).
* Fields: `entity_type`, `alias` and `user_defined` should be populated
* only for the annotated parts of the training phrase.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3;
*/
public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part getParts(int index) {
if (partsBuilder_ == null) {
return parts_.get(index);
} else {
return partsBuilder_.getMessage(index);
}
}
/**
*
* Required. The collection of training phrase parts (can be annotated).
* Fields: `entity_type`, `alias` and `user_defined` should be populated
* only for the annotated parts of the training phrase.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3;
*/
public Builder setParts(
int index, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part value) {
if (partsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePartsIsMutable();
parts_.set(index, value);
onChanged();
} else {
partsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Required. The collection of training phrase parts (can be annotated).
* Fields: `entity_type`, `alias` and `user_defined` should be populated
* only for the annotated parts of the training phrase.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3;
*/
public Builder setParts(
int index, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.Builder builderForValue) {
if (partsBuilder_ == null) {
ensurePartsIsMutable();
parts_.set(index, builderForValue.build());
onChanged();
} else {
partsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Required. The collection of training phrase parts (can be annotated).
* Fields: `entity_type`, `alias` and `user_defined` should be populated
* only for the annotated parts of the training phrase.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3;
*/
public Builder addParts(com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part value) {
if (partsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePartsIsMutable();
parts_.add(value);
onChanged();
} else {
partsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Required. The collection of training phrase parts (can be annotated).
* Fields: `entity_type`, `alias` and `user_defined` should be populated
* only for the annotated parts of the training phrase.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3;
*/
public Builder addParts(
int index, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part value) {
if (partsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePartsIsMutable();
parts_.add(index, value);
onChanged();
} else {
partsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Required. The collection of training phrase parts (can be annotated).
* Fields: `entity_type`, `alias` and `user_defined` should be populated
* only for the annotated parts of the training phrase.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3;
*/
public Builder addParts(
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.Builder builderForValue) {
if (partsBuilder_ == null) {
ensurePartsIsMutable();
parts_.add(builderForValue.build());
onChanged();
} else {
partsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Required. The collection of training phrase parts (can be annotated).
* Fields: `entity_type`, `alias` and `user_defined` should be populated
* only for the annotated parts of the training phrase.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3;
*/
public Builder addParts(
int index, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.Builder builderForValue) {
if (partsBuilder_ == null) {
ensurePartsIsMutable();
parts_.add(index, builderForValue.build());
onChanged();
} else {
partsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Required. The collection of training phrase parts (can be annotated).
* Fields: `entity_type`, `alias` and `user_defined` should be populated
* only for the annotated parts of the training phrase.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3;
*/
public Builder addAllParts(
java.lang.Iterable extends com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part> values) {
if (partsBuilder_ == null) {
ensurePartsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, parts_);
onChanged();
} else {
partsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Required. The collection of training phrase parts (can be annotated).
* Fields: `entity_type`, `alias` and `user_defined` should be populated
* only for the annotated parts of the training phrase.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3;
*/
public Builder clearParts() {
if (partsBuilder_ == null) {
parts_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
partsBuilder_.clear();
}
return this;
}
/**
*
* Required. The collection of training phrase parts (can be annotated).
* Fields: `entity_type`, `alias` and `user_defined` should be populated
* only for the annotated parts of the training phrase.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3;
*/
public Builder removeParts(int index) {
if (partsBuilder_ == null) {
ensurePartsIsMutable();
parts_.remove(index);
onChanged();
} else {
partsBuilder_.remove(index);
}
return this;
}
/**
*
* Required. The collection of training phrase parts (can be annotated).
* Fields: `entity_type`, `alias` and `user_defined` should be populated
* only for the annotated parts of the training phrase.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3;
*/
public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.Builder getPartsBuilder(
int index) {
return getPartsFieldBuilder().getBuilder(index);
}
/**
*
* Required. The collection of training phrase parts (can be annotated).
* Fields: `entity_type`, `alias` and `user_defined` should be populated
* only for the annotated parts of the training phrase.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3;
*/
public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.PartOrBuilder getPartsOrBuilder(
int index) {
if (partsBuilder_ == null) {
return parts_.get(index); } else {
return partsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Required. The collection of training phrase parts (can be annotated).
* Fields: `entity_type`, `alias` and `user_defined` should be populated
* only for the annotated parts of the training phrase.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3;
*/
public java.util.List extends com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.PartOrBuilder>
getPartsOrBuilderList() {
if (partsBuilder_ != null) {
return partsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(parts_);
}
}
/**
*
* Required. The collection of training phrase parts (can be annotated).
* Fields: `entity_type`, `alias` and `user_defined` should be populated
* only for the annotated parts of the training phrase.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3;
*/
public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.Builder addPartsBuilder() {
return getPartsFieldBuilder().addBuilder(
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.getDefaultInstance());
}
/**
*
* Required. The collection of training phrase parts (can be annotated).
* Fields: `entity_type`, `alias` and `user_defined` should be populated
* only for the annotated parts of the training phrase.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3;
*/
public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.Builder addPartsBuilder(
int index) {
return getPartsFieldBuilder().addBuilder(
index, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.getDefaultInstance());
}
/**
*
* Required. The collection of training phrase parts (can be annotated).
* Fields: `entity_type`, `alias` and `user_defined` should be populated
* only for the annotated parts of the training phrase.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3;
*/
public java.util.List
getPartsBuilderList() {
return getPartsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.Builder, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.PartOrBuilder>
getPartsFieldBuilder() {
if (partsBuilder_ == null) {
partsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.Builder, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.PartOrBuilder>(
parts_,
((bitField0_ & 0x00000004) == 0x00000004),
getParentForChildren(),
isClean());
parts_ = null;
}
return partsBuilder_;
}
private int timesAddedCount_ ;
/**
*
* Optional. Indicates how many times this example or template was added to
* the intent. Each time a developer adds an existing sample by editing an
* intent or training, this counter is increased.
*
*
* int32 times_added_count = 4;
*/
public int getTimesAddedCount() {
return timesAddedCount_;
}
/**
*
* Optional. Indicates how many times this example or template was added to
* the intent. Each time a developer adds an existing sample by editing an
* intent or training, this counter is increased.
*
*
* int32 times_added_count = 4;
*/
public Builder setTimesAddedCount(int value) {
timesAddedCount_ = value;
onChanged();
return this;
}
/**
*
* Optional. Indicates how many times this example or template was added to
* the intent. Each time a developer adds an existing sample by editing an
* intent or training, this counter is increased.
*
*
* int32 times_added_count = 4;
*/
public Builder clearTimesAddedCount() {
timesAddedCount_ = 0;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.TrainingPhrase)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.TrainingPhrase)
private static final com.google.cloud.dialogflow.v2.Intent.TrainingPhrase DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.TrainingPhrase();
}
public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public TrainingPhrase parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new TrainingPhrase(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ParameterOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Parameter)
com.google.protobuf.MessageOrBuilder {
/**
*
* The unique identifier of this parameter.
*
*
* string name = 1;
*/
java.lang.String getName();
/**
*
* The unique identifier of this parameter.
*
*
* string name = 1;
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
* Required. The name of the parameter.
*
*
* string display_name = 2;
*/
java.lang.String getDisplayName();
/**
*
* Required. The name of the parameter.
*
*
* string display_name = 2;
*/
com.google.protobuf.ByteString
getDisplayNameBytes();
/**
*
* Optional. The definition of the parameter value. It can be:
* - a constant string,
* - a parameter value defined as `$parameter_name`,
* - an original parameter value defined as `$parameter_name.original`,
* - a parameter value from some context defined as
* `#context_name.parameter_name`.
*
*
* string value = 3;
*/
java.lang.String getValue();
/**
*
* Optional. The definition of the parameter value. It can be:
* - a constant string,
* - a parameter value defined as `$parameter_name`,
* - an original parameter value defined as `$parameter_name.original`,
* - a parameter value from some context defined as
* `#context_name.parameter_name`.
*
*
* string value = 3;
*/
com.google.protobuf.ByteString
getValueBytes();
/**
*
* Optional. The default value to use when the `value` yields an empty
* result.
* Default values can be extracted from contexts by using the following
* syntax: `#context_name.parameter_name`.
*
*
* string default_value = 4;
*/
java.lang.String getDefaultValue();
/**
*
* Optional. The default value to use when the `value` yields an empty
* result.
* Default values can be extracted from contexts by using the following
* syntax: `#context_name.parameter_name`.
*
*
* string default_value = 4;
*/
com.google.protobuf.ByteString
getDefaultValueBytes();
/**
*
* Optional. The name of the entity type, prefixed with `@`, that
* describes values of the parameter. If the parameter is
* required, this must be provided.
*
*
* string entity_type_display_name = 5;
*/
java.lang.String getEntityTypeDisplayName();
/**
*
* Optional. The name of the entity type, prefixed with `@`, that
* describes values of the parameter. If the parameter is
* required, this must be provided.
*
*
* string entity_type_display_name = 5;
*/
com.google.protobuf.ByteString
getEntityTypeDisplayNameBytes();
/**
*
* Optional. Indicates whether the parameter is required. That is,
* whether the intent cannot be completed without collecting the parameter
* value.
*
*
* bool mandatory = 6;
*/
boolean getMandatory();
/**
*
* Optional. The collection of prompts that the agent can present to the
* user in order to collect value for the parameter.
*
*
* repeated string prompts = 7;
*/
java.util.List
getPromptsList();
/**
*
* Optional. The collection of prompts that the agent can present to the
* user in order to collect value for the parameter.
*
*
* repeated string prompts = 7;
*/
int getPromptsCount();
/**
*
* Optional. The collection of prompts that the agent can present to the
* user in order to collect value for the parameter.
*
*
* repeated string prompts = 7;
*/
java.lang.String getPrompts(int index);
/**
*
* Optional. The collection of prompts that the agent can present to the
* user in order to collect value for the parameter.
*
*
* repeated string prompts = 7;
*/
com.google.protobuf.ByteString
getPromptsBytes(int index);
/**
*
* Optional. Indicates whether the parameter represents a list of values.
*
*
* bool is_list = 8;
*/
boolean getIsList();
}
/**
*
* Represents intent parameters.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Parameter}
*/
public static final class Parameter extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Parameter)
ParameterOrBuilder {
private static final long serialVersionUID = 0L;
// Use Parameter.newBuilder() to construct.
private Parameter(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Parameter() {
name_ = "";
displayName_ = "";
value_ = "";
defaultValue_ = "";
entityTypeDisplayName_ = "";
mandatory_ = false;
prompts_ = com.google.protobuf.LazyStringArrayList.EMPTY;
isList_ = false;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Parameter(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
displayName_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
value_ = s;
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
defaultValue_ = s;
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
entityTypeDisplayName_ = s;
break;
}
case 48: {
mandatory_ = input.readBool();
break;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
prompts_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000040;
}
prompts_.add(s);
break;
}
case 64: {
isList_ = input.readBool();
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_ & 0x00000040) == 0x00000040)) {
prompts_ = prompts_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Parameter_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Parameter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Parameter.class, com.google.cloud.dialogflow.v2.Intent.Parameter.Builder.class);
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
* The unique identifier of this parameter.
*
*
* string name = 1;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
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();
name_ = s;
return s;
}
}
/**
*
* The unique identifier of this parameter.
*
*
* string name = 1;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DISPLAY_NAME_FIELD_NUMBER = 2;
private volatile java.lang.Object displayName_;
/**
*
* Required. The name of the parameter.
*
*
* string display_name = 2;
*/
public java.lang.String getDisplayName() {
java.lang.Object ref = displayName_;
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();
displayName_ = s;
return s;
}
}
/**
*
* Required. The name of the parameter.
*
*
* string display_name = 2;
*/
public com.google.protobuf.ByteString
getDisplayNameBytes() {
java.lang.Object ref = displayName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
displayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VALUE_FIELD_NUMBER = 3;
private volatile java.lang.Object value_;
/**
*
* Optional. The definition of the parameter value. It can be:
* - a constant string,
* - a parameter value defined as `$parameter_name`,
* - an original parameter value defined as `$parameter_name.original`,
* - a parameter value from some context defined as
* `#context_name.parameter_name`.
*
*
* string value = 3;
*/
public java.lang.String getValue() {
java.lang.Object ref = value_;
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();
value_ = s;
return s;
}
}
/**
*
* Optional. The definition of the parameter value. It can be:
* - a constant string,
* - a parameter value defined as `$parameter_name`,
* - an original parameter value defined as `$parameter_name.original`,
* - a parameter value from some context defined as
* `#context_name.parameter_name`.
*
*
* string value = 3;
*/
public com.google.protobuf.ByteString
getValueBytes() {
java.lang.Object ref = value_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
value_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DEFAULT_VALUE_FIELD_NUMBER = 4;
private volatile java.lang.Object defaultValue_;
/**
*
* Optional. The default value to use when the `value` yields an empty
* result.
* Default values can be extracted from contexts by using the following
* syntax: `#context_name.parameter_name`.
*
*
* string default_value = 4;
*/
public java.lang.String getDefaultValue() {
java.lang.Object ref = defaultValue_;
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();
defaultValue_ = s;
return s;
}
}
/**
*
* Optional. The default value to use when the `value` yields an empty
* result.
* Default values can be extracted from contexts by using the following
* syntax: `#context_name.parameter_name`.
*
*
* string default_value = 4;
*/
public com.google.protobuf.ByteString
getDefaultValueBytes() {
java.lang.Object ref = defaultValue_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
defaultValue_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ENTITY_TYPE_DISPLAY_NAME_FIELD_NUMBER = 5;
private volatile java.lang.Object entityTypeDisplayName_;
/**
*
* Optional. The name of the entity type, prefixed with `@`, that
* describes values of the parameter. If the parameter is
* required, this must be provided.
*
*
* string entity_type_display_name = 5;
*/
public java.lang.String getEntityTypeDisplayName() {
java.lang.Object ref = entityTypeDisplayName_;
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();
entityTypeDisplayName_ = s;
return s;
}
}
/**
*
* Optional. The name of the entity type, prefixed with `@`, that
* describes values of the parameter. If the parameter is
* required, this must be provided.
*
*
* string entity_type_display_name = 5;
*/
public com.google.protobuf.ByteString
getEntityTypeDisplayNameBytes() {
java.lang.Object ref = entityTypeDisplayName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
entityTypeDisplayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MANDATORY_FIELD_NUMBER = 6;
private boolean mandatory_;
/**
*
* Optional. Indicates whether the parameter is required. That is,
* whether the intent cannot be completed without collecting the parameter
* value.
*
*
* bool mandatory = 6;
*/
public boolean getMandatory() {
return mandatory_;
}
public static final int PROMPTS_FIELD_NUMBER = 7;
private com.google.protobuf.LazyStringList prompts_;
/**
*
* Optional. The collection of prompts that the agent can present to the
* user in order to collect value for the parameter.
*
*
* repeated string prompts = 7;
*/
public com.google.protobuf.ProtocolStringList
getPromptsList() {
return prompts_;
}
/**
*
* Optional. The collection of prompts that the agent can present to the
* user in order to collect value for the parameter.
*
*
* repeated string prompts = 7;
*/
public int getPromptsCount() {
return prompts_.size();
}
/**
*
* Optional. The collection of prompts that the agent can present to the
* user in order to collect value for the parameter.
*
*
* repeated string prompts = 7;
*/
public java.lang.String getPrompts(int index) {
return prompts_.get(index);
}
/**
*
* Optional. The collection of prompts that the agent can present to the
* user in order to collect value for the parameter.
*
*
* repeated string prompts = 7;
*/
public com.google.protobuf.ByteString
getPromptsBytes(int index) {
return prompts_.getByteString(index);
}
public static final int IS_LIST_FIELD_NUMBER = 8;
private boolean isList_;
/**
*
* Optional. Indicates whether the parameter represents a list of values.
*
*
* bool is_list = 8;
*/
public boolean getIsList() {
return isList_;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!getDisplayNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_);
}
if (!getValueBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, value_);
}
if (!getDefaultValueBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, defaultValue_);
}
if (!getEntityTypeDisplayNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, entityTypeDisplayName_);
}
if (mandatory_ != false) {
output.writeBool(6, mandatory_);
}
for (int i = 0; i < prompts_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, prompts_.getRaw(i));
}
if (isList_ != false) {
output.writeBool(8, isList_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (!getDisplayNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_);
}
if (!getValueBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, value_);
}
if (!getDefaultValueBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, defaultValue_);
}
if (!getEntityTypeDisplayNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, entityTypeDisplayName_);
}
if (mandatory_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(6, mandatory_);
}
{
int dataSize = 0;
for (int i = 0; i < prompts_.size(); i++) {
dataSize += computeStringSizeNoTag(prompts_.getRaw(i));
}
size += dataSize;
size += 1 * getPromptsList().size();
}
if (isList_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(8, isList_);
}
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.v2.Intent.Parameter)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Parameter other = (com.google.cloud.dialogflow.v2.Intent.Parameter) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && getDisplayName()
.equals(other.getDisplayName());
result = result && getValue()
.equals(other.getValue());
result = result && getDefaultValue()
.equals(other.getDefaultValue());
result = result && getEntityTypeDisplayName()
.equals(other.getEntityTypeDisplayName());
result = result && (getMandatory()
== other.getMandatory());
result = result && getPromptsList()
.equals(other.getPromptsList());
result = result && (getIsList()
== other.getIsList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
hash = (53 * hash) + getDisplayName().hashCode();
hash = (37 * hash) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + getValue().hashCode();
hash = (37 * hash) + DEFAULT_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getDefaultValue().hashCode();
hash = (37 * hash) + ENTITY_TYPE_DISPLAY_NAME_FIELD_NUMBER;
hash = (53 * hash) + getEntityTypeDisplayName().hashCode();
hash = (37 * hash) + MANDATORY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getMandatory());
if (getPromptsCount() > 0) {
hash = (37 * hash) + PROMPTS_FIELD_NUMBER;
hash = (53 * hash) + getPromptsList().hashCode();
}
hash = (37 * hash) + IS_LIST_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getIsList());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.Parameter parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Parameter parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Parameter parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Parameter parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Parameter parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Parameter parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Parameter parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Parameter parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Parameter parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Parameter parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Parameter parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Parameter parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.Parameter prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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 intent parameters.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Parameter}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Parameter)
com.google.cloud.dialogflow.v2.Intent.ParameterOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Parameter_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Parameter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Parameter.class, com.google.cloud.dialogflow.v2.Intent.Parameter.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.Intent.Parameter.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
name_ = "";
displayName_ = "";
value_ = "";
defaultValue_ = "";
entityTypeDisplayName_ = "";
mandatory_ = false;
prompts_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000040);
isList_ = false;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Parameter_descriptor;
}
public com.google.cloud.dialogflow.v2.Intent.Parameter getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Parameter.getDefaultInstance();
}
public com.google.cloud.dialogflow.v2.Intent.Parameter build() {
com.google.cloud.dialogflow.v2.Intent.Parameter result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.cloud.dialogflow.v2.Intent.Parameter buildPartial() {
com.google.cloud.dialogflow.v2.Intent.Parameter result = new com.google.cloud.dialogflow.v2.Intent.Parameter(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.name_ = name_;
result.displayName_ = displayName_;
result.value_ = value_;
result.defaultValue_ = defaultValue_;
result.entityTypeDisplayName_ = entityTypeDisplayName_;
result.mandatory_ = mandatory_;
if (((bitField0_ & 0x00000040) == 0x00000040)) {
prompts_ = prompts_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000040);
}
result.prompts_ = prompts_;
result.isList_ = isList_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent.Parameter) {
return mergeFrom((com.google.cloud.dialogflow.v2.Intent.Parameter)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.Parameter other) {
if (other == com.google.cloud.dialogflow.v2.Intent.Parameter.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (!other.getDisplayName().isEmpty()) {
displayName_ = other.displayName_;
onChanged();
}
if (!other.getValue().isEmpty()) {
value_ = other.value_;
onChanged();
}
if (!other.getDefaultValue().isEmpty()) {
defaultValue_ = other.defaultValue_;
onChanged();
}
if (!other.getEntityTypeDisplayName().isEmpty()) {
entityTypeDisplayName_ = other.entityTypeDisplayName_;
onChanged();
}
if (other.getMandatory() != false) {
setMandatory(other.getMandatory());
}
if (!other.prompts_.isEmpty()) {
if (prompts_.isEmpty()) {
prompts_ = other.prompts_;
bitField0_ = (bitField0_ & ~0x00000040);
} else {
ensurePromptsIsMutable();
prompts_.addAll(other.prompts_);
}
onChanged();
}
if (other.getIsList() != false) {
setIsList(other.getIsList());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.dialogflow.v2.Intent.Parameter parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.dialogflow.v2.Intent.Parameter) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
* The unique identifier of this parameter.
*
*
* string name = 1;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The unique identifier of this parameter.
*
*
* string name = 1;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The unique identifier of this parameter.
*
*
* string name = 1;
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* The unique identifier of this parameter.
*
*
* string name = 1;
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* The unique identifier of this parameter.
*
*
* string name = 1;
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private java.lang.Object displayName_ = "";
/**
*
* Required. The name of the parameter.
*
*
* string display_name = 2;
*/
public java.lang.String getDisplayName() {
java.lang.Object ref = displayName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
displayName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Required. The name of the parameter.
*
*
* string display_name = 2;
*/
public com.google.protobuf.ByteString
getDisplayNameBytes() {
java.lang.Object ref = displayName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
displayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Required. The name of the parameter.
*
*
* string display_name = 2;
*/
public Builder setDisplayName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
displayName_ = value;
onChanged();
return this;
}
/**
*
* Required. The name of the parameter.
*
*
* string display_name = 2;
*/
public Builder clearDisplayName() {
displayName_ = getDefaultInstance().getDisplayName();
onChanged();
return this;
}
/**
*
* Required. The name of the parameter.
*
*
* string display_name = 2;
*/
public Builder setDisplayNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
displayName_ = value;
onChanged();
return this;
}
private java.lang.Object value_ = "";
/**
*
* Optional. The definition of the parameter value. It can be:
* - a constant string,
* - a parameter value defined as `$parameter_name`,
* - an original parameter value defined as `$parameter_name.original`,
* - a parameter value from some context defined as
* `#context_name.parameter_name`.
*
*
* string value = 3;
*/
public java.lang.String getValue() {
java.lang.Object ref = value_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
value_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional. The definition of the parameter value. It can be:
* - a constant string,
* - a parameter value defined as `$parameter_name`,
* - an original parameter value defined as `$parameter_name.original`,
* - a parameter value from some context defined as
* `#context_name.parameter_name`.
*
*
* string value = 3;
*/
public com.google.protobuf.ByteString
getValueBytes() {
java.lang.Object ref = value_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
value_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Optional. The definition of the parameter value. It can be:
* - a constant string,
* - a parameter value defined as `$parameter_name`,
* - an original parameter value defined as `$parameter_name.original`,
* - a parameter value from some context defined as
* `#context_name.parameter_name`.
*
*
* string value = 3;
*/
public Builder setValue(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
onChanged();
return this;
}
/**
*
* Optional. The definition of the parameter value. It can be:
* - a constant string,
* - a parameter value defined as `$parameter_name`,
* - an original parameter value defined as `$parameter_name.original`,
* - a parameter value from some context defined as
* `#context_name.parameter_name`.
*
*
* string value = 3;
*/
public Builder clearValue() {
value_ = getDefaultInstance().getValue();
onChanged();
return this;
}
/**
*
* Optional. The definition of the parameter value. It can be:
* - a constant string,
* - a parameter value defined as `$parameter_name`,
* - an original parameter value defined as `$parameter_name.original`,
* - a parameter value from some context defined as
* `#context_name.parameter_name`.
*
*
* string value = 3;
*/
public Builder setValueBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
value_ = value;
onChanged();
return this;
}
private java.lang.Object defaultValue_ = "";
/**
*
* Optional. The default value to use when the `value` yields an empty
* result.
* Default values can be extracted from contexts by using the following
* syntax: `#context_name.parameter_name`.
*
*
* string default_value = 4;
*/
public java.lang.String getDefaultValue() {
java.lang.Object ref = defaultValue_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
defaultValue_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional. The default value to use when the `value` yields an empty
* result.
* Default values can be extracted from contexts by using the following
* syntax: `#context_name.parameter_name`.
*
*
* string default_value = 4;
*/
public com.google.protobuf.ByteString
getDefaultValueBytes() {
java.lang.Object ref = defaultValue_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
defaultValue_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Optional. The default value to use when the `value` yields an empty
* result.
* Default values can be extracted from contexts by using the following
* syntax: `#context_name.parameter_name`.
*
*
* string default_value = 4;
*/
public Builder setDefaultValue(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
defaultValue_ = value;
onChanged();
return this;
}
/**
*
* Optional. The default value to use when the `value` yields an empty
* result.
* Default values can be extracted from contexts by using the following
* syntax: `#context_name.parameter_name`.
*
*
* string default_value = 4;
*/
public Builder clearDefaultValue() {
defaultValue_ = getDefaultInstance().getDefaultValue();
onChanged();
return this;
}
/**
*
* Optional. The default value to use when the `value` yields an empty
* result.
* Default values can be extracted from contexts by using the following
* syntax: `#context_name.parameter_name`.
*
*
* string default_value = 4;
*/
public Builder setDefaultValueBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
defaultValue_ = value;
onChanged();
return this;
}
private java.lang.Object entityTypeDisplayName_ = "";
/**
*
* Optional. The name of the entity type, prefixed with `@`, that
* describes values of the parameter. If the parameter is
* required, this must be provided.
*
*
* string entity_type_display_name = 5;
*/
public java.lang.String getEntityTypeDisplayName() {
java.lang.Object ref = entityTypeDisplayName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
entityTypeDisplayName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional. The name of the entity type, prefixed with `@`, that
* describes values of the parameter. If the parameter is
* required, this must be provided.
*
*
* string entity_type_display_name = 5;
*/
public com.google.protobuf.ByteString
getEntityTypeDisplayNameBytes() {
java.lang.Object ref = entityTypeDisplayName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
entityTypeDisplayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Optional. The name of the entity type, prefixed with `@`, that
* describes values of the parameter. If the parameter is
* required, this must be provided.
*
*
* string entity_type_display_name = 5;
*/
public Builder setEntityTypeDisplayName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
entityTypeDisplayName_ = value;
onChanged();
return this;
}
/**
*
* Optional. The name of the entity type, prefixed with `@`, that
* describes values of the parameter. If the parameter is
* required, this must be provided.
*
*
* string entity_type_display_name = 5;
*/
public Builder clearEntityTypeDisplayName() {
entityTypeDisplayName_ = getDefaultInstance().getEntityTypeDisplayName();
onChanged();
return this;
}
/**
*
* Optional. The name of the entity type, prefixed with `@`, that
* describes values of the parameter. If the parameter is
* required, this must be provided.
*
*
* string entity_type_display_name = 5;
*/
public Builder setEntityTypeDisplayNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
entityTypeDisplayName_ = value;
onChanged();
return this;
}
private boolean mandatory_ ;
/**
*
* Optional. Indicates whether the parameter is required. That is,
* whether the intent cannot be completed without collecting the parameter
* value.
*
*
* bool mandatory = 6;
*/
public boolean getMandatory() {
return mandatory_;
}
/**
*
* Optional. Indicates whether the parameter is required. That is,
* whether the intent cannot be completed without collecting the parameter
* value.
*
*
* bool mandatory = 6;
*/
public Builder setMandatory(boolean value) {
mandatory_ = value;
onChanged();
return this;
}
/**
*
* Optional. Indicates whether the parameter is required. That is,
* whether the intent cannot be completed without collecting the parameter
* value.
*
*
* bool mandatory = 6;
*/
public Builder clearMandatory() {
mandatory_ = false;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList prompts_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensurePromptsIsMutable() {
if (!((bitField0_ & 0x00000040) == 0x00000040)) {
prompts_ = new com.google.protobuf.LazyStringArrayList(prompts_);
bitField0_ |= 0x00000040;
}
}
/**
*
* Optional. The collection of prompts that the agent can present to the
* user in order to collect value for the parameter.
*
*
* repeated string prompts = 7;
*/
public com.google.protobuf.ProtocolStringList
getPromptsList() {
return prompts_.getUnmodifiableView();
}
/**
*
* Optional. The collection of prompts that the agent can present to the
* user in order to collect value for the parameter.
*
*
* repeated string prompts = 7;
*/
public int getPromptsCount() {
return prompts_.size();
}
/**
*
* Optional. The collection of prompts that the agent can present to the
* user in order to collect value for the parameter.
*
*
* repeated string prompts = 7;
*/
public java.lang.String getPrompts(int index) {
return prompts_.get(index);
}
/**
*
* Optional. The collection of prompts that the agent can present to the
* user in order to collect value for the parameter.
*
*
* repeated string prompts = 7;
*/
public com.google.protobuf.ByteString
getPromptsBytes(int index) {
return prompts_.getByteString(index);
}
/**
*
* Optional. The collection of prompts that the agent can present to the
* user in order to collect value for the parameter.
*
*
* repeated string prompts = 7;
*/
public Builder setPrompts(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensurePromptsIsMutable();
prompts_.set(index, value);
onChanged();
return this;
}
/**
*
* Optional. The collection of prompts that the agent can present to the
* user in order to collect value for the parameter.
*
*
* repeated string prompts = 7;
*/
public Builder addPrompts(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensurePromptsIsMutable();
prompts_.add(value);
onChanged();
return this;
}
/**
*
* Optional. The collection of prompts that the agent can present to the
* user in order to collect value for the parameter.
*
*
* repeated string prompts = 7;
*/
public Builder addAllPrompts(
java.lang.Iterable values) {
ensurePromptsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, prompts_);
onChanged();
return this;
}
/**
*
* Optional. The collection of prompts that the agent can present to the
* user in order to collect value for the parameter.
*
*
* repeated string prompts = 7;
*/
public Builder clearPrompts() {
prompts_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
return this;
}
/**
*
* Optional. The collection of prompts that the agent can present to the
* user in order to collect value for the parameter.
*
*
* repeated string prompts = 7;
*/
public Builder addPromptsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensurePromptsIsMutable();
prompts_.add(value);
onChanged();
return this;
}
private boolean isList_ ;
/**
*
* Optional. Indicates whether the parameter represents a list of values.
*
*
* bool is_list = 8;
*/
public boolean getIsList() {
return isList_;
}
/**
*
* Optional. Indicates whether the parameter represents a list of values.
*
*
* bool is_list = 8;
*/
public Builder setIsList(boolean value) {
isList_ = value;
onChanged();
return this;
}
/**
*
* Optional. Indicates whether the parameter represents a list of values.
*
*
* bool is_list = 8;
*/
public Builder clearIsList() {
isList_ = false;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Parameter)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Parameter)
private static final com.google.cloud.dialogflow.v2.Intent.Parameter DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Parameter();
}
public static com.google.cloud.dialogflow.v2.Intent.Parameter getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Parameter parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Parameter(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.cloud.dialogflow.v2.Intent.Parameter getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface MessageOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message)
com.google.protobuf.MessageOrBuilder {
/**
*
* The text response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Text text = 1;
*/
boolean hasText();
/**
*
* The text response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Text text = 1;
*/
com.google.cloud.dialogflow.v2.Intent.Message.Text getText();
/**
*
* The text response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Text text = 1;
*/
com.google.cloud.dialogflow.v2.Intent.Message.TextOrBuilder getTextOrBuilder();
/**
*
* The image response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 2;
*/
boolean hasImage();
/**
*
* The image response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 2;
*/
com.google.cloud.dialogflow.v2.Intent.Message.Image getImage();
/**
*
* The image response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 2;
*/
com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder getImageOrBuilder();
/**
*
* The quick replies response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.QuickReplies quick_replies = 3;
*/
boolean hasQuickReplies();
/**
*
* The quick replies response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.QuickReplies quick_replies = 3;
*/
com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies getQuickReplies();
/**
*
* The quick replies response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.QuickReplies quick_replies = 3;
*/
com.google.cloud.dialogflow.v2.Intent.Message.QuickRepliesOrBuilder getQuickRepliesOrBuilder();
/**
*
* The card response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Card card = 4;
*/
boolean hasCard();
/**
*
* The card response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Card card = 4;
*/
com.google.cloud.dialogflow.v2.Intent.Message.Card getCard();
/**
*
* The card response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Card card = 4;
*/
com.google.cloud.dialogflow.v2.Intent.Message.CardOrBuilder getCardOrBuilder();
/**
*
* Returns a response containing a custom, platform-specific payload.
* See the Intent.Message.Platform type for a description of the
* structure that may be required for your platform.
*
*
* .google.protobuf.Struct payload = 5;
*/
boolean hasPayload();
/**
*
* Returns a response containing a custom, platform-specific payload.
* See the Intent.Message.Platform type for a description of the
* structure that may be required for your platform.
*
*
* .google.protobuf.Struct payload = 5;
*/
com.google.protobuf.Struct getPayload();
/**
*
* Returns a response containing a custom, platform-specific payload.
* See the Intent.Message.Platform type for a description of the
* structure that may be required for your platform.
*
*
* .google.protobuf.Struct payload = 5;
*/
com.google.protobuf.StructOrBuilder getPayloadOrBuilder();
/**
*
* The voice and text-only responses for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SimpleResponses simple_responses = 7;
*/
boolean hasSimpleResponses();
/**
*
* The voice and text-only responses for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SimpleResponses simple_responses = 7;
*/
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses getSimpleResponses();
/**
*
* The voice and text-only responses for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SimpleResponses simple_responses = 7;
*/
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponsesOrBuilder getSimpleResponsesOrBuilder();
/**
*
* The basic card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard basic_card = 8;
*/
boolean hasBasicCard();
/**
*
* The basic card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard basic_card = 8;
*/
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard getBasicCard();
/**
*
* The basic card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard basic_card = 8;
*/
com.google.cloud.dialogflow.v2.Intent.Message.BasicCardOrBuilder getBasicCardOrBuilder();
/**
*
* The suggestion chips for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Suggestions suggestions = 9;
*/
boolean hasSuggestions();
/**
*
* The suggestion chips for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Suggestions suggestions = 9;
*/
com.google.cloud.dialogflow.v2.Intent.Message.Suggestions getSuggestions();
/**
*
* The suggestion chips for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Suggestions suggestions = 9;
*/
com.google.cloud.dialogflow.v2.Intent.Message.SuggestionsOrBuilder getSuggestionsOrBuilder();
/**
*
* The link out suggestion chip for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion link_out_suggestion = 10;
*/
boolean hasLinkOutSuggestion();
/**
*
* The link out suggestion chip for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion link_out_suggestion = 10;
*/
com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion getLinkOutSuggestion();
/**
*
* The link out suggestion chip for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion link_out_suggestion = 10;
*/
com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestionOrBuilder getLinkOutSuggestionOrBuilder();
/**
*
* The list card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.ListSelect list_select = 11;
*/
boolean hasListSelect();
/**
*
* The list card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.ListSelect list_select = 11;
*/
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect getListSelect();
/**
*
* The list card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.ListSelect list_select = 11;
*/
com.google.cloud.dialogflow.v2.Intent.Message.ListSelectOrBuilder getListSelectOrBuilder();
/**
*
* The carousel card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect carousel_select = 12;
*/
boolean hasCarouselSelect();
/**
*
* The carousel card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect carousel_select = 12;
*/
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect getCarouselSelect();
/**
*
* The carousel card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect carousel_select = 12;
*/
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelectOrBuilder getCarouselSelectOrBuilder();
/**
*
* Optional. The platform that this message is intended for.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Platform platform = 6;
*/
int getPlatformValue();
/**
*
* Optional. The platform that this message is intended for.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Platform platform = 6;
*/
com.google.cloud.dialogflow.v2.Intent.Message.Platform getPlatform();
public com.google.cloud.dialogflow.v2.Intent.Message.MessageCase getMessageCase();
}
/**
*
* Corresponds to the `Response` field in the Dialogflow console.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message}
*/
public static final class Message extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message)
MessageOrBuilder {
private static final long serialVersionUID = 0L;
// Use Message.newBuilder() to construct.
private Message(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Message() {
platform_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Message(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
com.google.cloud.dialogflow.v2.Intent.Message.Text.Builder subBuilder = null;
if (messageCase_ == 1) {
subBuilder = ((com.google.cloud.dialogflow.v2.Intent.Message.Text) message_).toBuilder();
}
message_ =
input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.Text.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.Text) message_);
message_ = subBuilder.buildPartial();
}
messageCase_ = 1;
break;
}
case 18: {
com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder subBuilder = null;
if (messageCase_ == 2) {
subBuilder = ((com.google.cloud.dialogflow.v2.Intent.Message.Image) message_).toBuilder();
}
message_ =
input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.Image.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.Image) message_);
message_ = subBuilder.buildPartial();
}
messageCase_ = 2;
break;
}
case 26: {
com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.Builder subBuilder = null;
if (messageCase_ == 3) {
subBuilder = ((com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies) message_).toBuilder();
}
message_ =
input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies) message_);
message_ = subBuilder.buildPartial();
}
messageCase_ = 3;
break;
}
case 34: {
com.google.cloud.dialogflow.v2.Intent.Message.Card.Builder subBuilder = null;
if (messageCase_ == 4) {
subBuilder = ((com.google.cloud.dialogflow.v2.Intent.Message.Card) message_).toBuilder();
}
message_ =
input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.Card.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.Card) message_);
message_ = subBuilder.buildPartial();
}
messageCase_ = 4;
break;
}
case 42: {
com.google.protobuf.Struct.Builder subBuilder = null;
if (messageCase_ == 5) {
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_ = 5;
break;
}
case 48: {
int rawValue = input.readEnum();
platform_ = rawValue;
break;
}
case 58: {
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses.Builder subBuilder = null;
if (messageCase_ == 7) {
subBuilder = ((com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses) message_).toBuilder();
}
message_ =
input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses) message_);
message_ = subBuilder.buildPartial();
}
messageCase_ = 7;
break;
}
case 66: {
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Builder subBuilder = null;
if (messageCase_ == 8) {
subBuilder = ((com.google.cloud.dialogflow.v2.Intent.Message.BasicCard) message_).toBuilder();
}
message_ =
input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.BasicCard) message_);
message_ = subBuilder.buildPartial();
}
messageCase_ = 8;
break;
}
case 74: {
com.google.cloud.dialogflow.v2.Intent.Message.Suggestions.Builder subBuilder = null;
if (messageCase_ == 9) {
subBuilder = ((com.google.cloud.dialogflow.v2.Intent.Message.Suggestions) message_).toBuilder();
}
message_ =
input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.Suggestions.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.Suggestions) message_);
message_ = subBuilder.buildPartial();
}
messageCase_ = 9;
break;
}
case 82: {
com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion.Builder subBuilder = null;
if (messageCase_ == 10) {
subBuilder = ((com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion) message_).toBuilder();
}
message_ =
input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion) message_);
message_ = subBuilder.buildPartial();
}
messageCase_ = 10;
break;
}
case 90: {
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Builder subBuilder = null;
if (messageCase_ == 11) {
subBuilder = ((com.google.cloud.dialogflow.v2.Intent.Message.ListSelect) message_).toBuilder();
}
message_ =
input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.ListSelect) message_);
message_ = subBuilder.buildPartial();
}
messageCase_ = 11;
break;
}
case 98: {
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Builder subBuilder = null;
if (messageCase_ == 12) {
subBuilder = ((com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect) message_).toBuilder();
}
message_ =
input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect) message_);
message_ = subBuilder.buildPartial();
}
messageCase_ = 12;
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.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.class, com.google.cloud.dialogflow.v2.Intent.Message.Builder.class);
}
/**
*
* Represents different platforms that a rich message can be intended for.
*
*
* Protobuf enum {@code google.cloud.dialogflow.v2.Intent.Message.Platform}
*/
public enum Platform
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* Not specified.
*
*
* PLATFORM_UNSPECIFIED = 0;
*/
PLATFORM_UNSPECIFIED(0),
/**
*
* Facebook.
*
*
* FACEBOOK = 1;
*/
FACEBOOK(1),
/**
*
* Slack.
*
*
* SLACK = 2;
*/
SLACK(2),
/**
*
* Telegram.
*
*
* TELEGRAM = 3;
*/
TELEGRAM(3),
/**
*
* Kik.
*
*
* KIK = 4;
*/
KIK(4),
/**
*
* Skype.
*
*
* SKYPE = 5;
*/
SKYPE(5),
/**
*
* Line.
*
*
* LINE = 6;
*/
LINE(6),
/**
*
* Viber.
*
*
* VIBER = 7;
*/
VIBER(7),
/**
*
* Actions on Google.
* When using Actions on Google, you can choose one of the specific
* Intent.Message types that mention support for Actions on Google,
* or you can use the advanced Intent.Message.payload field.
* The payload field provides access to AoG features not available in the
* specific message types.
* If using the Intent.Message.payload field, it should have a structure
* similar to the JSON message shown here. For more information, see
* [Actions on Google Webhook
* Format](https://developers.google.com/actions/dialogflow/webhook)
* <pre>{
* "expectUserResponse": true,
* "isSsml": false,
* "noInputPrompts": [],
* "richResponse": {
* "items": [
* {
* "simpleResponse": {
* "displayText": "hi",
* "textToSpeech": "hello"
* }
* }
* ],
* "suggestions": [
* {
* "title": "Say this"
* },
* {
* "title": "or this"
* }
* ]
* },
* "systemIntent": {
* "data": {
* "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec",
* "listSelect": {
* "items": [
* {
* "optionInfo": {
* "key": "key1",
* "synonyms": [
* "key one"
* ]
* },
* "title": "must not be empty, but unique"
* },
* {
* "optionInfo": {
* "key": "key2",
* "synonyms": [
* "key two"
* ]
* },
* "title": "must not be empty, but unique"
* }
* ]
* }
* },
* "intent": "actions.intent.OPTION"
* }
* }</pre>
*
*
* ACTIONS_ON_GOOGLE = 8;
*/
ACTIONS_ON_GOOGLE(8),
UNRECOGNIZED(-1),
;
/**
*
* Not specified.
*
*
* PLATFORM_UNSPECIFIED = 0;
*/
public static final int PLATFORM_UNSPECIFIED_VALUE = 0;
/**
*
* Facebook.
*
*
* FACEBOOK = 1;
*/
public static final int FACEBOOK_VALUE = 1;
/**
*
* Slack.
*
*
* SLACK = 2;
*/
public static final int SLACK_VALUE = 2;
/**
*
* Telegram.
*
*
* TELEGRAM = 3;
*/
public static final int TELEGRAM_VALUE = 3;
/**
*
* Kik.
*
*
* KIK = 4;
*/
public static final int KIK_VALUE = 4;
/**
*
* Skype.
*
*
* SKYPE = 5;
*/
public static final int SKYPE_VALUE = 5;
/**
*
* Line.
*
*
* LINE = 6;
*/
public static final int LINE_VALUE = 6;
/**
*
* Viber.
*
*
* VIBER = 7;
*/
public static final int VIBER_VALUE = 7;
/**
*
* Actions on Google.
* When using Actions on Google, you can choose one of the specific
* Intent.Message types that mention support for Actions on Google,
* or you can use the advanced Intent.Message.payload field.
* The payload field provides access to AoG features not available in the
* specific message types.
* If using the Intent.Message.payload field, it should have a structure
* similar to the JSON message shown here. For more information, see
* [Actions on Google Webhook
* Format](https://developers.google.com/actions/dialogflow/webhook)
* <pre>{
* "expectUserResponse": true,
* "isSsml": false,
* "noInputPrompts": [],
* "richResponse": {
* "items": [
* {
* "simpleResponse": {
* "displayText": "hi",
* "textToSpeech": "hello"
* }
* }
* ],
* "suggestions": [
* {
* "title": "Say this"
* },
* {
* "title": "or this"
* }
* ]
* },
* "systemIntent": {
* "data": {
* "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec",
* "listSelect": {
* "items": [
* {
* "optionInfo": {
* "key": "key1",
* "synonyms": [
* "key one"
* ]
* },
* "title": "must not be empty, but unique"
* },
* {
* "optionInfo": {
* "key": "key2",
* "synonyms": [
* "key two"
* ]
* },
* "title": "must not be empty, but unique"
* }
* ]
* }
* },
* "intent": "actions.intent.OPTION"
* }
* }</pre>
*
*
* ACTIONS_ON_GOOGLE = 8;
*/
public static final int ACTIONS_ON_GOOGLE_VALUE = 8;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Platform valueOf(int value) {
return forNumber(value);
}
public static Platform forNumber(int value) {
switch (value) {
case 0: return PLATFORM_UNSPECIFIED;
case 1: return FACEBOOK;
case 2: return SLACK;
case 3: return TELEGRAM;
case 4: return KIK;
case 5: return SKYPE;
case 6: return LINE;
case 7: return VIBER;
case 8: return ACTIONS_ON_GOOGLE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Platform> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Platform findValueByNumber(int number) {
return Platform.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.Intent.Message.getDescriptor().getEnumTypes().get(0);
}
private static final Platform[] VALUES = values();
public static Platform valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private Platform(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.v2.Intent.Message.Platform)
}
public interface TextOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.Text)
com.google.protobuf.MessageOrBuilder {
/**
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1;
*/
java.util.List
getTextList();
/**
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1;
*/
int getTextCount();
/**
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1;
*/
java.lang.String getText(int index);
/**
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1;
*/
com.google.protobuf.ByteString
getTextBytes(int index);
}
/**
*
* The text response message.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.Text}
*/
public static final class Text extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.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
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
text_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
text_.add(s);
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) == 0x00000001)) {
text_ = text_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Text_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Text_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.Text.class, com.google.cloud.dialogflow.v2.Intent.Message.Text.Builder.class);
}
public static final int TEXT_FIELD_NUMBER = 1;
private com.google.protobuf.LazyStringList text_;
/**
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1;
*/
public com.google.protobuf.ProtocolStringList
getTextList() {
return text_;
}
/**
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1;
*/
public int getTextCount() {
return text_.size();
}
/**
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1;
*/
public java.lang.String getText(int index) {
return text_.get(index);
}
/**
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1;
*/
public com.google.protobuf.ByteString
getTextBytes(int index) {
return text_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
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));
}
unknownFields.writeTo(output);
}
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();
}
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.v2.Intent.Message.Text)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Message.Text other = (com.google.cloud.dialogflow.v2.Intent.Message.Text) obj;
boolean result = true;
result = result && getTextList()
.equals(other.getTextList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@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 = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Text parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.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.v2.Intent.Message.Text parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.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.v2.Intent.Message.Text parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.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.v2.Intent.Message.Text parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.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.v2.Intent.Message.Text parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.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.v2.Intent.Message.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.v2.Intent.Message.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);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.Message.Text prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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.v2.Intent.Message.Text}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.Text)
com.google.cloud.dialogflow.v2.Intent.Message.TextOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Text_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Text_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.Text.class, com.google.cloud.dialogflow.v2.Intent.Message.Text.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.Intent.Message.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) {
}
}
public Builder clear() {
super.clear();
text_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Text_descriptor;
}
public com.google.cloud.dialogflow.v2.Intent.Message.Text getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.Text.getDefaultInstance();
}
public com.google.cloud.dialogflow.v2.Intent.Message.Text build() {
com.google.cloud.dialogflow.v2.Intent.Message.Text result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.cloud.dialogflow.v2.Intent.Message.Text buildPartial() {
com.google.cloud.dialogflow.v2.Intent.Message.Text result = new com.google.cloud.dialogflow.v2.Intent.Message.Text(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
text_ = text_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.text_ = text_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent.Message.Text) {
return mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.Text)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.Message.Text other) {
if (other == com.google.cloud.dialogflow.v2.Intent.Message.Text.getDefaultInstance()) return this;
if (!other.text_.isEmpty()) {
if (text_.isEmpty()) {
text_ = other.text_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureTextIsMutable();
text_.addAll(other.text_);
}
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.dialogflow.v2.Intent.Message.Text parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.dialogflow.v2.Intent.Message.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) == 0x00000001)) {
text_ = new com.google.protobuf.LazyStringArrayList(text_);
bitField0_ |= 0x00000001;
}
}
/**
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1;
*/
public com.google.protobuf.ProtocolStringList
getTextList() {
return text_.getUnmodifiableView();
}
/**
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1;
*/
public int getTextCount() {
return text_.size();
}
/**
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1;
*/
public java.lang.String getText(int index) {
return text_.get(index);
}
/**
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1;
*/
public com.google.protobuf.ByteString
getTextBytes(int index) {
return text_.getByteString(index);
}
/**
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1;
*/
public Builder setText(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureTextIsMutable();
text_.set(index, value);
onChanged();
return this;
}
/**
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1;
*/
public Builder addText(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureTextIsMutable();
text_.add(value);
onChanged();
return this;
}
/**
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1;
*/
public Builder addAllText(
java.lang.Iterable values) {
ensureTextIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, text_);
onChanged();
return this;
}
/**
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1;
*/
public Builder clearText() {
text_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1;
*/
public Builder addTextBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureTextIsMutable();
text_.add(value);
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.Text)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.Text)
private static final com.google.cloud.dialogflow.v2.Intent.Message.Text DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Message.Text();
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Text getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
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;
}
public com.google.cloud.dialogflow.v2.Intent.Message.Text getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ImageOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.Image)
com.google.protobuf.MessageOrBuilder {
/**
*
* Optional. The public URI to an image file.
*
*
* string image_uri = 1;
*/
java.lang.String getImageUri();
/**
*
* Optional. The public URI to an image file.
*
*
* string image_uri = 1;
*/
com.google.protobuf.ByteString
getImageUriBytes();
/**
*
* Optional. A text description of the image to be used for accessibility,
* e.g., screen readers.
*
*
* string accessibility_text = 2;
*/
java.lang.String getAccessibilityText();
/**
*
* Optional. A text description of the image to be used for accessibility,
* e.g., screen readers.
*
*
* string accessibility_text = 2;
*/
com.google.protobuf.ByteString
getAccessibilityTextBytes();
}
/**
*
* The image response message.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.Image}
*/
public static final class Image extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.Image)
ImageOrBuilder {
private static final long serialVersionUID = 0L;
// Use Image.newBuilder() to construct.
private Image(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Image() {
imageUri_ = "";
accessibilityText_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Image(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
imageUri_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
accessibilityText_ = s;
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.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Image_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Image_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.Image.class, com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder.class);
}
public static final int IMAGE_URI_FIELD_NUMBER = 1;
private volatile java.lang.Object imageUri_;
/**
*
* Optional. The public URI to an image file.
*
*
* string image_uri = 1;
*/
public java.lang.String getImageUri() {
java.lang.Object ref = imageUri_;
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();
imageUri_ = s;
return s;
}
}
/**
*
* Optional. The public URI to an image file.
*
*
* string image_uri = 1;
*/
public com.google.protobuf.ByteString
getImageUriBytes() {
java.lang.Object ref = imageUri_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
imageUri_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ACCESSIBILITY_TEXT_FIELD_NUMBER = 2;
private volatile java.lang.Object accessibilityText_;
/**
*
* Optional. A text description of the image to be used for accessibility,
* e.g., screen readers.
*
*
* string accessibility_text = 2;
*/
public java.lang.String getAccessibilityText() {
java.lang.Object ref = accessibilityText_;
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();
accessibilityText_ = s;
return s;
}
}
/**
*
* Optional. A text description of the image to be used for accessibility,
* e.g., screen readers.
*
*
* string accessibility_text = 2;
*/
public com.google.protobuf.ByteString
getAccessibilityTextBytes() {
java.lang.Object ref = accessibilityText_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
accessibilityText_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getImageUriBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, imageUri_);
}
if (!getAccessibilityTextBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, accessibilityText_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getImageUriBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, imageUri_);
}
if (!getAccessibilityTextBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, accessibilityText_);
}
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.v2.Intent.Message.Image)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Message.Image other = (com.google.cloud.dialogflow.v2.Intent.Message.Image) obj;
boolean result = true;
result = result && getImageUri()
.equals(other.getImageUri());
result = result && getAccessibilityText()
.equals(other.getAccessibilityText());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + IMAGE_URI_FIELD_NUMBER;
hash = (53 * hash) + getImageUri().hashCode();
hash = (37 * hash) + ACCESSIBILITY_TEXT_FIELD_NUMBER;
hash = (53 * hash) + getAccessibilityText().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Image parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Image parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Image parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Image parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Image parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Image parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Image parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Image parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Image parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Image parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Image parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Image parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.Message.Image prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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 image response message.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.Image}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.Image)
com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Image_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Image_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.Image.class, com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.Intent.Message.Image.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
imageUri_ = "";
accessibilityText_ = "";
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Image_descriptor;
}
public com.google.cloud.dialogflow.v2.Intent.Message.Image getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance();
}
public com.google.cloud.dialogflow.v2.Intent.Message.Image build() {
com.google.cloud.dialogflow.v2.Intent.Message.Image result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.cloud.dialogflow.v2.Intent.Message.Image buildPartial() {
com.google.cloud.dialogflow.v2.Intent.Message.Image result = new com.google.cloud.dialogflow.v2.Intent.Message.Image(this);
result.imageUri_ = imageUri_;
result.accessibilityText_ = accessibilityText_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent.Message.Image) {
return mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.Image)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.Message.Image other) {
if (other == com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance()) return this;
if (!other.getImageUri().isEmpty()) {
imageUri_ = other.imageUri_;
onChanged();
}
if (!other.getAccessibilityText().isEmpty()) {
accessibilityText_ = other.accessibilityText_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.dialogflow.v2.Intent.Message.Image parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.dialogflow.v2.Intent.Message.Image) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object imageUri_ = "";
/**
*
* Optional. The public URI to an image file.
*
*
* string image_uri = 1;
*/
public java.lang.String getImageUri() {
java.lang.Object ref = imageUri_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
imageUri_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional. The public URI to an image file.
*
*
* string image_uri = 1;
*/
public com.google.protobuf.ByteString
getImageUriBytes() {
java.lang.Object ref = imageUri_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
imageUri_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Optional. The public URI to an image file.
*
*
* string image_uri = 1;
*/
public Builder setImageUri(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
imageUri_ = value;
onChanged();
return this;
}
/**
*
* Optional. The public URI to an image file.
*
*
* string image_uri = 1;
*/
public Builder clearImageUri() {
imageUri_ = getDefaultInstance().getImageUri();
onChanged();
return this;
}
/**
*
* Optional. The public URI to an image file.
*
*
* string image_uri = 1;
*/
public Builder setImageUriBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
imageUri_ = value;
onChanged();
return this;
}
private java.lang.Object accessibilityText_ = "";
/**
*
* Optional. A text description of the image to be used for accessibility,
* e.g., screen readers.
*
*
* string accessibility_text = 2;
*/
public java.lang.String getAccessibilityText() {
java.lang.Object ref = accessibilityText_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
accessibilityText_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional. A text description of the image to be used for accessibility,
* e.g., screen readers.
*
*
* string accessibility_text = 2;
*/
public com.google.protobuf.ByteString
getAccessibilityTextBytes() {
java.lang.Object ref = accessibilityText_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
accessibilityText_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Optional. A text description of the image to be used for accessibility,
* e.g., screen readers.
*
*
* string accessibility_text = 2;
*/
public Builder setAccessibilityText(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
accessibilityText_ = value;
onChanged();
return this;
}
/**
*
* Optional. A text description of the image to be used for accessibility,
* e.g., screen readers.
*
*
* string accessibility_text = 2;
*/
public Builder clearAccessibilityText() {
accessibilityText_ = getDefaultInstance().getAccessibilityText();
onChanged();
return this;
}
/**
*
* Optional. A text description of the image to be used for accessibility,
* e.g., screen readers.
*
*
* string accessibility_text = 2;
*/
public Builder setAccessibilityTextBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
accessibilityText_ = value;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.Image)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.Image)
private static final com.google.cloud.dialogflow.v2.Intent.Message.Image DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Message.Image();
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Image getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Image parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Image(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.cloud.dialogflow.v2.Intent.Message.Image getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface QuickRepliesOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.QuickReplies)
com.google.protobuf.MessageOrBuilder {
/**
*
* Optional. The title of the collection of quick replies.
*
*
* string title = 1;
*/
java.lang.String getTitle();
/**
*
* Optional. The title of the collection of quick replies.
*
*
* string title = 1;
*/
com.google.protobuf.ByteString
getTitleBytes();
/**
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2;
*/
java.util.List
getQuickRepliesList();
/**
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2;
*/
int getQuickRepliesCount();
/**
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2;
*/
java.lang.String getQuickReplies(int index);
/**
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2;
*/
com.google.protobuf.ByteString
getQuickRepliesBytes(int index);
}
/**
*
* The quick replies response message.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.QuickReplies}
*/
public static final class QuickReplies extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.QuickReplies)
QuickRepliesOrBuilder {
private static final long serialVersionUID = 0L;
// Use QuickReplies.newBuilder() to construct.
private QuickReplies(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private QuickReplies() {
title_ = "";
quickReplies_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private QuickReplies(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
title_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
quickReplies_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000002;
}
quickReplies_.add(s);
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_ & 0x00000002) == 0x00000002)) {
quickReplies_ = quickReplies_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_QuickReplies_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_QuickReplies_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.class, com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.Builder.class);
}
private int bitField0_;
public static final int TITLE_FIELD_NUMBER = 1;
private volatile java.lang.Object title_;
/**
*
* Optional. The title of the collection of quick replies.
*
*
* string title = 1;
*/
public java.lang.String getTitle() {
java.lang.Object ref = title_;
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();
title_ = s;
return s;
}
}
/**
*
* Optional. The title of the collection of quick replies.
*
*
* string title = 1;
*/
public com.google.protobuf.ByteString
getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int QUICK_REPLIES_FIELD_NUMBER = 2;
private com.google.protobuf.LazyStringList quickReplies_;
/**
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2;
*/
public com.google.protobuf.ProtocolStringList
getQuickRepliesList() {
return quickReplies_;
}
/**
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2;
*/
public int getQuickRepliesCount() {
return quickReplies_.size();
}
/**
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2;
*/
public java.lang.String getQuickReplies(int index) {
return quickReplies_.get(index);
}
/**
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2;
*/
public com.google.protobuf.ByteString
getQuickRepliesBytes(int index) {
return quickReplies_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getTitleBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_);
}
for (int i = 0; i < quickReplies_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, quickReplies_.getRaw(i));
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getTitleBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_);
}
{
int dataSize = 0;
for (int i = 0; i < quickReplies_.size(); i++) {
dataSize += computeStringSizeNoTag(quickReplies_.getRaw(i));
}
size += dataSize;
size += 1 * getQuickRepliesList().size();
}
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.v2.Intent.Message.QuickReplies)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies other = (com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies) obj;
boolean result = true;
result = result && getTitle()
.equals(other.getTitle());
result = result && getQuickRepliesList()
.equals(other.getQuickRepliesList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TITLE_FIELD_NUMBER;
hash = (53 * hash) + getTitle().hashCode();
if (getQuickRepliesCount() > 0) {
hash = (37 * hash) + QUICK_REPLIES_FIELD_NUMBER;
hash = (53 * hash) + getQuickRepliesList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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 quick replies response message.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.QuickReplies}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.QuickReplies)
com.google.cloud.dialogflow.v2.Intent.Message.QuickRepliesOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_QuickReplies_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_QuickReplies_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.class, com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
title_ = "";
quickReplies_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_QuickReplies_descriptor;
}
public com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.getDefaultInstance();
}
public com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies build() {
com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies buildPartial() {
com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies result = new com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.title_ = title_;
if (((bitField0_ & 0x00000002) == 0x00000002)) {
quickReplies_ = quickReplies_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000002);
}
result.quickReplies_ = quickReplies_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies) {
return mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies other) {
if (other == com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.getDefaultInstance()) return this;
if (!other.getTitle().isEmpty()) {
title_ = other.title_;
onChanged();
}
if (!other.quickReplies_.isEmpty()) {
if (quickReplies_.isEmpty()) {
quickReplies_ = other.quickReplies_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureQuickRepliesIsMutable();
quickReplies_.addAll(other.quickReplies_);
}
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object title_ = "";
/**
*
* Optional. The title of the collection of quick replies.
*
*
* string title = 1;
*/
public java.lang.String getTitle() {
java.lang.Object ref = title_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
title_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional. The title of the collection of quick replies.
*
*
* string title = 1;
*/
public com.google.protobuf.ByteString
getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Optional. The title of the collection of quick replies.
*
*
* string title = 1;
*/
public Builder setTitle(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
title_ = value;
onChanged();
return this;
}
/**
*
* Optional. The title of the collection of quick replies.
*
*
* string title = 1;
*/
public Builder clearTitle() {
title_ = getDefaultInstance().getTitle();
onChanged();
return this;
}
/**
*
* Optional. The title of the collection of quick replies.
*
*
* string title = 1;
*/
public Builder setTitleBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
title_ = value;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList quickReplies_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureQuickRepliesIsMutable() {
if (!((bitField0_ & 0x00000002) == 0x00000002)) {
quickReplies_ = new com.google.protobuf.LazyStringArrayList(quickReplies_);
bitField0_ |= 0x00000002;
}
}
/**
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2;
*/
public com.google.protobuf.ProtocolStringList
getQuickRepliesList() {
return quickReplies_.getUnmodifiableView();
}
/**
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2;
*/
public int getQuickRepliesCount() {
return quickReplies_.size();
}
/**
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2;
*/
public java.lang.String getQuickReplies(int index) {
return quickReplies_.get(index);
}
/**
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2;
*/
public com.google.protobuf.ByteString
getQuickRepliesBytes(int index) {
return quickReplies_.getByteString(index);
}
/**
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2;
*/
public Builder setQuickReplies(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureQuickRepliesIsMutable();
quickReplies_.set(index, value);
onChanged();
return this;
}
/**
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2;
*/
public Builder addQuickReplies(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureQuickRepliesIsMutable();
quickReplies_.add(value);
onChanged();
return this;
}
/**
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2;
*/
public Builder addAllQuickReplies(
java.lang.Iterable values) {
ensureQuickRepliesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, quickReplies_);
onChanged();
return this;
}
/**
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2;
*/
public Builder clearQuickReplies() {
quickReplies_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2;
*/
public Builder addQuickRepliesBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureQuickRepliesIsMutable();
quickReplies_.add(value);
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.QuickReplies)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.QuickReplies)
private static final com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies();
}
public static com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public QuickReplies parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new QuickReplies(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CardOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.Card)
com.google.protobuf.MessageOrBuilder {
/**
*
* Optional. The title of the card.
*
*
* string title = 1;
*/
java.lang.String getTitle();
/**
*
* Optional. The title of the card.
*
*
* string title = 1;
*/
com.google.protobuf.ByteString
getTitleBytes();
/**
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2;
*/
java.lang.String getSubtitle();
/**
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2;
*/
com.google.protobuf.ByteString
getSubtitleBytes();
/**
*
* Optional. The public URI to an image file for the card.
*
*
* string image_uri = 3;
*/
java.lang.String getImageUri();
/**
*
* Optional. The public URI to an image file for the card.
*
*
* string image_uri = 3;
*/
com.google.protobuf.ByteString
getImageUriBytes();
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4;
*/
java.util.List
getButtonsList();
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4;
*/
com.google.cloud.dialogflow.v2.Intent.Message.Card.Button getButtons(int index);
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4;
*/
int getButtonsCount();
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4;
*/
java.util.List extends com.google.cloud.dialogflow.v2.Intent.Message.Card.ButtonOrBuilder>
getButtonsOrBuilderList();
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4;
*/
com.google.cloud.dialogflow.v2.Intent.Message.Card.ButtonOrBuilder getButtonsOrBuilder(
int index);
}
/**
*
* The card response message.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.Card}
*/
public static final class Card extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.Card)
CardOrBuilder {
private static final long serialVersionUID = 0L;
// Use Card.newBuilder() to construct.
private Card(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Card() {
title_ = "";
subtitle_ = "";
imageUri_ = "";
buttons_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Card(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
title_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
subtitle_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
imageUri_ = s;
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
buttons_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
buttons_.add(
input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.Card.Button.parser(), extensionRegistry));
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_ & 0x00000008) == 0x00000008)) {
buttons_ = java.util.Collections.unmodifiableList(buttons_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Card_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Card_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.Card.class, com.google.cloud.dialogflow.v2.Intent.Message.Card.Builder.class);
}
public interface ButtonOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.Card.Button)
com.google.protobuf.MessageOrBuilder {
/**
*
* Optional. The text to show on the button.
*
*
* string text = 1;
*/
java.lang.String getText();
/**
*
* Optional. The text to show on the button.
*
*
* string text = 1;
*/
com.google.protobuf.ByteString
getTextBytes();
/**
*
* Optional. The text to send back to the Dialogflow API or a URI to
* open.
*
*
* string postback = 2;
*/
java.lang.String getPostback();
/**
*
* Optional. The text to send back to the Dialogflow API or a URI to
* open.
*
*
* string postback = 2;
*/
com.google.protobuf.ByteString
getPostbackBytes();
}
/**
*
* Optional. Contains information about a button.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.Card.Button}
*/
public static final class Button extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.Card.Button)
ButtonOrBuilder {
private static final long serialVersionUID = 0L;
// Use Button.newBuilder() to construct.
private Button(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Button() {
text_ = "";
postback_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Button(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
text_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
postback_ = s;
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.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Card_Button_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Card_Button_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.Card.Button.class, com.google.cloud.dialogflow.v2.Intent.Message.Card.Button.Builder.class);
}
public static final int TEXT_FIELD_NUMBER = 1;
private volatile java.lang.Object text_;
/**
*
* Optional. The text to show on the button.
*
*
* string text = 1;
*/
public java.lang.String getText() {
java.lang.Object ref = text_;
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();
text_ = s;
return s;
}
}
/**
*
* Optional. The text to show on the button.
*
*
* string text = 1;
*/
public com.google.protobuf.ByteString
getTextBytes() {
java.lang.Object ref = text_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
text_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int POSTBACK_FIELD_NUMBER = 2;
private volatile java.lang.Object postback_;
/**
*
* Optional. The text to send back to the Dialogflow API or a URI to
* open.
*
*
* string postback = 2;
*/
public java.lang.String getPostback() {
java.lang.Object ref = postback_;
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();
postback_ = s;
return s;
}
}
/**
*
* Optional. The text to send back to the Dialogflow API or a URI to
* open.
*
*
* string postback = 2;
*/
public com.google.protobuf.ByteString
getPostbackBytes() {
java.lang.Object ref = postback_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
postback_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getTextBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_);
}
if (!getPostbackBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, postback_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getTextBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_);
}
if (!getPostbackBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, postback_);
}
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.v2.Intent.Message.Card.Button)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Message.Card.Button other = (com.google.cloud.dialogflow.v2.Intent.Message.Card.Button) obj;
boolean result = true;
result = result && getText()
.equals(other.getText());
result = result && getPostback()
.equals(other.getPostback());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TEXT_FIELD_NUMBER;
hash = (53 * hash) + getText().hashCode();
hash = (37 * hash) + POSTBACK_FIELD_NUMBER;
hash = (53 * hash) + getPostback().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Card.Button parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Card.Button parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Card.Button parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Card.Button parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Card.Button parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Card.Button parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Card.Button parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Card.Button parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Card.Button parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Card.Button parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Card.Button parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Card.Button parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.Message.Card.Button prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* Optional. Contains information about a button.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.Card.Button}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.Card.Button)
com.google.cloud.dialogflow.v2.Intent.Message.Card.ButtonOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Card_Button_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Card_Button_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.Card.Button.class, com.google.cloud.dialogflow.v2.Intent.Message.Card.Button.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.Intent.Message.Card.Button.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
text_ = "";
postback_ = "";
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Card_Button_descriptor;
}
public com.google.cloud.dialogflow.v2.Intent.Message.Card.Button getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.Card.Button.getDefaultInstance();
}
public com.google.cloud.dialogflow.v2.Intent.Message.Card.Button build() {
com.google.cloud.dialogflow.v2.Intent.Message.Card.Button result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.cloud.dialogflow.v2.Intent.Message.Card.Button buildPartial() {
com.google.cloud.dialogflow.v2.Intent.Message.Card.Button result = new com.google.cloud.dialogflow.v2.Intent.Message.Card.Button(this);
result.text_ = text_;
result.postback_ = postback_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent.Message.Card.Button) {
return mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.Card.Button)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.Message.Card.Button other) {
if (other == com.google.cloud.dialogflow.v2.Intent.Message.Card.Button.getDefaultInstance()) return this;
if (!other.getText().isEmpty()) {
text_ = other.text_;
onChanged();
}
if (!other.getPostback().isEmpty()) {
postback_ = other.postback_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.dialogflow.v2.Intent.Message.Card.Button parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.dialogflow.v2.Intent.Message.Card.Button) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object text_ = "";
/**
*
* Optional. The text to show on the button.
*
*
* string text = 1;
*/
public java.lang.String getText() {
java.lang.Object ref = text_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
text_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional. The text to show on the button.
*
*
* string text = 1;
*/
public com.google.protobuf.ByteString
getTextBytes() {
java.lang.Object ref = text_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
text_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Optional. The text to show on the button.
*
*
* string text = 1;
*/
public Builder setText(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
text_ = value;
onChanged();
return this;
}
/**
*
* Optional. The text to show on the button.
*
*
* string text = 1;
*/
public Builder clearText() {
text_ = getDefaultInstance().getText();
onChanged();
return this;
}
/**
*
* Optional. The text to show on the button.
*
*
* string text = 1;
*/
public Builder setTextBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
text_ = value;
onChanged();
return this;
}
private java.lang.Object postback_ = "";
/**
*
* Optional. The text to send back to the Dialogflow API or a URI to
* open.
*
*
* string postback = 2;
*/
public java.lang.String getPostback() {
java.lang.Object ref = postback_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
postback_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional. The text to send back to the Dialogflow API or a URI to
* open.
*
*
* string postback = 2;
*/
public com.google.protobuf.ByteString
getPostbackBytes() {
java.lang.Object ref = postback_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
postback_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Optional. The text to send back to the Dialogflow API or a URI to
* open.
*
*
* string postback = 2;
*/
public Builder setPostback(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
postback_ = value;
onChanged();
return this;
}
/**
*
* Optional. The text to send back to the Dialogflow API or a URI to
* open.
*
*
* string postback = 2;
*/
public Builder clearPostback() {
postback_ = getDefaultInstance().getPostback();
onChanged();
return this;
}
/**
*
* Optional. The text to send back to the Dialogflow API or a URI to
* open.
*
*
* string postback = 2;
*/
public Builder setPostbackBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
postback_ = value;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.Card.Button)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.Card.Button)
private static final com.google.cloud.dialogflow.v2.Intent.Message.Card.Button DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Message.Card.Button();
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Card.Button getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Button parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Button(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.cloud.dialogflow.v2.Intent.Message.Card.Button getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int TITLE_FIELD_NUMBER = 1;
private volatile java.lang.Object title_;
/**
*
* Optional. The title of the card.
*
*
* string title = 1;
*/
public java.lang.String getTitle() {
java.lang.Object ref = title_;
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();
title_ = s;
return s;
}
}
/**
*
* Optional. The title of the card.
*
*
* string title = 1;
*/
public com.google.protobuf.ByteString
getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SUBTITLE_FIELD_NUMBER = 2;
private volatile java.lang.Object subtitle_;
/**
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2;
*/
public java.lang.String getSubtitle() {
java.lang.Object ref = subtitle_;
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();
subtitle_ = s;
return s;
}
}
/**
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2;
*/
public com.google.protobuf.ByteString
getSubtitleBytes() {
java.lang.Object ref = subtitle_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
subtitle_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int IMAGE_URI_FIELD_NUMBER = 3;
private volatile java.lang.Object imageUri_;
/**
*
* Optional. The public URI to an image file for the card.
*
*
* string image_uri = 3;
*/
public java.lang.String getImageUri() {
java.lang.Object ref = imageUri_;
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();
imageUri_ = s;
return s;
}
}
/**
*
* Optional. The public URI to an image file for the card.
*
*
* string image_uri = 3;
*/
public com.google.protobuf.ByteString
getImageUriBytes() {
java.lang.Object ref = imageUri_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
imageUri_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int BUTTONS_FIELD_NUMBER = 4;
private java.util.List buttons_;
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4;
*/
public java.util.List getButtonsList() {
return buttons_;
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4;
*/
public java.util.List extends com.google.cloud.dialogflow.v2.Intent.Message.Card.ButtonOrBuilder>
getButtonsOrBuilderList() {
return buttons_;
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4;
*/
public int getButtonsCount() {
return buttons_.size();
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Card.Button getButtons(int index) {
return buttons_.get(index);
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Card.ButtonOrBuilder getButtonsOrBuilder(
int index) {
return buttons_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getTitleBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_);
}
if (!getSubtitleBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, subtitle_);
}
if (!getImageUriBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, imageUri_);
}
for (int i = 0; i < buttons_.size(); i++) {
output.writeMessage(4, buttons_.get(i));
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getTitleBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_);
}
if (!getSubtitleBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, subtitle_);
}
if (!getImageUriBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, imageUri_);
}
for (int i = 0; i < buttons_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, buttons_.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.v2.Intent.Message.Card)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Message.Card other = (com.google.cloud.dialogflow.v2.Intent.Message.Card) obj;
boolean result = true;
result = result && getTitle()
.equals(other.getTitle());
result = result && getSubtitle()
.equals(other.getSubtitle());
result = result && getImageUri()
.equals(other.getImageUri());
result = result && getButtonsList()
.equals(other.getButtonsList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TITLE_FIELD_NUMBER;
hash = (53 * hash) + getTitle().hashCode();
hash = (37 * hash) + SUBTITLE_FIELD_NUMBER;
hash = (53 * hash) + getSubtitle().hashCode();
hash = (37 * hash) + IMAGE_URI_FIELD_NUMBER;
hash = (53 * hash) + getImageUri().hashCode();
if (getButtonsCount() > 0) {
hash = (37 * hash) + BUTTONS_FIELD_NUMBER;
hash = (53 * hash) + getButtonsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Card parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Card parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Card parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Card parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Card parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Card parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Card parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Card parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Card parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Card parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Card parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Card parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.Message.Card prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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 card response message.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.Card}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.Card)
com.google.cloud.dialogflow.v2.Intent.Message.CardOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Card_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Card_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.Card.class, com.google.cloud.dialogflow.v2.Intent.Message.Card.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.Intent.Message.Card.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getButtonsFieldBuilder();
}
}
public Builder clear() {
super.clear();
title_ = "";
subtitle_ = "";
imageUri_ = "";
if (buttonsBuilder_ == null) {
buttons_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
} else {
buttonsBuilder_.clear();
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Card_descriptor;
}
public com.google.cloud.dialogflow.v2.Intent.Message.Card getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.Card.getDefaultInstance();
}
public com.google.cloud.dialogflow.v2.Intent.Message.Card build() {
com.google.cloud.dialogflow.v2.Intent.Message.Card result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.cloud.dialogflow.v2.Intent.Message.Card buildPartial() {
com.google.cloud.dialogflow.v2.Intent.Message.Card result = new com.google.cloud.dialogflow.v2.Intent.Message.Card(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.title_ = title_;
result.subtitle_ = subtitle_;
result.imageUri_ = imageUri_;
if (buttonsBuilder_ == null) {
if (((bitField0_ & 0x00000008) == 0x00000008)) {
buttons_ = java.util.Collections.unmodifiableList(buttons_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.buttons_ = buttons_;
} else {
result.buttons_ = buttonsBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent.Message.Card) {
return mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.Card)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.Message.Card other) {
if (other == com.google.cloud.dialogflow.v2.Intent.Message.Card.getDefaultInstance()) return this;
if (!other.getTitle().isEmpty()) {
title_ = other.title_;
onChanged();
}
if (!other.getSubtitle().isEmpty()) {
subtitle_ = other.subtitle_;
onChanged();
}
if (!other.getImageUri().isEmpty()) {
imageUri_ = other.imageUri_;
onChanged();
}
if (buttonsBuilder_ == null) {
if (!other.buttons_.isEmpty()) {
if (buttons_.isEmpty()) {
buttons_ = other.buttons_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureButtonsIsMutable();
buttons_.addAll(other.buttons_);
}
onChanged();
}
} else {
if (!other.buttons_.isEmpty()) {
if (buttonsBuilder_.isEmpty()) {
buttonsBuilder_.dispose();
buttonsBuilder_ = null;
buttons_ = other.buttons_;
bitField0_ = (bitField0_ & ~0x00000008);
buttonsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getButtonsFieldBuilder() : null;
} else {
buttonsBuilder_.addAllMessages(other.buttons_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.dialogflow.v2.Intent.Message.Card parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.dialogflow.v2.Intent.Message.Card) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object title_ = "";
/**
*
* Optional. The title of the card.
*
*
* string title = 1;
*/
public java.lang.String getTitle() {
java.lang.Object ref = title_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
title_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional. The title of the card.
*
*
* string title = 1;
*/
public com.google.protobuf.ByteString
getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Optional. The title of the card.
*
*
* string title = 1;
*/
public Builder setTitle(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
title_ = value;
onChanged();
return this;
}
/**
*
* Optional. The title of the card.
*
*
* string title = 1;
*/
public Builder clearTitle() {
title_ = getDefaultInstance().getTitle();
onChanged();
return this;
}
/**
*
* Optional. The title of the card.
*
*
* string title = 1;
*/
public Builder setTitleBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
title_ = value;
onChanged();
return this;
}
private java.lang.Object subtitle_ = "";
/**
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2;
*/
public java.lang.String getSubtitle() {
java.lang.Object ref = subtitle_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
subtitle_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2;
*/
public com.google.protobuf.ByteString
getSubtitleBytes() {
java.lang.Object ref = subtitle_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
subtitle_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2;
*/
public Builder setSubtitle(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
subtitle_ = value;
onChanged();
return this;
}
/**
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2;
*/
public Builder clearSubtitle() {
subtitle_ = getDefaultInstance().getSubtitle();
onChanged();
return this;
}
/**
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2;
*/
public Builder setSubtitleBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
subtitle_ = value;
onChanged();
return this;
}
private java.lang.Object imageUri_ = "";
/**
*
* Optional. The public URI to an image file for the card.
*
*
* string image_uri = 3;
*/
public java.lang.String getImageUri() {
java.lang.Object ref = imageUri_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
imageUri_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional. The public URI to an image file for the card.
*
*
* string image_uri = 3;
*/
public com.google.protobuf.ByteString
getImageUriBytes() {
java.lang.Object ref = imageUri_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
imageUri_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Optional. The public URI to an image file for the card.
*
*
* string image_uri = 3;
*/
public Builder setImageUri(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
imageUri_ = value;
onChanged();
return this;
}
/**
*
* Optional. The public URI to an image file for the card.
*
*
* string image_uri = 3;
*/
public Builder clearImageUri() {
imageUri_ = getDefaultInstance().getImageUri();
onChanged();
return this;
}
/**
*
* Optional. The public URI to an image file for the card.
*
*
* string image_uri = 3;
*/
public Builder setImageUriBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
imageUri_ = value;
onChanged();
return this;
}
private java.util.List buttons_ =
java.util.Collections.emptyList();
private void ensureButtonsIsMutable() {
if (!((bitField0_ & 0x00000008) == 0x00000008)) {
buttons_ = new java.util.ArrayList(buttons_);
bitField0_ |= 0x00000008;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.Card.Button, com.google.cloud.dialogflow.v2.Intent.Message.Card.Button.Builder, com.google.cloud.dialogflow.v2.Intent.Message.Card.ButtonOrBuilder> buttonsBuilder_;
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4;
*/
public java.util.List getButtonsList() {
if (buttonsBuilder_ == null) {
return java.util.Collections.unmodifiableList(buttons_);
} else {
return buttonsBuilder_.getMessageList();
}
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4;
*/
public int getButtonsCount() {
if (buttonsBuilder_ == null) {
return buttons_.size();
} else {
return buttonsBuilder_.getCount();
}
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Card.Button getButtons(int index) {
if (buttonsBuilder_ == null) {
return buttons_.get(index);
} else {
return buttonsBuilder_.getMessage(index);
}
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4;
*/
public Builder setButtons(
int index, com.google.cloud.dialogflow.v2.Intent.Message.Card.Button value) {
if (buttonsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureButtonsIsMutable();
buttons_.set(index, value);
onChanged();
} else {
buttonsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4;
*/
public Builder setButtons(
int index, com.google.cloud.dialogflow.v2.Intent.Message.Card.Button.Builder builderForValue) {
if (buttonsBuilder_ == null) {
ensureButtonsIsMutable();
buttons_.set(index, builderForValue.build());
onChanged();
} else {
buttonsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4;
*/
public Builder addButtons(com.google.cloud.dialogflow.v2.Intent.Message.Card.Button value) {
if (buttonsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureButtonsIsMutable();
buttons_.add(value);
onChanged();
} else {
buttonsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4;
*/
public Builder addButtons(
int index, com.google.cloud.dialogflow.v2.Intent.Message.Card.Button value) {
if (buttonsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureButtonsIsMutable();
buttons_.add(index, value);
onChanged();
} else {
buttonsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4;
*/
public Builder addButtons(
com.google.cloud.dialogflow.v2.Intent.Message.Card.Button.Builder builderForValue) {
if (buttonsBuilder_ == null) {
ensureButtonsIsMutable();
buttons_.add(builderForValue.build());
onChanged();
} else {
buttonsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4;
*/
public Builder addButtons(
int index, com.google.cloud.dialogflow.v2.Intent.Message.Card.Button.Builder builderForValue) {
if (buttonsBuilder_ == null) {
ensureButtonsIsMutable();
buttons_.add(index, builderForValue.build());
onChanged();
} else {
buttonsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4;
*/
public Builder addAllButtons(
java.lang.Iterable extends com.google.cloud.dialogflow.v2.Intent.Message.Card.Button> values) {
if (buttonsBuilder_ == null) {
ensureButtonsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, buttons_);
onChanged();
} else {
buttonsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4;
*/
public Builder clearButtons() {
if (buttonsBuilder_ == null) {
buttons_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
buttonsBuilder_.clear();
}
return this;
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4;
*/
public Builder removeButtons(int index) {
if (buttonsBuilder_ == null) {
ensureButtonsIsMutable();
buttons_.remove(index);
onChanged();
} else {
buttonsBuilder_.remove(index);
}
return this;
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Card.Button.Builder getButtonsBuilder(
int index) {
return getButtonsFieldBuilder().getBuilder(index);
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Card.ButtonOrBuilder getButtonsOrBuilder(
int index) {
if (buttonsBuilder_ == null) {
return buttons_.get(index); } else {
return buttonsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4;
*/
public java.util.List extends com.google.cloud.dialogflow.v2.Intent.Message.Card.ButtonOrBuilder>
getButtonsOrBuilderList() {
if (buttonsBuilder_ != null) {
return buttonsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(buttons_);
}
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Card.Button.Builder addButtonsBuilder() {
return getButtonsFieldBuilder().addBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.Card.Button.getDefaultInstance());
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Card.Button.Builder addButtonsBuilder(
int index) {
return getButtonsFieldBuilder().addBuilder(
index, com.google.cloud.dialogflow.v2.Intent.Message.Card.Button.getDefaultInstance());
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4;
*/
public java.util.List
getButtonsBuilderList() {
return getButtonsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.Card.Button, com.google.cloud.dialogflow.v2.Intent.Message.Card.Button.Builder, com.google.cloud.dialogflow.v2.Intent.Message.Card.ButtonOrBuilder>
getButtonsFieldBuilder() {
if (buttonsBuilder_ == null) {
buttonsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.Card.Button, com.google.cloud.dialogflow.v2.Intent.Message.Card.Button.Builder, com.google.cloud.dialogflow.v2.Intent.Message.Card.ButtonOrBuilder>(
buttons_,
((bitField0_ & 0x00000008) == 0x00000008),
getParentForChildren(),
isClean());
buttons_ = null;
}
return buttonsBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.Card)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.Card)
private static final com.google.cloud.dialogflow.v2.Intent.Message.Card DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Message.Card();
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Card getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Card parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Card(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.cloud.dialogflow.v2.Intent.Message.Card getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface SimpleResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.SimpleResponse)
com.google.protobuf.MessageOrBuilder {
/**
*
* One of text_to_speech or ssml must be provided. The plain text of the
* speech output. Mutually exclusive with ssml.
*
*
* string text_to_speech = 1;
*/
java.lang.String getTextToSpeech();
/**
*
* One of text_to_speech or ssml must be provided. The plain text of the
* speech output. Mutually exclusive with ssml.
*
*
* string text_to_speech = 1;
*/
com.google.protobuf.ByteString
getTextToSpeechBytes();
/**
*
* One of text_to_speech or ssml must be provided. Structured spoken
* response to the user in the SSML format. Mutually exclusive with
* text_to_speech.
*
*
* string ssml = 2;
*/
java.lang.String getSsml();
/**
*
* One of text_to_speech or ssml must be provided. Structured spoken
* response to the user in the SSML format. Mutually exclusive with
* text_to_speech.
*
*
* string ssml = 2;
*/
com.google.protobuf.ByteString
getSsmlBytes();
/**
*
* Optional. The text to display.
*
*
* string display_text = 3;
*/
java.lang.String getDisplayText();
/**
*
* Optional. The text to display.
*
*
* string display_text = 3;
*/
com.google.protobuf.ByteString
getDisplayTextBytes();
}
/**
*
* The simple response message containing speech or text.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.SimpleResponse}
*/
public static final class SimpleResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.SimpleResponse)
SimpleResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use SimpleResponse.newBuilder() to construct.
private SimpleResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SimpleResponse() {
textToSpeech_ = "";
ssml_ = "";
displayText_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private SimpleResponse(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
textToSpeech_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
ssml_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
displayText_ = s;
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.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_SimpleResponse_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_SimpleResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse.class, com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse.Builder.class);
}
public static final int TEXT_TO_SPEECH_FIELD_NUMBER = 1;
private volatile java.lang.Object textToSpeech_;
/**
*
* One of text_to_speech or ssml must be provided. The plain text of the
* speech output. Mutually exclusive with ssml.
*
*
* string text_to_speech = 1;
*/
public java.lang.String getTextToSpeech() {
java.lang.Object ref = textToSpeech_;
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();
textToSpeech_ = s;
return s;
}
}
/**
*
* One of text_to_speech or ssml must be provided. The plain text of the
* speech output. Mutually exclusive with ssml.
*
*
* string text_to_speech = 1;
*/
public com.google.protobuf.ByteString
getTextToSpeechBytes() {
java.lang.Object ref = textToSpeech_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
textToSpeech_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SSML_FIELD_NUMBER = 2;
private volatile java.lang.Object ssml_;
/**
*
* One of text_to_speech or ssml must be provided. Structured spoken
* response to the user in the SSML format. Mutually exclusive with
* text_to_speech.
*
*
* string ssml = 2;
*/
public java.lang.String getSsml() {
java.lang.Object ref = ssml_;
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();
ssml_ = s;
return s;
}
}
/**
*
* One of text_to_speech or ssml must be provided. Structured spoken
* response to the user in the SSML format. Mutually exclusive with
* text_to_speech.
*
*
* string ssml = 2;
*/
public com.google.protobuf.ByteString
getSsmlBytes() {
java.lang.Object ref = ssml_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
ssml_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DISPLAY_TEXT_FIELD_NUMBER = 3;
private volatile java.lang.Object displayText_;
/**
*
* Optional. The text to display.
*
*
* string display_text = 3;
*/
public java.lang.String getDisplayText() {
java.lang.Object ref = displayText_;
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();
displayText_ = s;
return s;
}
}
/**
*
* Optional. The text to display.
*
*
* string display_text = 3;
*/
public com.google.protobuf.ByteString
getDisplayTextBytes() {
java.lang.Object ref = displayText_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
displayText_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getTextToSpeechBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, textToSpeech_);
}
if (!getSsmlBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ssml_);
}
if (!getDisplayTextBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayText_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getTextToSpeechBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, textToSpeech_);
}
if (!getSsmlBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ssml_);
}
if (!getDisplayTextBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayText_);
}
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.v2.Intent.Message.SimpleResponse)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse other = (com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse) obj;
boolean result = true;
result = result && getTextToSpeech()
.equals(other.getTextToSpeech());
result = result && getSsml()
.equals(other.getSsml());
result = result && getDisplayText()
.equals(other.getDisplayText());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TEXT_TO_SPEECH_FIELD_NUMBER;
hash = (53 * hash) + getTextToSpeech().hashCode();
hash = (37 * hash) + SSML_FIELD_NUMBER;
hash = (53 * hash) + getSsml().hashCode();
hash = (37 * hash) + DISPLAY_TEXT_FIELD_NUMBER;
hash = (53 * hash) + getDisplayText().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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 simple response message containing speech or text.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.SimpleResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.SimpleResponse)
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_SimpleResponse_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_SimpleResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse.class, com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
textToSpeech_ = "";
ssml_ = "";
displayText_ = "";
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_SimpleResponse_descriptor;
}
public com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse.getDefaultInstance();
}
public com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse build() {
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse buildPartial() {
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse result = new com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse(this);
result.textToSpeech_ = textToSpeech_;
result.ssml_ = ssml_;
result.displayText_ = displayText_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse) {
return mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse other) {
if (other == com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse.getDefaultInstance()) return this;
if (!other.getTextToSpeech().isEmpty()) {
textToSpeech_ = other.textToSpeech_;
onChanged();
}
if (!other.getSsml().isEmpty()) {
ssml_ = other.ssml_;
onChanged();
}
if (!other.getDisplayText().isEmpty()) {
displayText_ = other.displayText_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object textToSpeech_ = "";
/**
*
* One of text_to_speech or ssml must be provided. The plain text of the
* speech output. Mutually exclusive with ssml.
*
*
* string text_to_speech = 1;
*/
public java.lang.String getTextToSpeech() {
java.lang.Object ref = textToSpeech_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
textToSpeech_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* One of text_to_speech or ssml must be provided. The plain text of the
* speech output. Mutually exclusive with ssml.
*
*
* string text_to_speech = 1;
*/
public com.google.protobuf.ByteString
getTextToSpeechBytes() {
java.lang.Object ref = textToSpeech_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
textToSpeech_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* One of text_to_speech or ssml must be provided. The plain text of the
* speech output. Mutually exclusive with ssml.
*
*
* string text_to_speech = 1;
*/
public Builder setTextToSpeech(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
textToSpeech_ = value;
onChanged();
return this;
}
/**
*
* One of text_to_speech or ssml must be provided. The plain text of the
* speech output. Mutually exclusive with ssml.
*
*
* string text_to_speech = 1;
*/
public Builder clearTextToSpeech() {
textToSpeech_ = getDefaultInstance().getTextToSpeech();
onChanged();
return this;
}
/**
*
* One of text_to_speech or ssml must be provided. The plain text of the
* speech output. Mutually exclusive with ssml.
*
*
* string text_to_speech = 1;
*/
public Builder setTextToSpeechBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
textToSpeech_ = value;
onChanged();
return this;
}
private java.lang.Object ssml_ = "";
/**
*
* One of text_to_speech or ssml must be provided. Structured spoken
* response to the user in the SSML format. Mutually exclusive with
* text_to_speech.
*
*
* string ssml = 2;
*/
public java.lang.String getSsml() {
java.lang.Object ref = ssml_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
ssml_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* One of text_to_speech or ssml must be provided. Structured spoken
* response to the user in the SSML format. Mutually exclusive with
* text_to_speech.
*
*
* string ssml = 2;
*/
public com.google.protobuf.ByteString
getSsmlBytes() {
java.lang.Object ref = ssml_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
ssml_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* One of text_to_speech or ssml must be provided. Structured spoken
* response to the user in the SSML format. Mutually exclusive with
* text_to_speech.
*
*
* string ssml = 2;
*/
public Builder setSsml(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ssml_ = value;
onChanged();
return this;
}
/**
*
* One of text_to_speech or ssml must be provided. Structured spoken
* response to the user in the SSML format. Mutually exclusive with
* text_to_speech.
*
*
* string ssml = 2;
*/
public Builder clearSsml() {
ssml_ = getDefaultInstance().getSsml();
onChanged();
return this;
}
/**
*
* One of text_to_speech or ssml must be provided. Structured spoken
* response to the user in the SSML format. Mutually exclusive with
* text_to_speech.
*
*
* string ssml = 2;
*/
public Builder setSsmlBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ssml_ = value;
onChanged();
return this;
}
private java.lang.Object displayText_ = "";
/**
*
* Optional. The text to display.
*
*
* string display_text = 3;
*/
public java.lang.String getDisplayText() {
java.lang.Object ref = displayText_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
displayText_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional. The text to display.
*
*
* string display_text = 3;
*/
public com.google.protobuf.ByteString
getDisplayTextBytes() {
java.lang.Object ref = displayText_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
displayText_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Optional. The text to display.
*
*
* string display_text = 3;
*/
public Builder setDisplayText(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
displayText_ = value;
onChanged();
return this;
}
/**
*
* Optional. The text to display.
*
*
* string display_text = 3;
*/
public Builder clearDisplayText() {
displayText_ = getDefaultInstance().getDisplayText();
onChanged();
return this;
}
/**
*
* Optional. The text to display.
*
*
* string display_text = 3;
*/
public Builder setDisplayTextBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
displayText_ = value;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.SimpleResponse)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.SimpleResponse)
private static final com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse();
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public SimpleResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SimpleResponse(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface SimpleResponsesOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.SimpleResponses)
com.google.protobuf.MessageOrBuilder {
/**
*
* Required. The list of simple responses.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1;
*/
java.util.List
getSimpleResponsesList();
/**
*
* Required. The list of simple responses.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1;
*/
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse getSimpleResponses(int index);
/**
*
* Required. The list of simple responses.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1;
*/
int getSimpleResponsesCount();
/**
*
* Required. The list of simple responses.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1;
*/
java.util.List extends com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponseOrBuilder>
getSimpleResponsesOrBuilderList();
/**
*
* Required. The list of simple responses.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1;
*/
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponseOrBuilder getSimpleResponsesOrBuilder(
int index);
}
/**
*
* The collection of simple response candidates.
* This message in `QueryResult.fulfillment_messages` and
* `WebhookResponse.fulfillment_messages` should contain only one
* `SimpleResponse`.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.SimpleResponses}
*/
public static final class SimpleResponses extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.SimpleResponses)
SimpleResponsesOrBuilder {
private static final long serialVersionUID = 0L;
// Use SimpleResponses.newBuilder() to construct.
private SimpleResponses(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SimpleResponses() {
simpleResponses_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private SimpleResponses(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
simpleResponses_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
simpleResponses_.add(
input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse.parser(), extensionRegistry));
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) == 0x00000001)) {
simpleResponses_ = java.util.Collections.unmodifiableList(simpleResponses_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_SimpleResponses_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_SimpleResponses_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses.class, com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses.Builder.class);
}
public static final int SIMPLE_RESPONSES_FIELD_NUMBER = 1;
private java.util.List simpleResponses_;
/**
*
* Required. The list of simple responses.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1;
*/
public java.util.List getSimpleResponsesList() {
return simpleResponses_;
}
/**
*
* Required. The list of simple responses.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1;
*/
public java.util.List extends com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponseOrBuilder>
getSimpleResponsesOrBuilderList() {
return simpleResponses_;
}
/**
*
* Required. The list of simple responses.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1;
*/
public int getSimpleResponsesCount() {
return simpleResponses_.size();
}
/**
*
* Required. The list of simple responses.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse getSimpleResponses(int index) {
return simpleResponses_.get(index);
}
/**
*
* Required. The list of simple responses.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponseOrBuilder getSimpleResponsesOrBuilder(
int index) {
return simpleResponses_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < simpleResponses_.size(); i++) {
output.writeMessage(1, simpleResponses_.get(i));
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < simpleResponses_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, simpleResponses_.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.v2.Intent.Message.SimpleResponses)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses other = (com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses) obj;
boolean result = true;
result = result && getSimpleResponsesList()
.equals(other.getSimpleResponsesList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getSimpleResponsesCount() > 0) {
hash = (37 * hash) + SIMPLE_RESPONSES_FIELD_NUMBER;
hash = (53 * hash) + getSimpleResponsesList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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 collection of simple response candidates.
* This message in `QueryResult.fulfillment_messages` and
* `WebhookResponse.fulfillment_messages` should contain only one
* `SimpleResponse`.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.SimpleResponses}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.SimpleResponses)
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponsesOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_SimpleResponses_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_SimpleResponses_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses.class, com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getSimpleResponsesFieldBuilder();
}
}
public Builder clear() {
super.clear();
if (simpleResponsesBuilder_ == null) {
simpleResponses_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
simpleResponsesBuilder_.clear();
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_SimpleResponses_descriptor;
}
public com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses.getDefaultInstance();
}
public com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses build() {
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses buildPartial() {
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses result = new com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses(this);
int from_bitField0_ = bitField0_;
if (simpleResponsesBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
simpleResponses_ = java.util.Collections.unmodifiableList(simpleResponses_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.simpleResponses_ = simpleResponses_;
} else {
result.simpleResponses_ = simpleResponsesBuilder_.build();
}
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses) {
return mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses other) {
if (other == com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses.getDefaultInstance()) return this;
if (simpleResponsesBuilder_ == null) {
if (!other.simpleResponses_.isEmpty()) {
if (simpleResponses_.isEmpty()) {
simpleResponses_ = other.simpleResponses_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureSimpleResponsesIsMutable();
simpleResponses_.addAll(other.simpleResponses_);
}
onChanged();
}
} else {
if (!other.simpleResponses_.isEmpty()) {
if (simpleResponsesBuilder_.isEmpty()) {
simpleResponsesBuilder_.dispose();
simpleResponsesBuilder_ = null;
simpleResponses_ = other.simpleResponses_;
bitField0_ = (bitField0_ & ~0x00000001);
simpleResponsesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getSimpleResponsesFieldBuilder() : null;
} else {
simpleResponsesBuilder_.addAllMessages(other.simpleResponses_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List simpleResponses_ =
java.util.Collections.emptyList();
private void ensureSimpleResponsesIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
simpleResponses_ = new java.util.ArrayList(simpleResponses_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse, com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse.Builder, com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponseOrBuilder> simpleResponsesBuilder_;
/**
*
* Required. The list of simple responses.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1;
*/
public java.util.List getSimpleResponsesList() {
if (simpleResponsesBuilder_ == null) {
return java.util.Collections.unmodifiableList(simpleResponses_);
} else {
return simpleResponsesBuilder_.getMessageList();
}
}
/**
*
* Required. The list of simple responses.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1;
*/
public int getSimpleResponsesCount() {
if (simpleResponsesBuilder_ == null) {
return simpleResponses_.size();
} else {
return simpleResponsesBuilder_.getCount();
}
}
/**
*
* Required. The list of simple responses.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse getSimpleResponses(int index) {
if (simpleResponsesBuilder_ == null) {
return simpleResponses_.get(index);
} else {
return simpleResponsesBuilder_.getMessage(index);
}
}
/**
*
* Required. The list of simple responses.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1;
*/
public Builder setSimpleResponses(
int index, com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse value) {
if (simpleResponsesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSimpleResponsesIsMutable();
simpleResponses_.set(index, value);
onChanged();
} else {
simpleResponsesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Required. The list of simple responses.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1;
*/
public Builder setSimpleResponses(
int index, com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse.Builder builderForValue) {
if (simpleResponsesBuilder_ == null) {
ensureSimpleResponsesIsMutable();
simpleResponses_.set(index, builderForValue.build());
onChanged();
} else {
simpleResponsesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Required. The list of simple responses.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1;
*/
public Builder addSimpleResponses(com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse value) {
if (simpleResponsesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSimpleResponsesIsMutable();
simpleResponses_.add(value);
onChanged();
} else {
simpleResponsesBuilder_.addMessage(value);
}
return this;
}
/**
*
* Required. The list of simple responses.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1;
*/
public Builder addSimpleResponses(
int index, com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse value) {
if (simpleResponsesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSimpleResponsesIsMutable();
simpleResponses_.add(index, value);
onChanged();
} else {
simpleResponsesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Required. The list of simple responses.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1;
*/
public Builder addSimpleResponses(
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse.Builder builderForValue) {
if (simpleResponsesBuilder_ == null) {
ensureSimpleResponsesIsMutable();
simpleResponses_.add(builderForValue.build());
onChanged();
} else {
simpleResponsesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Required. The list of simple responses.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1;
*/
public Builder addSimpleResponses(
int index, com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse.Builder builderForValue) {
if (simpleResponsesBuilder_ == null) {
ensureSimpleResponsesIsMutable();
simpleResponses_.add(index, builderForValue.build());
onChanged();
} else {
simpleResponsesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Required. The list of simple responses.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1;
*/
public Builder addAllSimpleResponses(
java.lang.Iterable extends com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse> values) {
if (simpleResponsesBuilder_ == null) {
ensureSimpleResponsesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, simpleResponses_);
onChanged();
} else {
simpleResponsesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Required. The list of simple responses.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1;
*/
public Builder clearSimpleResponses() {
if (simpleResponsesBuilder_ == null) {
simpleResponses_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
simpleResponsesBuilder_.clear();
}
return this;
}
/**
*
* Required. The list of simple responses.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1;
*/
public Builder removeSimpleResponses(int index) {
if (simpleResponsesBuilder_ == null) {
ensureSimpleResponsesIsMutable();
simpleResponses_.remove(index);
onChanged();
} else {
simpleResponsesBuilder_.remove(index);
}
return this;
}
/**
*
* Required. The list of simple responses.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse.Builder getSimpleResponsesBuilder(
int index) {
return getSimpleResponsesFieldBuilder().getBuilder(index);
}
/**
*
* Required. The list of simple responses.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponseOrBuilder getSimpleResponsesOrBuilder(
int index) {
if (simpleResponsesBuilder_ == null) {
return simpleResponses_.get(index); } else {
return simpleResponsesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Required. The list of simple responses.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1;
*/
public java.util.List extends com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponseOrBuilder>
getSimpleResponsesOrBuilderList() {
if (simpleResponsesBuilder_ != null) {
return simpleResponsesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(simpleResponses_);
}
}
/**
*
* Required. The list of simple responses.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse.Builder addSimpleResponsesBuilder() {
return getSimpleResponsesFieldBuilder().addBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse.getDefaultInstance());
}
/**
*
* Required. The list of simple responses.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse.Builder addSimpleResponsesBuilder(
int index) {
return getSimpleResponsesFieldBuilder().addBuilder(
index, com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse.getDefaultInstance());
}
/**
*
* Required. The list of simple responses.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1;
*/
public java.util.List
getSimpleResponsesBuilderList() {
return getSimpleResponsesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse, com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse.Builder, com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponseOrBuilder>
getSimpleResponsesFieldBuilder() {
if (simpleResponsesBuilder_ == null) {
simpleResponsesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse, com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse.Builder, com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponseOrBuilder>(
simpleResponses_,
((bitField0_ & 0x00000001) == 0x00000001),
getParentForChildren(),
isClean());
simpleResponses_ = null;
}
return simpleResponsesBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.SimpleResponses)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.SimpleResponses)
private static final com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses();
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public SimpleResponses parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SimpleResponses(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface BasicCardOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.BasicCard)
com.google.protobuf.MessageOrBuilder {
/**
*
* Optional. The title of the card.
*
*
* string title = 1;
*/
java.lang.String getTitle();
/**
*
* Optional. The title of the card.
*
*
* string title = 1;
*/
com.google.protobuf.ByteString
getTitleBytes();
/**
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2;
*/
java.lang.String getSubtitle();
/**
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2;
*/
com.google.protobuf.ByteString
getSubtitleBytes();
/**
*
* Required, unless image is present. The body text of the card.
*
*
* string formatted_text = 3;
*/
java.lang.String getFormattedText();
/**
*
* Required, unless image is present. The body text of the card.
*
*
* string formatted_text = 3;
*/
com.google.protobuf.ByteString
getFormattedTextBytes();
/**
*
* Optional. The image for the card.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
boolean hasImage();
/**
*
* Optional. The image for the card.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
com.google.cloud.dialogflow.v2.Intent.Message.Image getImage();
/**
*
* Optional. The image for the card.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder getImageOrBuilder();
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5;
*/
java.util.List
getButtonsList();
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5;
*/
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button getButtons(int index);
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5;
*/
int getButtonsCount();
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5;
*/
java.util.List extends com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.ButtonOrBuilder>
getButtonsOrBuilderList();
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5;
*/
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.ButtonOrBuilder getButtonsOrBuilder(
int index);
}
/**
*
* The basic card message. Useful for displaying information.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.BasicCard}
*/
public static final class BasicCard extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.BasicCard)
BasicCardOrBuilder {
private static final long serialVersionUID = 0L;
// Use BasicCard.newBuilder() to construct.
private BasicCard(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private BasicCard() {
title_ = "";
subtitle_ = "";
formattedText_ = "";
buttons_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private BasicCard(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
title_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
subtitle_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
formattedText_ = s;
break;
}
case 34: {
com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder subBuilder = null;
if (image_ != null) {
subBuilder = image_.toBuilder();
}
image_ = input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.Image.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(image_);
image_ = subBuilder.buildPartial();
}
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
buttons_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000010;
}
buttons_.add(
input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.parser(), extensionRegistry));
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_ & 0x00000010) == 0x00000010)) {
buttons_ = java.util.Collections.unmodifiableList(buttons_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_BasicCard_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_BasicCard_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.class, com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Builder.class);
}
public interface ButtonOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button)
com.google.protobuf.MessageOrBuilder {
/**
*
* Required. The title of the button.
*
*
* string title = 1;
*/
java.lang.String getTitle();
/**
*
* Required. The title of the button.
*
*
* string title = 1;
*/
com.google.protobuf.ByteString
getTitleBytes();
/**
*
* Required. Action to take when a user taps on the button.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction open_uri_action = 2;
*/
boolean hasOpenUriAction();
/**
*
* Required. Action to take when a user taps on the button.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction open_uri_action = 2;
*/
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction getOpenUriAction();
/**
*
* Required. Action to take when a user taps on the button.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction open_uri_action = 2;
*/
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriActionOrBuilder getOpenUriActionOrBuilder();
}
/**
*
* The button object that appears at the bottom of a card.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button}
*/
public static final class Button extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button)
ButtonOrBuilder {
private static final long serialVersionUID = 0L;
// Use Button.newBuilder() to construct.
private Button(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Button() {
title_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Button(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
title_ = s;
break;
}
case 18: {
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction.Builder subBuilder = null;
if (openUriAction_ != null) {
subBuilder = openUriAction_.toBuilder();
}
openUriAction_ = input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(openUriAction_);
openUriAction_ = subBuilder.buildPartial();
}
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.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_BasicCard_Button_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_BasicCard_Button_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.class, com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.Builder.class);
}
public interface OpenUriActionOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction)
com.google.protobuf.MessageOrBuilder {
/**
*
* Required. The HTTP or HTTPS scheme URI.
*
*
* string uri = 1;
*/
java.lang.String getUri();
/**
*
* Required. The HTTP or HTTPS scheme URI.
*
*
* string uri = 1;
*/
com.google.protobuf.ByteString
getUriBytes();
}
/**
*
* Opens the given URI.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction}
*/
public static final class OpenUriAction extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction)
OpenUriActionOrBuilder {
private static final long serialVersionUID = 0L;
// Use OpenUriAction.newBuilder() to construct.
private OpenUriAction(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private OpenUriAction() {
uri_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private OpenUriAction(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
uri_ = s;
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.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_BasicCard_Button_OpenUriAction_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_BasicCard_Button_OpenUriAction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction.class, com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction.Builder.class);
}
public static final int URI_FIELD_NUMBER = 1;
private volatile java.lang.Object uri_;
/**
*
* Required. The HTTP or HTTPS scheme URI.
*
*
* string uri = 1;
*/
public java.lang.String getUri() {
java.lang.Object ref = uri_;
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();
uri_ = s;
return s;
}
}
/**
*
* Required. The HTTP or HTTPS scheme URI.
*
*
* string uri = 1;
*/
public com.google.protobuf.ByteString
getUriBytes() {
java.lang.Object ref = uri_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
uri_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getUriBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getUriBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_);
}
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.v2.Intent.Message.BasicCard.Button.OpenUriAction)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction other = (com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction) obj;
boolean result = true;
result = result && getUri()
.equals(other.getUri());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + URI_FIELD_NUMBER;
hash = (53 * hash) + getUri().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* Opens the given URI.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction)
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriActionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_BasicCard_Button_OpenUriAction_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_BasicCard_Button_OpenUriAction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction.class, com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
uri_ = "";
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_BasicCard_Button_OpenUriAction_descriptor;
}
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction.getDefaultInstance();
}
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction build() {
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction buildPartial() {
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction result = new com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction(this);
result.uri_ = uri_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction) {
return mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction other) {
if (other == com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction.getDefaultInstance()) return this;
if (!other.getUri().isEmpty()) {
uri_ = other.uri_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object uri_ = "";
/**
*
* Required. The HTTP or HTTPS scheme URI.
*
*
* string uri = 1;
*/
public java.lang.String getUri() {
java.lang.Object ref = uri_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
uri_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Required. The HTTP or HTTPS scheme URI.
*
*
* string uri = 1;
*/
public com.google.protobuf.ByteString
getUriBytes() {
java.lang.Object ref = uri_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
uri_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Required. The HTTP or HTTPS scheme URI.
*
*
* string uri = 1;
*/
public Builder setUri(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
uri_ = value;
onChanged();
return this;
}
/**
*
* Required. The HTTP or HTTPS scheme URI.
*
*
* string uri = 1;
*/
public Builder clearUri() {
uri_ = getDefaultInstance().getUri();
onChanged();
return this;
}
/**
*
* Required. The HTTP or HTTPS scheme URI.
*
*
* string uri = 1;
*/
public Builder setUriBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
uri_ = value;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction)
private static final com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction();
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public OpenUriAction parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new OpenUriAction(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int TITLE_FIELD_NUMBER = 1;
private volatile java.lang.Object title_;
/**
*
* Required. The title of the button.
*
*
* string title = 1;
*/
public java.lang.String getTitle() {
java.lang.Object ref = title_;
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();
title_ = s;
return s;
}
}
/**
*
* Required. The title of the button.
*
*
* string title = 1;
*/
public com.google.protobuf.ByteString
getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int OPEN_URI_ACTION_FIELD_NUMBER = 2;
private com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction openUriAction_;
/**
*
* Required. Action to take when a user taps on the button.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction open_uri_action = 2;
*/
public boolean hasOpenUriAction() {
return openUriAction_ != null;
}
/**
*
* Required. Action to take when a user taps on the button.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction open_uri_action = 2;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction getOpenUriAction() {
return openUriAction_ == null ? com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction.getDefaultInstance() : openUriAction_;
}
/**
*
* Required. Action to take when a user taps on the button.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction open_uri_action = 2;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriActionOrBuilder getOpenUriActionOrBuilder() {
return getOpenUriAction();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getTitleBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_);
}
if (openUriAction_ != null) {
output.writeMessage(2, getOpenUriAction());
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getTitleBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_);
}
if (openUriAction_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getOpenUriAction());
}
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.v2.Intent.Message.BasicCard.Button)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button other = (com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button) obj;
boolean result = true;
result = result && getTitle()
.equals(other.getTitle());
result = result && (hasOpenUriAction() == other.hasOpenUriAction());
if (hasOpenUriAction()) {
result = result && getOpenUriAction()
.equals(other.getOpenUriAction());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TITLE_FIELD_NUMBER;
hash = (53 * hash) + getTitle().hashCode();
if (hasOpenUriAction()) {
hash = (37 * hash) + OPEN_URI_ACTION_FIELD_NUMBER;
hash = (53 * hash) + getOpenUriAction().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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 button object that appears at the bottom of a card.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button)
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.ButtonOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_BasicCard_Button_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_BasicCard_Button_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.class, com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
title_ = "";
if (openUriActionBuilder_ == null) {
openUriAction_ = null;
} else {
openUriAction_ = null;
openUriActionBuilder_ = null;
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_BasicCard_Button_descriptor;
}
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.getDefaultInstance();
}
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button build() {
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buildPartial() {
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button result = new com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button(this);
result.title_ = title_;
if (openUriActionBuilder_ == null) {
result.openUriAction_ = openUriAction_;
} else {
result.openUriAction_ = openUriActionBuilder_.build();
}
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button) {
return mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button other) {
if (other == com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.getDefaultInstance()) return this;
if (!other.getTitle().isEmpty()) {
title_ = other.title_;
onChanged();
}
if (other.hasOpenUriAction()) {
mergeOpenUriAction(other.getOpenUriAction());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object title_ = "";
/**
*
* Required. The title of the button.
*
*
* string title = 1;
*/
public java.lang.String getTitle() {
java.lang.Object ref = title_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
title_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Required. The title of the button.
*
*
* string title = 1;
*/
public com.google.protobuf.ByteString
getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Required. The title of the button.
*
*
* string title = 1;
*/
public Builder setTitle(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
title_ = value;
onChanged();
return this;
}
/**
*
* Required. The title of the button.
*
*
* string title = 1;
*/
public Builder clearTitle() {
title_ = getDefaultInstance().getTitle();
onChanged();
return this;
}
/**
*
* Required. The title of the button.
*
*
* string title = 1;
*/
public Builder setTitleBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
title_ = value;
onChanged();
return this;
}
private com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction openUriAction_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction, com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction.Builder, com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriActionOrBuilder> openUriActionBuilder_;
/**
*
* Required. Action to take when a user taps on the button.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction open_uri_action = 2;
*/
public boolean hasOpenUriAction() {
return openUriActionBuilder_ != null || openUriAction_ != null;
}
/**
*
* Required. Action to take when a user taps on the button.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction open_uri_action = 2;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction getOpenUriAction() {
if (openUriActionBuilder_ == null) {
return openUriAction_ == null ? com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction.getDefaultInstance() : openUriAction_;
} else {
return openUriActionBuilder_.getMessage();
}
}
/**
*
* Required. Action to take when a user taps on the button.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction open_uri_action = 2;
*/
public Builder setOpenUriAction(com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction value) {
if (openUriActionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
openUriAction_ = value;
onChanged();
} else {
openUriActionBuilder_.setMessage(value);
}
return this;
}
/**
*
* Required. Action to take when a user taps on the button.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction open_uri_action = 2;
*/
public Builder setOpenUriAction(
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction.Builder builderForValue) {
if (openUriActionBuilder_ == null) {
openUriAction_ = builderForValue.build();
onChanged();
} else {
openUriActionBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Required. Action to take when a user taps on the button.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction open_uri_action = 2;
*/
public Builder mergeOpenUriAction(com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction value) {
if (openUriActionBuilder_ == null) {
if (openUriAction_ != null) {
openUriAction_ =
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction.newBuilder(openUriAction_).mergeFrom(value).buildPartial();
} else {
openUriAction_ = value;
}
onChanged();
} else {
openUriActionBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Required. Action to take when a user taps on the button.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction open_uri_action = 2;
*/
public Builder clearOpenUriAction() {
if (openUriActionBuilder_ == null) {
openUriAction_ = null;
onChanged();
} else {
openUriAction_ = null;
openUriActionBuilder_ = null;
}
return this;
}
/**
*
* Required. Action to take when a user taps on the button.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction open_uri_action = 2;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction.Builder getOpenUriActionBuilder() {
onChanged();
return getOpenUriActionFieldBuilder().getBuilder();
}
/**
*
* Required. Action to take when a user taps on the button.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction open_uri_action = 2;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriActionOrBuilder getOpenUriActionOrBuilder() {
if (openUriActionBuilder_ != null) {
return openUriActionBuilder_.getMessageOrBuilder();
} else {
return openUriAction_ == null ?
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction.getDefaultInstance() : openUriAction_;
}
}
/**
*
* Required. Action to take when a user taps on the button.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction open_uri_action = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction, com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction.Builder, com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriActionOrBuilder>
getOpenUriActionFieldBuilder() {
if (openUriActionBuilder_ == null) {
openUriActionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction, com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction.Builder, com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriActionOrBuilder>(
getOpenUriAction(),
getParentForChildren(),
isClean());
openUriAction_ = null;
}
return openUriActionBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button)
private static final com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button();
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Button parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Button(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int TITLE_FIELD_NUMBER = 1;
private volatile java.lang.Object title_;
/**
*
* Optional. The title of the card.
*
*
* string title = 1;
*/
public java.lang.String getTitle() {
java.lang.Object ref = title_;
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();
title_ = s;
return s;
}
}
/**
*
* Optional. The title of the card.
*
*
* string title = 1;
*/
public com.google.protobuf.ByteString
getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SUBTITLE_FIELD_NUMBER = 2;
private volatile java.lang.Object subtitle_;
/**
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2;
*/
public java.lang.String getSubtitle() {
java.lang.Object ref = subtitle_;
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();
subtitle_ = s;
return s;
}
}
/**
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2;
*/
public com.google.protobuf.ByteString
getSubtitleBytes() {
java.lang.Object ref = subtitle_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
subtitle_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FORMATTED_TEXT_FIELD_NUMBER = 3;
private volatile java.lang.Object formattedText_;
/**
*
* Required, unless image is present. The body text of the card.
*
*
* string formatted_text = 3;
*/
public java.lang.String getFormattedText() {
java.lang.Object ref = formattedText_;
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();
formattedText_ = s;
return s;
}
}
/**
*
* Required, unless image is present. The body text of the card.
*
*
* string formatted_text = 3;
*/
public com.google.protobuf.ByteString
getFormattedTextBytes() {
java.lang.Object ref = formattedText_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
formattedText_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int IMAGE_FIELD_NUMBER = 4;
private com.google.cloud.dialogflow.v2.Intent.Message.Image image_;
/**
*
* Optional. The image for the card.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public boolean hasImage() {
return image_ != null;
}
/**
*
* Optional. The image for the card.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Image getImage() {
return image_ == null ? com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance() : image_;
}
/**
*
* Optional. The image for the card.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder getImageOrBuilder() {
return getImage();
}
public static final int BUTTONS_FIELD_NUMBER = 5;
private java.util.List buttons_;
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5;
*/
public java.util.List getButtonsList() {
return buttons_;
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5;
*/
public java.util.List extends com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.ButtonOrBuilder>
getButtonsOrBuilderList() {
return buttons_;
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5;
*/
public int getButtonsCount() {
return buttons_.size();
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button getButtons(int index) {
return buttons_.get(index);
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.ButtonOrBuilder getButtonsOrBuilder(
int index) {
return buttons_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getTitleBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_);
}
if (!getSubtitleBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, subtitle_);
}
if (!getFormattedTextBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, formattedText_);
}
if (image_ != null) {
output.writeMessage(4, getImage());
}
for (int i = 0; i < buttons_.size(); i++) {
output.writeMessage(5, buttons_.get(i));
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getTitleBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_);
}
if (!getSubtitleBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, subtitle_);
}
if (!getFormattedTextBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, formattedText_);
}
if (image_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getImage());
}
for (int i = 0; i < buttons_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, buttons_.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.v2.Intent.Message.BasicCard)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard other = (com.google.cloud.dialogflow.v2.Intent.Message.BasicCard) obj;
boolean result = true;
result = result && getTitle()
.equals(other.getTitle());
result = result && getSubtitle()
.equals(other.getSubtitle());
result = result && getFormattedText()
.equals(other.getFormattedText());
result = result && (hasImage() == other.hasImage());
if (hasImage()) {
result = result && getImage()
.equals(other.getImage());
}
result = result && getButtonsList()
.equals(other.getButtonsList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TITLE_FIELD_NUMBER;
hash = (53 * hash) + getTitle().hashCode();
hash = (37 * hash) + SUBTITLE_FIELD_NUMBER;
hash = (53 * hash) + getSubtitle().hashCode();
hash = (37 * hash) + FORMATTED_TEXT_FIELD_NUMBER;
hash = (53 * hash) + getFormattedText().hashCode();
if (hasImage()) {
hash = (37 * hash) + IMAGE_FIELD_NUMBER;
hash = (53 * hash) + getImage().hashCode();
}
if (getButtonsCount() > 0) {
hash = (37 * hash) + BUTTONS_FIELD_NUMBER;
hash = (53 * hash) + getButtonsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.Message.BasicCard prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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 basic card message. Useful for displaying information.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.BasicCard}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.BasicCard)
com.google.cloud.dialogflow.v2.Intent.Message.BasicCardOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_BasicCard_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_BasicCard_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.class, com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getButtonsFieldBuilder();
}
}
public Builder clear() {
super.clear();
title_ = "";
subtitle_ = "";
formattedText_ = "";
if (imageBuilder_ == null) {
image_ = null;
} else {
image_ = null;
imageBuilder_ = null;
}
if (buttonsBuilder_ == null) {
buttons_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
} else {
buttonsBuilder_.clear();
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_BasicCard_descriptor;
}
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.getDefaultInstance();
}
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard build() {
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard buildPartial() {
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard result = new com.google.cloud.dialogflow.v2.Intent.Message.BasicCard(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.title_ = title_;
result.subtitle_ = subtitle_;
result.formattedText_ = formattedText_;
if (imageBuilder_ == null) {
result.image_ = image_;
} else {
result.image_ = imageBuilder_.build();
}
if (buttonsBuilder_ == null) {
if (((bitField0_ & 0x00000010) == 0x00000010)) {
buttons_ = java.util.Collections.unmodifiableList(buttons_);
bitField0_ = (bitField0_ & ~0x00000010);
}
result.buttons_ = buttons_;
} else {
result.buttons_ = buttonsBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent.Message.BasicCard) {
return mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.BasicCard)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.Message.BasicCard other) {
if (other == com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.getDefaultInstance()) return this;
if (!other.getTitle().isEmpty()) {
title_ = other.title_;
onChanged();
}
if (!other.getSubtitle().isEmpty()) {
subtitle_ = other.subtitle_;
onChanged();
}
if (!other.getFormattedText().isEmpty()) {
formattedText_ = other.formattedText_;
onChanged();
}
if (other.hasImage()) {
mergeImage(other.getImage());
}
if (buttonsBuilder_ == null) {
if (!other.buttons_.isEmpty()) {
if (buttons_.isEmpty()) {
buttons_ = other.buttons_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensureButtonsIsMutable();
buttons_.addAll(other.buttons_);
}
onChanged();
}
} else {
if (!other.buttons_.isEmpty()) {
if (buttonsBuilder_.isEmpty()) {
buttonsBuilder_.dispose();
buttonsBuilder_ = null;
buttons_ = other.buttons_;
bitField0_ = (bitField0_ & ~0x00000010);
buttonsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getButtonsFieldBuilder() : null;
} else {
buttonsBuilder_.addAllMessages(other.buttons_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.dialogflow.v2.Intent.Message.BasicCard) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object title_ = "";
/**
*
* Optional. The title of the card.
*
*
* string title = 1;
*/
public java.lang.String getTitle() {
java.lang.Object ref = title_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
title_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional. The title of the card.
*
*
* string title = 1;
*/
public com.google.protobuf.ByteString
getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Optional. The title of the card.
*
*
* string title = 1;
*/
public Builder setTitle(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
title_ = value;
onChanged();
return this;
}
/**
*
* Optional. The title of the card.
*
*
* string title = 1;
*/
public Builder clearTitle() {
title_ = getDefaultInstance().getTitle();
onChanged();
return this;
}
/**
*
* Optional. The title of the card.
*
*
* string title = 1;
*/
public Builder setTitleBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
title_ = value;
onChanged();
return this;
}
private java.lang.Object subtitle_ = "";
/**
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2;
*/
public java.lang.String getSubtitle() {
java.lang.Object ref = subtitle_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
subtitle_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2;
*/
public com.google.protobuf.ByteString
getSubtitleBytes() {
java.lang.Object ref = subtitle_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
subtitle_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2;
*/
public Builder setSubtitle(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
subtitle_ = value;
onChanged();
return this;
}
/**
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2;
*/
public Builder clearSubtitle() {
subtitle_ = getDefaultInstance().getSubtitle();
onChanged();
return this;
}
/**
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2;
*/
public Builder setSubtitleBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
subtitle_ = value;
onChanged();
return this;
}
private java.lang.Object formattedText_ = "";
/**
*
* Required, unless image is present. The body text of the card.
*
*
* string formatted_text = 3;
*/
public java.lang.String getFormattedText() {
java.lang.Object ref = formattedText_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
formattedText_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Required, unless image is present. The body text of the card.
*
*
* string formatted_text = 3;
*/
public com.google.protobuf.ByteString
getFormattedTextBytes() {
java.lang.Object ref = formattedText_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
formattedText_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Required, unless image is present. The body text of the card.
*
*
* string formatted_text = 3;
*/
public Builder setFormattedText(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
formattedText_ = value;
onChanged();
return this;
}
/**
*
* Required, unless image is present. The body text of the card.
*
*
* string formatted_text = 3;
*/
public Builder clearFormattedText() {
formattedText_ = getDefaultInstance().getFormattedText();
onChanged();
return this;
}
/**
*
* Required, unless image is present. The body text of the card.
*
*
* string formatted_text = 3;
*/
public Builder setFormattedTextBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
formattedText_ = value;
onChanged();
return this;
}
private com.google.cloud.dialogflow.v2.Intent.Message.Image image_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.Image, com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder, com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder> imageBuilder_;
/**
*
* Optional. The image for the card.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public boolean hasImage() {
return imageBuilder_ != null || image_ != null;
}
/**
*
* Optional. The image for the card.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Image getImage() {
if (imageBuilder_ == null) {
return image_ == null ? com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance() : image_;
} else {
return imageBuilder_.getMessage();
}
}
/**
*
* Optional. The image for the card.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public Builder setImage(com.google.cloud.dialogflow.v2.Intent.Message.Image value) {
if (imageBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
image_ = value;
onChanged();
} else {
imageBuilder_.setMessage(value);
}
return this;
}
/**
*
* Optional. The image for the card.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public Builder setImage(
com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder builderForValue) {
if (imageBuilder_ == null) {
image_ = builderForValue.build();
onChanged();
} else {
imageBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Optional. The image for the card.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public Builder mergeImage(com.google.cloud.dialogflow.v2.Intent.Message.Image value) {
if (imageBuilder_ == null) {
if (image_ != null) {
image_ =
com.google.cloud.dialogflow.v2.Intent.Message.Image.newBuilder(image_).mergeFrom(value).buildPartial();
} else {
image_ = value;
}
onChanged();
} else {
imageBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Optional. The image for the card.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public Builder clearImage() {
if (imageBuilder_ == null) {
image_ = null;
onChanged();
} else {
image_ = null;
imageBuilder_ = null;
}
return this;
}
/**
*
* Optional. The image for the card.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder getImageBuilder() {
onChanged();
return getImageFieldBuilder().getBuilder();
}
/**
*
* Optional. The image for the card.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder getImageOrBuilder() {
if (imageBuilder_ != null) {
return imageBuilder_.getMessageOrBuilder();
} else {
return image_ == null ?
com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance() : image_;
}
}
/**
*
* Optional. The image for the card.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.Image, com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder, com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder>
getImageFieldBuilder() {
if (imageBuilder_ == null) {
imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.Image, com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder, com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder>(
getImage(),
getParentForChildren(),
isClean());
image_ = null;
}
return imageBuilder_;
}
private java.util.List buttons_ =
java.util.Collections.emptyList();
private void ensureButtonsIsMutable() {
if (!((bitField0_ & 0x00000010) == 0x00000010)) {
buttons_ = new java.util.ArrayList(buttons_);
bitField0_ |= 0x00000010;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button, com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.Builder, com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.ButtonOrBuilder> buttonsBuilder_;
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5;
*/
public java.util.List getButtonsList() {
if (buttonsBuilder_ == null) {
return java.util.Collections.unmodifiableList(buttons_);
} else {
return buttonsBuilder_.getMessageList();
}
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5;
*/
public int getButtonsCount() {
if (buttonsBuilder_ == null) {
return buttons_.size();
} else {
return buttonsBuilder_.getCount();
}
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button getButtons(int index) {
if (buttonsBuilder_ == null) {
return buttons_.get(index);
} else {
return buttonsBuilder_.getMessage(index);
}
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5;
*/
public Builder setButtons(
int index, com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button value) {
if (buttonsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureButtonsIsMutable();
buttons_.set(index, value);
onChanged();
} else {
buttonsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5;
*/
public Builder setButtons(
int index, com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.Builder builderForValue) {
if (buttonsBuilder_ == null) {
ensureButtonsIsMutable();
buttons_.set(index, builderForValue.build());
onChanged();
} else {
buttonsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5;
*/
public Builder addButtons(com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button value) {
if (buttonsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureButtonsIsMutable();
buttons_.add(value);
onChanged();
} else {
buttonsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5;
*/
public Builder addButtons(
int index, com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button value) {
if (buttonsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureButtonsIsMutable();
buttons_.add(index, value);
onChanged();
} else {
buttonsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5;
*/
public Builder addButtons(
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.Builder builderForValue) {
if (buttonsBuilder_ == null) {
ensureButtonsIsMutable();
buttons_.add(builderForValue.build());
onChanged();
} else {
buttonsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5;
*/
public Builder addButtons(
int index, com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.Builder builderForValue) {
if (buttonsBuilder_ == null) {
ensureButtonsIsMutable();
buttons_.add(index, builderForValue.build());
onChanged();
} else {
buttonsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5;
*/
public Builder addAllButtons(
java.lang.Iterable extends com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button> values) {
if (buttonsBuilder_ == null) {
ensureButtonsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, buttons_);
onChanged();
} else {
buttonsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5;
*/
public Builder clearButtons() {
if (buttonsBuilder_ == null) {
buttons_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
} else {
buttonsBuilder_.clear();
}
return this;
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5;
*/
public Builder removeButtons(int index) {
if (buttonsBuilder_ == null) {
ensureButtonsIsMutable();
buttons_.remove(index);
onChanged();
} else {
buttonsBuilder_.remove(index);
}
return this;
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.Builder getButtonsBuilder(
int index) {
return getButtonsFieldBuilder().getBuilder(index);
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.ButtonOrBuilder getButtonsOrBuilder(
int index) {
if (buttonsBuilder_ == null) {
return buttons_.get(index); } else {
return buttonsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5;
*/
public java.util.List extends com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.ButtonOrBuilder>
getButtonsOrBuilderList() {
if (buttonsBuilder_ != null) {
return buttonsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(buttons_);
}
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.Builder addButtonsBuilder() {
return getButtonsFieldBuilder().addBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.getDefaultInstance());
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.Builder addButtonsBuilder(
int index) {
return getButtonsFieldBuilder().addBuilder(
index, com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.getDefaultInstance());
}
/**
*
* Optional. The collection of card buttons.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5;
*/
public java.util.List
getButtonsBuilderList() {
return getButtonsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button, com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.Builder, com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.ButtonOrBuilder>
getButtonsFieldBuilder() {
if (buttonsBuilder_ == null) {
buttonsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button, com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.Builder, com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.ButtonOrBuilder>(
buttons_,
((bitField0_ & 0x00000010) == 0x00000010),
getParentForChildren(),
isClean());
buttons_ = null;
}
return buttonsBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.BasicCard)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.BasicCard)
private static final com.google.cloud.dialogflow.v2.Intent.Message.BasicCard DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Message.BasicCard();
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BasicCard getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public BasicCard parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new BasicCard(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface SuggestionOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.Suggestion)
com.google.protobuf.MessageOrBuilder {
/**
*
* Required. The text shown the in the suggestion chip.
*
*
* string title = 1;
*/
java.lang.String getTitle();
/**
*
* Required. The text shown the in the suggestion chip.
*
*
* string title = 1;
*/
com.google.protobuf.ByteString
getTitleBytes();
}
/**
*
* The suggestion chip message that the user can tap to quickly post a reply
* to the conversation.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.Suggestion}
*/
public static final class Suggestion extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.Suggestion)
SuggestionOrBuilder {
private static final long serialVersionUID = 0L;
// Use Suggestion.newBuilder() to construct.
private Suggestion(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Suggestion() {
title_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Suggestion(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
title_ = s;
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.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Suggestion_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Suggestion_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.Suggestion.class, com.google.cloud.dialogflow.v2.Intent.Message.Suggestion.Builder.class);
}
public static final int TITLE_FIELD_NUMBER = 1;
private volatile java.lang.Object title_;
/**
*
* Required. The text shown the in the suggestion chip.
*
*
* string title = 1;
*/
public java.lang.String getTitle() {
java.lang.Object ref = title_;
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();
title_ = s;
return s;
}
}
/**
*
* Required. The text shown the in the suggestion chip.
*
*
* string title = 1;
*/
public com.google.protobuf.ByteString
getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getTitleBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getTitleBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_);
}
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.v2.Intent.Message.Suggestion)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Message.Suggestion other = (com.google.cloud.dialogflow.v2.Intent.Message.Suggestion) obj;
boolean result = true;
result = result && getTitle()
.equals(other.getTitle());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TITLE_FIELD_NUMBER;
hash = (53 * hash) + getTitle().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Suggestion parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Suggestion parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Suggestion parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Suggestion parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Suggestion parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Suggestion parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Suggestion parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Suggestion parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Suggestion parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Suggestion parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Suggestion parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Suggestion parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.Message.Suggestion prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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 suggestion chip message that the user can tap to quickly post a reply
* to the conversation.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.Suggestion}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.Suggestion)
com.google.cloud.dialogflow.v2.Intent.Message.SuggestionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Suggestion_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Suggestion_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.Suggestion.class, com.google.cloud.dialogflow.v2.Intent.Message.Suggestion.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.Intent.Message.Suggestion.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
title_ = "";
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Suggestion_descriptor;
}
public com.google.cloud.dialogflow.v2.Intent.Message.Suggestion getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.Suggestion.getDefaultInstance();
}
public com.google.cloud.dialogflow.v2.Intent.Message.Suggestion build() {
com.google.cloud.dialogflow.v2.Intent.Message.Suggestion result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.cloud.dialogflow.v2.Intent.Message.Suggestion buildPartial() {
com.google.cloud.dialogflow.v2.Intent.Message.Suggestion result = new com.google.cloud.dialogflow.v2.Intent.Message.Suggestion(this);
result.title_ = title_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent.Message.Suggestion) {
return mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.Suggestion)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.Message.Suggestion other) {
if (other == com.google.cloud.dialogflow.v2.Intent.Message.Suggestion.getDefaultInstance()) return this;
if (!other.getTitle().isEmpty()) {
title_ = other.title_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.dialogflow.v2.Intent.Message.Suggestion parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.dialogflow.v2.Intent.Message.Suggestion) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object title_ = "";
/**
*
* Required. The text shown the in the suggestion chip.
*
*
* string title = 1;
*/
public java.lang.String getTitle() {
java.lang.Object ref = title_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
title_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Required. The text shown the in the suggestion chip.
*
*
* string title = 1;
*/
public com.google.protobuf.ByteString
getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Required. The text shown the in the suggestion chip.
*
*
* string title = 1;
*/
public Builder setTitle(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
title_ = value;
onChanged();
return this;
}
/**
*
* Required. The text shown the in the suggestion chip.
*
*
* string title = 1;
*/
public Builder clearTitle() {
title_ = getDefaultInstance().getTitle();
onChanged();
return this;
}
/**
*
* Required. The text shown the in the suggestion chip.
*
*
* string title = 1;
*/
public Builder setTitleBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
title_ = value;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.Suggestion)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.Suggestion)
private static final com.google.cloud.dialogflow.v2.Intent.Message.Suggestion DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Message.Suggestion();
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Suggestion getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Suggestion parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Suggestion(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.cloud.dialogflow.v2.Intent.Message.Suggestion getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface SuggestionsOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.Suggestions)
com.google.protobuf.MessageOrBuilder {
/**
*
* Required. The list of suggested replies.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1;
*/
java.util.List
getSuggestionsList();
/**
*
* Required. The list of suggested replies.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1;
*/
com.google.cloud.dialogflow.v2.Intent.Message.Suggestion getSuggestions(int index);
/**
*
* Required. The list of suggested replies.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1;
*/
int getSuggestionsCount();
/**
*
* Required. The list of suggested replies.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1;
*/
java.util.List extends com.google.cloud.dialogflow.v2.Intent.Message.SuggestionOrBuilder>
getSuggestionsOrBuilderList();
/**
*
* Required. The list of suggested replies.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1;
*/
com.google.cloud.dialogflow.v2.Intent.Message.SuggestionOrBuilder getSuggestionsOrBuilder(
int index);
}
/**
*
* The collection of suggestions.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.Suggestions}
*/
public static final class Suggestions extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.Suggestions)
SuggestionsOrBuilder {
private static final long serialVersionUID = 0L;
// Use Suggestions.newBuilder() to construct.
private Suggestions(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Suggestions() {
suggestions_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Suggestions(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
suggestions_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
suggestions_.add(
input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.Suggestion.parser(), extensionRegistry));
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) == 0x00000001)) {
suggestions_ = java.util.Collections.unmodifiableList(suggestions_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Suggestions_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Suggestions_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.Suggestions.class, com.google.cloud.dialogflow.v2.Intent.Message.Suggestions.Builder.class);
}
public static final int SUGGESTIONS_FIELD_NUMBER = 1;
private java.util.List suggestions_;
/**
*
* Required. The list of suggested replies.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1;
*/
public java.util.List getSuggestionsList() {
return suggestions_;
}
/**
*
* Required. The list of suggested replies.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1;
*/
public java.util.List extends com.google.cloud.dialogflow.v2.Intent.Message.SuggestionOrBuilder>
getSuggestionsOrBuilderList() {
return suggestions_;
}
/**
*
* Required. The list of suggested replies.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1;
*/
public int getSuggestionsCount() {
return suggestions_.size();
}
/**
*
* Required. The list of suggested replies.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Suggestion getSuggestions(int index) {
return suggestions_.get(index);
}
/**
*
* Required. The list of suggested replies.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.SuggestionOrBuilder getSuggestionsOrBuilder(
int index) {
return suggestions_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < suggestions_.size(); i++) {
output.writeMessage(1, suggestions_.get(i));
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < suggestions_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, suggestions_.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.v2.Intent.Message.Suggestions)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Message.Suggestions other = (com.google.cloud.dialogflow.v2.Intent.Message.Suggestions) obj;
boolean result = true;
result = result && getSuggestionsList()
.equals(other.getSuggestionsList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getSuggestionsCount() > 0) {
hash = (37 * hash) + SUGGESTIONS_FIELD_NUMBER;
hash = (53 * hash) + getSuggestionsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Suggestions parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Suggestions parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Suggestions parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Suggestions parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Suggestions parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Suggestions parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Suggestions parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Suggestions parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Suggestions parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Suggestions parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Suggestions parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Suggestions parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.Message.Suggestions prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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 collection of suggestions.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.Suggestions}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.Suggestions)
com.google.cloud.dialogflow.v2.Intent.Message.SuggestionsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Suggestions_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Suggestions_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.Suggestions.class, com.google.cloud.dialogflow.v2.Intent.Message.Suggestions.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.Intent.Message.Suggestions.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getSuggestionsFieldBuilder();
}
}
public Builder clear() {
super.clear();
if (suggestionsBuilder_ == null) {
suggestions_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
suggestionsBuilder_.clear();
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Suggestions_descriptor;
}
public com.google.cloud.dialogflow.v2.Intent.Message.Suggestions getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.Suggestions.getDefaultInstance();
}
public com.google.cloud.dialogflow.v2.Intent.Message.Suggestions build() {
com.google.cloud.dialogflow.v2.Intent.Message.Suggestions result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.cloud.dialogflow.v2.Intent.Message.Suggestions buildPartial() {
com.google.cloud.dialogflow.v2.Intent.Message.Suggestions result = new com.google.cloud.dialogflow.v2.Intent.Message.Suggestions(this);
int from_bitField0_ = bitField0_;
if (suggestionsBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
suggestions_ = java.util.Collections.unmodifiableList(suggestions_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.suggestions_ = suggestions_;
} else {
result.suggestions_ = suggestionsBuilder_.build();
}
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent.Message.Suggestions) {
return mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.Suggestions)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.Message.Suggestions other) {
if (other == com.google.cloud.dialogflow.v2.Intent.Message.Suggestions.getDefaultInstance()) return this;
if (suggestionsBuilder_ == null) {
if (!other.suggestions_.isEmpty()) {
if (suggestions_.isEmpty()) {
suggestions_ = other.suggestions_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureSuggestionsIsMutable();
suggestions_.addAll(other.suggestions_);
}
onChanged();
}
} else {
if (!other.suggestions_.isEmpty()) {
if (suggestionsBuilder_.isEmpty()) {
suggestionsBuilder_.dispose();
suggestionsBuilder_ = null;
suggestions_ = other.suggestions_;
bitField0_ = (bitField0_ & ~0x00000001);
suggestionsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getSuggestionsFieldBuilder() : null;
} else {
suggestionsBuilder_.addAllMessages(other.suggestions_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.dialogflow.v2.Intent.Message.Suggestions parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.dialogflow.v2.Intent.Message.Suggestions) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List suggestions_ =
java.util.Collections.emptyList();
private void ensureSuggestionsIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
suggestions_ = new java.util.ArrayList(suggestions_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.Suggestion, com.google.cloud.dialogflow.v2.Intent.Message.Suggestion.Builder, com.google.cloud.dialogflow.v2.Intent.Message.SuggestionOrBuilder> suggestionsBuilder_;
/**
*
* Required. The list of suggested replies.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1;
*/
public java.util.List getSuggestionsList() {
if (suggestionsBuilder_ == null) {
return java.util.Collections.unmodifiableList(suggestions_);
} else {
return suggestionsBuilder_.getMessageList();
}
}
/**
*
* Required. The list of suggested replies.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1;
*/
public int getSuggestionsCount() {
if (suggestionsBuilder_ == null) {
return suggestions_.size();
} else {
return suggestionsBuilder_.getCount();
}
}
/**
*
* Required. The list of suggested replies.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Suggestion getSuggestions(int index) {
if (suggestionsBuilder_ == null) {
return suggestions_.get(index);
} else {
return suggestionsBuilder_.getMessage(index);
}
}
/**
*
* Required. The list of suggested replies.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1;
*/
public Builder setSuggestions(
int index, com.google.cloud.dialogflow.v2.Intent.Message.Suggestion value) {
if (suggestionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSuggestionsIsMutable();
suggestions_.set(index, value);
onChanged();
} else {
suggestionsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Required. The list of suggested replies.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1;
*/
public Builder setSuggestions(
int index, com.google.cloud.dialogflow.v2.Intent.Message.Suggestion.Builder builderForValue) {
if (suggestionsBuilder_ == null) {
ensureSuggestionsIsMutable();
suggestions_.set(index, builderForValue.build());
onChanged();
} else {
suggestionsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Required. The list of suggested replies.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1;
*/
public Builder addSuggestions(com.google.cloud.dialogflow.v2.Intent.Message.Suggestion value) {
if (suggestionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSuggestionsIsMutable();
suggestions_.add(value);
onChanged();
} else {
suggestionsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Required. The list of suggested replies.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1;
*/
public Builder addSuggestions(
int index, com.google.cloud.dialogflow.v2.Intent.Message.Suggestion value) {
if (suggestionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSuggestionsIsMutable();
suggestions_.add(index, value);
onChanged();
} else {
suggestionsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Required. The list of suggested replies.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1;
*/
public Builder addSuggestions(
com.google.cloud.dialogflow.v2.Intent.Message.Suggestion.Builder builderForValue) {
if (suggestionsBuilder_ == null) {
ensureSuggestionsIsMutable();
suggestions_.add(builderForValue.build());
onChanged();
} else {
suggestionsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Required. The list of suggested replies.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1;
*/
public Builder addSuggestions(
int index, com.google.cloud.dialogflow.v2.Intent.Message.Suggestion.Builder builderForValue) {
if (suggestionsBuilder_ == null) {
ensureSuggestionsIsMutable();
suggestions_.add(index, builderForValue.build());
onChanged();
} else {
suggestionsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Required. The list of suggested replies.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1;
*/
public Builder addAllSuggestions(
java.lang.Iterable extends com.google.cloud.dialogflow.v2.Intent.Message.Suggestion> values) {
if (suggestionsBuilder_ == null) {
ensureSuggestionsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, suggestions_);
onChanged();
} else {
suggestionsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Required. The list of suggested replies.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1;
*/
public Builder clearSuggestions() {
if (suggestionsBuilder_ == null) {
suggestions_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
suggestionsBuilder_.clear();
}
return this;
}
/**
*
* Required. The list of suggested replies.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1;
*/
public Builder removeSuggestions(int index) {
if (suggestionsBuilder_ == null) {
ensureSuggestionsIsMutable();
suggestions_.remove(index);
onChanged();
} else {
suggestionsBuilder_.remove(index);
}
return this;
}
/**
*
* Required. The list of suggested replies.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Suggestion.Builder getSuggestionsBuilder(
int index) {
return getSuggestionsFieldBuilder().getBuilder(index);
}
/**
*
* Required. The list of suggested replies.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.SuggestionOrBuilder getSuggestionsOrBuilder(
int index) {
if (suggestionsBuilder_ == null) {
return suggestions_.get(index); } else {
return suggestionsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Required. The list of suggested replies.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1;
*/
public java.util.List extends com.google.cloud.dialogflow.v2.Intent.Message.SuggestionOrBuilder>
getSuggestionsOrBuilderList() {
if (suggestionsBuilder_ != null) {
return suggestionsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(suggestions_);
}
}
/**
*
* Required. The list of suggested replies.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Suggestion.Builder addSuggestionsBuilder() {
return getSuggestionsFieldBuilder().addBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.Suggestion.getDefaultInstance());
}
/**
*
* Required. The list of suggested replies.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Suggestion.Builder addSuggestionsBuilder(
int index) {
return getSuggestionsFieldBuilder().addBuilder(
index, com.google.cloud.dialogflow.v2.Intent.Message.Suggestion.getDefaultInstance());
}
/**
*
* Required. The list of suggested replies.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1;
*/
public java.util.List
getSuggestionsBuilderList() {
return getSuggestionsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.Suggestion, com.google.cloud.dialogflow.v2.Intent.Message.Suggestion.Builder, com.google.cloud.dialogflow.v2.Intent.Message.SuggestionOrBuilder>
getSuggestionsFieldBuilder() {
if (suggestionsBuilder_ == null) {
suggestionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.Suggestion, com.google.cloud.dialogflow.v2.Intent.Message.Suggestion.Builder, com.google.cloud.dialogflow.v2.Intent.Message.SuggestionOrBuilder>(
suggestions_,
((bitField0_ & 0x00000001) == 0x00000001),
getParentForChildren(),
isClean());
suggestions_ = null;
}
return suggestionsBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.Suggestions)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.Suggestions)
private static final com.google.cloud.dialogflow.v2.Intent.Message.Suggestions DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Message.Suggestions();
}
public static com.google.cloud.dialogflow.v2.Intent.Message.Suggestions getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Suggestions parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Suggestions(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.cloud.dialogflow.v2.Intent.Message.Suggestions getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface LinkOutSuggestionOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion)
com.google.protobuf.MessageOrBuilder {
/**
*
* Required. The name of the app or site this chip is linking to.
*
*
* string destination_name = 1;
*/
java.lang.String getDestinationName();
/**
*
* Required. The name of the app or site this chip is linking to.
*
*
* string destination_name = 1;
*/
com.google.protobuf.ByteString
getDestinationNameBytes();
/**
*
* Required. The URI of the app or site to open when the user taps the
* suggestion chip.
*
*
* string uri = 2;
*/
java.lang.String getUri();
/**
*
* Required. The URI of the app or site to open when the user taps the
* suggestion chip.
*
*
* string uri = 2;
*/
com.google.protobuf.ByteString
getUriBytes();
}
/**
*
* The suggestion chip message that allows the user to jump out to the app
* or website associated with this agent.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion}
*/
public static final class LinkOutSuggestion extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion)
LinkOutSuggestionOrBuilder {
private static final long serialVersionUID = 0L;
// Use LinkOutSuggestion.newBuilder() to construct.
private LinkOutSuggestion(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LinkOutSuggestion() {
destinationName_ = "";
uri_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private LinkOutSuggestion(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
destinationName_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
uri_ = s;
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.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_LinkOutSuggestion_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_LinkOutSuggestion_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion.class, com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion.Builder.class);
}
public static final int DESTINATION_NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object destinationName_;
/**
*
* Required. The name of the app or site this chip is linking to.
*
*
* string destination_name = 1;
*/
public java.lang.String getDestinationName() {
java.lang.Object ref = destinationName_;
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();
destinationName_ = s;
return s;
}
}
/**
*
* Required. The name of the app or site this chip is linking to.
*
*
* string destination_name = 1;
*/
public com.google.protobuf.ByteString
getDestinationNameBytes() {
java.lang.Object ref = destinationName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
destinationName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int URI_FIELD_NUMBER = 2;
private volatile java.lang.Object uri_;
/**
*
* Required. The URI of the app or site to open when the user taps the
* suggestion chip.
*
*
* string uri = 2;
*/
public java.lang.String getUri() {
java.lang.Object ref = uri_;
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();
uri_ = s;
return s;
}
}
/**
*
* Required. The URI of the app or site to open when the user taps the
* suggestion chip.
*
*
* string uri = 2;
*/
public com.google.protobuf.ByteString
getUriBytes() {
java.lang.Object ref = uri_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
uri_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getDestinationNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, destinationName_);
}
if (!getUriBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getDestinationNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, destinationName_);
}
if (!getUriBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_);
}
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.v2.Intent.Message.LinkOutSuggestion)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion other = (com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion) obj;
boolean result = true;
result = result && getDestinationName()
.equals(other.getDestinationName());
result = result && getUri()
.equals(other.getUri());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + DESTINATION_NAME_FIELD_NUMBER;
hash = (53 * hash) + getDestinationName().hashCode();
hash = (37 * hash) + URI_FIELD_NUMBER;
hash = (53 * hash) + getUri().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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 suggestion chip message that allows the user to jump out to the app
* or website associated with this agent.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion)
com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_LinkOutSuggestion_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_LinkOutSuggestion_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion.class, com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
destinationName_ = "";
uri_ = "";
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_LinkOutSuggestion_descriptor;
}
public com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion.getDefaultInstance();
}
public com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion build() {
com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion buildPartial() {
com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion result = new com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion(this);
result.destinationName_ = destinationName_;
result.uri_ = uri_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion) {
return mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion other) {
if (other == com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion.getDefaultInstance()) return this;
if (!other.getDestinationName().isEmpty()) {
destinationName_ = other.destinationName_;
onChanged();
}
if (!other.getUri().isEmpty()) {
uri_ = other.uri_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object destinationName_ = "";
/**
*
* Required. The name of the app or site this chip is linking to.
*
*
* string destination_name = 1;
*/
public java.lang.String getDestinationName() {
java.lang.Object ref = destinationName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
destinationName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Required. The name of the app or site this chip is linking to.
*
*
* string destination_name = 1;
*/
public com.google.protobuf.ByteString
getDestinationNameBytes() {
java.lang.Object ref = destinationName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
destinationName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Required. The name of the app or site this chip is linking to.
*
*
* string destination_name = 1;
*/
public Builder setDestinationName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
destinationName_ = value;
onChanged();
return this;
}
/**
*
* Required. The name of the app or site this chip is linking to.
*
*
* string destination_name = 1;
*/
public Builder clearDestinationName() {
destinationName_ = getDefaultInstance().getDestinationName();
onChanged();
return this;
}
/**
*
* Required. The name of the app or site this chip is linking to.
*
*
* string destination_name = 1;
*/
public Builder setDestinationNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
destinationName_ = value;
onChanged();
return this;
}
private java.lang.Object uri_ = "";
/**
*
* Required. The URI of the app or site to open when the user taps the
* suggestion chip.
*
*
* string uri = 2;
*/
public java.lang.String getUri() {
java.lang.Object ref = uri_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
uri_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Required. The URI of the app or site to open when the user taps the
* suggestion chip.
*
*
* string uri = 2;
*/
public com.google.protobuf.ByteString
getUriBytes() {
java.lang.Object ref = uri_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
uri_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Required. The URI of the app or site to open when the user taps the
* suggestion chip.
*
*
* string uri = 2;
*/
public Builder setUri(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
uri_ = value;
onChanged();
return this;
}
/**
*
* Required. The URI of the app or site to open when the user taps the
* suggestion chip.
*
*
* string uri = 2;
*/
public Builder clearUri() {
uri_ = getDefaultInstance().getUri();
onChanged();
return this;
}
/**
*
* Required. The URI of the app or site to open when the user taps the
* suggestion chip.
*
*
* string uri = 2;
*/
public Builder setUriBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
uri_ = value;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion)
private static final com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion();
}
public static com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public LinkOutSuggestion parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new LinkOutSuggestion(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ListSelectOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.ListSelect)
com.google.protobuf.MessageOrBuilder {
/**
*
* Optional. The overall title of the list.
*
*
* string title = 1;
*/
java.lang.String getTitle();
/**
*
* Optional. The overall title of the list.
*
*
* string title = 1;
*/
com.google.protobuf.ByteString
getTitleBytes();
/**
*
* Required. List items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2;
*/
java.util.List
getItemsList();
/**
*
* Required. List items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2;
*/
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item getItems(int index);
/**
*
* Required. List items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2;
*/
int getItemsCount();
/**
*
* Required. List items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2;
*/
java.util.List extends com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.ItemOrBuilder>
getItemsOrBuilderList();
/**
*
* Required. List items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2;
*/
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.ItemOrBuilder getItemsOrBuilder(
int index);
}
/**
*
* The card for presenting a list of options to select from.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.ListSelect}
*/
public static final class ListSelect extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.ListSelect)
ListSelectOrBuilder {
private static final long serialVersionUID = 0L;
// Use ListSelect.newBuilder() to construct.
private ListSelect(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ListSelect() {
title_ = "";
items_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ListSelect(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
title_ = s;
break;
}
case 18: {
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
items_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
items_.add(
input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item.parser(), extensionRegistry));
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_ & 0x00000002) == 0x00000002)) {
items_ = java.util.Collections.unmodifiableList(items_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_ListSelect_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_ListSelect_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.class, com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Builder.class);
}
public interface ItemOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item)
com.google.protobuf.MessageOrBuilder {
/**
*
* Required. Additional information about this option.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
boolean hasInfo();
/**
*
* Required. Additional information about this option.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo getInfo();
/**
*
* Required. Additional information about this option.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfoOrBuilder getInfoOrBuilder();
/**
*
* Required. The title of the list item.
*
*
* string title = 2;
*/
java.lang.String getTitle();
/**
*
* Required. The title of the list item.
*
*
* string title = 2;
*/
com.google.protobuf.ByteString
getTitleBytes();
/**
*
* Optional. The main text describing the item.
*
*
* string description = 3;
*/
java.lang.String getDescription();
/**
*
* Optional. The main text describing the item.
*
*
* string description = 3;
*/
com.google.protobuf.ByteString
getDescriptionBytes();
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
boolean hasImage();
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
com.google.cloud.dialogflow.v2.Intent.Message.Image getImage();
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder getImageOrBuilder();
}
/**
*
* An item in the list.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item}
*/
public static final class Item extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item)
ItemOrBuilder {
private static final long serialVersionUID = 0L;
// Use Item.newBuilder() to construct.
private Item(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Item() {
title_ = "";
description_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Item(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.Builder subBuilder = null;
if (info_ != null) {
subBuilder = info_.toBuilder();
}
info_ = input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(info_);
info_ = subBuilder.buildPartial();
}
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
title_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
description_ = s;
break;
}
case 34: {
com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder subBuilder = null;
if (image_ != null) {
subBuilder = image_.toBuilder();
}
image_ = input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.Image.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(image_);
image_ = subBuilder.buildPartial();
}
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.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_ListSelect_Item_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_ListSelect_Item_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item.class, com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item.Builder.class);
}
public static final int INFO_FIELD_NUMBER = 1;
private com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info_;
/**
*
* Required. Additional information about this option.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
public boolean hasInfo() {
return info_ != null;
}
/**
*
* Required. Additional information about this option.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo getInfo() {
return info_ == null ? com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.getDefaultInstance() : info_;
}
/**
*
* Required. Additional information about this option.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfoOrBuilder getInfoOrBuilder() {
return getInfo();
}
public static final int TITLE_FIELD_NUMBER = 2;
private volatile java.lang.Object title_;
/**
*
* Required. The title of the list item.
*
*
* string title = 2;
*/
public java.lang.String getTitle() {
java.lang.Object ref = title_;
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();
title_ = s;
return s;
}
}
/**
*
* Required. The title of the list item.
*
*
* string title = 2;
*/
public com.google.protobuf.ByteString
getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DESCRIPTION_FIELD_NUMBER = 3;
private volatile java.lang.Object description_;
/**
*
* Optional. The main text describing the item.
*
*
* string description = 3;
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
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();
description_ = s;
return s;
}
}
/**
*
* Optional. The main text describing the item.
*
*
* string description = 3;
*/
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int IMAGE_FIELD_NUMBER = 4;
private com.google.cloud.dialogflow.v2.Intent.Message.Image image_;
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public boolean hasImage() {
return image_ != null;
}
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Image getImage() {
return image_ == null ? com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance() : image_;
}
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder getImageOrBuilder() {
return getImage();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (info_ != null) {
output.writeMessage(1, getInfo());
}
if (!getTitleBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, title_);
}
if (!getDescriptionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_);
}
if (image_ != null) {
output.writeMessage(4, getImage());
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (info_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getInfo());
}
if (!getTitleBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, title_);
}
if (!getDescriptionBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_);
}
if (image_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getImage());
}
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.v2.Intent.Message.ListSelect.Item)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item other = (com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item) obj;
boolean result = true;
result = result && (hasInfo() == other.hasInfo());
if (hasInfo()) {
result = result && getInfo()
.equals(other.getInfo());
}
result = result && getTitle()
.equals(other.getTitle());
result = result && getDescription()
.equals(other.getDescription());
result = result && (hasImage() == other.hasImage());
if (hasImage()) {
result = result && getImage()
.equals(other.getImage());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasInfo()) {
hash = (37 * hash) + INFO_FIELD_NUMBER;
hash = (53 * hash) + getInfo().hashCode();
}
hash = (37 * hash) + TITLE_FIELD_NUMBER;
hash = (53 * hash) + getTitle().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
if (hasImage()) {
hash = (37 * hash) + IMAGE_FIELD_NUMBER;
hash = (53 * hash) + getImage().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* An item in the list.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item)
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.ItemOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_ListSelect_Item_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_ListSelect_Item_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item.class, com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
if (infoBuilder_ == null) {
info_ = null;
} else {
info_ = null;
infoBuilder_ = null;
}
title_ = "";
description_ = "";
if (imageBuilder_ == null) {
image_ = null;
} else {
image_ = null;
imageBuilder_ = null;
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_ListSelect_Item_descriptor;
}
public com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item.getDefaultInstance();
}
public com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item build() {
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item buildPartial() {
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item result = new com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item(this);
if (infoBuilder_ == null) {
result.info_ = info_;
} else {
result.info_ = infoBuilder_.build();
}
result.title_ = title_;
result.description_ = description_;
if (imageBuilder_ == null) {
result.image_ = image_;
} else {
result.image_ = imageBuilder_.build();
}
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item) {
return mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item other) {
if (other == com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item.getDefaultInstance()) return this;
if (other.hasInfo()) {
mergeInfo(other.getInfo());
}
if (!other.getTitle().isEmpty()) {
title_ = other.title_;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
onChanged();
}
if (other.hasImage()) {
mergeImage(other.getImage());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo, com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.Builder, com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfoOrBuilder> infoBuilder_;
/**
*
* Required. Additional information about this option.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
public boolean hasInfo() {
return infoBuilder_ != null || info_ != null;
}
/**
*
* Required. Additional information about this option.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo getInfo() {
if (infoBuilder_ == null) {
return info_ == null ? com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.getDefaultInstance() : info_;
} else {
return infoBuilder_.getMessage();
}
}
/**
*
* Required. Additional information about this option.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
public Builder setInfo(com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo value) {
if (infoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
info_ = value;
onChanged();
} else {
infoBuilder_.setMessage(value);
}
return this;
}
/**
*
* Required. Additional information about this option.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
public Builder setInfo(
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.Builder builderForValue) {
if (infoBuilder_ == null) {
info_ = builderForValue.build();
onChanged();
} else {
infoBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Required. Additional information about this option.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
public Builder mergeInfo(com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo value) {
if (infoBuilder_ == null) {
if (info_ != null) {
info_ =
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.newBuilder(info_).mergeFrom(value).buildPartial();
} else {
info_ = value;
}
onChanged();
} else {
infoBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Required. Additional information about this option.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
public Builder clearInfo() {
if (infoBuilder_ == null) {
info_ = null;
onChanged();
} else {
info_ = null;
infoBuilder_ = null;
}
return this;
}
/**
*
* Required. Additional information about this option.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.Builder getInfoBuilder() {
onChanged();
return getInfoFieldBuilder().getBuilder();
}
/**
*
* Required. Additional information about this option.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfoOrBuilder getInfoOrBuilder() {
if (infoBuilder_ != null) {
return infoBuilder_.getMessageOrBuilder();
} else {
return info_ == null ?
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.getDefaultInstance() : info_;
}
}
/**
*
* Required. Additional information about this option.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo, com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.Builder, com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfoOrBuilder>
getInfoFieldBuilder() {
if (infoBuilder_ == null) {
infoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo, com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.Builder, com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfoOrBuilder>(
getInfo(),
getParentForChildren(),
isClean());
info_ = null;
}
return infoBuilder_;
}
private java.lang.Object title_ = "";
/**
*
* Required. The title of the list item.
*
*
* string title = 2;
*/
public java.lang.String getTitle() {
java.lang.Object ref = title_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
title_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Required. The title of the list item.
*
*
* string title = 2;
*/
public com.google.protobuf.ByteString
getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Required. The title of the list item.
*
*
* string title = 2;
*/
public Builder setTitle(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
title_ = value;
onChanged();
return this;
}
/**
*
* Required. The title of the list item.
*
*
* string title = 2;
*/
public Builder clearTitle() {
title_ = getDefaultInstance().getTitle();
onChanged();
return this;
}
/**
*
* Required. The title of the list item.
*
*
* string title = 2;
*/
public Builder setTitleBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
title_ = value;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
*
* Optional. The main text describing the item.
*
*
* string description = 3;
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional. The main text describing the item.
*
*
* string description = 3;
*/
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Optional. The main text describing the item.
*
*
* string description = 3;
*/
public Builder setDescription(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
onChanged();
return this;
}
/**
*
* Optional. The main text describing the item.
*
*
* string description = 3;
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
onChanged();
return this;
}
/**
*
* Optional. The main text describing the item.
*
*
* string description = 3;
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
onChanged();
return this;
}
private com.google.cloud.dialogflow.v2.Intent.Message.Image image_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.Image, com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder, com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder> imageBuilder_;
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public boolean hasImage() {
return imageBuilder_ != null || image_ != null;
}
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Image getImage() {
if (imageBuilder_ == null) {
return image_ == null ? com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance() : image_;
} else {
return imageBuilder_.getMessage();
}
}
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public Builder setImage(com.google.cloud.dialogflow.v2.Intent.Message.Image value) {
if (imageBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
image_ = value;
onChanged();
} else {
imageBuilder_.setMessage(value);
}
return this;
}
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public Builder setImage(
com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder builderForValue) {
if (imageBuilder_ == null) {
image_ = builderForValue.build();
onChanged();
} else {
imageBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public Builder mergeImage(com.google.cloud.dialogflow.v2.Intent.Message.Image value) {
if (imageBuilder_ == null) {
if (image_ != null) {
image_ =
com.google.cloud.dialogflow.v2.Intent.Message.Image.newBuilder(image_).mergeFrom(value).buildPartial();
} else {
image_ = value;
}
onChanged();
} else {
imageBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public Builder clearImage() {
if (imageBuilder_ == null) {
image_ = null;
onChanged();
} else {
image_ = null;
imageBuilder_ = null;
}
return this;
}
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder getImageBuilder() {
onChanged();
return getImageFieldBuilder().getBuilder();
}
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder getImageOrBuilder() {
if (imageBuilder_ != null) {
return imageBuilder_.getMessageOrBuilder();
} else {
return image_ == null ?
com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance() : image_;
}
}
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.Image, com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder, com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder>
getImageFieldBuilder() {
if (imageBuilder_ == null) {
imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.Image, com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder, com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder>(
getImage(),
getParentForChildren(),
isClean());
image_ = null;
}
return imageBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item)
private static final com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item();
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser-
PARSER = new com.google.protobuf.AbstractParser
- () {
public Item parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Item(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser
- parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser
- getParserForType() {
return PARSER;
}
public com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int TITLE_FIELD_NUMBER = 1;
private volatile java.lang.Object title_;
/**
*
* Optional. The overall title of the list.
*
*
* string title = 1;
*/
public java.lang.String getTitle() {
java.lang.Object ref = title_;
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();
title_ = s;
return s;
}
}
/**
*
* Optional. The overall title of the list.
*
*
* string title = 1;
*/
public com.google.protobuf.ByteString
getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ITEMS_FIELD_NUMBER = 2;
private java.util.List items_;
/**
*
* Required. List items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2;
*/
public java.util.List getItemsList() {
return items_;
}
/**
*
* Required. List items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2;
*/
public java.util.List extends com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.ItemOrBuilder>
getItemsOrBuilderList() {
return items_;
}
/**
*
* Required. List items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2;
*/
public int getItemsCount() {
return items_.size();
}
/**
*
* Required. List items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item getItems(int index) {
return items_.get(index);
}
/**
*
* Required. List items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.ItemOrBuilder getItemsOrBuilder(
int index) {
return items_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getTitleBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_);
}
for (int i = 0; i < items_.size(); i++) {
output.writeMessage(2, items_.get(i));
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getTitleBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_);
}
for (int i = 0; i < items_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, items_.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.v2.Intent.Message.ListSelect)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect other = (com.google.cloud.dialogflow.v2.Intent.Message.ListSelect) obj;
boolean result = true;
result = result && getTitle()
.equals(other.getTitle());
result = result && getItemsList()
.equals(other.getItemsList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TITLE_FIELD_NUMBER;
hash = (53 * hash) + getTitle().hashCode();
if (getItemsCount() > 0) {
hash = (37 * hash) + ITEMS_FIELD_NUMBER;
hash = (53 * hash) + getItemsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ListSelect parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ListSelect parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ListSelect parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ListSelect parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ListSelect parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ListSelect parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ListSelect parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ListSelect parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ListSelect parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ListSelect parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ListSelect parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ListSelect parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.Message.ListSelect prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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 card for presenting a list of options to select from.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.ListSelect}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.ListSelect)
com.google.cloud.dialogflow.v2.Intent.Message.ListSelectOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_ListSelect_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_ListSelect_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.class, com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getItemsFieldBuilder();
}
}
public Builder clear() {
super.clear();
title_ = "";
if (itemsBuilder_ == null) {
items_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
itemsBuilder_.clear();
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_ListSelect_descriptor;
}
public com.google.cloud.dialogflow.v2.Intent.Message.ListSelect getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.getDefaultInstance();
}
public com.google.cloud.dialogflow.v2.Intent.Message.ListSelect build() {
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.cloud.dialogflow.v2.Intent.Message.ListSelect buildPartial() {
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect result = new com.google.cloud.dialogflow.v2.Intent.Message.ListSelect(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.title_ = title_;
if (itemsBuilder_ == null) {
if (((bitField0_ & 0x00000002) == 0x00000002)) {
items_ = java.util.Collections.unmodifiableList(items_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.items_ = items_;
} else {
result.items_ = itemsBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent.Message.ListSelect) {
return mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.ListSelect)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.Message.ListSelect other) {
if (other == com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.getDefaultInstance()) return this;
if (!other.getTitle().isEmpty()) {
title_ = other.title_;
onChanged();
}
if (itemsBuilder_ == null) {
if (!other.items_.isEmpty()) {
if (items_.isEmpty()) {
items_ = other.items_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureItemsIsMutable();
items_.addAll(other.items_);
}
onChanged();
}
} else {
if (!other.items_.isEmpty()) {
if (itemsBuilder_.isEmpty()) {
itemsBuilder_.dispose();
itemsBuilder_ = null;
items_ = other.items_;
bitField0_ = (bitField0_ & ~0x00000002);
itemsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getItemsFieldBuilder() : null;
} else {
itemsBuilder_.addAllMessages(other.items_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.dialogflow.v2.Intent.Message.ListSelect) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object title_ = "";
/**
*
* Optional. The overall title of the list.
*
*
* string title = 1;
*/
public java.lang.String getTitle() {
java.lang.Object ref = title_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
title_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional. The overall title of the list.
*
*
* string title = 1;
*/
public com.google.protobuf.ByteString
getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Optional. The overall title of the list.
*
*
* string title = 1;
*/
public Builder setTitle(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
title_ = value;
onChanged();
return this;
}
/**
*
* Optional. The overall title of the list.
*
*
* string title = 1;
*/
public Builder clearTitle() {
title_ = getDefaultInstance().getTitle();
onChanged();
return this;
}
/**
*
* Optional. The overall title of the list.
*
*
* string title = 1;
*/
public Builder setTitleBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
title_ = value;
onChanged();
return this;
}
private java.util.List items_ =
java.util.Collections.emptyList();
private void ensureItemsIsMutable() {
if (!((bitField0_ & 0x00000002) == 0x00000002)) {
items_ = new java.util.ArrayList(items_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item, com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item.Builder, com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.ItemOrBuilder> itemsBuilder_;
/**
*
* Required. List items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2;
*/
public java.util.List getItemsList() {
if (itemsBuilder_ == null) {
return java.util.Collections.unmodifiableList(items_);
} else {
return itemsBuilder_.getMessageList();
}
}
/**
*
* Required. List items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2;
*/
public int getItemsCount() {
if (itemsBuilder_ == null) {
return items_.size();
} else {
return itemsBuilder_.getCount();
}
}
/**
*
* Required. List items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item getItems(int index) {
if (itemsBuilder_ == null) {
return items_.get(index);
} else {
return itemsBuilder_.getMessage(index);
}
}
/**
*
* Required. List items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2;
*/
public Builder setItems(
int index, com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item value) {
if (itemsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureItemsIsMutable();
items_.set(index, value);
onChanged();
} else {
itemsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Required. List items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2;
*/
public Builder setItems(
int index, com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item.Builder builderForValue) {
if (itemsBuilder_ == null) {
ensureItemsIsMutable();
items_.set(index, builderForValue.build());
onChanged();
} else {
itemsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Required. List items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2;
*/
public Builder addItems(com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item value) {
if (itemsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureItemsIsMutable();
items_.add(value);
onChanged();
} else {
itemsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Required. List items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2;
*/
public Builder addItems(
int index, com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item value) {
if (itemsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureItemsIsMutable();
items_.add(index, value);
onChanged();
} else {
itemsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Required. List items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2;
*/
public Builder addItems(
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item.Builder builderForValue) {
if (itemsBuilder_ == null) {
ensureItemsIsMutable();
items_.add(builderForValue.build());
onChanged();
} else {
itemsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Required. List items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2;
*/
public Builder addItems(
int index, com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item.Builder builderForValue) {
if (itemsBuilder_ == null) {
ensureItemsIsMutable();
items_.add(index, builderForValue.build());
onChanged();
} else {
itemsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Required. List items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2;
*/
public Builder addAllItems(
java.lang.Iterable extends com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item> values) {
if (itemsBuilder_ == null) {
ensureItemsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, items_);
onChanged();
} else {
itemsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Required. List items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2;
*/
public Builder clearItems() {
if (itemsBuilder_ == null) {
items_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
itemsBuilder_.clear();
}
return this;
}
/**
*
* Required. List items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2;
*/
public Builder removeItems(int index) {
if (itemsBuilder_ == null) {
ensureItemsIsMutable();
items_.remove(index);
onChanged();
} else {
itemsBuilder_.remove(index);
}
return this;
}
/**
*
* Required. List items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item.Builder getItemsBuilder(
int index) {
return getItemsFieldBuilder().getBuilder(index);
}
/**
*
* Required. List items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.ItemOrBuilder getItemsOrBuilder(
int index) {
if (itemsBuilder_ == null) {
return items_.get(index); } else {
return itemsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Required. List items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2;
*/
public java.util.List extends com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.ItemOrBuilder>
getItemsOrBuilderList() {
if (itemsBuilder_ != null) {
return itemsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(items_);
}
}
/**
*
* Required. List items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item.Builder addItemsBuilder() {
return getItemsFieldBuilder().addBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item.getDefaultInstance());
}
/**
*
* Required. List items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item.Builder addItemsBuilder(
int index) {
return getItemsFieldBuilder().addBuilder(
index, com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item.getDefaultInstance());
}
/**
*
* Required. List items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2;
*/
public java.util.List
getItemsBuilderList() {
return getItemsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item, com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item.Builder, com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.ItemOrBuilder>
getItemsFieldBuilder() {
if (itemsBuilder_ == null) {
itemsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item, com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item.Builder, com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.ItemOrBuilder>(
items_,
((bitField0_ & 0x00000002) == 0x00000002),
getParentForChildren(),
isClean());
items_ = null;
}
return itemsBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.ListSelect)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.ListSelect)
private static final com.google.cloud.dialogflow.v2.Intent.Message.ListSelect DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Message.ListSelect();
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ListSelect getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public ListSelect parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ListSelect(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.cloud.dialogflow.v2.Intent.Message.ListSelect getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CarouselSelectOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.CarouselSelect)
com.google.protobuf.MessageOrBuilder {
/**
*
* Required. Carousel items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1;
*/
java.util.List
getItemsList();
/**
*
* Required. Carousel items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1;
*/
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item getItems(int index);
/**
*
* Required. Carousel items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1;
*/
int getItemsCount();
/**
*
* Required. Carousel items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1;
*/
java.util.List extends com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.ItemOrBuilder>
getItemsOrBuilderList();
/**
*
* Required. Carousel items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1;
*/
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.ItemOrBuilder getItemsOrBuilder(
int index);
}
/**
*
* The card for presenting a carousel of options to select from.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.CarouselSelect}
*/
public static final class CarouselSelect extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.CarouselSelect)
CarouselSelectOrBuilder {
private static final long serialVersionUID = 0L;
// Use CarouselSelect.newBuilder() to construct.
private CarouselSelect(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CarouselSelect() {
items_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CarouselSelect(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
items_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
items_.add(
input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item.parser(), extensionRegistry));
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) == 0x00000001)) {
items_ = java.util.Collections.unmodifiableList(items_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_CarouselSelect_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_CarouselSelect_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.class, com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Builder.class);
}
public interface ItemOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item)
com.google.protobuf.MessageOrBuilder {
/**
*
* Required. Additional info about the option item.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
boolean hasInfo();
/**
*
* Required. Additional info about the option item.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo getInfo();
/**
*
* Required. Additional info about the option item.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfoOrBuilder getInfoOrBuilder();
/**
*
* Required. Title of the carousel item.
*
*
* string title = 2;
*/
java.lang.String getTitle();
/**
*
* Required. Title of the carousel item.
*
*
* string title = 2;
*/
com.google.protobuf.ByteString
getTitleBytes();
/**
*
* Optional. The body text of the card.
*
*
* string description = 3;
*/
java.lang.String getDescription();
/**
*
* Optional. The body text of the card.
*
*
* string description = 3;
*/
com.google.protobuf.ByteString
getDescriptionBytes();
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
boolean hasImage();
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
com.google.cloud.dialogflow.v2.Intent.Message.Image getImage();
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder getImageOrBuilder();
}
/**
*
* An item in the carousel.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item}
*/
public static final class Item extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item)
ItemOrBuilder {
private static final long serialVersionUID = 0L;
// Use Item.newBuilder() to construct.
private Item(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Item() {
title_ = "";
description_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Item(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.Builder subBuilder = null;
if (info_ != null) {
subBuilder = info_.toBuilder();
}
info_ = input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(info_);
info_ = subBuilder.buildPartial();
}
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
title_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
description_ = s;
break;
}
case 34: {
com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder subBuilder = null;
if (image_ != null) {
subBuilder = image_.toBuilder();
}
image_ = input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.Image.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(image_);
image_ = subBuilder.buildPartial();
}
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.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_CarouselSelect_Item_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_CarouselSelect_Item_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item.class, com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item.Builder.class);
}
public static final int INFO_FIELD_NUMBER = 1;
private com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info_;
/**
*
* Required. Additional info about the option item.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
public boolean hasInfo() {
return info_ != null;
}
/**
*
* Required. Additional info about the option item.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo getInfo() {
return info_ == null ? com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.getDefaultInstance() : info_;
}
/**
*
* Required. Additional info about the option item.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfoOrBuilder getInfoOrBuilder() {
return getInfo();
}
public static final int TITLE_FIELD_NUMBER = 2;
private volatile java.lang.Object title_;
/**
*
* Required. Title of the carousel item.
*
*
* string title = 2;
*/
public java.lang.String getTitle() {
java.lang.Object ref = title_;
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();
title_ = s;
return s;
}
}
/**
*
* Required. Title of the carousel item.
*
*
* string title = 2;
*/
public com.google.protobuf.ByteString
getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DESCRIPTION_FIELD_NUMBER = 3;
private volatile java.lang.Object description_;
/**
*
* Optional. The body text of the card.
*
*
* string description = 3;
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
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();
description_ = s;
return s;
}
}
/**
*
* Optional. The body text of the card.
*
*
* string description = 3;
*/
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int IMAGE_FIELD_NUMBER = 4;
private com.google.cloud.dialogflow.v2.Intent.Message.Image image_;
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public boolean hasImage() {
return image_ != null;
}
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Image getImage() {
return image_ == null ? com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance() : image_;
}
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder getImageOrBuilder() {
return getImage();
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (info_ != null) {
output.writeMessage(1, getInfo());
}
if (!getTitleBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, title_);
}
if (!getDescriptionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_);
}
if (image_ != null) {
output.writeMessage(4, getImage());
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (info_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getInfo());
}
if (!getTitleBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, title_);
}
if (!getDescriptionBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_);
}
if (image_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getImage());
}
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.v2.Intent.Message.CarouselSelect.Item)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item other = (com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item) obj;
boolean result = true;
result = result && (hasInfo() == other.hasInfo());
if (hasInfo()) {
result = result && getInfo()
.equals(other.getInfo());
}
result = result && getTitle()
.equals(other.getTitle());
result = result && getDescription()
.equals(other.getDescription());
result = result && (hasImage() == other.hasImage());
if (hasImage()) {
result = result && getImage()
.equals(other.getImage());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasInfo()) {
hash = (37 * hash) + INFO_FIELD_NUMBER;
hash = (53 * hash) + getInfo().hashCode();
}
hash = (37 * hash) + TITLE_FIELD_NUMBER;
hash = (53 * hash) + getTitle().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
if (hasImage()) {
hash = (37 * hash) + IMAGE_FIELD_NUMBER;
hash = (53 * hash) + getImage().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* An item in the carousel.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item)
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.ItemOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_CarouselSelect_Item_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_CarouselSelect_Item_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item.class, com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
if (infoBuilder_ == null) {
info_ = null;
} else {
info_ = null;
infoBuilder_ = null;
}
title_ = "";
description_ = "";
if (imageBuilder_ == null) {
image_ = null;
} else {
image_ = null;
imageBuilder_ = null;
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_CarouselSelect_Item_descriptor;
}
public com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item.getDefaultInstance();
}
public com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item build() {
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item buildPartial() {
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item result = new com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item(this);
if (infoBuilder_ == null) {
result.info_ = info_;
} else {
result.info_ = infoBuilder_.build();
}
result.title_ = title_;
result.description_ = description_;
if (imageBuilder_ == null) {
result.image_ = image_;
} else {
result.image_ = imageBuilder_.build();
}
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item) {
return mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item other) {
if (other == com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item.getDefaultInstance()) return this;
if (other.hasInfo()) {
mergeInfo(other.getInfo());
}
if (!other.getTitle().isEmpty()) {
title_ = other.title_;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
onChanged();
}
if (other.hasImage()) {
mergeImage(other.getImage());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo, com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.Builder, com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfoOrBuilder> infoBuilder_;
/**
*
* Required. Additional info about the option item.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
public boolean hasInfo() {
return infoBuilder_ != null || info_ != null;
}
/**
*
* Required. Additional info about the option item.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo getInfo() {
if (infoBuilder_ == null) {
return info_ == null ? com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.getDefaultInstance() : info_;
} else {
return infoBuilder_.getMessage();
}
}
/**
*
* Required. Additional info about the option item.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
public Builder setInfo(com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo value) {
if (infoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
info_ = value;
onChanged();
} else {
infoBuilder_.setMessage(value);
}
return this;
}
/**
*
* Required. Additional info about the option item.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
public Builder setInfo(
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.Builder builderForValue) {
if (infoBuilder_ == null) {
info_ = builderForValue.build();
onChanged();
} else {
infoBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Required. Additional info about the option item.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
public Builder mergeInfo(com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo value) {
if (infoBuilder_ == null) {
if (info_ != null) {
info_ =
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.newBuilder(info_).mergeFrom(value).buildPartial();
} else {
info_ = value;
}
onChanged();
} else {
infoBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Required. Additional info about the option item.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
public Builder clearInfo() {
if (infoBuilder_ == null) {
info_ = null;
onChanged();
} else {
info_ = null;
infoBuilder_ = null;
}
return this;
}
/**
*
* Required. Additional info about the option item.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.Builder getInfoBuilder() {
onChanged();
return getInfoFieldBuilder().getBuilder();
}
/**
*
* Required. Additional info about the option item.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfoOrBuilder getInfoOrBuilder() {
if (infoBuilder_ != null) {
return infoBuilder_.getMessageOrBuilder();
} else {
return info_ == null ?
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.getDefaultInstance() : info_;
}
}
/**
*
* Required. Additional info about the option item.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo, com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.Builder, com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfoOrBuilder>
getInfoFieldBuilder() {
if (infoBuilder_ == null) {
infoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo, com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.Builder, com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfoOrBuilder>(
getInfo(),
getParentForChildren(),
isClean());
info_ = null;
}
return infoBuilder_;
}
private java.lang.Object title_ = "";
/**
*
* Required. Title of the carousel item.
*
*
* string title = 2;
*/
public java.lang.String getTitle() {
java.lang.Object ref = title_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
title_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Required. Title of the carousel item.
*
*
* string title = 2;
*/
public com.google.protobuf.ByteString
getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Required. Title of the carousel item.
*
*
* string title = 2;
*/
public Builder setTitle(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
title_ = value;
onChanged();
return this;
}
/**
*
* Required. Title of the carousel item.
*
*
* string title = 2;
*/
public Builder clearTitle() {
title_ = getDefaultInstance().getTitle();
onChanged();
return this;
}
/**
*
* Required. Title of the carousel item.
*
*
* string title = 2;
*/
public Builder setTitleBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
title_ = value;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
*
* Optional. The body text of the card.
*
*
* string description = 3;
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional. The body text of the card.
*
*
* string description = 3;
*/
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Optional. The body text of the card.
*
*
* string description = 3;
*/
public Builder setDescription(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
onChanged();
return this;
}
/**
*
* Optional. The body text of the card.
*
*
* string description = 3;
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
onChanged();
return this;
}
/**
*
* Optional. The body text of the card.
*
*
* string description = 3;
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
onChanged();
return this;
}
private com.google.cloud.dialogflow.v2.Intent.Message.Image image_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.Image, com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder, com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder> imageBuilder_;
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public boolean hasImage() {
return imageBuilder_ != null || image_ != null;
}
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Image getImage() {
if (imageBuilder_ == null) {
return image_ == null ? com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance() : image_;
} else {
return imageBuilder_.getMessage();
}
}
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public Builder setImage(com.google.cloud.dialogflow.v2.Intent.Message.Image value) {
if (imageBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
image_ = value;
onChanged();
} else {
imageBuilder_.setMessage(value);
}
return this;
}
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public Builder setImage(
com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder builderForValue) {
if (imageBuilder_ == null) {
image_ = builderForValue.build();
onChanged();
} else {
imageBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public Builder mergeImage(com.google.cloud.dialogflow.v2.Intent.Message.Image value) {
if (imageBuilder_ == null) {
if (image_ != null) {
image_ =
com.google.cloud.dialogflow.v2.Intent.Message.Image.newBuilder(image_).mergeFrom(value).buildPartial();
} else {
image_ = value;
}
onChanged();
} else {
imageBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public Builder clearImage() {
if (imageBuilder_ == null) {
image_ = null;
onChanged();
} else {
image_ = null;
imageBuilder_ = null;
}
return this;
}
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder getImageBuilder() {
onChanged();
return getImageFieldBuilder().getBuilder();
}
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder getImageOrBuilder() {
if (imageBuilder_ != null) {
return imageBuilder_.getMessageOrBuilder();
} else {
return image_ == null ?
com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance() : image_;
}
}
/**
*
* Optional. The image to display.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.Image, com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder, com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder>
getImageFieldBuilder() {
if (imageBuilder_ == null) {
imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.Image, com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder, com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder>(
getImage(),
getParentForChildren(),
isClean());
image_ = null;
}
return imageBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item)
private static final com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item();
}
public static com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser-
PARSER = new com.google.protobuf.AbstractParser
- () {
public Item parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Item(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser
- parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser
- getParserForType() {
return PARSER;
}
public com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int ITEMS_FIELD_NUMBER = 1;
private java.util.List
items_;
/**
*
* Required. Carousel items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1;
*/
public java.util.List getItemsList() {
return items_;
}
/**
*
* Required. Carousel items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1;
*/
public java.util.List extends com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.ItemOrBuilder>
getItemsOrBuilderList() {
return items_;
}
/**
*
* Required. Carousel items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1;
*/
public int getItemsCount() {
return items_.size();
}
/**
*
* Required. Carousel items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item getItems(int index) {
return items_.get(index);
}
/**
*
* Required. Carousel items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.ItemOrBuilder getItemsOrBuilder(
int index) {
return items_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < items_.size(); i++) {
output.writeMessage(1, items_.get(i));
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < items_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, items_.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.v2.Intent.Message.CarouselSelect)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect other = (com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect) obj;
boolean result = true;
result = result && getItemsList()
.equals(other.getItemsList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getItemsCount() > 0) {
hash = (37 * hash) + ITEMS_FIELD_NUMBER;
hash = (53 * hash) + getItemsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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 card for presenting a carousel of options to select from.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.CarouselSelect}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.CarouselSelect)
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelectOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_CarouselSelect_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_CarouselSelect_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.class, com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getItemsFieldBuilder();
}
}
public Builder clear() {
super.clear();
if (itemsBuilder_ == null) {
items_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
itemsBuilder_.clear();
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_CarouselSelect_descriptor;
}
public com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.getDefaultInstance();
}
public com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect build() {
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect buildPartial() {
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect result = new com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect(this);
int from_bitField0_ = bitField0_;
if (itemsBuilder_ == null) {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
items_ = java.util.Collections.unmodifiableList(items_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.items_ = items_;
} else {
result.items_ = itemsBuilder_.build();
}
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect) {
return mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect other) {
if (other == com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.getDefaultInstance()) return this;
if (itemsBuilder_ == null) {
if (!other.items_.isEmpty()) {
if (items_.isEmpty()) {
items_ = other.items_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureItemsIsMutable();
items_.addAll(other.items_);
}
onChanged();
}
} else {
if (!other.items_.isEmpty()) {
if (itemsBuilder_.isEmpty()) {
itemsBuilder_.dispose();
itemsBuilder_ = null;
items_ = other.items_;
bitField0_ = (bitField0_ & ~0x00000001);
itemsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getItemsFieldBuilder() : null;
} else {
itemsBuilder_.addAllMessages(other.items_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List items_ =
java.util.Collections.emptyList();
private void ensureItemsIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
items_ = new java.util.ArrayList(items_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item, com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item.Builder, com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.ItemOrBuilder> itemsBuilder_;
/**
*
* Required. Carousel items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1;
*/
public java.util.List getItemsList() {
if (itemsBuilder_ == null) {
return java.util.Collections.unmodifiableList(items_);
} else {
return itemsBuilder_.getMessageList();
}
}
/**
*
* Required. Carousel items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1;
*/
public int getItemsCount() {
if (itemsBuilder_ == null) {
return items_.size();
} else {
return itemsBuilder_.getCount();
}
}
/**
*
* Required. Carousel items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item getItems(int index) {
if (itemsBuilder_ == null) {
return items_.get(index);
} else {
return itemsBuilder_.getMessage(index);
}
}
/**
*
* Required. Carousel items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1;
*/
public Builder setItems(
int index, com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item value) {
if (itemsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureItemsIsMutable();
items_.set(index, value);
onChanged();
} else {
itemsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Required. Carousel items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1;
*/
public Builder setItems(
int index, com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item.Builder builderForValue) {
if (itemsBuilder_ == null) {
ensureItemsIsMutable();
items_.set(index, builderForValue.build());
onChanged();
} else {
itemsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Required. Carousel items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1;
*/
public Builder addItems(com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item value) {
if (itemsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureItemsIsMutable();
items_.add(value);
onChanged();
} else {
itemsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Required. Carousel items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1;
*/
public Builder addItems(
int index, com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item value) {
if (itemsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureItemsIsMutable();
items_.add(index, value);
onChanged();
} else {
itemsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Required. Carousel items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1;
*/
public Builder addItems(
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item.Builder builderForValue) {
if (itemsBuilder_ == null) {
ensureItemsIsMutable();
items_.add(builderForValue.build());
onChanged();
} else {
itemsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Required. Carousel items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1;
*/
public Builder addItems(
int index, com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item.Builder builderForValue) {
if (itemsBuilder_ == null) {
ensureItemsIsMutable();
items_.add(index, builderForValue.build());
onChanged();
} else {
itemsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Required. Carousel items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1;
*/
public Builder addAllItems(
java.lang.Iterable extends com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item> values) {
if (itemsBuilder_ == null) {
ensureItemsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, items_);
onChanged();
} else {
itemsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Required. Carousel items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1;
*/
public Builder clearItems() {
if (itemsBuilder_ == null) {
items_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
itemsBuilder_.clear();
}
return this;
}
/**
*
* Required. Carousel items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1;
*/
public Builder removeItems(int index) {
if (itemsBuilder_ == null) {
ensureItemsIsMutable();
items_.remove(index);
onChanged();
} else {
itemsBuilder_.remove(index);
}
return this;
}
/**
*
* Required. Carousel items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item.Builder getItemsBuilder(
int index) {
return getItemsFieldBuilder().getBuilder(index);
}
/**
*
* Required. Carousel items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.ItemOrBuilder getItemsOrBuilder(
int index) {
if (itemsBuilder_ == null) {
return items_.get(index); } else {
return itemsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Required. Carousel items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1;
*/
public java.util.List extends com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.ItemOrBuilder>
getItemsOrBuilderList() {
if (itemsBuilder_ != null) {
return itemsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(items_);
}
}
/**
*
* Required. Carousel items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item.Builder addItemsBuilder() {
return getItemsFieldBuilder().addBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item.getDefaultInstance());
}
/**
*
* Required. Carousel items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item.Builder addItemsBuilder(
int index) {
return getItemsFieldBuilder().addBuilder(
index, com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item.getDefaultInstance());
}
/**
*
* Required. Carousel items.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1;
*/
public java.util.List
getItemsBuilderList() {
return getItemsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item, com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item.Builder, com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.ItemOrBuilder>
getItemsFieldBuilder() {
if (itemsBuilder_ == null) {
itemsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item, com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item.Builder, com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.ItemOrBuilder>(
items_,
((bitField0_ & 0x00000001) == 0x00000001),
getParentForChildren(),
isClean());
items_ = null;
}
return itemsBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.CarouselSelect)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.CarouselSelect)
private static final com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect();
}
public static com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public CarouselSelect parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CarouselSelect(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface SelectItemInfoOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo)
com.google.protobuf.MessageOrBuilder {
/**
*
* Required. A unique key that will be sent back to the agent if this
* response is given.
*
*
* string key = 1;
*/
java.lang.String getKey();
/**
*
* Required. A unique key that will be sent back to the agent if this
* response is given.
*
*
* string key = 1;
*/
com.google.protobuf.ByteString
getKeyBytes();
/**
*
* Optional. A list of synonyms that can also be used to trigger this
* item in dialog.
*
*
* repeated string synonyms = 2;
*/
java.util.List
getSynonymsList();
/**
*
* Optional. A list of synonyms that can also be used to trigger this
* item in dialog.
*
*
* repeated string synonyms = 2;
*/
int getSynonymsCount();
/**
*
* Optional. A list of synonyms that can also be used to trigger this
* item in dialog.
*
*
* repeated string synonyms = 2;
*/
java.lang.String getSynonyms(int index);
/**
*
* Optional. A list of synonyms that can also be used to trigger this
* item in dialog.
*
*
* repeated string synonyms = 2;
*/
com.google.protobuf.ByteString
getSynonymsBytes(int index);
}
/**
*
* Additional info about the select item for when it is triggered in a
* dialog.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo}
*/
public static final class SelectItemInfo extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo)
SelectItemInfoOrBuilder {
private static final long serialVersionUID = 0L;
// Use SelectItemInfo.newBuilder() to construct.
private SelectItemInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SelectItemInfo() {
key_ = "";
synonyms_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private SelectItemInfo(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
key_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
synonyms_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000002;
}
synonyms_.add(s);
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_ & 0x00000002) == 0x00000002)) {
synonyms_ = synonyms_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_SelectItemInfo_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_SelectItemInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.class, com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.Builder.class);
}
private int bitField0_;
public static final int KEY_FIELD_NUMBER = 1;
private volatile java.lang.Object key_;
/**
*
* Required. A unique key that will be sent back to the agent if this
* response is given.
*
*
* string key = 1;
*/
public java.lang.String getKey() {
java.lang.Object ref = key_;
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();
key_ = s;
return s;
}
}
/**
*
* Required. A unique key that will be sent back to the agent if this
* response is given.
*
*
* string key = 1;
*/
public com.google.protobuf.ByteString
getKeyBytes() {
java.lang.Object ref = key_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
key_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SYNONYMS_FIELD_NUMBER = 2;
private com.google.protobuf.LazyStringList synonyms_;
/**
*
* Optional. A list of synonyms that can also be used to trigger this
* item in dialog.
*
*
* repeated string synonyms = 2;
*/
public com.google.protobuf.ProtocolStringList
getSynonymsList() {
return synonyms_;
}
/**
*
* Optional. A list of synonyms that can also be used to trigger this
* item in dialog.
*
*
* repeated string synonyms = 2;
*/
public int getSynonymsCount() {
return synonyms_.size();
}
/**
*
* Optional. A list of synonyms that can also be used to trigger this
* item in dialog.
*
*
* repeated string synonyms = 2;
*/
public java.lang.String getSynonyms(int index) {
return synonyms_.get(index);
}
/**
*
* Optional. A list of synonyms that can also be used to trigger this
* item in dialog.
*
*
* repeated string synonyms = 2;
*/
public com.google.protobuf.ByteString
getSynonymsBytes(int index) {
return synonyms_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getKeyBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_);
}
for (int i = 0; i < synonyms_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, synonyms_.getRaw(i));
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getKeyBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_);
}
{
int dataSize = 0;
for (int i = 0; i < synonyms_.size(); i++) {
dataSize += computeStringSizeNoTag(synonyms_.getRaw(i));
}
size += dataSize;
size += 1 * getSynonymsList().size();
}
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.v2.Intent.Message.SelectItemInfo)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo other = (com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo) obj;
boolean result = true;
result = result && getKey()
.equals(other.getKey());
result = result && getSynonymsList()
.equals(other.getSynonymsList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + KEY_FIELD_NUMBER;
hash = (53 * hash) + getKey().hashCode();
if (getSynonymsCount() > 0) {
hash = (37 * hash) + SYNONYMS_FIELD_NUMBER;
hash = (53 * hash) + getSynonymsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* Additional info about the select item for when it is triggered in a
* dialog.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo)
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_SelectItemInfo_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_SelectItemInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.class, com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
key_ = "";
synonyms_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_SelectItemInfo_descriptor;
}
public com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.getDefaultInstance();
}
public com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo build() {
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo buildPartial() {
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo result = new com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.key_ = key_;
if (((bitField0_ & 0x00000002) == 0x00000002)) {
synonyms_ = synonyms_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000002);
}
result.synonyms_ = synonyms_;
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo) {
return mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo other) {
if (other == com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.getDefaultInstance()) return this;
if (!other.getKey().isEmpty()) {
key_ = other.key_;
onChanged();
}
if (!other.synonyms_.isEmpty()) {
if (synonyms_.isEmpty()) {
synonyms_ = other.synonyms_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureSynonymsIsMutable();
synonyms_.addAll(other.synonyms_);
}
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object key_ = "";
/**
*
* Required. A unique key that will be sent back to the agent if this
* response is given.
*
*
* string key = 1;
*/
public java.lang.String getKey() {
java.lang.Object ref = key_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
key_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Required. A unique key that will be sent back to the agent if this
* response is given.
*
*
* string key = 1;
*/
public com.google.protobuf.ByteString
getKeyBytes() {
java.lang.Object ref = key_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
key_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Required. A unique key that will be sent back to the agent if this
* response is given.
*
*
* string key = 1;
*/
public Builder setKey(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
key_ = value;
onChanged();
return this;
}
/**
*
* Required. A unique key that will be sent back to the agent if this
* response is given.
*
*
* string key = 1;
*/
public Builder clearKey() {
key_ = getDefaultInstance().getKey();
onChanged();
return this;
}
/**
*
* Required. A unique key that will be sent back to the agent if this
* response is given.
*
*
* string key = 1;
*/
public Builder setKeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
key_ = value;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList synonyms_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureSynonymsIsMutable() {
if (!((bitField0_ & 0x00000002) == 0x00000002)) {
synonyms_ = new com.google.protobuf.LazyStringArrayList(synonyms_);
bitField0_ |= 0x00000002;
}
}
/**
*
* Optional. A list of synonyms that can also be used to trigger this
* item in dialog.
*
*
* repeated string synonyms = 2;
*/
public com.google.protobuf.ProtocolStringList
getSynonymsList() {
return synonyms_.getUnmodifiableView();
}
/**
*
* Optional. A list of synonyms that can also be used to trigger this
* item in dialog.
*
*
* repeated string synonyms = 2;
*/
public int getSynonymsCount() {
return synonyms_.size();
}
/**
*
* Optional. A list of synonyms that can also be used to trigger this
* item in dialog.
*
*
* repeated string synonyms = 2;
*/
public java.lang.String getSynonyms(int index) {
return synonyms_.get(index);
}
/**
*
* Optional. A list of synonyms that can also be used to trigger this
* item in dialog.
*
*
* repeated string synonyms = 2;
*/
public com.google.protobuf.ByteString
getSynonymsBytes(int index) {
return synonyms_.getByteString(index);
}
/**
*
* Optional. A list of synonyms that can also be used to trigger this
* item in dialog.
*
*
* repeated string synonyms = 2;
*/
public Builder setSynonyms(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureSynonymsIsMutable();
synonyms_.set(index, value);
onChanged();
return this;
}
/**
*
* Optional. A list of synonyms that can also be used to trigger this
* item in dialog.
*
*
* repeated string synonyms = 2;
*/
public Builder addSynonyms(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureSynonymsIsMutable();
synonyms_.add(value);
onChanged();
return this;
}
/**
*
* Optional. A list of synonyms that can also be used to trigger this
* item in dialog.
*
*
* repeated string synonyms = 2;
*/
public Builder addAllSynonyms(
java.lang.Iterable values) {
ensureSynonymsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, synonyms_);
onChanged();
return this;
}
/**
*
* Optional. A list of synonyms that can also be used to trigger this
* item in dialog.
*
*
* repeated string synonyms = 2;
*/
public Builder clearSynonyms() {
synonyms_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* Optional. A list of synonyms that can also be used to trigger this
* item in dialog.
*
*
* repeated string synonyms = 2;
*/
public Builder addSynonymsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureSynonymsIsMutable();
synonyms_.add(value);
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo)
private static final com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo();
}
public static com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public SelectItemInfo parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SelectItemInfo(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int messageCase_ = 0;
private java.lang.Object message_;
public enum MessageCase
implements com.google.protobuf.Internal.EnumLite {
TEXT(1),
IMAGE(2),
QUICK_REPLIES(3),
CARD(4),
PAYLOAD(5),
SIMPLE_RESPONSES(7),
BASIC_CARD(8),
SUGGESTIONS(9),
LINK_OUT_SUGGESTION(10),
LIST_SELECT(11),
CAROUSEL_SELECT(12),
MESSAGE_NOT_SET(0);
private final int value;
private MessageCase(int value) {
this.value = value;
}
/**
* @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 IMAGE;
case 3: return QUICK_REPLIES;
case 4: return CARD;
case 5: return PAYLOAD;
case 7: return SIMPLE_RESPONSES;
case 8: return BASIC_CARD;
case 9: return SUGGESTIONS;
case 10: return LINK_OUT_SUGGESTION;
case 11: return LIST_SELECT;
case 12: return CAROUSEL_SELECT;
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;
/**
*
* The text response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Text text = 1;
*/
public boolean hasText() {
return messageCase_ == 1;
}
/**
*
* The text response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Text text = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Text getText() {
if (messageCase_ == 1) {
return (com.google.cloud.dialogflow.v2.Intent.Message.Text) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.Text.getDefaultInstance();
}
/**
*
* The text response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Text text = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.TextOrBuilder getTextOrBuilder() {
if (messageCase_ == 1) {
return (com.google.cloud.dialogflow.v2.Intent.Message.Text) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.Text.getDefaultInstance();
}
public static final int IMAGE_FIELD_NUMBER = 2;
/**
*
* The image response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 2;
*/
public boolean hasImage() {
return messageCase_ == 2;
}
/**
*
* The image response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 2;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Image getImage() {
if (messageCase_ == 2) {
return (com.google.cloud.dialogflow.v2.Intent.Message.Image) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance();
}
/**
*
* The image response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 2;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder getImageOrBuilder() {
if (messageCase_ == 2) {
return (com.google.cloud.dialogflow.v2.Intent.Message.Image) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance();
}
public static final int QUICK_REPLIES_FIELD_NUMBER = 3;
/**
*
* The quick replies response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.QuickReplies quick_replies = 3;
*/
public boolean hasQuickReplies() {
return messageCase_ == 3;
}
/**
*
* The quick replies response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.QuickReplies quick_replies = 3;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies getQuickReplies() {
if (messageCase_ == 3) {
return (com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.getDefaultInstance();
}
/**
*
* The quick replies response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.QuickReplies quick_replies = 3;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.QuickRepliesOrBuilder getQuickRepliesOrBuilder() {
if (messageCase_ == 3) {
return (com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.getDefaultInstance();
}
public static final int CARD_FIELD_NUMBER = 4;
/**
*
* The card response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Card card = 4;
*/
public boolean hasCard() {
return messageCase_ == 4;
}
/**
*
* The card response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Card card = 4;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Card getCard() {
if (messageCase_ == 4) {
return (com.google.cloud.dialogflow.v2.Intent.Message.Card) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.Card.getDefaultInstance();
}
/**
*
* The card response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Card card = 4;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.CardOrBuilder getCardOrBuilder() {
if (messageCase_ == 4) {
return (com.google.cloud.dialogflow.v2.Intent.Message.Card) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.Card.getDefaultInstance();
}
public static final int PAYLOAD_FIELD_NUMBER = 5;
/**
*
* Returns a response containing a custom, platform-specific payload.
* See the Intent.Message.Platform type for a description of the
* structure that may be required for your platform.
*
*
* .google.protobuf.Struct payload = 5;
*/
public boolean hasPayload() {
return messageCase_ == 5;
}
/**
*
* Returns a response containing a custom, platform-specific payload.
* See the Intent.Message.Platform type for a description of the
* structure that may be required for your platform.
*
*
* .google.protobuf.Struct payload = 5;
*/
public com.google.protobuf.Struct getPayload() {
if (messageCase_ == 5) {
return (com.google.protobuf.Struct) message_;
}
return com.google.protobuf.Struct.getDefaultInstance();
}
/**
*
* Returns a response containing a custom, platform-specific payload.
* See the Intent.Message.Platform type for a description of the
* structure that may be required for your platform.
*
*
* .google.protobuf.Struct payload = 5;
*/
public com.google.protobuf.StructOrBuilder getPayloadOrBuilder() {
if (messageCase_ == 5) {
return (com.google.protobuf.Struct) message_;
}
return com.google.protobuf.Struct.getDefaultInstance();
}
public static final int SIMPLE_RESPONSES_FIELD_NUMBER = 7;
/**
*
* The voice and text-only responses for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SimpleResponses simple_responses = 7;
*/
public boolean hasSimpleResponses() {
return messageCase_ == 7;
}
/**
*
* The voice and text-only responses for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SimpleResponses simple_responses = 7;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses getSimpleResponses() {
if (messageCase_ == 7) {
return (com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses.getDefaultInstance();
}
/**
*
* The voice and text-only responses for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SimpleResponses simple_responses = 7;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponsesOrBuilder getSimpleResponsesOrBuilder() {
if (messageCase_ == 7) {
return (com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses.getDefaultInstance();
}
public static final int BASIC_CARD_FIELD_NUMBER = 8;
/**
*
* The basic card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard basic_card = 8;
*/
public boolean hasBasicCard() {
return messageCase_ == 8;
}
/**
*
* The basic card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard basic_card = 8;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard getBasicCard() {
if (messageCase_ == 8) {
return (com.google.cloud.dialogflow.v2.Intent.Message.BasicCard) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.getDefaultInstance();
}
/**
*
* The basic card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard basic_card = 8;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCardOrBuilder getBasicCardOrBuilder() {
if (messageCase_ == 8) {
return (com.google.cloud.dialogflow.v2.Intent.Message.BasicCard) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.getDefaultInstance();
}
public static final int SUGGESTIONS_FIELD_NUMBER = 9;
/**
*
* The suggestion chips for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Suggestions suggestions = 9;
*/
public boolean hasSuggestions() {
return messageCase_ == 9;
}
/**
*
* The suggestion chips for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Suggestions suggestions = 9;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Suggestions getSuggestions() {
if (messageCase_ == 9) {
return (com.google.cloud.dialogflow.v2.Intent.Message.Suggestions) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.Suggestions.getDefaultInstance();
}
/**
*
* The suggestion chips for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Suggestions suggestions = 9;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.SuggestionsOrBuilder getSuggestionsOrBuilder() {
if (messageCase_ == 9) {
return (com.google.cloud.dialogflow.v2.Intent.Message.Suggestions) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.Suggestions.getDefaultInstance();
}
public static final int LINK_OUT_SUGGESTION_FIELD_NUMBER = 10;
/**
*
* The link out suggestion chip for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion link_out_suggestion = 10;
*/
public boolean hasLinkOutSuggestion() {
return messageCase_ == 10;
}
/**
*
* The link out suggestion chip for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion link_out_suggestion = 10;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion getLinkOutSuggestion() {
if (messageCase_ == 10) {
return (com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion.getDefaultInstance();
}
/**
*
* The link out suggestion chip for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion link_out_suggestion = 10;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestionOrBuilder getLinkOutSuggestionOrBuilder() {
if (messageCase_ == 10) {
return (com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion.getDefaultInstance();
}
public static final int LIST_SELECT_FIELD_NUMBER = 11;
/**
*
* The list card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.ListSelect list_select = 11;
*/
public boolean hasListSelect() {
return messageCase_ == 11;
}
/**
*
* The list card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.ListSelect list_select = 11;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.ListSelect getListSelect() {
if (messageCase_ == 11) {
return (com.google.cloud.dialogflow.v2.Intent.Message.ListSelect) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.getDefaultInstance();
}
/**
*
* The list card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.ListSelect list_select = 11;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.ListSelectOrBuilder getListSelectOrBuilder() {
if (messageCase_ == 11) {
return (com.google.cloud.dialogflow.v2.Intent.Message.ListSelect) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.getDefaultInstance();
}
public static final int CAROUSEL_SELECT_FIELD_NUMBER = 12;
/**
*
* The carousel card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect carousel_select = 12;
*/
public boolean hasCarouselSelect() {
return messageCase_ == 12;
}
/**
*
* The carousel card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect carousel_select = 12;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect getCarouselSelect() {
if (messageCase_ == 12) {
return (com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.getDefaultInstance();
}
/**
*
* The carousel card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect carousel_select = 12;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelectOrBuilder getCarouselSelectOrBuilder() {
if (messageCase_ == 12) {
return (com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.getDefaultInstance();
}
public static final int PLATFORM_FIELD_NUMBER = 6;
private int platform_;
/**
*
* Optional. The platform that this message is intended for.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Platform platform = 6;
*/
public int getPlatformValue() {
return platform_;
}
/**
*
* Optional. The platform that this message is intended for.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Platform platform = 6;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Platform getPlatform() {
com.google.cloud.dialogflow.v2.Intent.Message.Platform result = com.google.cloud.dialogflow.v2.Intent.Message.Platform.valueOf(platform_);
return result == null ? com.google.cloud.dialogflow.v2.Intent.Message.Platform.UNRECOGNIZED : result;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (messageCase_ == 1) {
output.writeMessage(1, (com.google.cloud.dialogflow.v2.Intent.Message.Text) message_);
}
if (messageCase_ == 2) {
output.writeMessage(2, (com.google.cloud.dialogflow.v2.Intent.Message.Image) message_);
}
if (messageCase_ == 3) {
output.writeMessage(3, (com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies) message_);
}
if (messageCase_ == 4) {
output.writeMessage(4, (com.google.cloud.dialogflow.v2.Intent.Message.Card) message_);
}
if (messageCase_ == 5) {
output.writeMessage(5, (com.google.protobuf.Struct) message_);
}
if (platform_ != com.google.cloud.dialogflow.v2.Intent.Message.Platform.PLATFORM_UNSPECIFIED.getNumber()) {
output.writeEnum(6, platform_);
}
if (messageCase_ == 7) {
output.writeMessage(7, (com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses) message_);
}
if (messageCase_ == 8) {
output.writeMessage(8, (com.google.cloud.dialogflow.v2.Intent.Message.BasicCard) message_);
}
if (messageCase_ == 9) {
output.writeMessage(9, (com.google.cloud.dialogflow.v2.Intent.Message.Suggestions) message_);
}
if (messageCase_ == 10) {
output.writeMessage(10, (com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion) message_);
}
if (messageCase_ == 11) {
output.writeMessage(11, (com.google.cloud.dialogflow.v2.Intent.Message.ListSelect) message_);
}
if (messageCase_ == 12) {
output.writeMessage(12, (com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect) message_);
}
unknownFields.writeTo(output);
}
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.v2.Intent.Message.Text) message_);
}
if (messageCase_ == 2) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, (com.google.cloud.dialogflow.v2.Intent.Message.Image) message_);
}
if (messageCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies) message_);
}
if (messageCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, (com.google.cloud.dialogflow.v2.Intent.Message.Card) message_);
}
if (messageCase_ == 5) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, (com.google.protobuf.Struct) message_);
}
if (platform_ != com.google.cloud.dialogflow.v2.Intent.Message.Platform.PLATFORM_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(6, platform_);
}
if (messageCase_ == 7) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, (com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses) message_);
}
if (messageCase_ == 8) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, (com.google.cloud.dialogflow.v2.Intent.Message.BasicCard) message_);
}
if (messageCase_ == 9) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, (com.google.cloud.dialogflow.v2.Intent.Message.Suggestions) message_);
}
if (messageCase_ == 10) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(10, (com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion) message_);
}
if (messageCase_ == 11) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(11, (com.google.cloud.dialogflow.v2.Intent.Message.ListSelect) message_);
}
if (messageCase_ == 12) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(12, (com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect) 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.v2.Intent.Message)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Message other = (com.google.cloud.dialogflow.v2.Intent.Message) obj;
boolean result = true;
result = result && platform_ == other.platform_;
result = result && getMessageCase().equals(
other.getMessageCase());
if (!result) return false;
switch (messageCase_) {
case 1:
result = result && getText()
.equals(other.getText());
break;
case 2:
result = result && getImage()
.equals(other.getImage());
break;
case 3:
result = result && getQuickReplies()
.equals(other.getQuickReplies());
break;
case 4:
result = result && getCard()
.equals(other.getCard());
break;
case 5:
result = result && getPayload()
.equals(other.getPayload());
break;
case 7:
result = result && getSimpleResponses()
.equals(other.getSimpleResponses());
break;
case 8:
result = result && getBasicCard()
.equals(other.getBasicCard());
break;
case 9:
result = result && getSuggestions()
.equals(other.getSuggestions());
break;
case 10:
result = result && getLinkOutSuggestion()
.equals(other.getLinkOutSuggestion());
break;
case 11:
result = result && getListSelect()
.equals(other.getListSelect());
break;
case 12:
result = result && getCarouselSelect()
.equals(other.getCarouselSelect());
break;
case 0:
default:
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + PLATFORM_FIELD_NUMBER;
hash = (53 * hash) + platform_;
switch (messageCase_) {
case 1:
hash = (37 * hash) + TEXT_FIELD_NUMBER;
hash = (53 * hash) + getText().hashCode();
break;
case 2:
hash = (37 * hash) + IMAGE_FIELD_NUMBER;
hash = (53 * hash) + getImage().hashCode();
break;
case 3:
hash = (37 * hash) + QUICK_REPLIES_FIELD_NUMBER;
hash = (53 * hash) + getQuickReplies().hashCode();
break;
case 4:
hash = (37 * hash) + CARD_FIELD_NUMBER;
hash = (53 * hash) + getCard().hashCode();
break;
case 5:
hash = (37 * hash) + PAYLOAD_FIELD_NUMBER;
hash = (53 * hash) + getPayload().hashCode();
break;
case 7:
hash = (37 * hash) + SIMPLE_RESPONSES_FIELD_NUMBER;
hash = (53 * hash) + getSimpleResponses().hashCode();
break;
case 8:
hash = (37 * hash) + BASIC_CARD_FIELD_NUMBER;
hash = (53 * hash) + getBasicCard().hashCode();
break;
case 9:
hash = (37 * hash) + SUGGESTIONS_FIELD_NUMBER;
hash = (53 * hash) + getSuggestions().hashCode();
break;
case 10:
hash = (37 * hash) + LINK_OUT_SUGGESTION_FIELD_NUMBER;
hash = (53 * hash) + getLinkOutSuggestion().hashCode();
break;
case 11:
hash = (37 * hash) + LIST_SELECT_FIELD_NUMBER;
hash = (53 * hash) + getListSelect().hashCode();
break;
case 12:
hash = (37 * hash) + CAROUSEL_SELECT_FIELD_NUMBER;
hash = (53 * hash) + getCarouselSelect().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.Message parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.Message parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.Message parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.Message prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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;
}
/**
*
* Corresponds to the `Response` field in the Dialogflow console.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message)
com.google.cloud.dialogflow.v2.Intent.MessageOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.class, com.google.cloud.dialogflow.v2.Intent.Message.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.Intent.Message.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
platform_ = 0;
messageCase_ = 0;
message_ = null;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_descriptor;
}
public com.google.cloud.dialogflow.v2.Intent.Message getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.getDefaultInstance();
}
public com.google.cloud.dialogflow.v2.Intent.Message build() {
com.google.cloud.dialogflow.v2.Intent.Message result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.cloud.dialogflow.v2.Intent.Message buildPartial() {
com.google.cloud.dialogflow.v2.Intent.Message result = new com.google.cloud.dialogflow.v2.Intent.Message(this);
if (messageCase_ == 1) {
if (textBuilder_ == null) {
result.message_ = message_;
} else {
result.message_ = textBuilder_.build();
}
}
if (messageCase_ == 2) {
if (imageBuilder_ == null) {
result.message_ = message_;
} else {
result.message_ = imageBuilder_.build();
}
}
if (messageCase_ == 3) {
if (quickRepliesBuilder_ == null) {
result.message_ = message_;
} else {
result.message_ = quickRepliesBuilder_.build();
}
}
if (messageCase_ == 4) {
if (cardBuilder_ == null) {
result.message_ = message_;
} else {
result.message_ = cardBuilder_.build();
}
}
if (messageCase_ == 5) {
if (payloadBuilder_ == null) {
result.message_ = message_;
} else {
result.message_ = payloadBuilder_.build();
}
}
if (messageCase_ == 7) {
if (simpleResponsesBuilder_ == null) {
result.message_ = message_;
} else {
result.message_ = simpleResponsesBuilder_.build();
}
}
if (messageCase_ == 8) {
if (basicCardBuilder_ == null) {
result.message_ = message_;
} else {
result.message_ = basicCardBuilder_.build();
}
}
if (messageCase_ == 9) {
if (suggestionsBuilder_ == null) {
result.message_ = message_;
} else {
result.message_ = suggestionsBuilder_.build();
}
}
if (messageCase_ == 10) {
if (linkOutSuggestionBuilder_ == null) {
result.message_ = message_;
} else {
result.message_ = linkOutSuggestionBuilder_.build();
}
}
if (messageCase_ == 11) {
if (listSelectBuilder_ == null) {
result.message_ = message_;
} else {
result.message_ = listSelectBuilder_.build();
}
}
if (messageCase_ == 12) {
if (carouselSelectBuilder_ == null) {
result.message_ = message_;
} else {
result.message_ = carouselSelectBuilder_.build();
}
}
result.platform_ = platform_;
result.messageCase_ = messageCase_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent.Message) {
return mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.Message other) {
if (other == com.google.cloud.dialogflow.v2.Intent.Message.getDefaultInstance()) return this;
if (other.platform_ != 0) {
setPlatformValue(other.getPlatformValue());
}
switch (other.getMessageCase()) {
case TEXT: {
mergeText(other.getText());
break;
}
case IMAGE: {
mergeImage(other.getImage());
break;
}
case QUICK_REPLIES: {
mergeQuickReplies(other.getQuickReplies());
break;
}
case CARD: {
mergeCard(other.getCard());
break;
}
case PAYLOAD: {
mergePayload(other.getPayload());
break;
}
case SIMPLE_RESPONSES: {
mergeSimpleResponses(other.getSimpleResponses());
break;
}
case BASIC_CARD: {
mergeBasicCard(other.getBasicCard());
break;
}
case SUGGESTIONS: {
mergeSuggestions(other.getSuggestions());
break;
}
case LINK_OUT_SUGGESTION: {
mergeLinkOutSuggestion(other.getLinkOutSuggestion());
break;
}
case LIST_SELECT: {
mergeListSelect(other.getListSelect());
break;
}
case CAROUSEL_SELECT: {
mergeCarouselSelect(other.getCarouselSelect());
break;
}
case MESSAGE_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.dialogflow.v2.Intent.Message parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.dialogflow.v2.Intent.Message) 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.v2.Intent.Message.Text, com.google.cloud.dialogflow.v2.Intent.Message.Text.Builder, com.google.cloud.dialogflow.v2.Intent.Message.TextOrBuilder> textBuilder_;
/**
*
* The text response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Text text = 1;
*/
public boolean hasText() {
return messageCase_ == 1;
}
/**
*
* The text response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Text text = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Text getText() {
if (textBuilder_ == null) {
if (messageCase_ == 1) {
return (com.google.cloud.dialogflow.v2.Intent.Message.Text) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.Text.getDefaultInstance();
} else {
if (messageCase_ == 1) {
return textBuilder_.getMessage();
}
return com.google.cloud.dialogflow.v2.Intent.Message.Text.getDefaultInstance();
}
}
/**
*
* The text response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Text text = 1;
*/
public Builder setText(com.google.cloud.dialogflow.v2.Intent.Message.Text value) {
if (textBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
message_ = value;
onChanged();
} else {
textBuilder_.setMessage(value);
}
messageCase_ = 1;
return this;
}
/**
*
* The text response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Text text = 1;
*/
public Builder setText(
com.google.cloud.dialogflow.v2.Intent.Message.Text.Builder builderForValue) {
if (textBuilder_ == null) {
message_ = builderForValue.build();
onChanged();
} else {
textBuilder_.setMessage(builderForValue.build());
}
messageCase_ = 1;
return this;
}
/**
*
* The text response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Text text = 1;
*/
public Builder mergeText(com.google.cloud.dialogflow.v2.Intent.Message.Text value) {
if (textBuilder_ == null) {
if (messageCase_ == 1 &&
message_ != com.google.cloud.dialogflow.v2.Intent.Message.Text.getDefaultInstance()) {
message_ = com.google.cloud.dialogflow.v2.Intent.Message.Text.newBuilder((com.google.cloud.dialogflow.v2.Intent.Message.Text) message_)
.mergeFrom(value).buildPartial();
} else {
message_ = value;
}
onChanged();
} else {
if (messageCase_ == 1) {
textBuilder_.mergeFrom(value);
}
textBuilder_.setMessage(value);
}
messageCase_ = 1;
return this;
}
/**
*
* The text response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.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;
}
/**
*
* The text response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Text text = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Text.Builder getTextBuilder() {
return getTextFieldBuilder().getBuilder();
}
/**
*
* The text response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Text text = 1;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.TextOrBuilder getTextOrBuilder() {
if ((messageCase_ == 1) && (textBuilder_ != null)) {
return textBuilder_.getMessageOrBuilder();
} else {
if (messageCase_ == 1) {
return (com.google.cloud.dialogflow.v2.Intent.Message.Text) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.Text.getDefaultInstance();
}
}
/**
*
* The text response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Text text = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.Text, com.google.cloud.dialogflow.v2.Intent.Message.Text.Builder, com.google.cloud.dialogflow.v2.Intent.Message.TextOrBuilder>
getTextFieldBuilder() {
if (textBuilder_ == null) {
if (!(messageCase_ == 1)) {
message_ = com.google.cloud.dialogflow.v2.Intent.Message.Text.getDefaultInstance();
}
textBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.Text, com.google.cloud.dialogflow.v2.Intent.Message.Text.Builder, com.google.cloud.dialogflow.v2.Intent.Message.TextOrBuilder>(
(com.google.cloud.dialogflow.v2.Intent.Message.Text) message_,
getParentForChildren(),
isClean());
message_ = null;
}
messageCase_ = 1;
onChanged();;
return textBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.Image, com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder, com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder> imageBuilder_;
/**
*
* The image response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 2;
*/
public boolean hasImage() {
return messageCase_ == 2;
}
/**
*
* The image response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 2;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Image getImage() {
if (imageBuilder_ == null) {
if (messageCase_ == 2) {
return (com.google.cloud.dialogflow.v2.Intent.Message.Image) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance();
} else {
if (messageCase_ == 2) {
return imageBuilder_.getMessage();
}
return com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance();
}
}
/**
*
* The image response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 2;
*/
public Builder setImage(com.google.cloud.dialogflow.v2.Intent.Message.Image value) {
if (imageBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
message_ = value;
onChanged();
} else {
imageBuilder_.setMessage(value);
}
messageCase_ = 2;
return this;
}
/**
*
* The image response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 2;
*/
public Builder setImage(
com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder builderForValue) {
if (imageBuilder_ == null) {
message_ = builderForValue.build();
onChanged();
} else {
imageBuilder_.setMessage(builderForValue.build());
}
messageCase_ = 2;
return this;
}
/**
*
* The image response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 2;
*/
public Builder mergeImage(com.google.cloud.dialogflow.v2.Intent.Message.Image value) {
if (imageBuilder_ == null) {
if (messageCase_ == 2 &&
message_ != com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance()) {
message_ = com.google.cloud.dialogflow.v2.Intent.Message.Image.newBuilder((com.google.cloud.dialogflow.v2.Intent.Message.Image) message_)
.mergeFrom(value).buildPartial();
} else {
message_ = value;
}
onChanged();
} else {
if (messageCase_ == 2) {
imageBuilder_.mergeFrom(value);
}
imageBuilder_.setMessage(value);
}
messageCase_ = 2;
return this;
}
/**
*
* The image response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 2;
*/
public Builder clearImage() {
if (imageBuilder_ == null) {
if (messageCase_ == 2) {
messageCase_ = 0;
message_ = null;
onChanged();
}
} else {
if (messageCase_ == 2) {
messageCase_ = 0;
message_ = null;
}
imageBuilder_.clear();
}
return this;
}
/**
*
* The image response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 2;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder getImageBuilder() {
return getImageFieldBuilder().getBuilder();
}
/**
*
* The image response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 2;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder getImageOrBuilder() {
if ((messageCase_ == 2) && (imageBuilder_ != null)) {
return imageBuilder_.getMessageOrBuilder();
} else {
if (messageCase_ == 2) {
return (com.google.cloud.dialogflow.v2.Intent.Message.Image) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance();
}
}
/**
*
* The image response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.Image, com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder, com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder>
getImageFieldBuilder() {
if (imageBuilder_ == null) {
if (!(messageCase_ == 2)) {
message_ = com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance();
}
imageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.Image, com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder, com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder>(
(com.google.cloud.dialogflow.v2.Intent.Message.Image) message_,
getParentForChildren(),
isClean());
message_ = null;
}
messageCase_ = 2;
onChanged();;
return imageBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies, com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.Builder, com.google.cloud.dialogflow.v2.Intent.Message.QuickRepliesOrBuilder> quickRepliesBuilder_;
/**
*
* The quick replies response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.QuickReplies quick_replies = 3;
*/
public boolean hasQuickReplies() {
return messageCase_ == 3;
}
/**
*
* The quick replies response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.QuickReplies quick_replies = 3;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies getQuickReplies() {
if (quickRepliesBuilder_ == null) {
if (messageCase_ == 3) {
return (com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.getDefaultInstance();
} else {
if (messageCase_ == 3) {
return quickRepliesBuilder_.getMessage();
}
return com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.getDefaultInstance();
}
}
/**
*
* The quick replies response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.QuickReplies quick_replies = 3;
*/
public Builder setQuickReplies(com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies value) {
if (quickRepliesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
message_ = value;
onChanged();
} else {
quickRepliesBuilder_.setMessage(value);
}
messageCase_ = 3;
return this;
}
/**
*
* The quick replies response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.QuickReplies quick_replies = 3;
*/
public Builder setQuickReplies(
com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.Builder builderForValue) {
if (quickRepliesBuilder_ == null) {
message_ = builderForValue.build();
onChanged();
} else {
quickRepliesBuilder_.setMessage(builderForValue.build());
}
messageCase_ = 3;
return this;
}
/**
*
* The quick replies response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.QuickReplies quick_replies = 3;
*/
public Builder mergeQuickReplies(com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies value) {
if (quickRepliesBuilder_ == null) {
if (messageCase_ == 3 &&
message_ != com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.getDefaultInstance()) {
message_ = com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.newBuilder((com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies) message_)
.mergeFrom(value).buildPartial();
} else {
message_ = value;
}
onChanged();
} else {
if (messageCase_ == 3) {
quickRepliesBuilder_.mergeFrom(value);
}
quickRepliesBuilder_.setMessage(value);
}
messageCase_ = 3;
return this;
}
/**
*
* The quick replies response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.QuickReplies quick_replies = 3;
*/
public Builder clearQuickReplies() {
if (quickRepliesBuilder_ == null) {
if (messageCase_ == 3) {
messageCase_ = 0;
message_ = null;
onChanged();
}
} else {
if (messageCase_ == 3) {
messageCase_ = 0;
message_ = null;
}
quickRepliesBuilder_.clear();
}
return this;
}
/**
*
* The quick replies response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.QuickReplies quick_replies = 3;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.Builder getQuickRepliesBuilder() {
return getQuickRepliesFieldBuilder().getBuilder();
}
/**
*
* The quick replies response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.QuickReplies quick_replies = 3;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.QuickRepliesOrBuilder getQuickRepliesOrBuilder() {
if ((messageCase_ == 3) && (quickRepliesBuilder_ != null)) {
return quickRepliesBuilder_.getMessageOrBuilder();
} else {
if (messageCase_ == 3) {
return (com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.getDefaultInstance();
}
}
/**
*
* The quick replies response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.QuickReplies quick_replies = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies, com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.Builder, com.google.cloud.dialogflow.v2.Intent.Message.QuickRepliesOrBuilder>
getQuickRepliesFieldBuilder() {
if (quickRepliesBuilder_ == null) {
if (!(messageCase_ == 3)) {
message_ = com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.getDefaultInstance();
}
quickRepliesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies, com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.Builder, com.google.cloud.dialogflow.v2.Intent.Message.QuickRepliesOrBuilder>(
(com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies) message_,
getParentForChildren(),
isClean());
message_ = null;
}
messageCase_ = 3;
onChanged();;
return quickRepliesBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.Card, com.google.cloud.dialogflow.v2.Intent.Message.Card.Builder, com.google.cloud.dialogflow.v2.Intent.Message.CardOrBuilder> cardBuilder_;
/**
*
* The card response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Card card = 4;
*/
public boolean hasCard() {
return messageCase_ == 4;
}
/**
*
* The card response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Card card = 4;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Card getCard() {
if (cardBuilder_ == null) {
if (messageCase_ == 4) {
return (com.google.cloud.dialogflow.v2.Intent.Message.Card) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.Card.getDefaultInstance();
} else {
if (messageCase_ == 4) {
return cardBuilder_.getMessage();
}
return com.google.cloud.dialogflow.v2.Intent.Message.Card.getDefaultInstance();
}
}
/**
*
* The card response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Card card = 4;
*/
public Builder setCard(com.google.cloud.dialogflow.v2.Intent.Message.Card value) {
if (cardBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
message_ = value;
onChanged();
} else {
cardBuilder_.setMessage(value);
}
messageCase_ = 4;
return this;
}
/**
*
* The card response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Card card = 4;
*/
public Builder setCard(
com.google.cloud.dialogflow.v2.Intent.Message.Card.Builder builderForValue) {
if (cardBuilder_ == null) {
message_ = builderForValue.build();
onChanged();
} else {
cardBuilder_.setMessage(builderForValue.build());
}
messageCase_ = 4;
return this;
}
/**
*
* The card response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Card card = 4;
*/
public Builder mergeCard(com.google.cloud.dialogflow.v2.Intent.Message.Card value) {
if (cardBuilder_ == null) {
if (messageCase_ == 4 &&
message_ != com.google.cloud.dialogflow.v2.Intent.Message.Card.getDefaultInstance()) {
message_ = com.google.cloud.dialogflow.v2.Intent.Message.Card.newBuilder((com.google.cloud.dialogflow.v2.Intent.Message.Card) message_)
.mergeFrom(value).buildPartial();
} else {
message_ = value;
}
onChanged();
} else {
if (messageCase_ == 4) {
cardBuilder_.mergeFrom(value);
}
cardBuilder_.setMessage(value);
}
messageCase_ = 4;
return this;
}
/**
*
* The card response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Card card = 4;
*/
public Builder clearCard() {
if (cardBuilder_ == null) {
if (messageCase_ == 4) {
messageCase_ = 0;
message_ = null;
onChanged();
}
} else {
if (messageCase_ == 4) {
messageCase_ = 0;
message_ = null;
}
cardBuilder_.clear();
}
return this;
}
/**
*
* The card response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Card card = 4;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Card.Builder getCardBuilder() {
return getCardFieldBuilder().getBuilder();
}
/**
*
* The card response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Card card = 4;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.CardOrBuilder getCardOrBuilder() {
if ((messageCase_ == 4) && (cardBuilder_ != null)) {
return cardBuilder_.getMessageOrBuilder();
} else {
if (messageCase_ == 4) {
return (com.google.cloud.dialogflow.v2.Intent.Message.Card) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.Card.getDefaultInstance();
}
}
/**
*
* The card response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Card card = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.Card, com.google.cloud.dialogflow.v2.Intent.Message.Card.Builder, com.google.cloud.dialogflow.v2.Intent.Message.CardOrBuilder>
getCardFieldBuilder() {
if (cardBuilder_ == null) {
if (!(messageCase_ == 4)) {
message_ = com.google.cloud.dialogflow.v2.Intent.Message.Card.getDefaultInstance();
}
cardBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.Card, com.google.cloud.dialogflow.v2.Intent.Message.Card.Builder, com.google.cloud.dialogflow.v2.Intent.Message.CardOrBuilder>(
(com.google.cloud.dialogflow.v2.Intent.Message.Card) message_,
getParentForChildren(),
isClean());
message_ = null;
}
messageCase_ = 4;
onChanged();;
return cardBuilder_;
}
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.
* See the Intent.Message.Platform type for a description of the
* structure that may be required for your platform.
*
*
* .google.protobuf.Struct payload = 5;
*/
public boolean hasPayload() {
return messageCase_ == 5;
}
/**
*
* Returns a response containing a custom, platform-specific payload.
* See the Intent.Message.Platform type for a description of the
* structure that may be required for your platform.
*
*
* .google.protobuf.Struct payload = 5;
*/
public com.google.protobuf.Struct getPayload() {
if (payloadBuilder_ == null) {
if (messageCase_ == 5) {
return (com.google.protobuf.Struct) message_;
}
return com.google.protobuf.Struct.getDefaultInstance();
} else {
if (messageCase_ == 5) {
return payloadBuilder_.getMessage();
}
return com.google.protobuf.Struct.getDefaultInstance();
}
}
/**
*
* Returns a response containing a custom, platform-specific payload.
* See the Intent.Message.Platform type for a description of the
* structure that may be required for your platform.
*
*
* .google.protobuf.Struct payload = 5;
*/
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_ = 5;
return this;
}
/**
*
* Returns a response containing a custom, platform-specific payload.
* See the Intent.Message.Platform type for a description of the
* structure that may be required for your platform.
*
*
* .google.protobuf.Struct payload = 5;
*/
public Builder setPayload(
com.google.protobuf.Struct.Builder builderForValue) {
if (payloadBuilder_ == null) {
message_ = builderForValue.build();
onChanged();
} else {
payloadBuilder_.setMessage(builderForValue.build());
}
messageCase_ = 5;
return this;
}
/**
*
* Returns a response containing a custom, platform-specific payload.
* See the Intent.Message.Platform type for a description of the
* structure that may be required for your platform.
*
*
* .google.protobuf.Struct payload = 5;
*/
public Builder mergePayload(com.google.protobuf.Struct value) {
if (payloadBuilder_ == null) {
if (messageCase_ == 5 &&
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_ == 5) {
payloadBuilder_.mergeFrom(value);
}
payloadBuilder_.setMessage(value);
}
messageCase_ = 5;
return this;
}
/**
*
* Returns a response containing a custom, platform-specific payload.
* See the Intent.Message.Platform type for a description of the
* structure that may be required for your platform.
*
*
* .google.protobuf.Struct payload = 5;
*/
public Builder clearPayload() {
if (payloadBuilder_ == null) {
if (messageCase_ == 5) {
messageCase_ = 0;
message_ = null;
onChanged();
}
} else {
if (messageCase_ == 5) {
messageCase_ = 0;
message_ = null;
}
payloadBuilder_.clear();
}
return this;
}
/**
*
* Returns a response containing a custom, platform-specific payload.
* See the Intent.Message.Platform type for a description of the
* structure that may be required for your platform.
*
*
* .google.protobuf.Struct payload = 5;
*/
public com.google.protobuf.Struct.Builder getPayloadBuilder() {
return getPayloadFieldBuilder().getBuilder();
}
/**
*
* Returns a response containing a custom, platform-specific payload.
* See the Intent.Message.Platform type for a description of the
* structure that may be required for your platform.
*
*
* .google.protobuf.Struct payload = 5;
*/
public com.google.protobuf.StructOrBuilder getPayloadOrBuilder() {
if ((messageCase_ == 5) && (payloadBuilder_ != null)) {
return payloadBuilder_.getMessageOrBuilder();
} else {
if (messageCase_ == 5) {
return (com.google.protobuf.Struct) message_;
}
return com.google.protobuf.Struct.getDefaultInstance();
}
}
/**
*
* Returns a response containing a custom, platform-specific payload.
* See the Intent.Message.Platform type for a description of the
* structure that may be required for your platform.
*
*
* .google.protobuf.Struct payload = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>
getPayloadFieldBuilder() {
if (payloadBuilder_ == null) {
if (!(messageCase_ == 5)) {
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_ = 5;
onChanged();;
return payloadBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses, com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses.Builder, com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponsesOrBuilder> simpleResponsesBuilder_;
/**
*
* The voice and text-only responses for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SimpleResponses simple_responses = 7;
*/
public boolean hasSimpleResponses() {
return messageCase_ == 7;
}
/**
*
* The voice and text-only responses for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SimpleResponses simple_responses = 7;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses getSimpleResponses() {
if (simpleResponsesBuilder_ == null) {
if (messageCase_ == 7) {
return (com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses.getDefaultInstance();
} else {
if (messageCase_ == 7) {
return simpleResponsesBuilder_.getMessage();
}
return com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses.getDefaultInstance();
}
}
/**
*
* The voice and text-only responses for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SimpleResponses simple_responses = 7;
*/
public Builder setSimpleResponses(com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses value) {
if (simpleResponsesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
message_ = value;
onChanged();
} else {
simpleResponsesBuilder_.setMessage(value);
}
messageCase_ = 7;
return this;
}
/**
*
* The voice and text-only responses for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SimpleResponses simple_responses = 7;
*/
public Builder setSimpleResponses(
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses.Builder builderForValue) {
if (simpleResponsesBuilder_ == null) {
message_ = builderForValue.build();
onChanged();
} else {
simpleResponsesBuilder_.setMessage(builderForValue.build());
}
messageCase_ = 7;
return this;
}
/**
*
* The voice and text-only responses for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SimpleResponses simple_responses = 7;
*/
public Builder mergeSimpleResponses(com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses value) {
if (simpleResponsesBuilder_ == null) {
if (messageCase_ == 7 &&
message_ != com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses.getDefaultInstance()) {
message_ = com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses.newBuilder((com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses) message_)
.mergeFrom(value).buildPartial();
} else {
message_ = value;
}
onChanged();
} else {
if (messageCase_ == 7) {
simpleResponsesBuilder_.mergeFrom(value);
}
simpleResponsesBuilder_.setMessage(value);
}
messageCase_ = 7;
return this;
}
/**
*
* The voice and text-only responses for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SimpleResponses simple_responses = 7;
*/
public Builder clearSimpleResponses() {
if (simpleResponsesBuilder_ == null) {
if (messageCase_ == 7) {
messageCase_ = 0;
message_ = null;
onChanged();
}
} else {
if (messageCase_ == 7) {
messageCase_ = 0;
message_ = null;
}
simpleResponsesBuilder_.clear();
}
return this;
}
/**
*
* The voice and text-only responses for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SimpleResponses simple_responses = 7;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses.Builder getSimpleResponsesBuilder() {
return getSimpleResponsesFieldBuilder().getBuilder();
}
/**
*
* The voice and text-only responses for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SimpleResponses simple_responses = 7;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponsesOrBuilder getSimpleResponsesOrBuilder() {
if ((messageCase_ == 7) && (simpleResponsesBuilder_ != null)) {
return simpleResponsesBuilder_.getMessageOrBuilder();
} else {
if (messageCase_ == 7) {
return (com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses.getDefaultInstance();
}
}
/**
*
* The voice and text-only responses for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SimpleResponses simple_responses = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses, com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses.Builder, com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponsesOrBuilder>
getSimpleResponsesFieldBuilder() {
if (simpleResponsesBuilder_ == null) {
if (!(messageCase_ == 7)) {
message_ = com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses.getDefaultInstance();
}
simpleResponsesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses, com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses.Builder, com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponsesOrBuilder>(
(com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses) message_,
getParentForChildren(),
isClean());
message_ = null;
}
messageCase_ = 7;
onChanged();;
return simpleResponsesBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard, com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Builder, com.google.cloud.dialogflow.v2.Intent.Message.BasicCardOrBuilder> basicCardBuilder_;
/**
*
* The basic card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard basic_card = 8;
*/
public boolean hasBasicCard() {
return messageCase_ == 8;
}
/**
*
* The basic card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard basic_card = 8;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard getBasicCard() {
if (basicCardBuilder_ == null) {
if (messageCase_ == 8) {
return (com.google.cloud.dialogflow.v2.Intent.Message.BasicCard) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.getDefaultInstance();
} else {
if (messageCase_ == 8) {
return basicCardBuilder_.getMessage();
}
return com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.getDefaultInstance();
}
}
/**
*
* The basic card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard basic_card = 8;
*/
public Builder setBasicCard(com.google.cloud.dialogflow.v2.Intent.Message.BasicCard value) {
if (basicCardBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
message_ = value;
onChanged();
} else {
basicCardBuilder_.setMessage(value);
}
messageCase_ = 8;
return this;
}
/**
*
* The basic card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard basic_card = 8;
*/
public Builder setBasicCard(
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Builder builderForValue) {
if (basicCardBuilder_ == null) {
message_ = builderForValue.build();
onChanged();
} else {
basicCardBuilder_.setMessage(builderForValue.build());
}
messageCase_ = 8;
return this;
}
/**
*
* The basic card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard basic_card = 8;
*/
public Builder mergeBasicCard(com.google.cloud.dialogflow.v2.Intent.Message.BasicCard value) {
if (basicCardBuilder_ == null) {
if (messageCase_ == 8 &&
message_ != com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.getDefaultInstance()) {
message_ = com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.newBuilder((com.google.cloud.dialogflow.v2.Intent.Message.BasicCard) message_)
.mergeFrom(value).buildPartial();
} else {
message_ = value;
}
onChanged();
} else {
if (messageCase_ == 8) {
basicCardBuilder_.mergeFrom(value);
}
basicCardBuilder_.setMessage(value);
}
messageCase_ = 8;
return this;
}
/**
*
* The basic card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard basic_card = 8;
*/
public Builder clearBasicCard() {
if (basicCardBuilder_ == null) {
if (messageCase_ == 8) {
messageCase_ = 0;
message_ = null;
onChanged();
}
} else {
if (messageCase_ == 8) {
messageCase_ = 0;
message_ = null;
}
basicCardBuilder_.clear();
}
return this;
}
/**
*
* The basic card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard basic_card = 8;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Builder getBasicCardBuilder() {
return getBasicCardFieldBuilder().getBuilder();
}
/**
*
* The basic card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard basic_card = 8;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCardOrBuilder getBasicCardOrBuilder() {
if ((messageCase_ == 8) && (basicCardBuilder_ != null)) {
return basicCardBuilder_.getMessageOrBuilder();
} else {
if (messageCase_ == 8) {
return (com.google.cloud.dialogflow.v2.Intent.Message.BasicCard) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.getDefaultInstance();
}
}
/**
*
* The basic card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard basic_card = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard, com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Builder, com.google.cloud.dialogflow.v2.Intent.Message.BasicCardOrBuilder>
getBasicCardFieldBuilder() {
if (basicCardBuilder_ == null) {
if (!(messageCase_ == 8)) {
message_ = com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.getDefaultInstance();
}
basicCardBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard, com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Builder, com.google.cloud.dialogflow.v2.Intent.Message.BasicCardOrBuilder>(
(com.google.cloud.dialogflow.v2.Intent.Message.BasicCard) message_,
getParentForChildren(),
isClean());
message_ = null;
}
messageCase_ = 8;
onChanged();;
return basicCardBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.Suggestions, com.google.cloud.dialogflow.v2.Intent.Message.Suggestions.Builder, com.google.cloud.dialogflow.v2.Intent.Message.SuggestionsOrBuilder> suggestionsBuilder_;
/**
*
* The suggestion chips for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Suggestions suggestions = 9;
*/
public boolean hasSuggestions() {
return messageCase_ == 9;
}
/**
*
* The suggestion chips for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Suggestions suggestions = 9;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Suggestions getSuggestions() {
if (suggestionsBuilder_ == null) {
if (messageCase_ == 9) {
return (com.google.cloud.dialogflow.v2.Intent.Message.Suggestions) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.Suggestions.getDefaultInstance();
} else {
if (messageCase_ == 9) {
return suggestionsBuilder_.getMessage();
}
return com.google.cloud.dialogflow.v2.Intent.Message.Suggestions.getDefaultInstance();
}
}
/**
*
* The suggestion chips for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Suggestions suggestions = 9;
*/
public Builder setSuggestions(com.google.cloud.dialogflow.v2.Intent.Message.Suggestions value) {
if (suggestionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
message_ = value;
onChanged();
} else {
suggestionsBuilder_.setMessage(value);
}
messageCase_ = 9;
return this;
}
/**
*
* The suggestion chips for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Suggestions suggestions = 9;
*/
public Builder setSuggestions(
com.google.cloud.dialogflow.v2.Intent.Message.Suggestions.Builder builderForValue) {
if (suggestionsBuilder_ == null) {
message_ = builderForValue.build();
onChanged();
} else {
suggestionsBuilder_.setMessage(builderForValue.build());
}
messageCase_ = 9;
return this;
}
/**
*
* The suggestion chips for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Suggestions suggestions = 9;
*/
public Builder mergeSuggestions(com.google.cloud.dialogflow.v2.Intent.Message.Suggestions value) {
if (suggestionsBuilder_ == null) {
if (messageCase_ == 9 &&
message_ != com.google.cloud.dialogflow.v2.Intent.Message.Suggestions.getDefaultInstance()) {
message_ = com.google.cloud.dialogflow.v2.Intent.Message.Suggestions.newBuilder((com.google.cloud.dialogflow.v2.Intent.Message.Suggestions) message_)
.mergeFrom(value).buildPartial();
} else {
message_ = value;
}
onChanged();
} else {
if (messageCase_ == 9) {
suggestionsBuilder_.mergeFrom(value);
}
suggestionsBuilder_.setMessage(value);
}
messageCase_ = 9;
return this;
}
/**
*
* The suggestion chips for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Suggestions suggestions = 9;
*/
public Builder clearSuggestions() {
if (suggestionsBuilder_ == null) {
if (messageCase_ == 9) {
messageCase_ = 0;
message_ = null;
onChanged();
}
} else {
if (messageCase_ == 9) {
messageCase_ = 0;
message_ = null;
}
suggestionsBuilder_.clear();
}
return this;
}
/**
*
* The suggestion chips for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Suggestions suggestions = 9;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Suggestions.Builder getSuggestionsBuilder() {
return getSuggestionsFieldBuilder().getBuilder();
}
/**
*
* The suggestion chips for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Suggestions suggestions = 9;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.SuggestionsOrBuilder getSuggestionsOrBuilder() {
if ((messageCase_ == 9) && (suggestionsBuilder_ != null)) {
return suggestionsBuilder_.getMessageOrBuilder();
} else {
if (messageCase_ == 9) {
return (com.google.cloud.dialogflow.v2.Intent.Message.Suggestions) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.Suggestions.getDefaultInstance();
}
}
/**
*
* The suggestion chips for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Suggestions suggestions = 9;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.Suggestions, com.google.cloud.dialogflow.v2.Intent.Message.Suggestions.Builder, com.google.cloud.dialogflow.v2.Intent.Message.SuggestionsOrBuilder>
getSuggestionsFieldBuilder() {
if (suggestionsBuilder_ == null) {
if (!(messageCase_ == 9)) {
message_ = com.google.cloud.dialogflow.v2.Intent.Message.Suggestions.getDefaultInstance();
}
suggestionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.Suggestions, com.google.cloud.dialogflow.v2.Intent.Message.Suggestions.Builder, com.google.cloud.dialogflow.v2.Intent.Message.SuggestionsOrBuilder>(
(com.google.cloud.dialogflow.v2.Intent.Message.Suggestions) message_,
getParentForChildren(),
isClean());
message_ = null;
}
messageCase_ = 9;
onChanged();;
return suggestionsBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion, com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion.Builder, com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestionOrBuilder> linkOutSuggestionBuilder_;
/**
*
* The link out suggestion chip for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion link_out_suggestion = 10;
*/
public boolean hasLinkOutSuggestion() {
return messageCase_ == 10;
}
/**
*
* The link out suggestion chip for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion link_out_suggestion = 10;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion getLinkOutSuggestion() {
if (linkOutSuggestionBuilder_ == null) {
if (messageCase_ == 10) {
return (com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion.getDefaultInstance();
} else {
if (messageCase_ == 10) {
return linkOutSuggestionBuilder_.getMessage();
}
return com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion.getDefaultInstance();
}
}
/**
*
* The link out suggestion chip for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion link_out_suggestion = 10;
*/
public Builder setLinkOutSuggestion(com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion value) {
if (linkOutSuggestionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
message_ = value;
onChanged();
} else {
linkOutSuggestionBuilder_.setMessage(value);
}
messageCase_ = 10;
return this;
}
/**
*
* The link out suggestion chip for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion link_out_suggestion = 10;
*/
public Builder setLinkOutSuggestion(
com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion.Builder builderForValue) {
if (linkOutSuggestionBuilder_ == null) {
message_ = builderForValue.build();
onChanged();
} else {
linkOutSuggestionBuilder_.setMessage(builderForValue.build());
}
messageCase_ = 10;
return this;
}
/**
*
* The link out suggestion chip for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion link_out_suggestion = 10;
*/
public Builder mergeLinkOutSuggestion(com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion value) {
if (linkOutSuggestionBuilder_ == null) {
if (messageCase_ == 10 &&
message_ != com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion.getDefaultInstance()) {
message_ = com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion.newBuilder((com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion) message_)
.mergeFrom(value).buildPartial();
} else {
message_ = value;
}
onChanged();
} else {
if (messageCase_ == 10) {
linkOutSuggestionBuilder_.mergeFrom(value);
}
linkOutSuggestionBuilder_.setMessage(value);
}
messageCase_ = 10;
return this;
}
/**
*
* The link out suggestion chip for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion link_out_suggestion = 10;
*/
public Builder clearLinkOutSuggestion() {
if (linkOutSuggestionBuilder_ == null) {
if (messageCase_ == 10) {
messageCase_ = 0;
message_ = null;
onChanged();
}
} else {
if (messageCase_ == 10) {
messageCase_ = 0;
message_ = null;
}
linkOutSuggestionBuilder_.clear();
}
return this;
}
/**
*
* The link out suggestion chip for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion link_out_suggestion = 10;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion.Builder getLinkOutSuggestionBuilder() {
return getLinkOutSuggestionFieldBuilder().getBuilder();
}
/**
*
* The link out suggestion chip for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion link_out_suggestion = 10;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestionOrBuilder getLinkOutSuggestionOrBuilder() {
if ((messageCase_ == 10) && (linkOutSuggestionBuilder_ != null)) {
return linkOutSuggestionBuilder_.getMessageOrBuilder();
} else {
if (messageCase_ == 10) {
return (com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion.getDefaultInstance();
}
}
/**
*
* The link out suggestion chip for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion link_out_suggestion = 10;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion, com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion.Builder, com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestionOrBuilder>
getLinkOutSuggestionFieldBuilder() {
if (linkOutSuggestionBuilder_ == null) {
if (!(messageCase_ == 10)) {
message_ = com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion.getDefaultInstance();
}
linkOutSuggestionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion, com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion.Builder, com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestionOrBuilder>(
(com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion) message_,
getParentForChildren(),
isClean());
message_ = null;
}
messageCase_ = 10;
onChanged();;
return linkOutSuggestionBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect, com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Builder, com.google.cloud.dialogflow.v2.Intent.Message.ListSelectOrBuilder> listSelectBuilder_;
/**
*
* The list card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.ListSelect list_select = 11;
*/
public boolean hasListSelect() {
return messageCase_ == 11;
}
/**
*
* The list card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.ListSelect list_select = 11;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.ListSelect getListSelect() {
if (listSelectBuilder_ == null) {
if (messageCase_ == 11) {
return (com.google.cloud.dialogflow.v2.Intent.Message.ListSelect) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.getDefaultInstance();
} else {
if (messageCase_ == 11) {
return listSelectBuilder_.getMessage();
}
return com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.getDefaultInstance();
}
}
/**
*
* The list card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.ListSelect list_select = 11;
*/
public Builder setListSelect(com.google.cloud.dialogflow.v2.Intent.Message.ListSelect value) {
if (listSelectBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
message_ = value;
onChanged();
} else {
listSelectBuilder_.setMessage(value);
}
messageCase_ = 11;
return this;
}
/**
*
* The list card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.ListSelect list_select = 11;
*/
public Builder setListSelect(
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Builder builderForValue) {
if (listSelectBuilder_ == null) {
message_ = builderForValue.build();
onChanged();
} else {
listSelectBuilder_.setMessage(builderForValue.build());
}
messageCase_ = 11;
return this;
}
/**
*
* The list card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.ListSelect list_select = 11;
*/
public Builder mergeListSelect(com.google.cloud.dialogflow.v2.Intent.Message.ListSelect value) {
if (listSelectBuilder_ == null) {
if (messageCase_ == 11 &&
message_ != com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.getDefaultInstance()) {
message_ = com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.newBuilder((com.google.cloud.dialogflow.v2.Intent.Message.ListSelect) message_)
.mergeFrom(value).buildPartial();
} else {
message_ = value;
}
onChanged();
} else {
if (messageCase_ == 11) {
listSelectBuilder_.mergeFrom(value);
}
listSelectBuilder_.setMessage(value);
}
messageCase_ = 11;
return this;
}
/**
*
* The list card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.ListSelect list_select = 11;
*/
public Builder clearListSelect() {
if (listSelectBuilder_ == null) {
if (messageCase_ == 11) {
messageCase_ = 0;
message_ = null;
onChanged();
}
} else {
if (messageCase_ == 11) {
messageCase_ = 0;
message_ = null;
}
listSelectBuilder_.clear();
}
return this;
}
/**
*
* The list card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.ListSelect list_select = 11;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Builder getListSelectBuilder() {
return getListSelectFieldBuilder().getBuilder();
}
/**
*
* The list card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.ListSelect list_select = 11;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.ListSelectOrBuilder getListSelectOrBuilder() {
if ((messageCase_ == 11) && (listSelectBuilder_ != null)) {
return listSelectBuilder_.getMessageOrBuilder();
} else {
if (messageCase_ == 11) {
return (com.google.cloud.dialogflow.v2.Intent.Message.ListSelect) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.getDefaultInstance();
}
}
/**
*
* The list card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.ListSelect list_select = 11;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect, com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Builder, com.google.cloud.dialogflow.v2.Intent.Message.ListSelectOrBuilder>
getListSelectFieldBuilder() {
if (listSelectBuilder_ == null) {
if (!(messageCase_ == 11)) {
message_ = com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.getDefaultInstance();
}
listSelectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect, com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Builder, com.google.cloud.dialogflow.v2.Intent.Message.ListSelectOrBuilder>(
(com.google.cloud.dialogflow.v2.Intent.Message.ListSelect) message_,
getParentForChildren(),
isClean());
message_ = null;
}
messageCase_ = 11;
onChanged();;
return listSelectBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect, com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Builder, com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelectOrBuilder> carouselSelectBuilder_;
/**
*
* The carousel card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect carousel_select = 12;
*/
public boolean hasCarouselSelect() {
return messageCase_ == 12;
}
/**
*
* The carousel card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect carousel_select = 12;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect getCarouselSelect() {
if (carouselSelectBuilder_ == null) {
if (messageCase_ == 12) {
return (com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.getDefaultInstance();
} else {
if (messageCase_ == 12) {
return carouselSelectBuilder_.getMessage();
}
return com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.getDefaultInstance();
}
}
/**
*
* The carousel card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect carousel_select = 12;
*/
public Builder setCarouselSelect(com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect value) {
if (carouselSelectBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
message_ = value;
onChanged();
} else {
carouselSelectBuilder_.setMessage(value);
}
messageCase_ = 12;
return this;
}
/**
*
* The carousel card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect carousel_select = 12;
*/
public Builder setCarouselSelect(
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Builder builderForValue) {
if (carouselSelectBuilder_ == null) {
message_ = builderForValue.build();
onChanged();
} else {
carouselSelectBuilder_.setMessage(builderForValue.build());
}
messageCase_ = 12;
return this;
}
/**
*
* The carousel card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect carousel_select = 12;
*/
public Builder mergeCarouselSelect(com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect value) {
if (carouselSelectBuilder_ == null) {
if (messageCase_ == 12 &&
message_ != com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.getDefaultInstance()) {
message_ = com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.newBuilder((com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect) message_)
.mergeFrom(value).buildPartial();
} else {
message_ = value;
}
onChanged();
} else {
if (messageCase_ == 12) {
carouselSelectBuilder_.mergeFrom(value);
}
carouselSelectBuilder_.setMessage(value);
}
messageCase_ = 12;
return this;
}
/**
*
* The carousel card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect carousel_select = 12;
*/
public Builder clearCarouselSelect() {
if (carouselSelectBuilder_ == null) {
if (messageCase_ == 12) {
messageCase_ = 0;
message_ = null;
onChanged();
}
} else {
if (messageCase_ == 12) {
messageCase_ = 0;
message_ = null;
}
carouselSelectBuilder_.clear();
}
return this;
}
/**
*
* The carousel card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect carousel_select = 12;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Builder getCarouselSelectBuilder() {
return getCarouselSelectFieldBuilder().getBuilder();
}
/**
*
* The carousel card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect carousel_select = 12;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelectOrBuilder getCarouselSelectOrBuilder() {
if ((messageCase_ == 12) && (carouselSelectBuilder_ != null)) {
return carouselSelectBuilder_.getMessageOrBuilder();
} else {
if (messageCase_ == 12) {
return (com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.getDefaultInstance();
}
}
/**
*
* The carousel card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect carousel_select = 12;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect, com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Builder, com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelectOrBuilder>
getCarouselSelectFieldBuilder() {
if (carouselSelectBuilder_ == null) {
if (!(messageCase_ == 12)) {
message_ = com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.getDefaultInstance();
}
carouselSelectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect, com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Builder, com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelectOrBuilder>(
(com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect) message_,
getParentForChildren(),
isClean());
message_ = null;
}
messageCase_ = 12;
onChanged();;
return carouselSelectBuilder_;
}
private int platform_ = 0;
/**
*
* Optional. The platform that this message is intended for.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Platform platform = 6;
*/
public int getPlatformValue() {
return platform_;
}
/**
*
* Optional. The platform that this message is intended for.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Platform platform = 6;
*/
public Builder setPlatformValue(int value) {
platform_ = value;
onChanged();
return this;
}
/**
*
* Optional. The platform that this message is intended for.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Platform platform = 6;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Platform getPlatform() {
com.google.cloud.dialogflow.v2.Intent.Message.Platform result = com.google.cloud.dialogflow.v2.Intent.Message.Platform.valueOf(platform_);
return result == null ? com.google.cloud.dialogflow.v2.Intent.Message.Platform.UNRECOGNIZED : result;
}
/**
*
* Optional. The platform that this message is intended for.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Platform platform = 6;
*/
public Builder setPlatform(com.google.cloud.dialogflow.v2.Intent.Message.Platform value) {
if (value == null) {
throw new NullPointerException();
}
platform_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Optional. The platform that this message is intended for.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Platform platform = 6;
*/
public Builder clearPlatform() {
platform_ = 0;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message)
private static final com.google.cloud.dialogflow.v2.Intent.Message DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Message();
}
public static com.google.cloud.dialogflow.v2.Intent.Message getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Message parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Message(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.cloud.dialogflow.v2.Intent.Message getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface FollowupIntentInfoOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.FollowupIntentInfo)
com.google.protobuf.MessageOrBuilder {
/**
*
* The unique identifier of the followup intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string followup_intent_name = 1;
*/
java.lang.String getFollowupIntentName();
/**
*
* The unique identifier of the followup intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string followup_intent_name = 1;
*/
com.google.protobuf.ByteString
getFollowupIntentNameBytes();
/**
*
* The unique identifier of the followup intent parent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string parent_followup_intent_name = 2;
*/
java.lang.String getParentFollowupIntentName();
/**
*
* The unique identifier of the followup intent parent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string parent_followup_intent_name = 2;
*/
com.google.protobuf.ByteString
getParentFollowupIntentNameBytes();
}
/**
*
* Represents a single followup intent in the chain.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.FollowupIntentInfo}
*/
public static final class FollowupIntentInfo extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.FollowupIntentInfo)
FollowupIntentInfoOrBuilder {
private static final long serialVersionUID = 0L;
// Use FollowupIntentInfo.newBuilder() to construct.
private FollowupIntentInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private FollowupIntentInfo() {
followupIntentName_ = "";
parentFollowupIntentName_ = "";
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private FollowupIntentInfo(
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;
default: {
if (!parseUnknownFieldProto3(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
followupIntentName_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
parentFollowupIntentName_ = s;
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.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_FollowupIntentInfo_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_FollowupIntentInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo.class, com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo.Builder.class);
}
public static final int FOLLOWUP_INTENT_NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object followupIntentName_;
/**
*
* The unique identifier of the followup intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string followup_intent_name = 1;
*/
public java.lang.String getFollowupIntentName() {
java.lang.Object ref = followupIntentName_;
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();
followupIntentName_ = s;
return s;
}
}
/**
*
* The unique identifier of the followup intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string followup_intent_name = 1;
*/
public com.google.protobuf.ByteString
getFollowupIntentNameBytes() {
java.lang.Object ref = followupIntentName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
followupIntentName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PARENT_FOLLOWUP_INTENT_NAME_FIELD_NUMBER = 2;
private volatile java.lang.Object parentFollowupIntentName_;
/**
*
* The unique identifier of the followup intent parent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string parent_followup_intent_name = 2;
*/
public java.lang.String getParentFollowupIntentName() {
java.lang.Object ref = parentFollowupIntentName_;
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();
parentFollowupIntentName_ = s;
return s;
}
}
/**
*
* The unique identifier of the followup intent parent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string parent_followup_intent_name = 2;
*/
public com.google.protobuf.ByteString
getParentFollowupIntentNameBytes() {
java.lang.Object ref = parentFollowupIntentName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
parentFollowupIntentName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getFollowupIntentNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, followupIntentName_);
}
if (!getParentFollowupIntentNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, parentFollowupIntentName_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getFollowupIntentNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, followupIntentName_);
}
if (!getParentFollowupIntentNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, parentFollowupIntentName_);
}
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.v2.Intent.FollowupIntentInfo)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo other = (com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo) obj;
boolean result = true;
result = result && getFollowupIntentName()
.equals(other.getFollowupIntentName());
result = result && getParentFollowupIntentName()
.equals(other.getParentFollowupIntentName());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + FOLLOWUP_INTENT_NAME_FIELD_NUMBER;
hash = (53 * hash) + getFollowupIntentName().hashCode();
hash = (37 * hash) + PARENT_FOLLOWUP_INTENT_NAME_FIELD_NUMBER;
hash = (53 * hash) + getParentFollowupIntentName().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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 single followup intent in the chain.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.FollowupIntentInfo}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.FollowupIntentInfo)
com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_FollowupIntentInfo_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_FollowupIntentInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo.class, com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
followupIntentName_ = "";
parentFollowupIntentName_ = "";
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_FollowupIntentInfo_descriptor;
}
public com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo.getDefaultInstance();
}
public com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo build() {
com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo buildPartial() {
com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo result = new com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo(this);
result.followupIntentName_ = followupIntentName_;
result.parentFollowupIntentName_ = parentFollowupIntentName_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo) {
return mergeFrom((com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo other) {
if (other == com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo.getDefaultInstance()) return this;
if (!other.getFollowupIntentName().isEmpty()) {
followupIntentName_ = other.followupIntentName_;
onChanged();
}
if (!other.getParentFollowupIntentName().isEmpty()) {
parentFollowupIntentName_ = other.parentFollowupIntentName_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object followupIntentName_ = "";
/**
*
* The unique identifier of the followup intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string followup_intent_name = 1;
*/
public java.lang.String getFollowupIntentName() {
java.lang.Object ref = followupIntentName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
followupIntentName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The unique identifier of the followup intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string followup_intent_name = 1;
*/
public com.google.protobuf.ByteString
getFollowupIntentNameBytes() {
java.lang.Object ref = followupIntentName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
followupIntentName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The unique identifier of the followup intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string followup_intent_name = 1;
*/
public Builder setFollowupIntentName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
followupIntentName_ = value;
onChanged();
return this;
}
/**
*
* The unique identifier of the followup intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string followup_intent_name = 1;
*/
public Builder clearFollowupIntentName() {
followupIntentName_ = getDefaultInstance().getFollowupIntentName();
onChanged();
return this;
}
/**
*
* The unique identifier of the followup intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string followup_intent_name = 1;
*/
public Builder setFollowupIntentNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
followupIntentName_ = value;
onChanged();
return this;
}
private java.lang.Object parentFollowupIntentName_ = "";
/**
*
* The unique identifier of the followup intent parent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string parent_followup_intent_name = 2;
*/
public java.lang.String getParentFollowupIntentName() {
java.lang.Object ref = parentFollowupIntentName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
parentFollowupIntentName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The unique identifier of the followup intent parent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string parent_followup_intent_name = 2;
*/
public com.google.protobuf.ByteString
getParentFollowupIntentNameBytes() {
java.lang.Object ref = parentFollowupIntentName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
parentFollowupIntentName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The unique identifier of the followup intent parent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string parent_followup_intent_name = 2;
*/
public Builder setParentFollowupIntentName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
parentFollowupIntentName_ = value;
onChanged();
return this;
}
/**
*
* The unique identifier of the followup intent parent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string parent_followup_intent_name = 2;
*/
public Builder clearParentFollowupIntentName() {
parentFollowupIntentName_ = getDefaultInstance().getParentFollowupIntentName();
onChanged();
return this;
}
/**
*
* The unique identifier of the followup intent parent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string parent_followup_intent_name = 2;
*/
public Builder setParentFollowupIntentNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
parentFollowupIntentName_ = value;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.FollowupIntentInfo)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.FollowupIntentInfo)
private static final com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo();
}
public static com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public FollowupIntentInfo parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new FollowupIntentInfo(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
* Required for all methods except `create` (`create` populates the name
* automatically.
* The unique identifier of this intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string name = 1;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
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();
name_ = s;
return s;
}
}
/**
*
* Required for all methods except `create` (`create` populates the name
* automatically.
* The unique identifier of this intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string name = 1;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DISPLAY_NAME_FIELD_NUMBER = 2;
private volatile java.lang.Object displayName_;
/**
*
* Required. The name of this intent.
*
*
* string display_name = 2;
*/
public java.lang.String getDisplayName() {
java.lang.Object ref = displayName_;
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();
displayName_ = s;
return s;
}
}
/**
*
* Required. The name of this intent.
*
*
* string display_name = 2;
*/
public com.google.protobuf.ByteString
getDisplayNameBytes() {
java.lang.Object ref = displayName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
displayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int WEBHOOK_STATE_FIELD_NUMBER = 6;
private int webhookState_;
/**
*
* Required. Indicates whether webhooks are enabled for the intent.
*
*
* .google.cloud.dialogflow.v2.Intent.WebhookState webhook_state = 6;
*/
public int getWebhookStateValue() {
return webhookState_;
}
/**
*
* Required. Indicates whether webhooks are enabled for the intent.
*
*
* .google.cloud.dialogflow.v2.Intent.WebhookState webhook_state = 6;
*/
public com.google.cloud.dialogflow.v2.Intent.WebhookState getWebhookState() {
com.google.cloud.dialogflow.v2.Intent.WebhookState result = com.google.cloud.dialogflow.v2.Intent.WebhookState.valueOf(webhookState_);
return result == null ? com.google.cloud.dialogflow.v2.Intent.WebhookState.UNRECOGNIZED : result;
}
public static final int PRIORITY_FIELD_NUMBER = 3;
private int priority_;
/**
*
* Optional. The priority of this intent. Higher numbers represent higher
* priorities. Zero or negative numbers mean that the intent is disabled.
*
*
* int32 priority = 3;
*/
public int getPriority() {
return priority_;
}
public static final int IS_FALLBACK_FIELD_NUMBER = 4;
private boolean isFallback_;
/**
*
* Optional. Indicates whether this is a fallback intent.
*
*
* bool is_fallback = 4;
*/
public boolean getIsFallback() {
return isFallback_;
}
public static final int ML_DISABLED_FIELD_NUMBER = 19;
private boolean mlDisabled_;
/**
*
* Optional. Indicates whether Machine Learning is disabled for the intent.
* Note: If `ml_diabled` setting is set to true, then this intent is not
* taken into account during inference in `ML ONLY` match mode. Also,
* auto-markup in the UI is turned off.
*
*
* bool ml_disabled = 19;
*/
public boolean getMlDisabled() {
return mlDisabled_;
}
public static final int INPUT_CONTEXT_NAMES_FIELD_NUMBER = 7;
private com.google.protobuf.LazyStringList inputContextNames_;
/**
*
* Optional. The list of context names required for this intent to be
* triggered.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated string input_context_names = 7;
*/
public com.google.protobuf.ProtocolStringList
getInputContextNamesList() {
return inputContextNames_;
}
/**
*
* Optional. The list of context names required for this intent to be
* triggered.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated string input_context_names = 7;
*/
public int getInputContextNamesCount() {
return inputContextNames_.size();
}
/**
*
* Optional. The list of context names required for this intent to be
* triggered.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated string input_context_names = 7;
*/
public java.lang.String getInputContextNames(int index) {
return inputContextNames_.get(index);
}
/**
*
* Optional. The list of context names required for this intent to be
* triggered.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated string input_context_names = 7;
*/
public com.google.protobuf.ByteString
getInputContextNamesBytes(int index) {
return inputContextNames_.getByteString(index);
}
public static final int EVENTS_FIELD_NUMBER = 8;
private com.google.protobuf.LazyStringList events_;
/**
*
* Optional. The collection of event names that trigger the intent.
* If the collection of input contexts is not empty, all of the contexts must
* be present in the active user session for an event to trigger this intent.
*
*
* repeated string events = 8;
*/
public com.google.protobuf.ProtocolStringList
getEventsList() {
return events_;
}
/**
*
* Optional. The collection of event names that trigger the intent.
* If the collection of input contexts is not empty, all of the contexts must
* be present in the active user session for an event to trigger this intent.
*
*
* repeated string events = 8;
*/
public int getEventsCount() {
return events_.size();
}
/**
*
* Optional. The collection of event names that trigger the intent.
* If the collection of input contexts is not empty, all of the contexts must
* be present in the active user session for an event to trigger this intent.
*
*
* repeated string events = 8;
*/
public java.lang.String getEvents(int index) {
return events_.get(index);
}
/**
*
* Optional. The collection of event names that trigger the intent.
* If the collection of input contexts is not empty, all of the contexts must
* be present in the active user session for an event to trigger this intent.
*
*
* repeated string events = 8;
*/
public com.google.protobuf.ByteString
getEventsBytes(int index) {
return events_.getByteString(index);
}
public static final int TRAINING_PHRASES_FIELD_NUMBER = 9;
private java.util.List trainingPhrases_;
/**
*
* Optional. The collection of examples/templates that the agent is
* trained on.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9;
*/
public java.util.List getTrainingPhrasesList() {
return trainingPhrases_;
}
/**
*
* Optional. The collection of examples/templates that the agent is
* trained on.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9;
*/
public java.util.List extends com.google.cloud.dialogflow.v2.Intent.TrainingPhraseOrBuilder>
getTrainingPhrasesOrBuilderList() {
return trainingPhrases_;
}
/**
*
* Optional. The collection of examples/templates that the agent is
* trained on.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9;
*/
public int getTrainingPhrasesCount() {
return trainingPhrases_.size();
}
/**
*
* Optional. The collection of examples/templates that the agent is
* trained on.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9;
*/
public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase getTrainingPhrases(int index) {
return trainingPhrases_.get(index);
}
/**
*
* Optional. The collection of examples/templates that the agent is
* trained on.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9;
*/
public com.google.cloud.dialogflow.v2.Intent.TrainingPhraseOrBuilder getTrainingPhrasesOrBuilder(
int index) {
return trainingPhrases_.get(index);
}
public static final int ACTION_FIELD_NUMBER = 10;
private volatile java.lang.Object action_;
/**
*
* Optional. The name of the action associated with the intent.
*
*
* string action = 10;
*/
public java.lang.String getAction() {
java.lang.Object ref = action_;
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();
action_ = s;
return s;
}
}
/**
*
* Optional. The name of the action associated with the intent.
*
*
* string action = 10;
*/
public com.google.protobuf.ByteString
getActionBytes() {
java.lang.Object ref = action_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
action_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int OUTPUT_CONTEXTS_FIELD_NUMBER = 11;
private java.util.List outputContexts_;
/**
*
* Optional. The collection of contexts that are activated when the intent
* is matched. Context messages in this collection should not set the
* parameters field. Setting the `lifespan_count` to 0 will reset the context
* when the intent is matched.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated .google.cloud.dialogflow.v2.Context output_contexts = 11;
*/
public java.util.List getOutputContextsList() {
return outputContexts_;
}
/**
*
* Optional. The collection of contexts that are activated when the intent
* is matched. Context messages in this collection should not set the
* parameters field. Setting the `lifespan_count` to 0 will reset the context
* when the intent is matched.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated .google.cloud.dialogflow.v2.Context output_contexts = 11;
*/
public java.util.List extends com.google.cloud.dialogflow.v2.ContextOrBuilder>
getOutputContextsOrBuilderList() {
return outputContexts_;
}
/**
*
* Optional. The collection of contexts that are activated when the intent
* is matched. Context messages in this collection should not set the
* parameters field. Setting the `lifespan_count` to 0 will reset the context
* when the intent is matched.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated .google.cloud.dialogflow.v2.Context output_contexts = 11;
*/
public int getOutputContextsCount() {
return outputContexts_.size();
}
/**
*
* Optional. The collection of contexts that are activated when the intent
* is matched. Context messages in this collection should not set the
* parameters field. Setting the `lifespan_count` to 0 will reset the context
* when the intent is matched.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated .google.cloud.dialogflow.v2.Context output_contexts = 11;
*/
public com.google.cloud.dialogflow.v2.Context getOutputContexts(int index) {
return outputContexts_.get(index);
}
/**
*
* Optional. The collection of contexts that are activated when the intent
* is matched. Context messages in this collection should not set the
* parameters field. Setting the `lifespan_count` to 0 will reset the context
* when the intent is matched.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated .google.cloud.dialogflow.v2.Context output_contexts = 11;
*/
public com.google.cloud.dialogflow.v2.ContextOrBuilder getOutputContextsOrBuilder(
int index) {
return outputContexts_.get(index);
}
public static final int RESET_CONTEXTS_FIELD_NUMBER = 12;
private boolean resetContexts_;
/**
*
* Optional. Indicates whether to delete all contexts in the current
* session when this intent is matched.
*
*
* bool reset_contexts = 12;
*/
public boolean getResetContexts() {
return resetContexts_;
}
public static final int PARAMETERS_FIELD_NUMBER = 13;
private java.util.List parameters_;
/**
*
* Optional. The collection of parameters associated with the intent.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13;
*/
public java.util.List getParametersList() {
return parameters_;
}
/**
*
* Optional. The collection of parameters associated with the intent.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13;
*/
public java.util.List extends com.google.cloud.dialogflow.v2.Intent.ParameterOrBuilder>
getParametersOrBuilderList() {
return parameters_;
}
/**
*
* Optional. The collection of parameters associated with the intent.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13;
*/
public int getParametersCount() {
return parameters_.size();
}
/**
*
* Optional. The collection of parameters associated with the intent.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13;
*/
public com.google.cloud.dialogflow.v2.Intent.Parameter getParameters(int index) {
return parameters_.get(index);
}
/**
*
* Optional. The collection of parameters associated with the intent.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13;
*/
public com.google.cloud.dialogflow.v2.Intent.ParameterOrBuilder getParametersOrBuilder(
int index) {
return parameters_.get(index);
}
public static final int MESSAGES_FIELD_NUMBER = 14;
private java.util.List messages_;
/**
*
* Optional. The collection of rich messages corresponding to the
* `Response` field in the Dialogflow console.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14;
*/
public java.util.List getMessagesList() {
return messages_;
}
/**
*
* Optional. The collection of rich messages corresponding to the
* `Response` field in the Dialogflow console.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14;
*/
public java.util.List extends com.google.cloud.dialogflow.v2.Intent.MessageOrBuilder>
getMessagesOrBuilderList() {
return messages_;
}
/**
*
* Optional. The collection of rich messages corresponding to the
* `Response` field in the Dialogflow console.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14;
*/
public int getMessagesCount() {
return messages_.size();
}
/**
*
* Optional. The collection of rich messages corresponding to the
* `Response` field in the Dialogflow console.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14;
*/
public com.google.cloud.dialogflow.v2.Intent.Message getMessages(int index) {
return messages_.get(index);
}
/**
*
* Optional. The collection of rich messages corresponding to the
* `Response` field in the Dialogflow console.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14;
*/
public com.google.cloud.dialogflow.v2.Intent.MessageOrBuilder getMessagesOrBuilder(
int index) {
return messages_.get(index);
}
public static final int DEFAULT_RESPONSE_PLATFORMS_FIELD_NUMBER = 15;
private java.util.List defaultResponsePlatforms_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, com.google.cloud.dialogflow.v2.Intent.Message.Platform> defaultResponsePlatforms_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, com.google.cloud.dialogflow.v2.Intent.Message.Platform>() {
public com.google.cloud.dialogflow.v2.Intent.Message.Platform convert(java.lang.Integer from) {
com.google.cloud.dialogflow.v2.Intent.Message.Platform result = com.google.cloud.dialogflow.v2.Intent.Message.Platform.valueOf(from);
return result == null ? com.google.cloud.dialogflow.v2.Intent.Message.Platform.UNRECOGNIZED : result;
}
};
/**
*
* Optional. The list of platforms for which the first response will be
* taken from among the messages assigned to the DEFAULT_PLATFORM.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Platform default_response_platforms = 15;
*/
public java.util.List getDefaultResponsePlatformsList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, com.google.cloud.dialogflow.v2.Intent.Message.Platform>(defaultResponsePlatforms_, defaultResponsePlatforms_converter_);
}
/**
*
* Optional. The list of platforms for which the first response will be
* taken from among the messages assigned to the DEFAULT_PLATFORM.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Platform default_response_platforms = 15;
*/
public int getDefaultResponsePlatformsCount() {
return defaultResponsePlatforms_.size();
}
/**
*
* Optional. The list of platforms for which the first response will be
* taken from among the messages assigned to the DEFAULT_PLATFORM.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Platform default_response_platforms = 15;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Platform getDefaultResponsePlatforms(int index) {
return defaultResponsePlatforms_converter_.convert(defaultResponsePlatforms_.get(index));
}
/**
*
* Optional. The list of platforms for which the first response will be
* taken from among the messages assigned to the DEFAULT_PLATFORM.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Platform default_response_platforms = 15;
*/
public java.util.List
getDefaultResponsePlatformsValueList() {
return defaultResponsePlatforms_;
}
/**
*
* Optional. The list of platforms for which the first response will be
* taken from among the messages assigned to the DEFAULT_PLATFORM.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Platform default_response_platforms = 15;
*/
public int getDefaultResponsePlatformsValue(int index) {
return defaultResponsePlatforms_.get(index);
}
private int defaultResponsePlatformsMemoizedSerializedSize;
public static final int ROOT_FOLLOWUP_INTENT_NAME_FIELD_NUMBER = 16;
private volatile java.lang.Object rootFollowupIntentName_;
/**
*
* The unique identifier of the root intent in the chain of followup intents.
* It identifies the correct followup intents chain for this intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string root_followup_intent_name = 16;
*/
public java.lang.String getRootFollowupIntentName() {
java.lang.Object ref = rootFollowupIntentName_;
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();
rootFollowupIntentName_ = s;
return s;
}
}
/**
*
* The unique identifier of the root intent in the chain of followup intents.
* It identifies the correct followup intents chain for this intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string root_followup_intent_name = 16;
*/
public com.google.protobuf.ByteString
getRootFollowupIntentNameBytes() {
java.lang.Object ref = rootFollowupIntentName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
rootFollowupIntentName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PARENT_FOLLOWUP_INTENT_NAME_FIELD_NUMBER = 17;
private volatile java.lang.Object parentFollowupIntentName_;
/**
*
* The unique identifier of the parent intent in the chain of followup
* intents.
* It identifies the parent followup intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string parent_followup_intent_name = 17;
*/
public java.lang.String getParentFollowupIntentName() {
java.lang.Object ref = parentFollowupIntentName_;
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();
parentFollowupIntentName_ = s;
return s;
}
}
/**
*
* The unique identifier of the parent intent in the chain of followup
* intents.
* It identifies the parent followup intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string parent_followup_intent_name = 17;
*/
public com.google.protobuf.ByteString
getParentFollowupIntentNameBytes() {
java.lang.Object ref = parentFollowupIntentName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
parentFollowupIntentName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FOLLOWUP_INTENT_INFO_FIELD_NUMBER = 18;
private java.util.List followupIntentInfo_;
/**
*
* Optional. Collection of information about all followup intents that have
* name of this intent as a root_name.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18;
*/
public java.util.List getFollowupIntentInfoList() {
return followupIntentInfo_;
}
/**
*
* Optional. Collection of information about all followup intents that have
* name of this intent as a root_name.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18;
*/
public java.util.List extends com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfoOrBuilder>
getFollowupIntentInfoOrBuilderList() {
return followupIntentInfo_;
}
/**
*
* Optional. Collection of information about all followup intents that have
* name of this intent as a root_name.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18;
*/
public int getFollowupIntentInfoCount() {
return followupIntentInfo_.size();
}
/**
*
* Optional. Collection of information about all followup intents that have
* name of this intent as a root_name.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18;
*/
public com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo getFollowupIntentInfo(int index) {
return followupIntentInfo_.get(index);
}
/**
*
* Optional. Collection of information about all followup intents that have
* name of this intent as a root_name.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18;
*/
public com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfoOrBuilder getFollowupIntentInfoOrBuilder(
int index) {
return followupIntentInfo_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!getDisplayNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_);
}
if (priority_ != 0) {
output.writeInt32(3, priority_);
}
if (isFallback_ != false) {
output.writeBool(4, isFallback_);
}
if (webhookState_ != com.google.cloud.dialogflow.v2.Intent.WebhookState.WEBHOOK_STATE_UNSPECIFIED.getNumber()) {
output.writeEnum(6, webhookState_);
}
for (int i = 0; i < inputContextNames_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, inputContextNames_.getRaw(i));
}
for (int i = 0; i < events_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, events_.getRaw(i));
}
for (int i = 0; i < trainingPhrases_.size(); i++) {
output.writeMessage(9, trainingPhrases_.get(i));
}
if (!getActionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 10, action_);
}
for (int i = 0; i < outputContexts_.size(); i++) {
output.writeMessage(11, outputContexts_.get(i));
}
if (resetContexts_ != false) {
output.writeBool(12, resetContexts_);
}
for (int i = 0; i < parameters_.size(); i++) {
output.writeMessage(13, parameters_.get(i));
}
for (int i = 0; i < messages_.size(); i++) {
output.writeMessage(14, messages_.get(i));
}
if (getDefaultResponsePlatformsList().size() > 0) {
output.writeUInt32NoTag(122);
output.writeUInt32NoTag(defaultResponsePlatformsMemoizedSerializedSize);
}
for (int i = 0; i < defaultResponsePlatforms_.size(); i++) {
output.writeEnumNoTag(defaultResponsePlatforms_.get(i));
}
if (!getRootFollowupIntentNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 16, rootFollowupIntentName_);
}
if (!getParentFollowupIntentNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 17, parentFollowupIntentName_);
}
for (int i = 0; i < followupIntentInfo_.size(); i++) {
output.writeMessage(18, followupIntentInfo_.get(i));
}
if (mlDisabled_ != false) {
output.writeBool(19, mlDisabled_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (!getDisplayNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_);
}
if (priority_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, priority_);
}
if (isFallback_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(4, isFallback_);
}
if (webhookState_ != com.google.cloud.dialogflow.v2.Intent.WebhookState.WEBHOOK_STATE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(6, webhookState_);
}
{
int dataSize = 0;
for (int i = 0; i < inputContextNames_.size(); i++) {
dataSize += computeStringSizeNoTag(inputContextNames_.getRaw(i));
}
size += dataSize;
size += 1 * getInputContextNamesList().size();
}
{
int dataSize = 0;
for (int i = 0; i < events_.size(); i++) {
dataSize += computeStringSizeNoTag(events_.getRaw(i));
}
size += dataSize;
size += 1 * getEventsList().size();
}
for (int i = 0; i < trainingPhrases_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, trainingPhrases_.get(i));
}
if (!getActionBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, action_);
}
for (int i = 0; i < outputContexts_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(11, outputContexts_.get(i));
}
if (resetContexts_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(12, resetContexts_);
}
for (int i = 0; i < parameters_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(13, parameters_.get(i));
}
for (int i = 0; i < messages_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(14, messages_.get(i));
}
{
int dataSize = 0;
for (int i = 0; i < defaultResponsePlatforms_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeEnumSizeNoTag(defaultResponsePlatforms_.get(i));
}
size += dataSize;
if (!getDefaultResponsePlatformsList().isEmpty()) { size += 1;
size += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(dataSize);
}defaultResponsePlatformsMemoizedSerializedSize = dataSize;
}
if (!getRootFollowupIntentNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, rootFollowupIntentName_);
}
if (!getParentFollowupIntentNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, parentFollowupIntentName_);
}
for (int i = 0; i < followupIntentInfo_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(18, followupIntentInfo_.get(i));
}
if (mlDisabled_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(19, mlDisabled_);
}
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.v2.Intent)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent other = (com.google.cloud.dialogflow.v2.Intent) obj;
boolean result = true;
result = result && getName()
.equals(other.getName());
result = result && getDisplayName()
.equals(other.getDisplayName());
result = result && webhookState_ == other.webhookState_;
result = result && (getPriority()
== other.getPriority());
result = result && (getIsFallback()
== other.getIsFallback());
result = result && (getMlDisabled()
== other.getMlDisabled());
result = result && getInputContextNamesList()
.equals(other.getInputContextNamesList());
result = result && getEventsList()
.equals(other.getEventsList());
result = result && getTrainingPhrasesList()
.equals(other.getTrainingPhrasesList());
result = result && getAction()
.equals(other.getAction());
result = result && getOutputContextsList()
.equals(other.getOutputContextsList());
result = result && (getResetContexts()
== other.getResetContexts());
result = result && getParametersList()
.equals(other.getParametersList());
result = result && getMessagesList()
.equals(other.getMessagesList());
result = result && defaultResponsePlatforms_.equals(other.defaultResponsePlatforms_);
result = result && getRootFollowupIntentName()
.equals(other.getRootFollowupIntentName());
result = result && getParentFollowupIntentName()
.equals(other.getParentFollowupIntentName());
result = result && getFollowupIntentInfoList()
.equals(other.getFollowupIntentInfoList());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
hash = (53 * hash) + getDisplayName().hashCode();
hash = (37 * hash) + WEBHOOK_STATE_FIELD_NUMBER;
hash = (53 * hash) + webhookState_;
hash = (37 * hash) + PRIORITY_FIELD_NUMBER;
hash = (53 * hash) + getPriority();
hash = (37 * hash) + IS_FALLBACK_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getIsFallback());
hash = (37 * hash) + ML_DISABLED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getMlDisabled());
if (getInputContextNamesCount() > 0) {
hash = (37 * hash) + INPUT_CONTEXT_NAMES_FIELD_NUMBER;
hash = (53 * hash) + getInputContextNamesList().hashCode();
}
if (getEventsCount() > 0) {
hash = (37 * hash) + EVENTS_FIELD_NUMBER;
hash = (53 * hash) + getEventsList().hashCode();
}
if (getTrainingPhrasesCount() > 0) {
hash = (37 * hash) + TRAINING_PHRASES_FIELD_NUMBER;
hash = (53 * hash) + getTrainingPhrasesList().hashCode();
}
hash = (37 * hash) + ACTION_FIELD_NUMBER;
hash = (53 * hash) + getAction().hashCode();
if (getOutputContextsCount() > 0) {
hash = (37 * hash) + OUTPUT_CONTEXTS_FIELD_NUMBER;
hash = (53 * hash) + getOutputContextsList().hashCode();
}
hash = (37 * hash) + RESET_CONTEXTS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getResetContexts());
if (getParametersCount() > 0) {
hash = (37 * hash) + PARAMETERS_FIELD_NUMBER;
hash = (53 * hash) + getParametersList().hashCode();
}
if (getMessagesCount() > 0) {
hash = (37 * hash) + MESSAGES_FIELD_NUMBER;
hash = (53 * hash) + getMessagesList().hashCode();
}
if (getDefaultResponsePlatformsCount() > 0) {
hash = (37 * hash) + DEFAULT_RESPONSE_PLATFORMS_FIELD_NUMBER;
hash = (53 * hash) + defaultResponsePlatforms_.hashCode();
}
hash = (37 * hash) + ROOT_FOLLOWUP_INTENT_NAME_FIELD_NUMBER;
hash = (53 * hash) + getRootFollowupIntentName().hashCode();
hash = (37 * hash) + PARENT_FOLLOWUP_INTENT_NAME_FIELD_NUMBER;
hash = (53 * hash) + getParentFollowupIntentName().hashCode();
if (getFollowupIntentInfoCount() > 0) {
hash = (37 * hash) + FOLLOWUP_INTENT_INFO_FIELD_NUMBER;
hash = (53 * hash) + getFollowupIntentInfoList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.Intent parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.Intent parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
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 intent.
* Intents convert a number of user expressions or patterns into an action. An
* action is an extraction of a user command or sentence semantics.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent)
com.google.cloud.dialogflow.v2.IntentOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.class, com.google.cloud.dialogflow.v2.Intent.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.Intent.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getTrainingPhrasesFieldBuilder();
getOutputContextsFieldBuilder();
getParametersFieldBuilder();
getMessagesFieldBuilder();
getFollowupIntentInfoFieldBuilder();
}
}
public Builder clear() {
super.clear();
name_ = "";
displayName_ = "";
webhookState_ = 0;
priority_ = 0;
isFallback_ = false;
mlDisabled_ = false;
inputContextNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000040);
events_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000080);
if (trainingPhrasesBuilder_ == null) {
trainingPhrases_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000100);
} else {
trainingPhrasesBuilder_.clear();
}
action_ = "";
if (outputContextsBuilder_ == null) {
outputContexts_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000400);
} else {
outputContextsBuilder_.clear();
}
resetContexts_ = false;
if (parametersBuilder_ == null) {
parameters_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00001000);
} else {
parametersBuilder_.clear();
}
if (messagesBuilder_ == null) {
messages_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00002000);
} else {
messagesBuilder_.clear();
}
defaultResponsePlatforms_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00004000);
rootFollowupIntentName_ = "";
parentFollowupIntentName_ = "";
if (followupIntentInfoBuilder_ == null) {
followupIntentInfo_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00020000);
} else {
followupIntentInfoBuilder_.clear();
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_descriptor;
}
public com.google.cloud.dialogflow.v2.Intent getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.getDefaultInstance();
}
public com.google.cloud.dialogflow.v2.Intent build() {
com.google.cloud.dialogflow.v2.Intent result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.google.cloud.dialogflow.v2.Intent buildPartial() {
com.google.cloud.dialogflow.v2.Intent result = new com.google.cloud.dialogflow.v2.Intent(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.name_ = name_;
result.displayName_ = displayName_;
result.webhookState_ = webhookState_;
result.priority_ = priority_;
result.isFallback_ = isFallback_;
result.mlDisabled_ = mlDisabled_;
if (((bitField0_ & 0x00000040) == 0x00000040)) {
inputContextNames_ = inputContextNames_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000040);
}
result.inputContextNames_ = inputContextNames_;
if (((bitField0_ & 0x00000080) == 0x00000080)) {
events_ = events_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000080);
}
result.events_ = events_;
if (trainingPhrasesBuilder_ == null) {
if (((bitField0_ & 0x00000100) == 0x00000100)) {
trainingPhrases_ = java.util.Collections.unmodifiableList(trainingPhrases_);
bitField0_ = (bitField0_ & ~0x00000100);
}
result.trainingPhrases_ = trainingPhrases_;
} else {
result.trainingPhrases_ = trainingPhrasesBuilder_.build();
}
result.action_ = action_;
if (outputContextsBuilder_ == null) {
if (((bitField0_ & 0x00000400) == 0x00000400)) {
outputContexts_ = java.util.Collections.unmodifiableList(outputContexts_);
bitField0_ = (bitField0_ & ~0x00000400);
}
result.outputContexts_ = outputContexts_;
} else {
result.outputContexts_ = outputContextsBuilder_.build();
}
result.resetContexts_ = resetContexts_;
if (parametersBuilder_ == null) {
if (((bitField0_ & 0x00001000) == 0x00001000)) {
parameters_ = java.util.Collections.unmodifiableList(parameters_);
bitField0_ = (bitField0_ & ~0x00001000);
}
result.parameters_ = parameters_;
} else {
result.parameters_ = parametersBuilder_.build();
}
if (messagesBuilder_ == null) {
if (((bitField0_ & 0x00002000) == 0x00002000)) {
messages_ = java.util.Collections.unmodifiableList(messages_);
bitField0_ = (bitField0_ & ~0x00002000);
}
result.messages_ = messages_;
} else {
result.messages_ = messagesBuilder_.build();
}
if (((bitField0_ & 0x00004000) == 0x00004000)) {
defaultResponsePlatforms_ = java.util.Collections.unmodifiableList(defaultResponsePlatforms_);
bitField0_ = (bitField0_ & ~0x00004000);
}
result.defaultResponsePlatforms_ = defaultResponsePlatforms_;
result.rootFollowupIntentName_ = rootFollowupIntentName_;
result.parentFollowupIntentName_ = parentFollowupIntentName_;
if (followupIntentInfoBuilder_ == null) {
if (((bitField0_ & 0x00020000) == 0x00020000)) {
followupIntentInfo_ = java.util.Collections.unmodifiableList(followupIntentInfo_);
bitField0_ = (bitField0_ & ~0x00020000);
}
result.followupIntentInfo_ = followupIntentInfo_;
} else {
result.followupIntentInfo_ = followupIntentInfoBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent) {
return mergeFrom((com.google.cloud.dialogflow.v2.Intent)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent other) {
if (other == com.google.cloud.dialogflow.v2.Intent.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (!other.getDisplayName().isEmpty()) {
displayName_ = other.displayName_;
onChanged();
}
if (other.webhookState_ != 0) {
setWebhookStateValue(other.getWebhookStateValue());
}
if (other.getPriority() != 0) {
setPriority(other.getPriority());
}
if (other.getIsFallback() != false) {
setIsFallback(other.getIsFallback());
}
if (other.getMlDisabled() != false) {
setMlDisabled(other.getMlDisabled());
}
if (!other.inputContextNames_.isEmpty()) {
if (inputContextNames_.isEmpty()) {
inputContextNames_ = other.inputContextNames_;
bitField0_ = (bitField0_ & ~0x00000040);
} else {
ensureInputContextNamesIsMutable();
inputContextNames_.addAll(other.inputContextNames_);
}
onChanged();
}
if (!other.events_.isEmpty()) {
if (events_.isEmpty()) {
events_ = other.events_;
bitField0_ = (bitField0_ & ~0x00000080);
} else {
ensureEventsIsMutable();
events_.addAll(other.events_);
}
onChanged();
}
if (trainingPhrasesBuilder_ == null) {
if (!other.trainingPhrases_.isEmpty()) {
if (trainingPhrases_.isEmpty()) {
trainingPhrases_ = other.trainingPhrases_;
bitField0_ = (bitField0_ & ~0x00000100);
} else {
ensureTrainingPhrasesIsMutable();
trainingPhrases_.addAll(other.trainingPhrases_);
}
onChanged();
}
} else {
if (!other.trainingPhrases_.isEmpty()) {
if (trainingPhrasesBuilder_.isEmpty()) {
trainingPhrasesBuilder_.dispose();
trainingPhrasesBuilder_ = null;
trainingPhrases_ = other.trainingPhrases_;
bitField0_ = (bitField0_ & ~0x00000100);
trainingPhrasesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getTrainingPhrasesFieldBuilder() : null;
} else {
trainingPhrasesBuilder_.addAllMessages(other.trainingPhrases_);
}
}
}
if (!other.getAction().isEmpty()) {
action_ = other.action_;
onChanged();
}
if (outputContextsBuilder_ == null) {
if (!other.outputContexts_.isEmpty()) {
if (outputContexts_.isEmpty()) {
outputContexts_ = other.outputContexts_;
bitField0_ = (bitField0_ & ~0x00000400);
} else {
ensureOutputContextsIsMutable();
outputContexts_.addAll(other.outputContexts_);
}
onChanged();
}
} else {
if (!other.outputContexts_.isEmpty()) {
if (outputContextsBuilder_.isEmpty()) {
outputContextsBuilder_.dispose();
outputContextsBuilder_ = null;
outputContexts_ = other.outputContexts_;
bitField0_ = (bitField0_ & ~0x00000400);
outputContextsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getOutputContextsFieldBuilder() : null;
} else {
outputContextsBuilder_.addAllMessages(other.outputContexts_);
}
}
}
if (other.getResetContexts() != false) {
setResetContexts(other.getResetContexts());
}
if (parametersBuilder_ == null) {
if (!other.parameters_.isEmpty()) {
if (parameters_.isEmpty()) {
parameters_ = other.parameters_;
bitField0_ = (bitField0_ & ~0x00001000);
} else {
ensureParametersIsMutable();
parameters_.addAll(other.parameters_);
}
onChanged();
}
} else {
if (!other.parameters_.isEmpty()) {
if (parametersBuilder_.isEmpty()) {
parametersBuilder_.dispose();
parametersBuilder_ = null;
parameters_ = other.parameters_;
bitField0_ = (bitField0_ & ~0x00001000);
parametersBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getParametersFieldBuilder() : null;
} else {
parametersBuilder_.addAllMessages(other.parameters_);
}
}
}
if (messagesBuilder_ == null) {
if (!other.messages_.isEmpty()) {
if (messages_.isEmpty()) {
messages_ = other.messages_;
bitField0_ = (bitField0_ & ~0x00002000);
} else {
ensureMessagesIsMutable();
messages_.addAll(other.messages_);
}
onChanged();
}
} else {
if (!other.messages_.isEmpty()) {
if (messagesBuilder_.isEmpty()) {
messagesBuilder_.dispose();
messagesBuilder_ = null;
messages_ = other.messages_;
bitField0_ = (bitField0_ & ~0x00002000);
messagesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getMessagesFieldBuilder() : null;
} else {
messagesBuilder_.addAllMessages(other.messages_);
}
}
}
if (!other.defaultResponsePlatforms_.isEmpty()) {
if (defaultResponsePlatforms_.isEmpty()) {
defaultResponsePlatforms_ = other.defaultResponsePlatforms_;
bitField0_ = (bitField0_ & ~0x00004000);
} else {
ensureDefaultResponsePlatformsIsMutable();
defaultResponsePlatforms_.addAll(other.defaultResponsePlatforms_);
}
onChanged();
}
if (!other.getRootFollowupIntentName().isEmpty()) {
rootFollowupIntentName_ = other.rootFollowupIntentName_;
onChanged();
}
if (!other.getParentFollowupIntentName().isEmpty()) {
parentFollowupIntentName_ = other.parentFollowupIntentName_;
onChanged();
}
if (followupIntentInfoBuilder_ == null) {
if (!other.followupIntentInfo_.isEmpty()) {
if (followupIntentInfo_.isEmpty()) {
followupIntentInfo_ = other.followupIntentInfo_;
bitField0_ = (bitField0_ & ~0x00020000);
} else {
ensureFollowupIntentInfoIsMutable();
followupIntentInfo_.addAll(other.followupIntentInfo_);
}
onChanged();
}
} else {
if (!other.followupIntentInfo_.isEmpty()) {
if (followupIntentInfoBuilder_.isEmpty()) {
followupIntentInfoBuilder_.dispose();
followupIntentInfoBuilder_ = null;
followupIntentInfo_ = other.followupIntentInfo_;
bitField0_ = (bitField0_ & ~0x00020000);
followupIntentInfoBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getFollowupIntentInfoFieldBuilder() : null;
} else {
followupIntentInfoBuilder_.addAllMessages(other.followupIntentInfo_);
}
}
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.cloud.dialogflow.v2.Intent parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.cloud.dialogflow.v2.Intent) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
* Required for all methods except `create` (`create` populates the name
* automatically.
* The unique identifier of this intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string name = 1;
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Required for all methods except `create` (`create` populates the name
* automatically.
* The unique identifier of this intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string name = 1;
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Required for all methods except `create` (`create` populates the name
* automatically.
* The unique identifier of this intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string name = 1;
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* Required for all methods except `create` (`create` populates the name
* automatically.
* The unique identifier of this intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string name = 1;
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* Required for all methods except `create` (`create` populates the name
* automatically.
* The unique identifier of this intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string name = 1;
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private java.lang.Object displayName_ = "";
/**
*
* Required. The name of this intent.
*
*
* string display_name = 2;
*/
public java.lang.String getDisplayName() {
java.lang.Object ref = displayName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
displayName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Required. The name of this intent.
*
*
* string display_name = 2;
*/
public com.google.protobuf.ByteString
getDisplayNameBytes() {
java.lang.Object ref = displayName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
displayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Required. The name of this intent.
*
*
* string display_name = 2;
*/
public Builder setDisplayName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
displayName_ = value;
onChanged();
return this;
}
/**
*
* Required. The name of this intent.
*
*
* string display_name = 2;
*/
public Builder clearDisplayName() {
displayName_ = getDefaultInstance().getDisplayName();
onChanged();
return this;
}
/**
*
* Required. The name of this intent.
*
*
* string display_name = 2;
*/
public Builder setDisplayNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
displayName_ = value;
onChanged();
return this;
}
private int webhookState_ = 0;
/**
*
* Required. Indicates whether webhooks are enabled for the intent.
*
*
* .google.cloud.dialogflow.v2.Intent.WebhookState webhook_state = 6;
*/
public int getWebhookStateValue() {
return webhookState_;
}
/**
*
* Required. Indicates whether webhooks are enabled for the intent.
*
*
* .google.cloud.dialogflow.v2.Intent.WebhookState webhook_state = 6;
*/
public Builder setWebhookStateValue(int value) {
webhookState_ = value;
onChanged();
return this;
}
/**
*
* Required. Indicates whether webhooks are enabled for the intent.
*
*
* .google.cloud.dialogflow.v2.Intent.WebhookState webhook_state = 6;
*/
public com.google.cloud.dialogflow.v2.Intent.WebhookState getWebhookState() {
com.google.cloud.dialogflow.v2.Intent.WebhookState result = com.google.cloud.dialogflow.v2.Intent.WebhookState.valueOf(webhookState_);
return result == null ? com.google.cloud.dialogflow.v2.Intent.WebhookState.UNRECOGNIZED : result;
}
/**
*
* Required. Indicates whether webhooks are enabled for the intent.
*
*
* .google.cloud.dialogflow.v2.Intent.WebhookState webhook_state = 6;
*/
public Builder setWebhookState(com.google.cloud.dialogflow.v2.Intent.WebhookState value) {
if (value == null) {
throw new NullPointerException();
}
webhookState_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Required. Indicates whether webhooks are enabled for the intent.
*
*
* .google.cloud.dialogflow.v2.Intent.WebhookState webhook_state = 6;
*/
public Builder clearWebhookState() {
webhookState_ = 0;
onChanged();
return this;
}
private int priority_ ;
/**
*
* Optional. The priority of this intent. Higher numbers represent higher
* priorities. Zero or negative numbers mean that the intent is disabled.
*
*
* int32 priority = 3;
*/
public int getPriority() {
return priority_;
}
/**
*
* Optional. The priority of this intent. Higher numbers represent higher
* priorities. Zero or negative numbers mean that the intent is disabled.
*
*
* int32 priority = 3;
*/
public Builder setPriority(int value) {
priority_ = value;
onChanged();
return this;
}
/**
*
* Optional. The priority of this intent. Higher numbers represent higher
* priorities. Zero or negative numbers mean that the intent is disabled.
*
*
* int32 priority = 3;
*/
public Builder clearPriority() {
priority_ = 0;
onChanged();
return this;
}
private boolean isFallback_ ;
/**
*
* Optional. Indicates whether this is a fallback intent.
*
*
* bool is_fallback = 4;
*/
public boolean getIsFallback() {
return isFallback_;
}
/**
*
* Optional. Indicates whether this is a fallback intent.
*
*
* bool is_fallback = 4;
*/
public Builder setIsFallback(boolean value) {
isFallback_ = value;
onChanged();
return this;
}
/**
*
* Optional. Indicates whether this is a fallback intent.
*
*
* bool is_fallback = 4;
*/
public Builder clearIsFallback() {
isFallback_ = false;
onChanged();
return this;
}
private boolean mlDisabled_ ;
/**
*
* Optional. Indicates whether Machine Learning is disabled for the intent.
* Note: If `ml_diabled` setting is set to true, then this intent is not
* taken into account during inference in `ML ONLY` match mode. Also,
* auto-markup in the UI is turned off.
*
*
* bool ml_disabled = 19;
*/
public boolean getMlDisabled() {
return mlDisabled_;
}
/**
*
* Optional. Indicates whether Machine Learning is disabled for the intent.
* Note: If `ml_diabled` setting is set to true, then this intent is not
* taken into account during inference in `ML ONLY` match mode. Also,
* auto-markup in the UI is turned off.
*
*
* bool ml_disabled = 19;
*/
public Builder setMlDisabled(boolean value) {
mlDisabled_ = value;
onChanged();
return this;
}
/**
*
* Optional. Indicates whether Machine Learning is disabled for the intent.
* Note: If `ml_diabled` setting is set to true, then this intent is not
* taken into account during inference in `ML ONLY` match mode. Also,
* auto-markup in the UI is turned off.
*
*
* bool ml_disabled = 19;
*/
public Builder clearMlDisabled() {
mlDisabled_ = false;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList inputContextNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureInputContextNamesIsMutable() {
if (!((bitField0_ & 0x00000040) == 0x00000040)) {
inputContextNames_ = new com.google.protobuf.LazyStringArrayList(inputContextNames_);
bitField0_ |= 0x00000040;
}
}
/**
*
* Optional. The list of context names required for this intent to be
* triggered.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated string input_context_names = 7;
*/
public com.google.protobuf.ProtocolStringList
getInputContextNamesList() {
return inputContextNames_.getUnmodifiableView();
}
/**
*
* Optional. The list of context names required for this intent to be
* triggered.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated string input_context_names = 7;
*/
public int getInputContextNamesCount() {
return inputContextNames_.size();
}
/**
*
* Optional. The list of context names required for this intent to be
* triggered.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated string input_context_names = 7;
*/
public java.lang.String getInputContextNames(int index) {
return inputContextNames_.get(index);
}
/**
*
* Optional. The list of context names required for this intent to be
* triggered.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated string input_context_names = 7;
*/
public com.google.protobuf.ByteString
getInputContextNamesBytes(int index) {
return inputContextNames_.getByteString(index);
}
/**
*
* Optional. The list of context names required for this intent to be
* triggered.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated string input_context_names = 7;
*/
public Builder setInputContextNames(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureInputContextNamesIsMutable();
inputContextNames_.set(index, value);
onChanged();
return this;
}
/**
*
* Optional. The list of context names required for this intent to be
* triggered.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated string input_context_names = 7;
*/
public Builder addInputContextNames(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureInputContextNamesIsMutable();
inputContextNames_.add(value);
onChanged();
return this;
}
/**
*
* Optional. The list of context names required for this intent to be
* triggered.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated string input_context_names = 7;
*/
public Builder addAllInputContextNames(
java.lang.Iterable values) {
ensureInputContextNamesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, inputContextNames_);
onChanged();
return this;
}
/**
*
* Optional. The list of context names required for this intent to be
* triggered.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated string input_context_names = 7;
*/
public Builder clearInputContextNames() {
inputContextNames_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
return this;
}
/**
*
* Optional. The list of context names required for this intent to be
* triggered.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated string input_context_names = 7;
*/
public Builder addInputContextNamesBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureInputContextNamesIsMutable();
inputContextNames_.add(value);
onChanged();
return this;
}
private com.google.protobuf.LazyStringList events_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureEventsIsMutable() {
if (!((bitField0_ & 0x00000080) == 0x00000080)) {
events_ = new com.google.protobuf.LazyStringArrayList(events_);
bitField0_ |= 0x00000080;
}
}
/**
*
* Optional. The collection of event names that trigger the intent.
* If the collection of input contexts is not empty, all of the contexts must
* be present in the active user session for an event to trigger this intent.
*
*
* repeated string events = 8;
*/
public com.google.protobuf.ProtocolStringList
getEventsList() {
return events_.getUnmodifiableView();
}
/**
*
* Optional. The collection of event names that trigger the intent.
* If the collection of input contexts is not empty, all of the contexts must
* be present in the active user session for an event to trigger this intent.
*
*
* repeated string events = 8;
*/
public int getEventsCount() {
return events_.size();
}
/**
*
* Optional. The collection of event names that trigger the intent.
* If the collection of input contexts is not empty, all of the contexts must
* be present in the active user session for an event to trigger this intent.
*
*
* repeated string events = 8;
*/
public java.lang.String getEvents(int index) {
return events_.get(index);
}
/**
*
* Optional. The collection of event names that trigger the intent.
* If the collection of input contexts is not empty, all of the contexts must
* be present in the active user session for an event to trigger this intent.
*
*
* repeated string events = 8;
*/
public com.google.protobuf.ByteString
getEventsBytes(int index) {
return events_.getByteString(index);
}
/**
*
* Optional. The collection of event names that trigger the intent.
* If the collection of input contexts is not empty, all of the contexts must
* be present in the active user session for an event to trigger this intent.
*
*
* repeated string events = 8;
*/
public Builder setEvents(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureEventsIsMutable();
events_.set(index, value);
onChanged();
return this;
}
/**
*
* Optional. The collection of event names that trigger the intent.
* If the collection of input contexts is not empty, all of the contexts must
* be present in the active user session for an event to trigger this intent.
*
*
* repeated string events = 8;
*/
public Builder addEvents(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureEventsIsMutable();
events_.add(value);
onChanged();
return this;
}
/**
*
* Optional. The collection of event names that trigger the intent.
* If the collection of input contexts is not empty, all of the contexts must
* be present in the active user session for an event to trigger this intent.
*
*
* repeated string events = 8;
*/
public Builder addAllEvents(
java.lang.Iterable values) {
ensureEventsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, events_);
onChanged();
return this;
}
/**
*
* Optional. The collection of event names that trigger the intent.
* If the collection of input contexts is not empty, all of the contexts must
* be present in the active user session for an event to trigger this intent.
*
*
* repeated string events = 8;
*/
public Builder clearEvents() {
events_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000080);
onChanged();
return this;
}
/**
*
* Optional. The collection of event names that trigger the intent.
* If the collection of input contexts is not empty, all of the contexts must
* be present in the active user session for an event to trigger this intent.
*
*
* repeated string events = 8;
*/
public Builder addEventsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureEventsIsMutable();
events_.add(value);
onChanged();
return this;
}
private java.util.List trainingPhrases_ =
java.util.Collections.emptyList();
private void ensureTrainingPhrasesIsMutable() {
if (!((bitField0_ & 0x00000100) == 0x00000100)) {
trainingPhrases_ = new java.util.ArrayList(trainingPhrases_);
bitField0_ |= 0x00000100;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Builder, com.google.cloud.dialogflow.v2.Intent.TrainingPhraseOrBuilder> trainingPhrasesBuilder_;
/**
*
* Optional. The collection of examples/templates that the agent is
* trained on.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9;
*/
public java.util.List getTrainingPhrasesList() {
if (trainingPhrasesBuilder_ == null) {
return java.util.Collections.unmodifiableList(trainingPhrases_);
} else {
return trainingPhrasesBuilder_.getMessageList();
}
}
/**
*
* Optional. The collection of examples/templates that the agent is
* trained on.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9;
*/
public int getTrainingPhrasesCount() {
if (trainingPhrasesBuilder_ == null) {
return trainingPhrases_.size();
} else {
return trainingPhrasesBuilder_.getCount();
}
}
/**
*
* Optional. The collection of examples/templates that the agent is
* trained on.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9;
*/
public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase getTrainingPhrases(int index) {
if (trainingPhrasesBuilder_ == null) {
return trainingPhrases_.get(index);
} else {
return trainingPhrasesBuilder_.getMessage(index);
}
}
/**
*
* Optional. The collection of examples/templates that the agent is
* trained on.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9;
*/
public Builder setTrainingPhrases(
int index, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase value) {
if (trainingPhrasesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTrainingPhrasesIsMutable();
trainingPhrases_.set(index, value);
onChanged();
} else {
trainingPhrasesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Optional. The collection of examples/templates that the agent is
* trained on.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9;
*/
public Builder setTrainingPhrases(
int index, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Builder builderForValue) {
if (trainingPhrasesBuilder_ == null) {
ensureTrainingPhrasesIsMutable();
trainingPhrases_.set(index, builderForValue.build());
onChanged();
} else {
trainingPhrasesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Optional. The collection of examples/templates that the agent is
* trained on.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9;
*/
public Builder addTrainingPhrases(com.google.cloud.dialogflow.v2.Intent.TrainingPhrase value) {
if (trainingPhrasesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTrainingPhrasesIsMutable();
trainingPhrases_.add(value);
onChanged();
} else {
trainingPhrasesBuilder_.addMessage(value);
}
return this;
}
/**
*
* Optional. The collection of examples/templates that the agent is
* trained on.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9;
*/
public Builder addTrainingPhrases(
int index, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase value) {
if (trainingPhrasesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureTrainingPhrasesIsMutable();
trainingPhrases_.add(index, value);
onChanged();
} else {
trainingPhrasesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Optional. The collection of examples/templates that the agent is
* trained on.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9;
*/
public Builder addTrainingPhrases(
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Builder builderForValue) {
if (trainingPhrasesBuilder_ == null) {
ensureTrainingPhrasesIsMutable();
trainingPhrases_.add(builderForValue.build());
onChanged();
} else {
trainingPhrasesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Optional. The collection of examples/templates that the agent is
* trained on.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9;
*/
public Builder addTrainingPhrases(
int index, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Builder builderForValue) {
if (trainingPhrasesBuilder_ == null) {
ensureTrainingPhrasesIsMutable();
trainingPhrases_.add(index, builderForValue.build());
onChanged();
} else {
trainingPhrasesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Optional. The collection of examples/templates that the agent is
* trained on.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9;
*/
public Builder addAllTrainingPhrases(
java.lang.Iterable extends com.google.cloud.dialogflow.v2.Intent.TrainingPhrase> values) {
if (trainingPhrasesBuilder_ == null) {
ensureTrainingPhrasesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, trainingPhrases_);
onChanged();
} else {
trainingPhrasesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Optional. The collection of examples/templates that the agent is
* trained on.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9;
*/
public Builder clearTrainingPhrases() {
if (trainingPhrasesBuilder_ == null) {
trainingPhrases_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000100);
onChanged();
} else {
trainingPhrasesBuilder_.clear();
}
return this;
}
/**
*
* Optional. The collection of examples/templates that the agent is
* trained on.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9;
*/
public Builder removeTrainingPhrases(int index) {
if (trainingPhrasesBuilder_ == null) {
ensureTrainingPhrasesIsMutable();
trainingPhrases_.remove(index);
onChanged();
} else {
trainingPhrasesBuilder_.remove(index);
}
return this;
}
/**
*
* Optional. The collection of examples/templates that the agent is
* trained on.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9;
*/
public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Builder getTrainingPhrasesBuilder(
int index) {
return getTrainingPhrasesFieldBuilder().getBuilder(index);
}
/**
*
* Optional. The collection of examples/templates that the agent is
* trained on.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9;
*/
public com.google.cloud.dialogflow.v2.Intent.TrainingPhraseOrBuilder getTrainingPhrasesOrBuilder(
int index) {
if (trainingPhrasesBuilder_ == null) {
return trainingPhrases_.get(index); } else {
return trainingPhrasesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Optional. The collection of examples/templates that the agent is
* trained on.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9;
*/
public java.util.List extends com.google.cloud.dialogflow.v2.Intent.TrainingPhraseOrBuilder>
getTrainingPhrasesOrBuilderList() {
if (trainingPhrasesBuilder_ != null) {
return trainingPhrasesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(trainingPhrases_);
}
}
/**
*
* Optional. The collection of examples/templates that the agent is
* trained on.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9;
*/
public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Builder addTrainingPhrasesBuilder() {
return getTrainingPhrasesFieldBuilder().addBuilder(
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.getDefaultInstance());
}
/**
*
* Optional. The collection of examples/templates that the agent is
* trained on.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9;
*/
public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Builder addTrainingPhrasesBuilder(
int index) {
return getTrainingPhrasesFieldBuilder().addBuilder(
index, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.getDefaultInstance());
}
/**
*
* Optional. The collection of examples/templates that the agent is
* trained on.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase training_phrases = 9;
*/
public java.util.List
getTrainingPhrasesBuilderList() {
return getTrainingPhrasesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Builder, com.google.cloud.dialogflow.v2.Intent.TrainingPhraseOrBuilder>
getTrainingPhrasesFieldBuilder() {
if (trainingPhrasesBuilder_ == null) {
trainingPhrasesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Builder, com.google.cloud.dialogflow.v2.Intent.TrainingPhraseOrBuilder>(
trainingPhrases_,
((bitField0_ & 0x00000100) == 0x00000100),
getParentForChildren(),
isClean());
trainingPhrases_ = null;
}
return trainingPhrasesBuilder_;
}
private java.lang.Object action_ = "";
/**
*
* Optional. The name of the action associated with the intent.
*
*
* string action = 10;
*/
public java.lang.String getAction() {
java.lang.Object ref = action_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
action_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Optional. The name of the action associated with the intent.
*
*
* string action = 10;
*/
public com.google.protobuf.ByteString
getActionBytes() {
java.lang.Object ref = action_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
action_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Optional. The name of the action associated with the intent.
*
*
* string action = 10;
*/
public Builder setAction(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
action_ = value;
onChanged();
return this;
}
/**
*
* Optional. The name of the action associated with the intent.
*
*
* string action = 10;
*/
public Builder clearAction() {
action_ = getDefaultInstance().getAction();
onChanged();
return this;
}
/**
*
* Optional. The name of the action associated with the intent.
*
*
* string action = 10;
*/
public Builder setActionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
action_ = value;
onChanged();
return this;
}
private java.util.List outputContexts_ =
java.util.Collections.emptyList();
private void ensureOutputContextsIsMutable() {
if (!((bitField0_ & 0x00000400) == 0x00000400)) {
outputContexts_ = new java.util.ArrayList(outputContexts_);
bitField0_ |= 0x00000400;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Context, com.google.cloud.dialogflow.v2.Context.Builder, com.google.cloud.dialogflow.v2.ContextOrBuilder> outputContextsBuilder_;
/**
*
* Optional. The collection of contexts that are activated when the intent
* is matched. Context messages in this collection should not set the
* parameters field. Setting the `lifespan_count` to 0 will reset the context
* when the intent is matched.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated .google.cloud.dialogflow.v2.Context output_contexts = 11;
*/
public java.util.List getOutputContextsList() {
if (outputContextsBuilder_ == null) {
return java.util.Collections.unmodifiableList(outputContexts_);
} else {
return outputContextsBuilder_.getMessageList();
}
}
/**
*
* Optional. The collection of contexts that are activated when the intent
* is matched. Context messages in this collection should not set the
* parameters field. Setting the `lifespan_count` to 0 will reset the context
* when the intent is matched.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated .google.cloud.dialogflow.v2.Context output_contexts = 11;
*/
public int getOutputContextsCount() {
if (outputContextsBuilder_ == null) {
return outputContexts_.size();
} else {
return outputContextsBuilder_.getCount();
}
}
/**
*
* Optional. The collection of contexts that are activated when the intent
* is matched. Context messages in this collection should not set the
* parameters field. Setting the `lifespan_count` to 0 will reset the context
* when the intent is matched.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated .google.cloud.dialogflow.v2.Context output_contexts = 11;
*/
public com.google.cloud.dialogflow.v2.Context getOutputContexts(int index) {
if (outputContextsBuilder_ == null) {
return outputContexts_.get(index);
} else {
return outputContextsBuilder_.getMessage(index);
}
}
/**
*
* Optional. The collection of contexts that are activated when the intent
* is matched. Context messages in this collection should not set the
* parameters field. Setting the `lifespan_count` to 0 will reset the context
* when the intent is matched.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated .google.cloud.dialogflow.v2.Context output_contexts = 11;
*/
public Builder setOutputContexts(
int index, com.google.cloud.dialogflow.v2.Context value) {
if (outputContextsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureOutputContextsIsMutable();
outputContexts_.set(index, value);
onChanged();
} else {
outputContextsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Optional. The collection of contexts that are activated when the intent
* is matched. Context messages in this collection should not set the
* parameters field. Setting the `lifespan_count` to 0 will reset the context
* when the intent is matched.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated .google.cloud.dialogflow.v2.Context output_contexts = 11;
*/
public Builder setOutputContexts(
int index, com.google.cloud.dialogflow.v2.Context.Builder builderForValue) {
if (outputContextsBuilder_ == null) {
ensureOutputContextsIsMutable();
outputContexts_.set(index, builderForValue.build());
onChanged();
} else {
outputContextsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Optional. The collection of contexts that are activated when the intent
* is matched. Context messages in this collection should not set the
* parameters field. Setting the `lifespan_count` to 0 will reset the context
* when the intent is matched.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated .google.cloud.dialogflow.v2.Context output_contexts = 11;
*/
public Builder addOutputContexts(com.google.cloud.dialogflow.v2.Context value) {
if (outputContextsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureOutputContextsIsMutable();
outputContexts_.add(value);
onChanged();
} else {
outputContextsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Optional. The collection of contexts that are activated when the intent
* is matched. Context messages in this collection should not set the
* parameters field. Setting the `lifespan_count` to 0 will reset the context
* when the intent is matched.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated .google.cloud.dialogflow.v2.Context output_contexts = 11;
*/
public Builder addOutputContexts(
int index, com.google.cloud.dialogflow.v2.Context value) {
if (outputContextsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureOutputContextsIsMutable();
outputContexts_.add(index, value);
onChanged();
} else {
outputContextsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Optional. The collection of contexts that are activated when the intent
* is matched. Context messages in this collection should not set the
* parameters field. Setting the `lifespan_count` to 0 will reset the context
* when the intent is matched.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated .google.cloud.dialogflow.v2.Context output_contexts = 11;
*/
public Builder addOutputContexts(
com.google.cloud.dialogflow.v2.Context.Builder builderForValue) {
if (outputContextsBuilder_ == null) {
ensureOutputContextsIsMutable();
outputContexts_.add(builderForValue.build());
onChanged();
} else {
outputContextsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Optional. The collection of contexts that are activated when the intent
* is matched. Context messages in this collection should not set the
* parameters field. Setting the `lifespan_count` to 0 will reset the context
* when the intent is matched.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated .google.cloud.dialogflow.v2.Context output_contexts = 11;
*/
public Builder addOutputContexts(
int index, com.google.cloud.dialogflow.v2.Context.Builder builderForValue) {
if (outputContextsBuilder_ == null) {
ensureOutputContextsIsMutable();
outputContexts_.add(index, builderForValue.build());
onChanged();
} else {
outputContextsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Optional. The collection of contexts that are activated when the intent
* is matched. Context messages in this collection should not set the
* parameters field. Setting the `lifespan_count` to 0 will reset the context
* when the intent is matched.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated .google.cloud.dialogflow.v2.Context output_contexts = 11;
*/
public Builder addAllOutputContexts(
java.lang.Iterable extends com.google.cloud.dialogflow.v2.Context> values) {
if (outputContextsBuilder_ == null) {
ensureOutputContextsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, outputContexts_);
onChanged();
} else {
outputContextsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Optional. The collection of contexts that are activated when the intent
* is matched. Context messages in this collection should not set the
* parameters field. Setting the `lifespan_count` to 0 will reset the context
* when the intent is matched.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated .google.cloud.dialogflow.v2.Context output_contexts = 11;
*/
public Builder clearOutputContexts() {
if (outputContextsBuilder_ == null) {
outputContexts_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000400);
onChanged();
} else {
outputContextsBuilder_.clear();
}
return this;
}
/**
*
* Optional. The collection of contexts that are activated when the intent
* is matched. Context messages in this collection should not set the
* parameters field. Setting the `lifespan_count` to 0 will reset the context
* when the intent is matched.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated .google.cloud.dialogflow.v2.Context output_contexts = 11;
*/
public Builder removeOutputContexts(int index) {
if (outputContextsBuilder_ == null) {
ensureOutputContextsIsMutable();
outputContexts_.remove(index);
onChanged();
} else {
outputContextsBuilder_.remove(index);
}
return this;
}
/**
*
* Optional. The collection of contexts that are activated when the intent
* is matched. Context messages in this collection should not set the
* parameters field. Setting the `lifespan_count` to 0 will reset the context
* when the intent is matched.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated .google.cloud.dialogflow.v2.Context output_contexts = 11;
*/
public com.google.cloud.dialogflow.v2.Context.Builder getOutputContextsBuilder(
int index) {
return getOutputContextsFieldBuilder().getBuilder(index);
}
/**
*
* Optional. The collection of contexts that are activated when the intent
* is matched. Context messages in this collection should not set the
* parameters field. Setting the `lifespan_count` to 0 will reset the context
* when the intent is matched.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated .google.cloud.dialogflow.v2.Context output_contexts = 11;
*/
public com.google.cloud.dialogflow.v2.ContextOrBuilder getOutputContextsOrBuilder(
int index) {
if (outputContextsBuilder_ == null) {
return outputContexts_.get(index); } else {
return outputContextsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Optional. The collection of contexts that are activated when the intent
* is matched. Context messages in this collection should not set the
* parameters field. Setting the `lifespan_count` to 0 will reset the context
* when the intent is matched.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated .google.cloud.dialogflow.v2.Context output_contexts = 11;
*/
public java.util.List extends com.google.cloud.dialogflow.v2.ContextOrBuilder>
getOutputContextsOrBuilderList() {
if (outputContextsBuilder_ != null) {
return outputContextsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(outputContexts_);
}
}
/**
*
* Optional. The collection of contexts that are activated when the intent
* is matched. Context messages in this collection should not set the
* parameters field. Setting the `lifespan_count` to 0 will reset the context
* when the intent is matched.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated .google.cloud.dialogflow.v2.Context output_contexts = 11;
*/
public com.google.cloud.dialogflow.v2.Context.Builder addOutputContextsBuilder() {
return getOutputContextsFieldBuilder().addBuilder(
com.google.cloud.dialogflow.v2.Context.getDefaultInstance());
}
/**
*
* Optional. The collection of contexts that are activated when the intent
* is matched. Context messages in this collection should not set the
* parameters field. Setting the `lifespan_count` to 0 will reset the context
* when the intent is matched.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated .google.cloud.dialogflow.v2.Context output_contexts = 11;
*/
public com.google.cloud.dialogflow.v2.Context.Builder addOutputContextsBuilder(
int index) {
return getOutputContextsFieldBuilder().addBuilder(
index, com.google.cloud.dialogflow.v2.Context.getDefaultInstance());
}
/**
*
* Optional. The collection of contexts that are activated when the intent
* is matched. Context messages in this collection should not set the
* parameters field. Setting the `lifespan_count` to 0 will reset the context
* when the intent is matched.
* Format: `projects/<Project ID>/agent/sessions/-/contexts/<Context ID>`.
*
*
* repeated .google.cloud.dialogflow.v2.Context output_contexts = 11;
*/
public java.util.List
getOutputContextsBuilderList() {
return getOutputContextsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Context, com.google.cloud.dialogflow.v2.Context.Builder, com.google.cloud.dialogflow.v2.ContextOrBuilder>
getOutputContextsFieldBuilder() {
if (outputContextsBuilder_ == null) {
outputContextsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Context, com.google.cloud.dialogflow.v2.Context.Builder, com.google.cloud.dialogflow.v2.ContextOrBuilder>(
outputContexts_,
((bitField0_ & 0x00000400) == 0x00000400),
getParentForChildren(),
isClean());
outputContexts_ = null;
}
return outputContextsBuilder_;
}
private boolean resetContexts_ ;
/**
*
* Optional. Indicates whether to delete all contexts in the current
* session when this intent is matched.
*
*
* bool reset_contexts = 12;
*/
public boolean getResetContexts() {
return resetContexts_;
}
/**
*
* Optional. Indicates whether to delete all contexts in the current
* session when this intent is matched.
*
*
* bool reset_contexts = 12;
*/
public Builder setResetContexts(boolean value) {
resetContexts_ = value;
onChanged();
return this;
}
/**
*
* Optional. Indicates whether to delete all contexts in the current
* session when this intent is matched.
*
*
* bool reset_contexts = 12;
*/
public Builder clearResetContexts() {
resetContexts_ = false;
onChanged();
return this;
}
private java.util.List parameters_ =
java.util.Collections.emptyList();
private void ensureParametersIsMutable() {
if (!((bitField0_ & 0x00001000) == 0x00001000)) {
parameters_ = new java.util.ArrayList(parameters_);
bitField0_ |= 0x00001000;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Parameter, com.google.cloud.dialogflow.v2.Intent.Parameter.Builder, com.google.cloud.dialogflow.v2.Intent.ParameterOrBuilder> parametersBuilder_;
/**
*
* Optional. The collection of parameters associated with the intent.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13;
*/
public java.util.List getParametersList() {
if (parametersBuilder_ == null) {
return java.util.Collections.unmodifiableList(parameters_);
} else {
return parametersBuilder_.getMessageList();
}
}
/**
*
* Optional. The collection of parameters associated with the intent.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13;
*/
public int getParametersCount() {
if (parametersBuilder_ == null) {
return parameters_.size();
} else {
return parametersBuilder_.getCount();
}
}
/**
*
* Optional. The collection of parameters associated with the intent.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13;
*/
public com.google.cloud.dialogflow.v2.Intent.Parameter getParameters(int index) {
if (parametersBuilder_ == null) {
return parameters_.get(index);
} else {
return parametersBuilder_.getMessage(index);
}
}
/**
*
* Optional. The collection of parameters associated with the intent.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13;
*/
public Builder setParameters(
int index, com.google.cloud.dialogflow.v2.Intent.Parameter value) {
if (parametersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureParametersIsMutable();
parameters_.set(index, value);
onChanged();
} else {
parametersBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Optional. The collection of parameters associated with the intent.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13;
*/
public Builder setParameters(
int index, com.google.cloud.dialogflow.v2.Intent.Parameter.Builder builderForValue) {
if (parametersBuilder_ == null) {
ensureParametersIsMutable();
parameters_.set(index, builderForValue.build());
onChanged();
} else {
parametersBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Optional. The collection of parameters associated with the intent.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13;
*/
public Builder addParameters(com.google.cloud.dialogflow.v2.Intent.Parameter value) {
if (parametersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureParametersIsMutable();
parameters_.add(value);
onChanged();
} else {
parametersBuilder_.addMessage(value);
}
return this;
}
/**
*
* Optional. The collection of parameters associated with the intent.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13;
*/
public Builder addParameters(
int index, com.google.cloud.dialogflow.v2.Intent.Parameter value) {
if (parametersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureParametersIsMutable();
parameters_.add(index, value);
onChanged();
} else {
parametersBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Optional. The collection of parameters associated with the intent.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13;
*/
public Builder addParameters(
com.google.cloud.dialogflow.v2.Intent.Parameter.Builder builderForValue) {
if (parametersBuilder_ == null) {
ensureParametersIsMutable();
parameters_.add(builderForValue.build());
onChanged();
} else {
parametersBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Optional. The collection of parameters associated with the intent.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13;
*/
public Builder addParameters(
int index, com.google.cloud.dialogflow.v2.Intent.Parameter.Builder builderForValue) {
if (parametersBuilder_ == null) {
ensureParametersIsMutable();
parameters_.add(index, builderForValue.build());
onChanged();
} else {
parametersBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Optional. The collection of parameters associated with the intent.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13;
*/
public Builder addAllParameters(
java.lang.Iterable extends com.google.cloud.dialogflow.v2.Intent.Parameter> values) {
if (parametersBuilder_ == null) {
ensureParametersIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, parameters_);
onChanged();
} else {
parametersBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Optional. The collection of parameters associated with the intent.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13;
*/
public Builder clearParameters() {
if (parametersBuilder_ == null) {
parameters_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00001000);
onChanged();
} else {
parametersBuilder_.clear();
}
return this;
}
/**
*
* Optional. The collection of parameters associated with the intent.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13;
*/
public Builder removeParameters(int index) {
if (parametersBuilder_ == null) {
ensureParametersIsMutable();
parameters_.remove(index);
onChanged();
} else {
parametersBuilder_.remove(index);
}
return this;
}
/**
*
* Optional. The collection of parameters associated with the intent.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13;
*/
public com.google.cloud.dialogflow.v2.Intent.Parameter.Builder getParametersBuilder(
int index) {
return getParametersFieldBuilder().getBuilder(index);
}
/**
*
* Optional. The collection of parameters associated with the intent.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13;
*/
public com.google.cloud.dialogflow.v2.Intent.ParameterOrBuilder getParametersOrBuilder(
int index) {
if (parametersBuilder_ == null) {
return parameters_.get(index); } else {
return parametersBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Optional. The collection of parameters associated with the intent.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13;
*/
public java.util.List extends com.google.cloud.dialogflow.v2.Intent.ParameterOrBuilder>
getParametersOrBuilderList() {
if (parametersBuilder_ != null) {
return parametersBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(parameters_);
}
}
/**
*
* Optional. The collection of parameters associated with the intent.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13;
*/
public com.google.cloud.dialogflow.v2.Intent.Parameter.Builder addParametersBuilder() {
return getParametersFieldBuilder().addBuilder(
com.google.cloud.dialogflow.v2.Intent.Parameter.getDefaultInstance());
}
/**
*
* Optional. The collection of parameters associated with the intent.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13;
*/
public com.google.cloud.dialogflow.v2.Intent.Parameter.Builder addParametersBuilder(
int index) {
return getParametersFieldBuilder().addBuilder(
index, com.google.cloud.dialogflow.v2.Intent.Parameter.getDefaultInstance());
}
/**
*
* Optional. The collection of parameters associated with the intent.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Parameter parameters = 13;
*/
public java.util.List
getParametersBuilderList() {
return getParametersFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Parameter, com.google.cloud.dialogflow.v2.Intent.Parameter.Builder, com.google.cloud.dialogflow.v2.Intent.ParameterOrBuilder>
getParametersFieldBuilder() {
if (parametersBuilder_ == null) {
parametersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Parameter, com.google.cloud.dialogflow.v2.Intent.Parameter.Builder, com.google.cloud.dialogflow.v2.Intent.ParameterOrBuilder>(
parameters_,
((bitField0_ & 0x00001000) == 0x00001000),
getParentForChildren(),
isClean());
parameters_ = null;
}
return parametersBuilder_;
}
private java.util.List messages_ =
java.util.Collections.emptyList();
private void ensureMessagesIsMutable() {
if (!((bitField0_ & 0x00002000) == 0x00002000)) {
messages_ = new java.util.ArrayList(messages_);
bitField0_ |= 0x00002000;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message, com.google.cloud.dialogflow.v2.Intent.Message.Builder, com.google.cloud.dialogflow.v2.Intent.MessageOrBuilder> messagesBuilder_;
/**
*
* Optional. The collection of rich messages corresponding to the
* `Response` field in the Dialogflow console.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14;
*/
public java.util.List getMessagesList() {
if (messagesBuilder_ == null) {
return java.util.Collections.unmodifiableList(messages_);
} else {
return messagesBuilder_.getMessageList();
}
}
/**
*
* Optional. The collection of rich messages corresponding to the
* `Response` field in the Dialogflow console.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14;
*/
public int getMessagesCount() {
if (messagesBuilder_ == null) {
return messages_.size();
} else {
return messagesBuilder_.getCount();
}
}
/**
*
* Optional. The collection of rich messages corresponding to the
* `Response` field in the Dialogflow console.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14;
*/
public com.google.cloud.dialogflow.v2.Intent.Message getMessages(int index) {
if (messagesBuilder_ == null) {
return messages_.get(index);
} else {
return messagesBuilder_.getMessage(index);
}
}
/**
*
* Optional. The collection of rich messages corresponding to the
* `Response` field in the Dialogflow console.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14;
*/
public Builder setMessages(
int index, com.google.cloud.dialogflow.v2.Intent.Message value) {
if (messagesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMessagesIsMutable();
messages_.set(index, value);
onChanged();
} else {
messagesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Optional. The collection of rich messages corresponding to the
* `Response` field in the Dialogflow console.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14;
*/
public Builder setMessages(
int index, com.google.cloud.dialogflow.v2.Intent.Message.Builder builderForValue) {
if (messagesBuilder_ == null) {
ensureMessagesIsMutable();
messages_.set(index, builderForValue.build());
onChanged();
} else {
messagesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Optional. The collection of rich messages corresponding to the
* `Response` field in the Dialogflow console.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14;
*/
public Builder addMessages(com.google.cloud.dialogflow.v2.Intent.Message value) {
if (messagesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMessagesIsMutable();
messages_.add(value);
onChanged();
} else {
messagesBuilder_.addMessage(value);
}
return this;
}
/**
*
* Optional. The collection of rich messages corresponding to the
* `Response` field in the Dialogflow console.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14;
*/
public Builder addMessages(
int index, com.google.cloud.dialogflow.v2.Intent.Message value) {
if (messagesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMessagesIsMutable();
messages_.add(index, value);
onChanged();
} else {
messagesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Optional. The collection of rich messages corresponding to the
* `Response` field in the Dialogflow console.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14;
*/
public Builder addMessages(
com.google.cloud.dialogflow.v2.Intent.Message.Builder builderForValue) {
if (messagesBuilder_ == null) {
ensureMessagesIsMutable();
messages_.add(builderForValue.build());
onChanged();
} else {
messagesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Optional. The collection of rich messages corresponding to the
* `Response` field in the Dialogflow console.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14;
*/
public Builder addMessages(
int index, com.google.cloud.dialogflow.v2.Intent.Message.Builder builderForValue) {
if (messagesBuilder_ == null) {
ensureMessagesIsMutable();
messages_.add(index, builderForValue.build());
onChanged();
} else {
messagesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Optional. The collection of rich messages corresponding to the
* `Response` field in the Dialogflow console.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14;
*/
public Builder addAllMessages(
java.lang.Iterable extends com.google.cloud.dialogflow.v2.Intent.Message> values) {
if (messagesBuilder_ == null) {
ensureMessagesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, messages_);
onChanged();
} else {
messagesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Optional. The collection of rich messages corresponding to the
* `Response` field in the Dialogflow console.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14;
*/
public Builder clearMessages() {
if (messagesBuilder_ == null) {
messages_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00002000);
onChanged();
} else {
messagesBuilder_.clear();
}
return this;
}
/**
*
* Optional. The collection of rich messages corresponding to the
* `Response` field in the Dialogflow console.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14;
*/
public Builder removeMessages(int index) {
if (messagesBuilder_ == null) {
ensureMessagesIsMutable();
messages_.remove(index);
onChanged();
} else {
messagesBuilder_.remove(index);
}
return this;
}
/**
*
* Optional. The collection of rich messages corresponding to the
* `Response` field in the Dialogflow console.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Builder getMessagesBuilder(
int index) {
return getMessagesFieldBuilder().getBuilder(index);
}
/**
*
* Optional. The collection of rich messages corresponding to the
* `Response` field in the Dialogflow console.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14;
*/
public com.google.cloud.dialogflow.v2.Intent.MessageOrBuilder getMessagesOrBuilder(
int index) {
if (messagesBuilder_ == null) {
return messages_.get(index); } else {
return messagesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Optional. The collection of rich messages corresponding to the
* `Response` field in the Dialogflow console.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14;
*/
public java.util.List extends com.google.cloud.dialogflow.v2.Intent.MessageOrBuilder>
getMessagesOrBuilderList() {
if (messagesBuilder_ != null) {
return messagesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(messages_);
}
}
/**
*
* Optional. The collection of rich messages corresponding to the
* `Response` field in the Dialogflow console.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Builder addMessagesBuilder() {
return getMessagesFieldBuilder().addBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.getDefaultInstance());
}
/**
*
* Optional. The collection of rich messages corresponding to the
* `Response` field in the Dialogflow console.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Builder addMessagesBuilder(
int index) {
return getMessagesFieldBuilder().addBuilder(
index, com.google.cloud.dialogflow.v2.Intent.Message.getDefaultInstance());
}
/**
*
* Optional. The collection of rich messages corresponding to the
* `Response` field in the Dialogflow console.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message messages = 14;
*/
public java.util.List
getMessagesBuilderList() {
return getMessagesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message, com.google.cloud.dialogflow.v2.Intent.Message.Builder, com.google.cloud.dialogflow.v2.Intent.MessageOrBuilder>
getMessagesFieldBuilder() {
if (messagesBuilder_ == null) {
messagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message, com.google.cloud.dialogflow.v2.Intent.Message.Builder, com.google.cloud.dialogflow.v2.Intent.MessageOrBuilder>(
messages_,
((bitField0_ & 0x00002000) == 0x00002000),
getParentForChildren(),
isClean());
messages_ = null;
}
return messagesBuilder_;
}
private java.util.List defaultResponsePlatforms_ =
java.util.Collections.emptyList();
private void ensureDefaultResponsePlatformsIsMutable() {
if (!((bitField0_ & 0x00004000) == 0x00004000)) {
defaultResponsePlatforms_ = new java.util.ArrayList(defaultResponsePlatforms_);
bitField0_ |= 0x00004000;
}
}
/**
*
* Optional. The list of platforms for which the first response will be
* taken from among the messages assigned to the DEFAULT_PLATFORM.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Platform default_response_platforms = 15;
*/
public java.util.List getDefaultResponsePlatformsList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, com.google.cloud.dialogflow.v2.Intent.Message.Platform>(defaultResponsePlatforms_, defaultResponsePlatforms_converter_);
}
/**
*
* Optional. The list of platforms for which the first response will be
* taken from among the messages assigned to the DEFAULT_PLATFORM.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Platform default_response_platforms = 15;
*/
public int getDefaultResponsePlatformsCount() {
return defaultResponsePlatforms_.size();
}
/**
*
* Optional. The list of platforms for which the first response will be
* taken from among the messages assigned to the DEFAULT_PLATFORM.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Platform default_response_platforms = 15;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Platform getDefaultResponsePlatforms(int index) {
return defaultResponsePlatforms_converter_.convert(defaultResponsePlatforms_.get(index));
}
/**
*
* Optional. The list of platforms for which the first response will be
* taken from among the messages assigned to the DEFAULT_PLATFORM.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Platform default_response_platforms = 15;
*/
public Builder setDefaultResponsePlatforms(
int index, com.google.cloud.dialogflow.v2.Intent.Message.Platform value) {
if (value == null) {
throw new NullPointerException();
}
ensureDefaultResponsePlatformsIsMutable();
defaultResponsePlatforms_.set(index, value.getNumber());
onChanged();
return this;
}
/**
*
* Optional. The list of platforms for which the first response will be
* taken from among the messages assigned to the DEFAULT_PLATFORM.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Platform default_response_platforms = 15;
*/
public Builder addDefaultResponsePlatforms(com.google.cloud.dialogflow.v2.Intent.Message.Platform value) {
if (value == null) {
throw new NullPointerException();
}
ensureDefaultResponsePlatformsIsMutable();
defaultResponsePlatforms_.add(value.getNumber());
onChanged();
return this;
}
/**
*
* Optional. The list of platforms for which the first response will be
* taken from among the messages assigned to the DEFAULT_PLATFORM.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Platform default_response_platforms = 15;
*/
public Builder addAllDefaultResponsePlatforms(
java.lang.Iterable extends com.google.cloud.dialogflow.v2.Intent.Message.Platform> values) {
ensureDefaultResponsePlatformsIsMutable();
for (com.google.cloud.dialogflow.v2.Intent.Message.Platform value : values) {
defaultResponsePlatforms_.add(value.getNumber());
}
onChanged();
return this;
}
/**
*
* Optional. The list of platforms for which the first response will be
* taken from among the messages assigned to the DEFAULT_PLATFORM.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Platform default_response_platforms = 15;
*/
public Builder clearDefaultResponsePlatforms() {
defaultResponsePlatforms_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00004000);
onChanged();
return this;
}
/**
*
* Optional. The list of platforms for which the first response will be
* taken from among the messages assigned to the DEFAULT_PLATFORM.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Platform default_response_platforms = 15;
*/
public java.util.List
getDefaultResponsePlatformsValueList() {
return java.util.Collections.unmodifiableList(defaultResponsePlatforms_);
}
/**
*
* Optional. The list of platforms for which the first response will be
* taken from among the messages assigned to the DEFAULT_PLATFORM.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Platform default_response_platforms = 15;
*/
public int getDefaultResponsePlatformsValue(int index) {
return defaultResponsePlatforms_.get(index);
}
/**
*
* Optional. The list of platforms for which the first response will be
* taken from among the messages assigned to the DEFAULT_PLATFORM.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Platform default_response_platforms = 15;
*/
public Builder setDefaultResponsePlatformsValue(
int index, int value) {
ensureDefaultResponsePlatformsIsMutable();
defaultResponsePlatforms_.set(index, value);
onChanged();
return this;
}
/**
*
* Optional. The list of platforms for which the first response will be
* taken from among the messages assigned to the DEFAULT_PLATFORM.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Platform default_response_platforms = 15;
*/
public Builder addDefaultResponsePlatformsValue(int value) {
ensureDefaultResponsePlatformsIsMutable();
defaultResponsePlatforms_.add(value);
onChanged();
return this;
}
/**
*
* Optional. The list of platforms for which the first response will be
* taken from among the messages assigned to the DEFAULT_PLATFORM.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Platform default_response_platforms = 15;
*/
public Builder addAllDefaultResponsePlatformsValue(
java.lang.Iterable values) {
ensureDefaultResponsePlatformsIsMutable();
for (int value : values) {
defaultResponsePlatforms_.add(value);
}
onChanged();
return this;
}
private java.lang.Object rootFollowupIntentName_ = "";
/**
*
* The unique identifier of the root intent in the chain of followup intents.
* It identifies the correct followup intents chain for this intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string root_followup_intent_name = 16;
*/
public java.lang.String getRootFollowupIntentName() {
java.lang.Object ref = rootFollowupIntentName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
rootFollowupIntentName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The unique identifier of the root intent in the chain of followup intents.
* It identifies the correct followup intents chain for this intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string root_followup_intent_name = 16;
*/
public com.google.protobuf.ByteString
getRootFollowupIntentNameBytes() {
java.lang.Object ref = rootFollowupIntentName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
rootFollowupIntentName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The unique identifier of the root intent in the chain of followup intents.
* It identifies the correct followup intents chain for this intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string root_followup_intent_name = 16;
*/
public Builder setRootFollowupIntentName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
rootFollowupIntentName_ = value;
onChanged();
return this;
}
/**
*
* The unique identifier of the root intent in the chain of followup intents.
* It identifies the correct followup intents chain for this intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string root_followup_intent_name = 16;
*/
public Builder clearRootFollowupIntentName() {
rootFollowupIntentName_ = getDefaultInstance().getRootFollowupIntentName();
onChanged();
return this;
}
/**
*
* The unique identifier of the root intent in the chain of followup intents.
* It identifies the correct followup intents chain for this intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string root_followup_intent_name = 16;
*/
public Builder setRootFollowupIntentNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
rootFollowupIntentName_ = value;
onChanged();
return this;
}
private java.lang.Object parentFollowupIntentName_ = "";
/**
*
* The unique identifier of the parent intent in the chain of followup
* intents.
* It identifies the parent followup intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string parent_followup_intent_name = 17;
*/
public java.lang.String getParentFollowupIntentName() {
java.lang.Object ref = parentFollowupIntentName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
parentFollowupIntentName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The unique identifier of the parent intent in the chain of followup
* intents.
* It identifies the parent followup intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string parent_followup_intent_name = 17;
*/
public com.google.protobuf.ByteString
getParentFollowupIntentNameBytes() {
java.lang.Object ref = parentFollowupIntentName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
parentFollowupIntentName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The unique identifier of the parent intent in the chain of followup
* intents.
* It identifies the parent followup intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string parent_followup_intent_name = 17;
*/
public Builder setParentFollowupIntentName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
parentFollowupIntentName_ = value;
onChanged();
return this;
}
/**
*
* The unique identifier of the parent intent in the chain of followup
* intents.
* It identifies the parent followup intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string parent_followup_intent_name = 17;
*/
public Builder clearParentFollowupIntentName() {
parentFollowupIntentName_ = getDefaultInstance().getParentFollowupIntentName();
onChanged();
return this;
}
/**
*
* The unique identifier of the parent intent in the chain of followup
* intents.
* It identifies the parent followup intent.
* Format: `projects/<Project ID>/agent/intents/<Intent ID>`.
*
*
* string parent_followup_intent_name = 17;
*/
public Builder setParentFollowupIntentNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
parentFollowupIntentName_ = value;
onChanged();
return this;
}
private java.util.List followupIntentInfo_ =
java.util.Collections.emptyList();
private void ensureFollowupIntentInfoIsMutable() {
if (!((bitField0_ & 0x00020000) == 0x00020000)) {
followupIntentInfo_ = new java.util.ArrayList(followupIntentInfo_);
bitField0_ |= 0x00020000;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo, com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo.Builder, com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfoOrBuilder> followupIntentInfoBuilder_;
/**
*
* Optional. Collection of information about all followup intents that have
* name of this intent as a root_name.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18;
*/
public java.util.List getFollowupIntentInfoList() {
if (followupIntentInfoBuilder_ == null) {
return java.util.Collections.unmodifiableList(followupIntentInfo_);
} else {
return followupIntentInfoBuilder_.getMessageList();
}
}
/**
*
* Optional. Collection of information about all followup intents that have
* name of this intent as a root_name.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18;
*/
public int getFollowupIntentInfoCount() {
if (followupIntentInfoBuilder_ == null) {
return followupIntentInfo_.size();
} else {
return followupIntentInfoBuilder_.getCount();
}
}
/**
*
* Optional. Collection of information about all followup intents that have
* name of this intent as a root_name.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18;
*/
public com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo getFollowupIntentInfo(int index) {
if (followupIntentInfoBuilder_ == null) {
return followupIntentInfo_.get(index);
} else {
return followupIntentInfoBuilder_.getMessage(index);
}
}
/**
*
* Optional. Collection of information about all followup intents that have
* name of this intent as a root_name.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18;
*/
public Builder setFollowupIntentInfo(
int index, com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo value) {
if (followupIntentInfoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFollowupIntentInfoIsMutable();
followupIntentInfo_.set(index, value);
onChanged();
} else {
followupIntentInfoBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Optional. Collection of information about all followup intents that have
* name of this intent as a root_name.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18;
*/
public Builder setFollowupIntentInfo(
int index, com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo.Builder builderForValue) {
if (followupIntentInfoBuilder_ == null) {
ensureFollowupIntentInfoIsMutable();
followupIntentInfo_.set(index, builderForValue.build());
onChanged();
} else {
followupIntentInfoBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Optional. Collection of information about all followup intents that have
* name of this intent as a root_name.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18;
*/
public Builder addFollowupIntentInfo(com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo value) {
if (followupIntentInfoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFollowupIntentInfoIsMutable();
followupIntentInfo_.add(value);
onChanged();
} else {
followupIntentInfoBuilder_.addMessage(value);
}
return this;
}
/**
*
* Optional. Collection of information about all followup intents that have
* name of this intent as a root_name.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18;
*/
public Builder addFollowupIntentInfo(
int index, com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo value) {
if (followupIntentInfoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFollowupIntentInfoIsMutable();
followupIntentInfo_.add(index, value);
onChanged();
} else {
followupIntentInfoBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Optional. Collection of information about all followup intents that have
* name of this intent as a root_name.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18;
*/
public Builder addFollowupIntentInfo(
com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo.Builder builderForValue) {
if (followupIntentInfoBuilder_ == null) {
ensureFollowupIntentInfoIsMutable();
followupIntentInfo_.add(builderForValue.build());
onChanged();
} else {
followupIntentInfoBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Optional. Collection of information about all followup intents that have
* name of this intent as a root_name.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18;
*/
public Builder addFollowupIntentInfo(
int index, com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo.Builder builderForValue) {
if (followupIntentInfoBuilder_ == null) {
ensureFollowupIntentInfoIsMutable();
followupIntentInfo_.add(index, builderForValue.build());
onChanged();
} else {
followupIntentInfoBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Optional. Collection of information about all followup intents that have
* name of this intent as a root_name.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18;
*/
public Builder addAllFollowupIntentInfo(
java.lang.Iterable extends com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo> values) {
if (followupIntentInfoBuilder_ == null) {
ensureFollowupIntentInfoIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, followupIntentInfo_);
onChanged();
} else {
followupIntentInfoBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Optional. Collection of information about all followup intents that have
* name of this intent as a root_name.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18;
*/
public Builder clearFollowupIntentInfo() {
if (followupIntentInfoBuilder_ == null) {
followupIntentInfo_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00020000);
onChanged();
} else {
followupIntentInfoBuilder_.clear();
}
return this;
}
/**
*
* Optional. Collection of information about all followup intents that have
* name of this intent as a root_name.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18;
*/
public Builder removeFollowupIntentInfo(int index) {
if (followupIntentInfoBuilder_ == null) {
ensureFollowupIntentInfoIsMutable();
followupIntentInfo_.remove(index);
onChanged();
} else {
followupIntentInfoBuilder_.remove(index);
}
return this;
}
/**
*
* Optional. Collection of information about all followup intents that have
* name of this intent as a root_name.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18;
*/
public com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo.Builder getFollowupIntentInfoBuilder(
int index) {
return getFollowupIntentInfoFieldBuilder().getBuilder(index);
}
/**
*
* Optional. Collection of information about all followup intents that have
* name of this intent as a root_name.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18;
*/
public com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfoOrBuilder getFollowupIntentInfoOrBuilder(
int index) {
if (followupIntentInfoBuilder_ == null) {
return followupIntentInfo_.get(index); } else {
return followupIntentInfoBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Optional. Collection of information about all followup intents that have
* name of this intent as a root_name.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18;
*/
public java.util.List extends com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfoOrBuilder>
getFollowupIntentInfoOrBuilderList() {
if (followupIntentInfoBuilder_ != null) {
return followupIntentInfoBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(followupIntentInfo_);
}
}
/**
*
* Optional. Collection of information about all followup intents that have
* name of this intent as a root_name.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18;
*/
public com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo.Builder addFollowupIntentInfoBuilder() {
return getFollowupIntentInfoFieldBuilder().addBuilder(
com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo.getDefaultInstance());
}
/**
*
* Optional. Collection of information about all followup intents that have
* name of this intent as a root_name.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18;
*/
public com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo.Builder addFollowupIntentInfoBuilder(
int index) {
return getFollowupIntentInfoFieldBuilder().addBuilder(
index, com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo.getDefaultInstance());
}
/**
*
* Optional. Collection of information about all followup intents that have
* name of this intent as a root_name.
*
*
* repeated .google.cloud.dialogflow.v2.Intent.FollowupIntentInfo followup_intent_info = 18;
*/
public java.util.List
getFollowupIntentInfoBuilderList() {
return getFollowupIntentInfoFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo, com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo.Builder, com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfoOrBuilder>
getFollowupIntentInfoFieldBuilder() {
if (followupIntentInfoBuilder_ == null) {
followupIntentInfoBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo, com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo.Builder, com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfoOrBuilder>(
followupIntentInfo_,
((bitField0_ & 0x00020000) == 0x00020000),
getParentForChildren(),
isClean());
followupIntentInfo_ = null;
}
return followupIntentInfoBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFieldsProto3(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent)
private static final com.google.cloud.dialogflow.v2.Intent DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent();
}
public static com.google.cloud.dialogflow.v2.Intent getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Intent parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Intent(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.google.cloud.dialogflow.v2.Intent getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}