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
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/dialogflow/v2/intent.proto
// Protobuf Java Version: 3.25.4
package com.google.cloud.dialogflow.v2;
/**
*
*
*
* An intent categorizes an end-user's intention for one conversation turn. For
* each agent, you define many intents, where your combined intents can handle a
* complete conversation. When an end-user writes or says something, referred to
* as an end-user expression or end-user input, Dialogflow matches the end-user
* input to the best intent in your agent. Matching an intent is also known as
* intent classification.
*
* For more information, see the [intent
* guide](https://cloud.google.com/dialogflow/docs/intents-overview).
*
*
* 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;
inputContextNames_ = com.google.protobuf.LazyStringArrayList.emptyList();
events_ = com.google.protobuf.LazyStringArrayList.emptyList();
trainingPhrases_ = java.util.Collections.emptyList();
action_ = "";
outputContexts_ = java.util.Collections.emptyList();
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
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Intent();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_descriptor;
}
@java.lang.Override
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;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static WebhookState valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire 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 internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public WebhookState findValueByNumber(int number) {
return WebhookState.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
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 {
/**
*
*
*
* Output only. The unique identifier of this training phrase.
*
*
* string name = 1;
*
* @return The name.
*/
java.lang.String getName();
/**
*
*
*
* Output only. The unique identifier of this training phrase.
*
*
* string name = 1;
*
* @return The bytes for name.
*/
com.google.protobuf.ByteString getNameBytes();
/**
*
*
*
* Required. The type of the training phrase.
*
*
*
* .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The enum numeric value on the wire for type.
*/
int getTypeValue();
/**
*
*
*
* Required. The type of the training phrase.
*
*
*
* .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The type.
*/
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type getType();
/**
*
*
*
* Required. The ordered list of training phrase parts.
* The parts are concatenated in order to form the training phrase.
*
* Note: The API does not automatically annotate training phrases like the
* Dialogflow Console does.
*
* Note: Do not forget to include whitespace at part boundaries,
* so the training phrase is well formatted when the parts are concatenated.
*
* If the training phrase does not need to be annotated with parameters,
* you just need a single part with only the
* [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
* field set.
*
* If you want to annotate the training phrase, you must create multiple
* parts, where the fields of each part are populated in one of two ways:
*
* - `Part.text` is set to a part of the phrase that has no parameters.
* - `Part.text` is set to a part of the phrase that you want to annotate,
* and the `entity_type`, `alias`, and `user_defined` fields are all
* set.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
java.util.List getPartsList();
/**
*
*
*
* Required. The ordered list of training phrase parts.
* The parts are concatenated in order to form the training phrase.
*
* Note: The API does not automatically annotate training phrases like the
* Dialogflow Console does.
*
* Note: Do not forget to include whitespace at part boundaries,
* so the training phrase is well formatted when the parts are concatenated.
*
* If the training phrase does not need to be annotated with parameters,
* you just need a single part with only the
* [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
* field set.
*
* If you want to annotate the training phrase, you must create multiple
* parts, where the fields of each part are populated in one of two ways:
*
* - `Part.text` is set to a part of the phrase that has no parameters.
* - `Part.text` is set to a part of the phrase that you want to annotate,
* and the `entity_type`, `alias`, and `user_defined` fields are all
* set.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part getParts(int index);
/**
*
*
*
* Required. The ordered list of training phrase parts.
* The parts are concatenated in order to form the training phrase.
*
* Note: The API does not automatically annotate training phrases like the
* Dialogflow Console does.
*
* Note: Do not forget to include whitespace at part boundaries,
* so the training phrase is well formatted when the parts are concatenated.
*
* If the training phrase does not need to be annotated with parameters,
* you just need a single part with only the
* [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
* field set.
*
* If you want to annotate the training phrase, you must create multiple
* parts, where the fields of each part are populated in one of two ways:
*
* - `Part.text` is set to a part of the phrase that has no parameters.
* - `Part.text` is set to a part of the phrase that you want to annotate,
* and the `entity_type`, `alias`, and `user_defined` fields are all
* set.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
int getPartsCount();
/**
*
*
*
* Required. The ordered list of training phrase parts.
* The parts are concatenated in order to form the training phrase.
*
* Note: The API does not automatically annotate training phrases like the
* Dialogflow Console does.
*
* Note: Do not forget to include whitespace at part boundaries,
* so the training phrase is well formatted when the parts are concatenated.
*
* If the training phrase does not need to be annotated with parameters,
* you just need a single part with only the
* [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
* field set.
*
* If you want to annotate the training phrase, you must create multiple
* parts, where the fields of each part are populated in one of two ways:
*
* - `Part.text` is set to a part of the phrase that has no parameters.
* - `Part.text` is set to a part of the phrase that you want to annotate,
* and the `entity_type`, `alias`, and `user_defined` fields are all
* set.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
java.util.List extends com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.PartOrBuilder>
getPartsOrBuilderList();
/**
*
*
*
* Required. The ordered list of training phrase parts.
* The parts are concatenated in order to form the training phrase.
*
* Note: The API does not automatically annotate training phrases like the
* Dialogflow Console does.
*
* Note: Do not forget to include whitespace at part boundaries,
* so the training phrase is well formatted when the parts are concatenated.
*
* If the training phrase does not need to be annotated with parameters,
* you just need a single part with only the
* [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
* field set.
*
* If you want to annotate the training phrase, you must create multiple
* parts, where the fields of each part are populated in one of two ways:
*
* - `Part.text` is set to a part of the phrase that has no parameters.
* - `Part.text` is set to a part of the phrase that you want to annotate,
* and the `entity_type`, `alias`, and `user_defined` fields are all
* set.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.PartOrBuilder getPartsOrBuilder(int index);
/**
*
*
*
* Optional. Indicates how many times this example 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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The timesAddedCount.
*/
int getTimesAddedCount();
}
/**
*
*
*
* Represents an example 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();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new TrainingPhrase();
}
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;
}
@java.lang.Override
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 mode has been deprecated. Example mode is the only supported
* way to create new training phrases. If you have existing training
* phrases that you've created in template mode, those will continue to
* work.
*
*
* TEMPLATE = 2 [deprecated = true];
*/
@java.lang.Deprecated
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 mode has been deprecated. Example mode is the only supported
* way to create new training phrases. If you have existing training
* phrases that you've created in template mode, those will continue to
* work.
*
*
* TEMPLATE = 2 [deprecated = true];
*/
@java.lang.Deprecated 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;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Type valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire 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 internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Type findValueByNumber(int number) {
return Type.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
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 for this part.
*
*
* string text = 1;
*
* @return The text.
*/
java.lang.String getText();
/**
*
*
*
* Required. The text for this part.
*
*
* string text = 1;
*
* @return The bytes for text.
*/
com.google.protobuf.ByteString getTextBytes();
/**
*
*
*
* Optional. The entity type name prefixed with `@`.
* This field is required for annotated parts of the training phrase.
*
*
* string entity_type = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The entityType.
*/
java.lang.String getEntityType();
/**
*
*
*
* Optional. The entity type name prefixed with `@`.
* This field is required for annotated parts of the training phrase.
*
*
* string entity_type = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for entityType.
*/
com.google.protobuf.ByteString getEntityTypeBytes();
/**
*
*
*
* Optional. The parameter name for the value extracted from the
* annotated part of the example.
* This field is required for annotated parts of the training phrase.
*
*
* string alias = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The alias.
*/
java.lang.String getAlias();
/**
*
*
*
* Optional. The parameter name for the value extracted from the
* annotated part of the example.
* This field is required for annotated parts of the training phrase.
*
*
* string alias = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for alias.
*/
com.google.protobuf.ByteString getAliasBytes();
/**
*
*
*
* Optional. Indicates whether the text was manually annotated.
* This field is set to true when the Dialogflow Console is used to
* manually annotate the part. When creating an annotated part with the
* API, you must set this to true.
*
*
* bool user_defined = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The userDefined.
*/
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_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Part();
}
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;
}
@java.lang.Override
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;
@SuppressWarnings("serial")
private volatile java.lang.Object text_ = "";
/**
*
*
*
* Required. The text for this part.
*
*
* string text = 1;
*
* @return The text.
*/
@java.lang.Override
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 for this part.
*
*
* string text = 1;
*
* @return The bytes for text.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
private volatile java.lang.Object entityType_ = "";
/**
*
*
*
* Optional. The entity type name prefixed with `@`.
* This field is required for annotated parts of the training phrase.
*
*
* string entity_type = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The entityType.
*/
@java.lang.Override
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 annotated parts of the training phrase.
*
*
* string entity_type = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for entityType.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
private volatile java.lang.Object alias_ = "";
/**
*
*
*
* Optional. The parameter name for the value extracted from the
* annotated part of the example.
* This field is required for annotated parts of the training phrase.
*
*
* string alias = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The alias.
*/
@java.lang.Override
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.
* This field is required for annotated parts of the training phrase.
*
*
* string alias = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for alias.
*/
@java.lang.Override
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_ = false;
/**
*
*
*
* Optional. Indicates whether the text was manually annotated.
* This field is set to true when the Dialogflow Console is used to
* manually annotate the part. When creating an annotated part with the
* API, you must set this to true.
*
*
* bool user_defined = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The userDefined.
*/
@java.lang.Override
public boolean getUserDefined() {
return userDefined_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityType_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, entityType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(alias_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, alias_);
}
if (userDefined_ != false) {
output.writeBool(4, userDefined_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityType_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, entityType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(alias_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, alias_);
}
if (userDefined_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, userDefined_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.v2.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;
if (!getText().equals(other.getText())) return false;
if (!getEntityType().equals(other.getEntityType())) return false;
if (!getAlias().equals(other.getAlias())) return false;
if (getUserDefined() != other.getUserDefined()) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + 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) + getUnknownFields().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);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Represents a 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;
}
@java.lang.Override
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() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
text_ = "";
entityType_ = "";
alias_ = "";
userDefined_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_TrainingPhrase_Part_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.text_ = text_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.entityType_ = entityType_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.alias_ = alias_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.userDefined_ = userDefined_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.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_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getEntityType().isEmpty()) {
entityType_ = other.entityType_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getAlias().isEmpty()) {
alias_ = other.alias_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.getUserDefined() != false) {
setUserDefined(other.getUserDefined());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
text_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
entityType_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
alias_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 32:
{
userDefined_ = input.readBool();
bitField0_ |= 0x00000008;
break;
} // case 32
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object text_ = "";
/**
*
*
*
* Required. The text for this part.
*
*
* string text = 1;
*
* @return The text.
*/
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 for this part.
*
*
* string text = 1;
*
* @return The bytes for text.
*/
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 for this part.
*
*
* string text = 1;
*
* @param value The text to set.
* @return This builder for chaining.
*/
public Builder setText(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
text_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. The text for this part.
*
*
* string text = 1;
*
* @return This builder for chaining.
*/
public Builder clearText() {
text_ = getDefaultInstance().getText();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Required. The text for this part.
*
*
* string text = 1;
*
* @param value The bytes for text to set.
* @return This builder for chaining.
*/
public Builder setTextBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
text_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object entityType_ = "";
/**
*
*
*
* Optional. The entity type name prefixed with `@`.
* This field is required for annotated parts of the training phrase.
*
*
* string entity_type = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The entityType.
*/
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 annotated parts of the training phrase.
*
*
* string entity_type = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for entityType.
*/
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 annotated parts of the training phrase.
*
*
* string entity_type = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The entityType to set.
* @return This builder for chaining.
*/
public Builder setEntityType(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
entityType_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. The entity type name prefixed with `@`.
* This field is required for annotated parts of the training phrase.
*
*
* string entity_type = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearEntityType() {
entityType_ = getDefaultInstance().getEntityType();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Optional. The entity type name prefixed with `@`.
* This field is required for annotated parts of the training phrase.
*
*
* string entity_type = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for entityType to set.
* @return This builder for chaining.
*/
public Builder setEntityTypeBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
entityType_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object alias_ = "";
/**
*
*
*
* Optional. The parameter name for the value extracted from the
* annotated part of the example.
* This field is required for annotated parts of the training phrase.
*
*
* string alias = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The alias.
*/
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.
* This field is required for annotated parts of the training phrase.
*
*
* string alias = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for alias.
*/
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.
* This field is required for annotated parts of the training phrase.
*
*
* string alias = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The alias to set.
* @return This builder for chaining.
*/
public Builder setAlias(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
alias_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Optional. The parameter name for the value extracted from the
* annotated part of the example.
* This field is required for annotated parts of the training phrase.
*
*
* string alias = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearAlias() {
alias_ = getDefaultInstance().getAlias();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* Optional. The parameter name for the value extracted from the
* annotated part of the example.
* This field is required for annotated parts of the training phrase.
*
*
* string alias = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for alias to set.
* @return This builder for chaining.
*/
public Builder setAliasBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
alias_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private boolean userDefined_;
/**
*
*
*
* Optional. Indicates whether the text was manually annotated.
* This field is set to true when the Dialogflow Console is used to
* manually annotate the part. When creating an annotated part with the
* API, you must set this to true.
*
*
* bool user_defined = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The userDefined.
*/
@java.lang.Override
public boolean getUserDefined() {
return userDefined_;
}
/**
*
*
*
* Optional. Indicates whether the text was manually annotated.
* This field is set to true when the Dialogflow Console is used to
* manually annotate the part. When creating an annotated part with the
* API, you must set this to true.
*
*
* bool user_defined = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The userDefined to set.
* @return This builder for chaining.
*/
public Builder setUserDefined(boolean value) {
userDefined_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Optional. Indicates whether the text was manually annotated.
* This field is set to true when the Dialogflow Console is used to
* manually annotate the part. When creating an annotated part with the
* API, you must set this to true.
*
*
* bool user_defined = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearUserDefined() {
bitField0_ = (bitField0_ & ~0x00000008);
userDefined_ = false;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.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() {
@java.lang.Override
public Part parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* Output only. The unique identifier of this training phrase.
*
*
* string name = 1;
*
* @return The name.
*/
@java.lang.Override
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;
}
}
/**
*
*
*
* Output only. The unique identifier of this training phrase.
*
*
* string name = 1;
*
* @return The bytes for name.
*/
@java.lang.Override
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_ = 0;
/**
*
*
*
* Required. The type of the training phrase.
*
*
*
* .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override
public int getTypeValue() {
return type_;
}
/**
*
*
*
* Required. The type of the training phrase.
*
*
*
* .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The type.
*/
@java.lang.Override
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.forNumber(type_);
return result == null
? com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type.UNRECOGNIZED
: result;
}
public static final int PARTS_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private java.util.List parts_;
/**
*
*
*
* Required. The ordered list of training phrase parts.
* The parts are concatenated in order to form the training phrase.
*
* Note: The API does not automatically annotate training phrases like the
* Dialogflow Console does.
*
* Note: Do not forget to include whitespace at part boundaries,
* so the training phrase is well formatted when the parts are concatenated.
*
* If the training phrase does not need to be annotated with parameters,
* you just need a single part with only the
* [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
* field set.
*
* If you want to annotate the training phrase, you must create multiple
* parts, where the fields of each part are populated in one of two ways:
*
* - `Part.text` is set to a part of the phrase that has no parameters.
* - `Part.text` is set to a part of the phrase that you want to annotate,
* and the `entity_type`, `alias`, and `user_defined` fields are all
* set.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public java.util.List
getPartsList() {
return parts_;
}
/**
*
*
*
* Required. The ordered list of training phrase parts.
* The parts are concatenated in order to form the training phrase.
*
* Note: The API does not automatically annotate training phrases like the
* Dialogflow Console does.
*
* Note: Do not forget to include whitespace at part boundaries,
* so the training phrase is well formatted when the parts are concatenated.
*
* If the training phrase does not need to be annotated with parameters,
* you just need a single part with only the
* [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
* field set.
*
* If you want to annotate the training phrase, you must create multiple
* parts, where the fields of each part are populated in one of two ways:
*
* - `Part.text` is set to a part of the phrase that has no parameters.
* - `Part.text` is set to a part of the phrase that you want to annotate,
* and the `entity_type`, `alias`, and `user_defined` fields are all
* set.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public java.util.List<
? extends com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.PartOrBuilder>
getPartsOrBuilderList() {
return parts_;
}
/**
*
*
*
* Required. The ordered list of training phrase parts.
* The parts are concatenated in order to form the training phrase.
*
* Note: The API does not automatically annotate training phrases like the
* Dialogflow Console does.
*
* Note: Do not forget to include whitespace at part boundaries,
* so the training phrase is well formatted when the parts are concatenated.
*
* If the training phrase does not need to be annotated with parameters,
* you just need a single part with only the
* [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
* field set.
*
* If you want to annotate the training phrase, you must create multiple
* parts, where the fields of each part are populated in one of two ways:
*
* - `Part.text` is set to a part of the phrase that has no parameters.
* - `Part.text` is set to a part of the phrase that you want to annotate,
* and the `entity_type`, `alias`, and `user_defined` fields are all
* set.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public int getPartsCount() {
return parts_.size();
}
/**
*
*
*
* Required. The ordered list of training phrase parts.
* The parts are concatenated in order to form the training phrase.
*
* Note: The API does not automatically annotate training phrases like the
* Dialogflow Console does.
*
* Note: Do not forget to include whitespace at part boundaries,
* so the training phrase is well formatted when the parts are concatenated.
*
* If the training phrase does not need to be annotated with parameters,
* you just need a single part with only the
* [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
* field set.
*
* If you want to annotate the training phrase, you must create multiple
* parts, where the fields of each part are populated in one of two ways:
*
* - `Part.text` is set to a part of the phrase that has no parameters.
* - `Part.text` is set to a part of the phrase that you want to annotate,
* and the `entity_type`, `alias`, and `user_defined` fields are all
* set.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part getParts(int index) {
return parts_.get(index);
}
/**
*
*
*
* Required. The ordered list of training phrase parts.
* The parts are concatenated in order to form the training phrase.
*
* Note: The API does not automatically annotate training phrases like the
* Dialogflow Console does.
*
* Note: Do not forget to include whitespace at part boundaries,
* so the training phrase is well formatted when the parts are concatenated.
*
* If the training phrase does not need to be annotated with parameters,
* you just need a single part with only the
* [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
* field set.
*
* If you want to annotate the training phrase, you must create multiple
* parts, where the fields of each part are populated in one of two ways:
*
* - `Part.text` is set to a part of the phrase that has no parameters.
* - `Part.text` is set to a part of the phrase that you want to annotate,
* and the `entity_type`, `alias`, and `user_defined` fields are all
* set.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
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_ = 0;
/**
*
*
*
* Optional. Indicates how many times this example 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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The timesAddedCount.
*/
@java.lang.Override
public int getTimesAddedCount() {
return timesAddedCount_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
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_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
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 += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.v2.Intent.TrainingPhrase)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase other =
(com.google.cloud.dialogflow.v2.Intent.TrainingPhrase) obj;
if (!getName().equals(other.getName())) return false;
if (type_ != other.type_) return false;
if (!getPartsList().equals(other.getPartsList())) return false;
if (getTimesAddedCount() != other.getTimesAddedCount()) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + 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) + getUnknownFields().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);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Represents an example 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;
}
@java.lang.Override
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() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
type_ = 0;
if (partsBuilder_ == null) {
parts_ = java.util.Collections.emptyList();
} else {
parts_ = null;
partsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
timesAddedCount_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_TrainingPhrase_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase result) {
if (partsBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
parts_ = java.util.Collections.unmodifiableList(parts_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.parts_ = parts_;
} else {
result.parts_ = partsBuilder_.build();
}
}
private void buildPartial0(com.google.cloud.dialogflow.v2.Intent.TrainingPhrase result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.type_ = type_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.timesAddedCount_ = timesAddedCount_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.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_;
bitField0_ |= 0x00000001;
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.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 16:
{
type_ = input.readEnum();
bitField0_ |= 0x00000002;
break;
} // case 16
case 26:
{
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part m =
input.readMessage(
com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.parser(),
extensionRegistry);
if (partsBuilder_ == null) {
ensurePartsIsMutable();
parts_.add(m);
} else {
partsBuilder_.addMessage(m);
}
break;
} // case 26
case 32:
{
timesAddedCount_ = input.readInt32();
bitField0_ |= 0x00000008;
break;
} // case 32
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
*
*
* Output only. The unique identifier of this training phrase.
*
*
* string name = 1;
*
* @return The name.
*/
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;
}
}
/**
*
*
*
* Output only. The unique identifier of this training phrase.
*
*
* string name = 1;
*
* @return The bytes for name.
*/
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;
}
}
/**
*
*
*
* Output only. The unique identifier of this training phrase.
*
*
* string name = 1;
*
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Output only. The unique identifier of this training phrase.
*
*
* string name = 1;
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Output only. The unique identifier of this training phrase.
*
*
* string name = 1;
*
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private int type_ = 0;
/**
*
*
*
* Required. The type of the training phrase.
*
*
*
* .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override
public int getTypeValue() {
return type_;
}
/**
*
*
*
* Required. The type of the training phrase.
*
*
*
* .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2 [(.google.api.field_behavior) = REQUIRED];
*
*
* @param value The enum numeric value on the wire for type to set.
* @return This builder for chaining.
*/
public Builder setTypeValue(int value) {
type_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Required. The type of the training phrase.
*
*
*
* .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The type.
*/
@java.lang.Override
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.forNumber(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 [(.google.api.field_behavior) = REQUIRED];
*
*
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
type_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Required. The type of the training phrase.
*
*
*
* .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return This builder for chaining.
*/
public Builder clearType() {
bitField0_ = (bitField0_ & ~0x00000002);
type_ = 0;
onChanged();
return this;
}
private java.util.List parts_ =
java.util.Collections.emptyList();
private void ensurePartsIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
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 ordered list of training phrase parts.
* The parts are concatenated in order to form the training phrase.
*
* Note: The API does not automatically annotate training phrases like the
* Dialogflow Console does.
*
* Note: Do not forget to include whitespace at part boundaries,
* so the training phrase is well formatted when the parts are concatenated.
*
* If the training phrase does not need to be annotated with parameters,
* you just need a single part with only the
* [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
* field set.
*
* If you want to annotate the training phrase, you must create multiple
* parts, where the fields of each part are populated in one of two ways:
*
* - `Part.text` is set to a part of the phrase that has no parameters.
* - `Part.text` is set to a part of the phrase that you want to annotate,
* and the `entity_type`, `alias`, and `user_defined` fields are all
* set.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
public java.util.List
getPartsList() {
if (partsBuilder_ == null) {
return java.util.Collections.unmodifiableList(parts_);
} else {
return partsBuilder_.getMessageList();
}
}
/**
*
*
*
* Required. The ordered list of training phrase parts.
* The parts are concatenated in order to form the training phrase.
*
* Note: The API does not automatically annotate training phrases like the
* Dialogflow Console does.
*
* Note: Do not forget to include whitespace at part boundaries,
* so the training phrase is well formatted when the parts are concatenated.
*
* If the training phrase does not need to be annotated with parameters,
* you just need a single part with only the
* [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
* field set.
*
* If you want to annotate the training phrase, you must create multiple
* parts, where the fields of each part are populated in one of two ways:
*
* - `Part.text` is set to a part of the phrase that has no parameters.
* - `Part.text` is set to a part of the phrase that you want to annotate,
* and the `entity_type`, `alias`, and `user_defined` fields are all
* set.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
public int getPartsCount() {
if (partsBuilder_ == null) {
return parts_.size();
} else {
return partsBuilder_.getCount();
}
}
/**
*
*
*
* Required. The ordered list of training phrase parts.
* The parts are concatenated in order to form the training phrase.
*
* Note: The API does not automatically annotate training phrases like the
* Dialogflow Console does.
*
* Note: Do not forget to include whitespace at part boundaries,
* so the training phrase is well formatted when the parts are concatenated.
*
* If the training phrase does not need to be annotated with parameters,
* you just need a single part with only the
* [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
* field set.
*
* If you want to annotate the training phrase, you must create multiple
* parts, where the fields of each part are populated in one of two ways:
*
* - `Part.text` is set to a part of the phrase that has no parameters.
* - `Part.text` is set to a part of the phrase that you want to annotate,
* and the `entity_type`, `alias`, and `user_defined` fields are all
* set.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 ordered list of training phrase parts.
* The parts are concatenated in order to form the training phrase.
*
* Note: The API does not automatically annotate training phrases like the
* Dialogflow Console does.
*
* Note: Do not forget to include whitespace at part boundaries,
* so the training phrase is well formatted when the parts are concatenated.
*
* If the training phrase does not need to be annotated with parameters,
* you just need a single part with only the
* [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
* field set.
*
* If you want to annotate the training phrase, you must create multiple
* parts, where the fields of each part are populated in one of two ways:
*
* - `Part.text` is set to a part of the phrase that has no parameters.
* - `Part.text` is set to a part of the phrase that you want to annotate,
* and the `entity_type`, `alias`, and `user_defined` fields are all
* set.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 ordered list of training phrase parts.
* The parts are concatenated in order to form the training phrase.
*
* Note: The API does not automatically annotate training phrases like the
* Dialogflow Console does.
*
* Note: Do not forget to include whitespace at part boundaries,
* so the training phrase is well formatted when the parts are concatenated.
*
* If the training phrase does not need to be annotated with parameters,
* you just need a single part with only the
* [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
* field set.
*
* If you want to annotate the training phrase, you must create multiple
* parts, where the fields of each part are populated in one of two ways:
*
* - `Part.text` is set to a part of the phrase that has no parameters.
* - `Part.text` is set to a part of the phrase that you want to annotate,
* and the `entity_type`, `alias`, and `user_defined` fields are all
* set.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 ordered list of training phrase parts.
* The parts are concatenated in order to form the training phrase.
*
* Note: The API does not automatically annotate training phrases like the
* Dialogflow Console does.
*
* Note: Do not forget to include whitespace at part boundaries,
* so the training phrase is well formatted when the parts are concatenated.
*
* If the training phrase does not need to be annotated with parameters,
* you just need a single part with only the
* [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
* field set.
*
* If you want to annotate the training phrase, you must create multiple
* parts, where the fields of each part are populated in one of two ways:
*
* - `Part.text` is set to a part of the phrase that has no parameters.
* - `Part.text` is set to a part of the phrase that you want to annotate,
* and the `entity_type`, `alias`, and `user_defined` fields are all
* set.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 ordered list of training phrase parts.
* The parts are concatenated in order to form the training phrase.
*
* Note: The API does not automatically annotate training phrases like the
* Dialogflow Console does.
*
* Note: Do not forget to include whitespace at part boundaries,
* so the training phrase is well formatted when the parts are concatenated.
*
* If the training phrase does not need to be annotated with parameters,
* you just need a single part with only the
* [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
* field set.
*
* If you want to annotate the training phrase, you must create multiple
* parts, where the fields of each part are populated in one of two ways:
*
* - `Part.text` is set to a part of the phrase that has no parameters.
* - `Part.text` is set to a part of the phrase that you want to annotate,
* and the `entity_type`, `alias`, and `user_defined` fields are all
* set.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 ordered list of training phrase parts.
* The parts are concatenated in order to form the training phrase.
*
* Note: The API does not automatically annotate training phrases like the
* Dialogflow Console does.
*
* Note: Do not forget to include whitespace at part boundaries,
* so the training phrase is well formatted when the parts are concatenated.
*
* If the training phrase does not need to be annotated with parameters,
* you just need a single part with only the
* [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
* field set.
*
* If you want to annotate the training phrase, you must create multiple
* parts, where the fields of each part are populated in one of two ways:
*
* - `Part.text` is set to a part of the phrase that has no parameters.
* - `Part.text` is set to a part of the phrase that you want to annotate,
* and the `entity_type`, `alias`, and `user_defined` fields are all
* set.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 ordered list of training phrase parts.
* The parts are concatenated in order to form the training phrase.
*
* Note: The API does not automatically annotate training phrases like the
* Dialogflow Console does.
*
* Note: Do not forget to include whitespace at part boundaries,
* so the training phrase is well formatted when the parts are concatenated.
*
* If the training phrase does not need to be annotated with parameters,
* you just need a single part with only the
* [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
* field set.
*
* If you want to annotate the training phrase, you must create multiple
* parts, where the fields of each part are populated in one of two ways:
*
* - `Part.text` is set to a part of the phrase that has no parameters.
* - `Part.text` is set to a part of the phrase that you want to annotate,
* and the `entity_type`, `alias`, and `user_defined` fields are all
* set.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 ordered list of training phrase parts.
* The parts are concatenated in order to form the training phrase.
*
* Note: The API does not automatically annotate training phrases like the
* Dialogflow Console does.
*
* Note: Do not forget to include whitespace at part boundaries,
* so the training phrase is well formatted when the parts are concatenated.
*
* If the training phrase does not need to be annotated with parameters,
* you just need a single part with only the
* [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
* field set.
*
* If you want to annotate the training phrase, you must create multiple
* parts, where the fields of each part are populated in one of two ways:
*
* - `Part.text` is set to a part of the phrase that has no parameters.
* - `Part.text` is set to a part of the phrase that you want to annotate,
* and the `entity_type`, `alias`, and `user_defined` fields are all
* set.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 ordered list of training phrase parts.
* The parts are concatenated in order to form the training phrase.
*
* Note: The API does not automatically annotate training phrases like the
* Dialogflow Console does.
*
* Note: Do not forget to include whitespace at part boundaries,
* so the training phrase is well formatted when the parts are concatenated.
*
* If the training phrase does not need to be annotated with parameters,
* you just need a single part with only the
* [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
* field set.
*
* If you want to annotate the training phrase, you must create multiple
* parts, where the fields of each part are populated in one of two ways:
*
* - `Part.text` is set to a part of the phrase that has no parameters.
* - `Part.text` is set to a part of the phrase that you want to annotate,
* and the `entity_type`, `alias`, and `user_defined` fields are all
* set.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder clearParts() {
if (partsBuilder_ == null) {
parts_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
partsBuilder_.clear();
}
return this;
}
/**
*
*
*
* Required. The ordered list of training phrase parts.
* The parts are concatenated in order to form the training phrase.
*
* Note: The API does not automatically annotate training phrases like the
* Dialogflow Console does.
*
* Note: Do not forget to include whitespace at part boundaries,
* so the training phrase is well formatted when the parts are concatenated.
*
* If the training phrase does not need to be annotated with parameters,
* you just need a single part with only the
* [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
* field set.
*
* If you want to annotate the training phrase, you must create multiple
* parts, where the fields of each part are populated in one of two ways:
*
* - `Part.text` is set to a part of the phrase that has no parameters.
* - `Part.text` is set to a part of the phrase that you want to annotate,
* and the `entity_type`, `alias`, and `user_defined` fields are all
* set.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder removeParts(int index) {
if (partsBuilder_ == null) {
ensurePartsIsMutable();
parts_.remove(index);
onChanged();
} else {
partsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Required. The ordered list of training phrase parts.
* The parts are concatenated in order to form the training phrase.
*
* Note: The API does not automatically annotate training phrases like the
* Dialogflow Console does.
*
* Note: Do not forget to include whitespace at part boundaries,
* so the training phrase is well formatted when the parts are concatenated.
*
* If the training phrase does not need to be annotated with parameters,
* you just need a single part with only the
* [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
* field set.
*
* If you want to annotate the training phrase, you must create multiple
* parts, where the fields of each part are populated in one of two ways:
*
* - `Part.text` is set to a part of the phrase that has no parameters.
* - `Part.text` is set to a part of the phrase that you want to annotate,
* and the `entity_type`, `alias`, and `user_defined` fields are all
* set.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.Builder getPartsBuilder(
int index) {
return getPartsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Required. The ordered list of training phrase parts.
* The parts are concatenated in order to form the training phrase.
*
* Note: The API does not automatically annotate training phrases like the
* Dialogflow Console does.
*
* Note: Do not forget to include whitespace at part boundaries,
* so the training phrase is well formatted when the parts are concatenated.
*
* If the training phrase does not need to be annotated with parameters,
* you just need a single part with only the
* [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
* field set.
*
* If you want to annotate the training phrase, you must create multiple
* parts, where the fields of each part are populated in one of two ways:
*
* - `Part.text` is set to a part of the phrase that has no parameters.
* - `Part.text` is set to a part of the phrase that you want to annotate,
* and the `entity_type`, `alias`, and `user_defined` fields are all
* set.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 ordered list of training phrase parts.
* The parts are concatenated in order to form the training phrase.
*
* Note: The API does not automatically annotate training phrases like the
* Dialogflow Console does.
*
* Note: Do not forget to include whitespace at part boundaries,
* so the training phrase is well formatted when the parts are concatenated.
*
* If the training phrase does not need to be annotated with parameters,
* you just need a single part with only the
* [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
* field set.
*
* If you want to annotate the training phrase, you must create multiple
* parts, where the fields of each part are populated in one of two ways:
*
* - `Part.text` is set to a part of the phrase that has no parameters.
* - `Part.text` is set to a part of the phrase that you want to annotate,
* and the `entity_type`, `alias`, and `user_defined` fields are all
* set.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 ordered list of training phrase parts.
* The parts are concatenated in order to form the training phrase.
*
* Note: The API does not automatically annotate training phrases like the
* Dialogflow Console does.
*
* Note: Do not forget to include whitespace at part boundaries,
* so the training phrase is well formatted when the parts are concatenated.
*
* If the training phrase does not need to be annotated with parameters,
* you just need a single part with only the
* [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
* field set.
*
* If you want to annotate the training phrase, you must create multiple
* parts, where the fields of each part are populated in one of two ways:
*
* - `Part.text` is set to a part of the phrase that has no parameters.
* - `Part.text` is set to a part of the phrase that you want to annotate,
* and the `entity_type`, `alias`, and `user_defined` fields are all
* set.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 ordered list of training phrase parts.
* The parts are concatenated in order to form the training phrase.
*
* Note: The API does not automatically annotate training phrases like the
* Dialogflow Console does.
*
* Note: Do not forget to include whitespace at part boundaries,
* so the training phrase is well formatted when the parts are concatenated.
*
* If the training phrase does not need to be annotated with parameters,
* you just need a single part with only the
* [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
* field set.
*
* If you want to annotate the training phrase, you must create multiple
* parts, where the fields of each part are populated in one of two ways:
*
* - `Part.text` is set to a part of the phrase that has no parameters.
* - `Part.text` is set to a part of the phrase that you want to annotate,
* and the `entity_type`, `alias`, and `user_defined` fields are all
* set.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 ordered list of training phrase parts.
* The parts are concatenated in order to form the training phrase.
*
* Note: The API does not automatically annotate training phrases like the
* Dialogflow Console does.
*
* Note: Do not forget to include whitespace at part boundaries,
* so the training phrase is well formatted when the parts are concatenated.
*
* If the training phrase does not need to be annotated with parameters,
* you just need a single part with only the
* [Part.text][google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.text]
* field set.
*
* If you want to annotate the training phrase, you must create multiple
* parts, where the fields of each part are populated in one of two ways:
*
* - `Part.text` is set to a part of the phrase that has no parameters.
* - `Part.text` is set to a part of the phrase that you want to annotate,
* and the `entity_type`, `alias`, and `user_defined` fields are all
* set.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3 [(.google.api.field_behavior) = REQUIRED];
*
*/
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) != 0), getParentForChildren(), isClean());
parts_ = null;
}
return partsBuilder_;
}
private int timesAddedCount_;
/**
*
*
*
* Optional. Indicates how many times this example 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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The timesAddedCount.
*/
@java.lang.Override
public int getTimesAddedCount() {
return timesAddedCount_;
}
/**
*
*
*
* Optional. Indicates how many times this example 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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The timesAddedCount to set.
* @return This builder for chaining.
*/
public Builder setTimesAddedCount(int value) {
timesAddedCount_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Optional. Indicates how many times this example 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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearTimesAddedCount() {
bitField0_ = (bitField0_ & ~0x00000008);
timesAddedCount_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.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() {
@java.lang.Override
public TrainingPhrase parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.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;
*
* @return The name.
*/
java.lang.String getName();
/**
*
*
*
* The unique identifier of this parameter.
*
*
* string name = 1;
*
* @return The bytes for name.
*/
com.google.protobuf.ByteString getNameBytes();
/**
*
*
*
* Required. The name of the parameter.
*
*
* string display_name = 2;
*
* @return The displayName.
*/
java.lang.String getDisplayName();
/**
*
*
*
* Required. The name of the parameter.
*
*
* string display_name = 2;
*
* @return The bytes for displayName.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The value.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for value.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The defaultValue.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for defaultValue.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The entityTypeDisplayName.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for entityTypeDisplayName.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The mandatory.
*/
boolean getMandatory();
/**
*
*
*
* Optional. The collection of prompts that the agent can present to the
* user in order to collect a value for the parameter.
*
*
* repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the prompts.
*/
java.util.List getPromptsList();
/**
*
*
*
* Optional. The collection of prompts that the agent can present to the
* user in order to collect a value for the parameter.
*
*
* repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of prompts.
*/
int getPromptsCount();
/**
*
*
*
* Optional. The collection of prompts that the agent can present to the
* user in order to collect a value for the parameter.
*
*
* repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The prompts at the given index.
*/
java.lang.String getPrompts(int index);
/**
*
*
*
* Optional. The collection of prompts that the agent can present to the
* user in order to collect a value for the parameter.
*
*
* repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the prompts at the given index.
*/
com.google.protobuf.ByteString getPromptsBytes(int index);
/**
*
*
*
* Optional. Indicates whether the parameter represents a list of values.
*
*
* bool is_list = 8 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The isList.
*/
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_ = "";
prompts_ = com.google.protobuf.LazyStringArrayList.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Parameter();
}
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;
}
@java.lang.Override
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);
}
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* The unique identifier of this parameter.
*
*
* string name = 1;
*
* @return The name.
*/
@java.lang.Override
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;
*
* @return The bytes for name.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
private volatile java.lang.Object displayName_ = "";
/**
*
*
*
* Required. The name of the parameter.
*
*
* string display_name = 2;
*
* @return The displayName.
*/
@java.lang.Override
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;
*
* @return The bytes for displayName.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The value.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for value.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The defaultValue.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for defaultValue.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The entityTypeDisplayName.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for entityTypeDisplayName.
*/
@java.lang.Override
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_ = false;
/**
*
*
*
* Optional. Indicates whether the parameter is required. That is,
* whether the intent cannot be completed without collecting the parameter
* value.
*
*
* bool mandatory = 6 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The mandatory.
*/
@java.lang.Override
public boolean getMandatory() {
return mandatory_;
}
public static final int PROMPTS_FIELD_NUMBER = 7;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList prompts_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Optional. The collection of prompts that the agent can present to the
* user in order to collect a value for the parameter.
*
*
* repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the prompts.
*/
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 a value for the parameter.
*
*
* repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of prompts.
*/
public int getPromptsCount() {
return prompts_.size();
}
/**
*
*
*
* Optional. The collection of prompts that the agent can present to the
* user in order to collect a value for the parameter.
*
*
* repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The prompts at the given index.
*/
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 a value for the parameter.
*
*
* repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the prompts at the given index.
*/
public com.google.protobuf.ByteString getPromptsBytes(int index) {
return prompts_.getByteString(index);
}
public static final int IS_LIST_FIELD_NUMBER = 8;
private boolean isList_ = false;
/**
*
*
*
* Optional. Indicates whether the parameter represents a list of values.
*
*
* bool is_list = 8 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The isList.
*/
@java.lang.Override
public boolean getIsList() {
return isList_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, value_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultValue_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, defaultValue_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityTypeDisplayName_)) {
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_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, value_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(defaultValue_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, defaultValue_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(entityTypeDisplayName_)) {
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 += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.v2.Intent.Parameter)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Parameter other =
(com.google.cloud.dialogflow.v2.Intent.Parameter) obj;
if (!getName().equals(other.getName())) return false;
if (!getDisplayName().equals(other.getDisplayName())) return false;
if (!getValue().equals(other.getValue())) return false;
if (!getDefaultValue().equals(other.getDefaultValue())) return false;
if (!getEntityTypeDisplayName().equals(other.getEntityTypeDisplayName())) return false;
if (getMandatory() != other.getMandatory()) return false;
if (!getPromptsList().equals(other.getPromptsList())) return false;
if (getIsList() != other.getIsList()) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + 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) + getUnknownFields().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);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.Parameter prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Represents 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;
}
@java.lang.Override
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() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
displayName_ = "";
value_ = "";
defaultValue_ = "";
entityTypeDisplayName_ = "";
mandatory_ = false;
prompts_ = com.google.protobuf.LazyStringArrayList.emptyList();
isList_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Parameter_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Parameter getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Parameter.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.dialogflow.v2.Intent.Parameter result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.displayName_ = displayName_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.value_ = value_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.defaultValue_ = defaultValue_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.entityTypeDisplayName_ = entityTypeDisplayName_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.mandatory_ = mandatory_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
prompts_.makeImmutable();
result.prompts_ = prompts_;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.isList_ = isList_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.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_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getDisplayName().isEmpty()) {
displayName_ = other.displayName_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getValue().isEmpty()) {
value_ = other.value_;
bitField0_ |= 0x00000004;
onChanged();
}
if (!other.getDefaultValue().isEmpty()) {
defaultValue_ = other.defaultValue_;
bitField0_ |= 0x00000008;
onChanged();
}
if (!other.getEntityTypeDisplayName().isEmpty()) {
entityTypeDisplayName_ = other.entityTypeDisplayName_;
bitField0_ |= 0x00000010;
onChanged();
}
if (other.getMandatory() != false) {
setMandatory(other.getMandatory());
}
if (!other.prompts_.isEmpty()) {
if (prompts_.isEmpty()) {
prompts_ = other.prompts_;
bitField0_ |= 0x00000040;
} else {
ensurePromptsIsMutable();
prompts_.addAll(other.prompts_);
}
onChanged();
}
if (other.getIsList() != false) {
setIsList(other.getIsList());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
displayName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
value_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
defaultValue_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 34
case 42:
{
entityTypeDisplayName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 42
case 48:
{
mandatory_ = input.readBool();
bitField0_ |= 0x00000020;
break;
} // case 48
case 58:
{
java.lang.String s = input.readStringRequireUtf8();
ensurePromptsIsMutable();
prompts_.add(s);
break;
} // case 58
case 64:
{
isList_ = input.readBool();
bitField0_ |= 0x00000080;
break;
} // case 64
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
*
*
* The unique identifier of this parameter.
*
*
* string name = 1;
*
* @return The name.
*/
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;
*
* @return The bytes for name.
*/
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;
*
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The unique identifier of this parameter.
*
*
* string name = 1;
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* The unique identifier of this parameter.
*
*
* string name = 1;
*
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object displayName_ = "";
/**
*
*
*
* Required. The name of the parameter.
*
*
* string display_name = 2;
*
* @return The displayName.
*/
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;
*
* @return The bytes for displayName.
*/
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;
*
* @param value The displayName to set.
* @return This builder for chaining.
*/
public Builder setDisplayName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
displayName_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Required. The name of the parameter.
*
*
* string display_name = 2;
*
* @return This builder for chaining.
*/
public Builder clearDisplayName() {
displayName_ = getDefaultInstance().getDisplayName();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Required. The name of the parameter.
*
*
* string display_name = 2;
*
* @param value The bytes for displayName to set.
* @return This builder for chaining.
*/
public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
displayName_ = value;
bitField0_ |= 0x00000002;
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The value.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for value.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The value to set.
* @return This builder for chaining.
*/
public Builder setValue(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
value_ = value;
bitField0_ |= 0x00000004;
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearValue() {
value_ = getDefaultInstance().getValue();
bitField0_ = (bitField0_ & ~0x00000004);
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for value to set.
* @return This builder for chaining.
*/
public Builder setValueBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
value_ = value;
bitField0_ |= 0x00000004;
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The defaultValue.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for defaultValue.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The defaultValue to set.
* @return This builder for chaining.
*/
public Builder setDefaultValue(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
defaultValue_ = value;
bitField0_ |= 0x00000008;
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearDefaultValue() {
defaultValue_ = getDefaultInstance().getDefaultValue();
bitField0_ = (bitField0_ & ~0x00000008);
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for defaultValue to set.
* @return This builder for chaining.
*/
public Builder setDefaultValueBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
defaultValue_ = value;
bitField0_ |= 0x00000008;
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The entityTypeDisplayName.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for entityTypeDisplayName.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The entityTypeDisplayName to set.
* @return This builder for chaining.
*/
public Builder setEntityTypeDisplayName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
entityTypeDisplayName_ = value;
bitField0_ |= 0x00000010;
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearEntityTypeDisplayName() {
entityTypeDisplayName_ = getDefaultInstance().getEntityTypeDisplayName();
bitField0_ = (bitField0_ & ~0x00000010);
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for entityTypeDisplayName to set.
* @return This builder for chaining.
*/
public Builder setEntityTypeDisplayNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
entityTypeDisplayName_ = value;
bitField0_ |= 0x00000010;
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The mandatory.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The mandatory to set.
* @return This builder for chaining.
*/
public Builder setMandatory(boolean value) {
mandatory_ = value;
bitField0_ |= 0x00000020;
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearMandatory() {
bitField0_ = (bitField0_ & ~0x00000020);
mandatory_ = false;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList prompts_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensurePromptsIsMutable() {
if (!prompts_.isModifiable()) {
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 a value for the parameter.
*
*
* repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the prompts.
*/
public com.google.protobuf.ProtocolStringList getPromptsList() {
prompts_.makeImmutable();
return prompts_;
}
/**
*
*
*
* Optional. The collection of prompts that the agent can present to the
* user in order to collect a value for the parameter.
*
*
* repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of prompts.
*/
public int getPromptsCount() {
return prompts_.size();
}
/**
*
*
*
* Optional. The collection of prompts that the agent can present to the
* user in order to collect a value for the parameter.
*
*
* repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The prompts at the given index.
*/
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 a value for the parameter.
*
*
* repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the prompts at the given index.
*/
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 a value for the parameter.
*
*
* repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index to set the value at.
* @param value The prompts to set.
* @return This builder for chaining.
*/
public Builder setPrompts(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensurePromptsIsMutable();
prompts_.set(index, value);
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Optional. The collection of prompts that the agent can present to the
* user in order to collect a value for the parameter.
*
*
* repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The prompts to add.
* @return This builder for chaining.
*/
public Builder addPrompts(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensurePromptsIsMutable();
prompts_.add(value);
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Optional. The collection of prompts that the agent can present to the
* user in order to collect a value for the parameter.
*
*
* repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @param values The prompts to add.
* @return This builder for chaining.
*/
public Builder addAllPrompts(java.lang.Iterable values) {
ensurePromptsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, prompts_);
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Optional. The collection of prompts that the agent can present to the
* user in order to collect a value for the parameter.
*
*
* repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearPrompts() {
prompts_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000040);
;
onChanged();
return this;
}
/**
*
*
*
* Optional. The collection of prompts that the agent can present to the
* user in order to collect a value for the parameter.
*
*
* repeated string prompts = 7 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes of the prompts to add.
* @return This builder for chaining.
*/
public Builder addPromptsBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensurePromptsIsMutable();
prompts_.add(value);
bitField0_ |= 0x00000040;
onChanged();
return this;
}
private boolean isList_;
/**
*
*
*
* Optional. Indicates whether the parameter represents a list of values.
*
*
* bool is_list = 8 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The isList.
*/
@java.lang.Override
public boolean getIsList() {
return isList_;
}
/**
*
*
*
* Optional. Indicates whether the parameter represents a list of values.
*
*
* bool is_list = 8 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The isList to set.
* @return This builder for chaining.
*/
public Builder setIsList(boolean value) {
isList_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* Optional. Indicates whether the parameter represents a list of values.
*
*
* bool is_list = 8 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearIsList() {
bitField0_ = (bitField0_ & ~0x00000080);
isList_ = false;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.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() {
@java.lang.Override
public Parameter parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.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;
*
* @return Whether the text field is set.
*/
boolean hasText();
/**
*
*
*
* The text response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Text text = 1;
*
* @return The text.
*/
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;
*
* @return Whether the image field is set.
*/
boolean hasImage();
/**
*
*
*
* The image response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 2;
*
* @return The image.
*/
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;
*
* @return Whether the quickReplies field is set.
*/
boolean hasQuickReplies();
/**
*
*
*
* The quick replies response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.QuickReplies quick_replies = 3;
*
* @return The quickReplies.
*/
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;
*
* @return Whether the card field is set.
*/
boolean hasCard();
/**
*
*
*
* The card response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Card card = 4;
*
* @return The card.
*/
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();
/**
*
*
*
* A custom platform-specific response.
*
*
* .google.protobuf.Struct payload = 5;
*
* @return Whether the payload field is set.
*/
boolean hasPayload();
/**
*
*
*
* A custom platform-specific response.
*
*
* .google.protobuf.Struct payload = 5;
*
* @return The payload.
*/
com.google.protobuf.Struct getPayload();
/**
*
*
*
* A custom platform-specific response.
*
*
* .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;
*
* @return Whether the simpleResponses field is set.
*/
boolean hasSimpleResponses();
/**
*
*
*
* The voice and text-only responses for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SimpleResponses simple_responses = 7;
*
* @return The simpleResponses.
*/
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;
*
* @return Whether the basicCard field is set.
*/
boolean hasBasicCard();
/**
*
*
*
* The basic card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard basic_card = 8;
*
* @return The basicCard.
*/
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;
*
* @return Whether the suggestions field is set.
*/
boolean hasSuggestions();
/**
*
*
*
* The suggestion chips for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Suggestions suggestions = 9;
*
* @return The suggestions.
*/
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;
*
*
* @return Whether the linkOutSuggestion field is set.
*/
boolean hasLinkOutSuggestion();
/**
*
*
*
* The link out suggestion chip for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion link_out_suggestion = 10;
*
*
* @return The linkOutSuggestion.
*/
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;
*
* @return Whether the listSelect field is set.
*/
boolean hasListSelect();
/**
*
*
*
* The list card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.ListSelect list_select = 11;
*
* @return The listSelect.
*/
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;
*
* @return Whether the carouselSelect field is set.
*/
boolean hasCarouselSelect();
/**
*
*
*
* The carousel card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect carousel_select = 12;
*
* @return The carouselSelect.
*/
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();
/**
*
*
*
* Browse carousel card for Actions on Google.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard browse_carousel_card = 22;
*
*
* @return Whether the browseCarouselCard field is set.
*/
boolean hasBrowseCarouselCard();
/**
*
*
*
* Browse carousel card for Actions on Google.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard browse_carousel_card = 22;
*
*
* @return The browseCarouselCard.
*/
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard getBrowseCarouselCard();
/**
*
*
*
* Browse carousel card for Actions on Google.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard browse_carousel_card = 22;
*
*/
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCardOrBuilder
getBrowseCarouselCardOrBuilder();
/**
*
*
*
* Table card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.TableCard table_card = 23;
*
* @return Whether the tableCard field is set.
*/
boolean hasTableCard();
/**
*
*
*
* Table card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.TableCard table_card = 23;
*
* @return The tableCard.
*/
com.google.cloud.dialogflow.v2.Intent.Message.TableCard getTableCard();
/**
*
*
*
* Table card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.TableCard table_card = 23;
*/
com.google.cloud.dialogflow.v2.Intent.Message.TableCardOrBuilder getTableCardOrBuilder();
/**
*
*
*
* The media content card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.MediaContent media_content = 24;
*
* @return Whether the mediaContent field is set.
*/
boolean hasMediaContent();
/**
*
*
*
* The media content card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.MediaContent media_content = 24;
*
* @return The mediaContent.
*/
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent getMediaContent();
/**
*
*
*
* The media content card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.MediaContent media_content = 24;
*/
com.google.cloud.dialogflow.v2.Intent.Message.MediaContentOrBuilder getMediaContentOrBuilder();
/**
*
*
*
* Optional. The platform that this message is intended for.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Platform platform = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for platform.
*/
int getPlatformValue();
/**
*
*
*
* Optional. The platform that this message is intended for.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Platform platform = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The platform.
*/
com.google.cloud.dialogflow.v2.Intent.Message.Platform getPlatform();
com.google.cloud.dialogflow.v2.Intent.Message.MessageCase getMessageCase();
}
/**
*
*
*
* A rich response message.
* Corresponds to the intent `Response` field in the Dialogflow console.
* For more information, see
* [Rich response
* messages](https://cloud.google.com/dialogflow/docs/intents-rich-messages).
*
*
* 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
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Message();
}
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;
}
@java.lang.Override
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);
}
/**
*
*
*
* The rich response message integration platform. See
* [Integrations](https://cloud.google.com/dialogflow/docs/integrations).
*
*
* Protobuf enum {@code google.cloud.dialogflow.v2.Intent.Message.Platform}
*/
public enum Platform implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* Default platform.
*
*
* 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),
/**
*
*
*
* Google Assistant
* See [Dialogflow webhook
* format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json)
*
*
* ACTIONS_ON_GOOGLE = 8;
*/
ACTIONS_ON_GOOGLE(8),
/**
*
*
*
* Google Hangouts.
*
*
* GOOGLE_HANGOUTS = 11;
*/
GOOGLE_HANGOUTS(11),
UNRECOGNIZED(-1),
;
/**
*
*
*
* Default platform.
*
*
* 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;
/**
*
*
*
* Google Assistant
* See [Dialogflow webhook
* format](https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json)
*
*
* ACTIONS_ON_GOOGLE = 8;
*/
public static final int ACTIONS_ON_GOOGLE_VALUE = 8;
/**
*
*
*
* Google Hangouts.
*
*
* GOOGLE_HANGOUTS = 11;
*/
public static final int GOOGLE_HANGOUTS_VALUE = 11;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Platform valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire 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;
case 11:
return GOOGLE_HANGOUTS;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Platform findValueByNumber(int number) {
return Platform.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the text.
*/
java.util.List getTextList();
/**
*
*
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of text.
*/
int getTextCount();
/**
*
*
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The text at the given index.
*/
java.lang.String getText(int index);
/**
*
*
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the text at the given index.
*/
com.google.protobuf.ByteString getTextBytes(int index);
}
/**
*
*
*
* 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.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Text();
}
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;
}
@java.lang.Override
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;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList text_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the text.
*/
public com.google.protobuf.ProtocolStringList getTextList() {
return text_;
}
/**
*
*
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of text.
*/
public int getTextCount() {
return text_.size();
}
/**
*
*
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The text at the given index.
*/
public java.lang.String getText(int index) {
return text_.get(index);
}
/**
*
*
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the text at the given index.
*/
public com.google.protobuf.ByteString getTextBytes(int index) {
return text_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
for (int i = 0; i < text_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_.getRaw(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < text_.size(); i++) {
dataSize += computeStringSizeNoTag(text_.getRaw(i));
}
size += dataSize;
size += 1 * getTextList().size();
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.v2.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;
if (!getTextList().equals(other.getTextList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getTextCount() > 0) {
hash = (37 * hash) + TEXT_FIELD_NUMBER;
hash = (53 * hash) + getTextList().hashCode();
}
hash = (29 * hash) + getUnknownFields().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);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.Text prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* The text response message.
*
*
* Protobuf type {@code google.cloud.dialogflow.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;
}
@java.lang.Override
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() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
text_ = com.google.protobuf.LazyStringArrayList.emptyList();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_Text_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.Text getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.Text.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.dialogflow.v2.Intent.Message.Text result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
text_.makeImmutable();
result.text_ = text_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.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_ |= 0x00000001;
} else {
ensureTextIsMutable();
text_.addAll(other.text_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
java.lang.String s = input.readStringRequireUtf8();
ensureTextIsMutable();
text_.add(s);
break;
} // case 10
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.google.protobuf.LazyStringArrayList text_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureTextIsMutable() {
if (!text_.isModifiable()) {
text_ = new com.google.protobuf.LazyStringArrayList(text_);
}
bitField0_ |= 0x00000001;
}
/**
*
*
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the text.
*/
public com.google.protobuf.ProtocolStringList getTextList() {
text_.makeImmutable();
return text_;
}
/**
*
*
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of text.
*/
public int getTextCount() {
return text_.size();
}
/**
*
*
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The text at the given index.
*/
public java.lang.String getText(int index) {
return text_.get(index);
}
/**
*
*
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the text at the given index.
*/
public com.google.protobuf.ByteString getTextBytes(int index) {
return text_.getByteString(index);
}
/**
*
*
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index to set the value at.
* @param value The text to set.
* @return This builder for chaining.
*/
public Builder setText(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureTextIsMutable();
text_.set(index, value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The text to add.
* @return This builder for chaining.
*/
public Builder addText(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureTextIsMutable();
text_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param values The text to add.
* @return This builder for chaining.
*/
public Builder addAllText(java.lang.Iterable values) {
ensureTextIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, text_);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearText() {
text_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
;
onChanged();
return this;
}
/**
*
*
*
* Optional. The collection of the agent's responses.
*
*
* repeated string text = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes of the text to add.
* @return This builder for chaining.
*/
public Builder addTextBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureTextIsMutable();
text_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.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() {
@java.lang.Override
public Text parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The imageUri.
*/
java.lang.String getImageUri();
/**
*
*
*
* Optional. The public URI to an image file.
*
*
* string image_uri = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for imageUri.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The accessibilityText.
*/
java.lang.String getAccessibilityText();
/**
*
*
*
* Optional. A text description of the image to be used for accessibility,
* e.g., screen readers.
*
*
* string accessibility_text = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for accessibilityText.
*/
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
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Image();
}
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;
}
@java.lang.Override
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;
@SuppressWarnings("serial")
private volatile java.lang.Object imageUri_ = "";
/**
*
*
*
* Optional. The public URI to an image file.
*
*
* string image_uri = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The imageUri.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for imageUri.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The accessibilityText.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for accessibilityText.
*/
@java.lang.Override
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;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, imageUri_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accessibilityText_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, accessibilityText_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, imageUri_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(accessibilityText_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, accessibilityText_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.v2.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;
if (!getImageUri().equals(other.getImageUri())) return false;
if (!getAccessibilityText().equals(other.getAccessibilityText())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + IMAGE_URI_FIELD_NUMBER;
hash = (53 * hash) + getImageUri().hashCode();
hash = (37 * hash) + ACCESSIBILITY_TEXT_FIELD_NUMBER;
hash = (53 * hash) + getAccessibilityText().hashCode();
hash = (29 * hash) + getUnknownFields().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);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.Image prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* The 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;
}
@java.lang.Override
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() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
imageUri_ = "";
accessibilityText_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_Image_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.Image getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.dialogflow.v2.Intent.Message.Image result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.imageUri_ = imageUri_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.accessibilityText_ = accessibilityText_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.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_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getAccessibilityText().isEmpty()) {
accessibilityText_ = other.accessibilityText_;
bitField0_ |= 0x00000002;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
imageUri_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
accessibilityText_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object imageUri_ = "";
/**
*
*
*
* Optional. The public URI to an image file.
*
*
* string image_uri = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The imageUri.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for imageUri.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The imageUri to set.
* @return This builder for chaining.
*/
public Builder setImageUri(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
imageUri_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Optional. The public URI to an image file.
*
*
* string image_uri = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearImageUri() {
imageUri_ = getDefaultInstance().getImageUri();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Optional. The public URI to an image file.
*
*
* string image_uri = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for imageUri to set.
* @return This builder for chaining.
*/
public Builder setImageUriBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
imageUri_ = value;
bitField0_ |= 0x00000001;
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The accessibilityText.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for accessibilityText.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The accessibilityText to set.
* @return This builder for chaining.
*/
public Builder setAccessibilityText(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
accessibilityText_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. A text description of the image to be used for accessibility,
* e.g., screen readers.
*
*
* string accessibility_text = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearAccessibilityText() {
accessibilityText_ = getDefaultInstance().getAccessibilityText();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Optional. A text description of the image to be used for accessibility,
* e.g., screen readers.
*
*
* string accessibility_text = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for accessibilityText to set.
* @return This builder for chaining.
*/
public Builder setAccessibilityTextBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
accessibilityText_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.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() {
@java.lang.Override
public Image parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The title.
*/
java.lang.String getTitle();
/**
*
*
*
* Optional. The title of the collection of quick replies.
*
*
* string title = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for title.
*/
com.google.protobuf.ByteString getTitleBytes();
/**
*
*
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the quickReplies.
*/
java.util.List getQuickRepliesList();
/**
*
*
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of quickReplies.
*/
int getQuickRepliesCount();
/**
*
*
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The quickReplies at the given index.
*/
java.lang.String getQuickReplies(int index);
/**
*
*
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the quickReplies at the given index.
*/
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.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new QuickReplies();
}
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;
}
@java.lang.Override
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);
}
public static final int TITLE_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object title_ = "";
/**
*
*
*
* Optional. The title of the collection of quick replies.
*
*
* string title = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The title.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for title.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList quickReplies_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the quickReplies.
*/
public com.google.protobuf.ProtocolStringList getQuickRepliesList() {
return quickReplies_;
}
/**
*
*
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of quickReplies.
*/
public int getQuickRepliesCount() {
return quickReplies_.size();
}
/**
*
*
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The quickReplies at the given index.
*/
public java.lang.String getQuickReplies(int index) {
return quickReplies_.get(index);
}
/**
*
*
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the quickReplies at the given index.
*/
public com.google.protobuf.ByteString getQuickRepliesBytes(int index) {
return quickReplies_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
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));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
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 += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.v2.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;
if (!getTitle().equals(other.getTitle())) return false;
if (!getQuickRepliesList().equals(other.getQuickRepliesList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + 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) + getUnknownFields().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);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* The 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;
}
@java.lang.Override
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() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
title_ = "";
quickReplies_ = com.google.protobuf.LazyStringArrayList.emptyList();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_QuickReplies_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.title_ = title_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
quickReplies_.makeImmutable();
result.quickReplies_ = quickReplies_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.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_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.quickReplies_.isEmpty()) {
if (quickReplies_.isEmpty()) {
quickReplies_ = other.quickReplies_;
bitField0_ |= 0x00000002;
} else {
ensureQuickRepliesIsMutable();
quickReplies_.addAll(other.quickReplies_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
title_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
java.lang.String s = input.readStringRequireUtf8();
ensureQuickRepliesIsMutable();
quickReplies_.add(s);
break;
} // case 18
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object title_ = "";
/**
*
*
*
* Optional. The title of the collection of quick replies.
*
*
* string title = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The title.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for title.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The title to set.
* @return This builder for chaining.
*/
public Builder setTitle(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
title_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Optional. The title of the collection of quick replies.
*
*
* string title = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearTitle() {
title_ = getDefaultInstance().getTitle();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Optional. The title of the collection of quick replies.
*
*
* string title = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for title to set.
* @return This builder for chaining.
*/
public Builder setTitleBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
title_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList quickReplies_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureQuickRepliesIsMutable() {
if (!quickReplies_.isModifiable()) {
quickReplies_ = new com.google.protobuf.LazyStringArrayList(quickReplies_);
}
bitField0_ |= 0x00000002;
}
/**
*
*
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the quickReplies.
*/
public com.google.protobuf.ProtocolStringList getQuickRepliesList() {
quickReplies_.makeImmutable();
return quickReplies_;
}
/**
*
*
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of quickReplies.
*/
public int getQuickRepliesCount() {
return quickReplies_.size();
}
/**
*
*
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The quickReplies at the given index.
*/
public java.lang.String getQuickReplies(int index) {
return quickReplies_.get(index);
}
/**
*
*
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the quickReplies at the given index.
*/
public com.google.protobuf.ByteString getQuickRepliesBytes(int index) {
return quickReplies_.getByteString(index);
}
/**
*
*
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index to set the value at.
* @param value The quickReplies to set.
* @return This builder for chaining.
*/
public Builder setQuickReplies(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureQuickRepliesIsMutable();
quickReplies_.set(index, value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The quickReplies to add.
* @return This builder for chaining.
*/
public Builder addQuickReplies(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureQuickRepliesIsMutable();
quickReplies_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param values The quickReplies to add.
* @return This builder for chaining.
*/
public Builder addAllQuickReplies(java.lang.Iterable values) {
ensureQuickRepliesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, quickReplies_);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearQuickReplies() {
quickReplies_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
;
onChanged();
return this;
}
/**
*
*
*
* Optional. The collection of quick replies.
*
*
* repeated string quick_replies = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes of the quickReplies to add.
* @return This builder for chaining.
*/
public Builder addQuickRepliesBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureQuickRepliesIsMutable();
quickReplies_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.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() {
@java.lang.Override
public QuickReplies parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The title.
*/
java.lang.String getTitle();
/**
*
*
*
* Optional. The title of the card.
*
*
* string title = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for title.
*/
com.google.protobuf.ByteString getTitleBytes();
/**
*
*
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The subtitle.
*/
java.lang.String getSubtitle();
/**
*
*
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for subtitle.
*/
com.google.protobuf.ByteString getSubtitleBytes();
/**
*
*
*
* Optional. The public URI to an image file for the card.
*
*
* string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The imageUri.
*/
java.lang.String getImageUri();
/**
*
*
*
* Optional. The public URI to an image file for the card.
*
*
* string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for imageUri.
*/
com.google.protobuf.ByteString getImageUriBytes();
/**
*
*
*
* Optional. The collection of card buttons.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
java.util.List getButtonsList();
/**
*
*
*
* Optional. The collection of card buttons.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
int getButtonsCount();
/**
*
*
*
* Optional. The collection of card buttons.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Card();
}
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;
}
@java.lang.Override
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The text.
*/
java.lang.String getText();
/**
*
*
*
* Optional. The text to show on the button.
*
*
* string text = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for text.
*/
com.google.protobuf.ByteString getTextBytes();
/**
*
*
*
* Optional. The text to send back to the Dialogflow API or a URI to
* open.
*
*
* string postback = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The postback.
*/
java.lang.String getPostback();
/**
*
*
*
* Optional. The text to send back to the Dialogflow API or a URI to
* open.
*
*
* string postback = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for postback.
*/
com.google.protobuf.ByteString getPostbackBytes();
}
/**
*
*
*
* 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
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Button();
}
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;
}
@java.lang.Override
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;
@SuppressWarnings("serial")
private volatile java.lang.Object text_ = "";
/**
*
*
*
* Optional. The text to show on the button.
*
*
* string text = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The text.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for text.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
private volatile java.lang.Object postback_ = "";
/**
*
*
*
* Optional. The text to send back to the Dialogflow API or a URI to
* open.
*
*
* string postback = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The postback.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for postback.
*/
@java.lang.Override
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;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(postback_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, postback_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(postback_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, postback_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.v2.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;
if (!getText().equals(other.getText())) return false;
if (!getPostback().equals(other.getPostback())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TEXT_FIELD_NUMBER;
hash = (53 * hash) + getText().hashCode();
hash = (37 * hash) + POSTBACK_FIELD_NUMBER;
hash = (53 * hash) + getPostback().hashCode();
hash = (29 * hash) + getUnknownFields().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);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.Card.Button prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* 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;
}
@java.lang.Override
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() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
text_ = "";
postback_ = "";
return this;
}
@java.lang.Override
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;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.Card.Button
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.Card.Button.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.v2.Intent.Message.Card.Button result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.text_ = text_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.postback_ = postback_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.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_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getPostback().isEmpty()) {
postback_ = other.postback_;
bitField0_ |= 0x00000002;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
text_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
postback_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object text_ = "";
/**
*
*
*
* Optional. The text to show on the button.
*
*
* string text = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The text.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for text.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The text to set.
* @return This builder for chaining.
*/
public Builder setText(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
text_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Optional. The text to show on the button.
*
*
* string text = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearText() {
text_ = getDefaultInstance().getText();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Optional. The text to show on the button.
*
*
* string text = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for text to set.
* @return This builder for chaining.
*/
public Builder setTextBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
text_ = value;
bitField0_ |= 0x00000001;
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The postback.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for postback.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The postback to set.
* @return This builder for chaining.
*/
public Builder setPostback(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
postback_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. The text to send back to the Dialogflow API or a URI to
* open.
*
*
* string postback = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearPostback() {
postback_ = getDefaultInstance().getPostback();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Optional. The text to send back to the Dialogflow API or a URI to
* open.
*
*
* string postback = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for postback to set.
* @return This builder for chaining.
*/
public Builder setPostbackBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
postback_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.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() {
@java.lang.Override
public Button parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.Card.Button
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int TITLE_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object title_ = "";
/**
*
*
*
* Optional. The title of the card.
*
*
* string title = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The title.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for title.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
private volatile java.lang.Object subtitle_ = "";
/**
*
*
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The subtitle.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for subtitle.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
private volatile java.lang.Object imageUri_ = "";
/**
*
*
*
* Optional. The public URI to an image file for the card.
*
*
* string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The imageUri.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for imageUri.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
private java.util.List buttons_;
/**
*
*
*
* Optional. The collection of card buttons.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List
getButtonsList() {
return buttons_;
}
/**
*
*
*
* Optional. The collection of card buttons.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public int getButtonsCount() {
return buttons_.size();
}
/**
*
*
*
* Optional. The collection of card buttons.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.Card.ButtonOrBuilder getButtonsOrBuilder(
int index) {
return buttons_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subtitle_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, subtitle_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, imageUri_);
}
for (int i = 0; i < buttons_.size(); i++) {
output.writeMessage(4, buttons_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subtitle_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, subtitle_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) {
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 += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.v2.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;
if (!getTitle().equals(other.getTitle())) return false;
if (!getSubtitle().equals(other.getSubtitle())) return false;
if (!getImageUri().equals(other.getImageUri())) return false;
if (!getButtonsList().equals(other.getButtonsList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + 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) + getUnknownFields().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);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.Card prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* The 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;
}
@java.lang.Override
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() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
title_ = "";
subtitle_ = "";
imageUri_ = "";
if (buttonsBuilder_ == null) {
buttons_ = java.util.Collections.emptyList();
} else {
buttons_ = null;
buttonsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_Card_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.Card getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.Card.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.dialogflow.v2.Intent.Message.Card result) {
if (buttonsBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)) {
buttons_ = java.util.Collections.unmodifiableList(buttons_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.buttons_ = buttons_;
} else {
result.buttons_ = buttonsBuilder_.build();
}
}
private void buildPartial0(com.google.cloud.dialogflow.v2.Intent.Message.Card result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.title_ = title_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.subtitle_ = subtitle_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.imageUri_ = imageUri_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.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_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getSubtitle().isEmpty()) {
subtitle_ = other.subtitle_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getImageUri().isEmpty()) {
imageUri_ = other.imageUri_;
bitField0_ |= 0x00000004;
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.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
title_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
subtitle_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
imageUri_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
com.google.cloud.dialogflow.v2.Intent.Message.Card.Button m =
input.readMessage(
com.google.cloud.dialogflow.v2.Intent.Message.Card.Button.parser(),
extensionRegistry);
if (buttonsBuilder_ == null) {
ensureButtonsIsMutable();
buttons_.add(m);
} else {
buttonsBuilder_.addMessage(m);
}
break;
} // case 34
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object title_ = "";
/**
*
*
*
* Optional. The title of the card.
*
*
* string title = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The title.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for title.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The title to set.
* @return This builder for chaining.
*/
public Builder setTitle(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
title_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Optional. The title of the card.
*
*
* string title = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearTitle() {
title_ = getDefaultInstance().getTitle();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Optional. The title of the card.
*
*
* string title = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for title to set.
* @return This builder for chaining.
*/
public Builder setTitleBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
title_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object subtitle_ = "";
/**
*
*
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The subtitle.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for subtitle.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The subtitle to set.
* @return This builder for chaining.
*/
public Builder setSubtitle(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
subtitle_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearSubtitle() {
subtitle_ = getDefaultInstance().getSubtitle();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for subtitle to set.
* @return This builder for chaining.
*/
public Builder setSubtitleBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
subtitle_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object imageUri_ = "";
/**
*
*
*
* Optional. The public URI to an image file for the card.
*
*
* string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The imageUri.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for imageUri.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The imageUri to set.
* @return This builder for chaining.
*/
public Builder setImageUri(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
imageUri_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Optional. The public URI to an image file for the card.
*
*
* string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearImageUri() {
imageUri_ = getDefaultInstance().getImageUri();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* Optional. The public URI to an image file for the card.
*
*
* string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for imageUri to set.
* @return This builder for chaining.
*/
public Builder setImageUriBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
imageUri_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private java.util.List buttons_ =
java.util.Collections.emptyList();
private void ensureButtonsIsMutable() {
if (!((bitField0_ & 0x00000008) != 0)) {
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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) != 0), getParentForChildren(), isClean());
buttons_ = null;
}
return buttonsBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.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() {
@java.lang.Override
public Card parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.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;
*
* @return The textToSpeech.
*/
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;
*
* @return The bytes for textToSpeech.
*/
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;
*
* @return The ssml.
*/
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;
*
* @return The bytes for ssml.
*/
com.google.protobuf.ByteString getSsmlBytes();
/**
*
*
*
* Optional. The text to display.
*
*
* string display_text = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The displayText.
*/
java.lang.String getDisplayText();
/**
*
*
*
* Optional. The text to display.
*
*
* string display_text = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for displayText.
*/
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
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new SimpleResponse();
}
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;
}
@java.lang.Override
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;
@SuppressWarnings("serial")
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;
*
* @return The textToSpeech.
*/
@java.lang.Override
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;
*
* @return The bytes for textToSpeech.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
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;
*
* @return The ssml.
*/
@java.lang.Override
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;
*
* @return The bytes for ssml.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
private volatile java.lang.Object displayText_ = "";
/**
*
*
*
* Optional. The text to display.
*
*
* string display_text = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The displayText.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for displayText.
*/
@java.lang.Override
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;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(textToSpeech_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, textToSpeech_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ssml_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ssml_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayText_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, displayText_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(textToSpeech_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, textToSpeech_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ssml_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ssml_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayText_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, displayText_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.v2.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;
if (!getTextToSpeech().equals(other.getTextToSpeech())) return false;
if (!getSsml().equals(other.getSsml())) return false;
if (!getDisplayText().equals(other.getDisplayText())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + 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) + getUnknownFields().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);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* The 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;
}
@java.lang.Override
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() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
textToSpeech_ = "";
ssml_ = "";
displayText_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_SimpleResponse_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.textToSpeech_ = textToSpeech_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.ssml_ = ssml_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.displayText_ = displayText_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.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_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getSsml().isEmpty()) {
ssml_ = other.ssml_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getDisplayText().isEmpty()) {
displayText_ = other.displayText_;
bitField0_ |= 0x00000004;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
textToSpeech_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
ssml_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
displayText_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
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;
*
* @return The textToSpeech.
*/
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;
*
* @return The bytes for textToSpeech.
*/
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;
*
* @param value The textToSpeech to set.
* @return This builder for chaining.
*/
public Builder setTextToSpeech(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
textToSpeech_ = value;
bitField0_ |= 0x00000001;
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;
*
* @return This builder for chaining.
*/
public Builder clearTextToSpeech() {
textToSpeech_ = getDefaultInstance().getTextToSpeech();
bitField0_ = (bitField0_ & ~0x00000001);
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;
*
* @param value The bytes for textToSpeech to set.
* @return This builder for chaining.
*/
public Builder setTextToSpeechBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
textToSpeech_ = value;
bitField0_ |= 0x00000001;
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;
*
* @return The ssml.
*/
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;
*
* @return The bytes for ssml.
*/
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;
*
* @param value The ssml to set.
* @return This builder for chaining.
*/
public Builder setSsml(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ssml_ = value;
bitField0_ |= 0x00000002;
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;
*
* @return This builder for chaining.
*/
public Builder clearSsml() {
ssml_ = getDefaultInstance().getSsml();
bitField0_ = (bitField0_ & ~0x00000002);
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;
*
* @param value The bytes for ssml to set.
* @return This builder for chaining.
*/
public Builder setSsmlBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ssml_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object displayText_ = "";
/**
*
*
*
* Optional. The text to display.
*
*
* string display_text = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The displayText.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for displayText.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The displayText to set.
* @return This builder for chaining.
*/
public Builder setDisplayText(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
displayText_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Optional. The text to display.
*
*
* string display_text = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearDisplayText() {
displayText_ = getDefaultInstance().getDisplayText();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* Optional. The text to display.
*
*
* string display_text = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for displayText to set.
* @return This builder for chaining.
*/
public Builder setDisplayTextBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
displayText_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.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() {
@java.lang.Override
public SimpleResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.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 [(.google.api.field_behavior) = REQUIRED];
*
*/
java.util.List
getSimpleResponsesList();
/**
*
*
*
* Required. The list of simple responses.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
int getSimpleResponsesCount();
/**
*
*
*
* Required. The list of simple responses.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new SimpleResponses();
}
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;
}
@java.lang.Override
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;
@SuppressWarnings("serial")
private java.util.List
simpleResponses_;
/**
*
*
*
* Required. The list of simple responses.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public java.util.List
getSimpleResponsesList() {
return simpleResponses_;
}
/**
*
*
*
* Required. The list of simple responses.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public int getSimpleResponsesCount() {
return simpleResponses_.size();
}
/**
*
*
*
* Required. The list of simple responses.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.SimpleResponse simple_responses = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponseOrBuilder
getSimpleResponsesOrBuilder(int index) {
return simpleResponses_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
for (int i = 0; i < simpleResponses_.size(); i++) {
output.writeMessage(1, simpleResponses_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
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 += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.v2.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;
if (!getSimpleResponsesList().equals(other.getSimpleResponsesList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getSimpleResponsesCount() > 0) {
hash = (37 * hash) + SIMPLE_RESPONSES_FIELD_NUMBER;
hash = (53 * hash) + getSimpleResponsesList().hashCode();
}
hash = (29 * hash) + getUnknownFields().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);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* The 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;
}
@java.lang.Override
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() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (simpleResponsesBuilder_ == null) {
simpleResponses_ = java.util.Collections.emptyList();
} else {
simpleResponses_ = null;
simpleResponsesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_SimpleResponses_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses result) {
if (simpleResponsesBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
simpleResponses_ = java.util.Collections.unmodifiableList(simpleResponses_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.simpleResponses_ = simpleResponses_;
} else {
result.simpleResponses_ = simpleResponsesBuilder_.build();
}
}
private void buildPartial0(
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses result) {
int from_bitField0_ = bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.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.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse m =
input.readMessage(
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse.parser(),
extensionRegistry);
if (simpleResponsesBuilder_ == null) {
ensureSimpleResponsesIsMutable();
simpleResponses_.add(m);
} else {
simpleResponsesBuilder_.addMessage(m);
}
break;
} // case 10
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.util.List
simpleResponses_ = java.util.Collections.emptyList();
private void ensureSimpleResponsesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
simpleResponses_ =
new java.util.ArrayList<
com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponse>(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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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) != 0),
getParentForChildren(),
isClean());
simpleResponses_ = null;
}
return simpleResponsesBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.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() {
@java.lang.Override
public SimpleResponses parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The title.
*/
java.lang.String getTitle();
/**
*
*
*
* Optional. The title of the card.
*
*
* string title = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for title.
*/
com.google.protobuf.ByteString getTitleBytes();
/**
*
*
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The subtitle.
*/
java.lang.String getSubtitle();
/**
*
*
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for subtitle.
*/
com.google.protobuf.ByteString getSubtitleBytes();
/**
*
*
*
* Required, unless image is present. The body text of the card.
*
*
* string formatted_text = 3;
*
* @return The formattedText.
*/
java.lang.String getFormattedText();
/**
*
*
*
* Required, unless image is present. The body text of the card.
*
*
* string formatted_text = 3;
*
* @return The bytes for formattedText.
*/
com.google.protobuf.ByteString getFormattedTextBytes();
/**
*
*
*
* Optional. The image for the card.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the image field is set.
*/
boolean hasImage();
/**
*
*
*
* Optional. The image for the card.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The image.
*/
com.google.cloud.dialogflow.v2.Intent.Message.Image getImage();
/**
*
*
*
* Optional. The image for the card.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
java.util.List
getButtonsList();
/**
*
*
*
* Optional. The collection of card buttons.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
int getButtonsCount();
/**
*
*
*
* Optional. The collection of card buttons.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new BasicCard();
}
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;
}
@java.lang.Override
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;
*
* @return The title.
*/
java.lang.String getTitle();
/**
*
*
*
* Required. The title of the button.
*
*
* string title = 1;
*
* @return The bytes for title.
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return Whether the openUriAction field is set.
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The openUriAction.
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Button();
}
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;
}
@java.lang.Override
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;
*
* @return The uri.
*/
java.lang.String getUri();
/**
*
*
*
* Required. The HTTP or HTTPS scheme URI.
*
*
* string uri = 1;
*
* @return The bytes for uri.
*/
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
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new OpenUriAction();
}
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;
}
@java.lang.Override
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;
@SuppressWarnings("serial")
private volatile java.lang.Object uri_ = "";
/**
*
*
*
* Required. The HTTP or HTTPS scheme URI.
*
*
* string uri = 1;
*
* @return The uri.
*/
@java.lang.Override
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;
*
* @return The bytes for uri.
*/
@java.lang.Override
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;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uri_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uri_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj
instanceof
com.google.cloud.dialogflow.v2.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;
if (!getUri().equals(other.getUri())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + URI_FIELD_NUMBER;
hash = (53 * hash) + getUri().hashCode();
hash = (29 * hash) + getUnknownFields().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);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction
prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* 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;
}
@java.lang.Override
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() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
uri_ = "";
return this;
}
@java.lang.Override
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;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction
.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction
result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.uri_ = uri_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other
instanceof
com.google.cloud.dialogflow.v2.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_;
bitField0_ |= 0x00000001;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
uri_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object uri_ = "";
/**
*
*
*
* Required. The HTTP or HTTPS scheme URI.
*
*
* string uri = 1;
*
* @return The uri.
*/
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;
*
* @return The bytes for uri.
*/
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;
*
* @param value The uri to set.
* @return This builder for chaining.
*/
public Builder setUri(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
uri_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. The HTTP or HTTPS scheme URI.
*
*
* string uri = 1;
*
* @return This builder for chaining.
*/
public Builder clearUri() {
uri_ = getDefaultInstance().getUri();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Required. The HTTP or HTTPS scheme URI.
*
*
* string uri = 1;
*
* @param value The bytes for uri to set.
* @return This builder for chaining.
*/
public Builder setUriBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
uri_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.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() {
@java.lang.Override
public OpenUriAction parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int TITLE_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object title_ = "";
/**
*
*
*
* Required. The title of the button.
*
*
* string title = 1;
*
* @return The title.
*/
@java.lang.Override
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;
*
* @return The bytes for title.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return Whether the openUriAction field is set.
*/
@java.lang.Override
public boolean hasOpenUriAction() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Required. Action to take when a user taps on the button.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction open_uri_action = 2 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The openUriAction.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriActionOrBuilder
getOpenUriActionOrBuilder() {
return openUriAction_ == null
? com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction
.getDefaultInstance()
: openUriAction_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getOpenUriAction());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOpenUriAction());
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.v2.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;
if (!getTitle().equals(other.getTitle())) return false;
if (hasOpenUriAction() != other.hasOpenUriAction()) return false;
if (hasOpenUriAction()) {
if (!getOpenUriAction().equals(other.getOpenUriAction())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + 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) + getUnknownFields().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);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* The 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;
}
@java.lang.Override
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) {
getOpenUriActionFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
title_ = "";
openUriAction_ = null;
if (openUriActionBuilder_ != null) {
openUriActionBuilder_.dispose();
openUriActionBuilder_ = null;
}
return this;
}
@java.lang.Override
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;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button
.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.title_ = title_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.openUriAction_ =
openUriActionBuilder_ == null ? openUriAction_ : openUriActionBuilder_.build();
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.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_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasOpenUriAction()) {
mergeOpenUriAction(other.getOpenUriAction());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
title_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
input.readMessage(
getOpenUriActionFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object title_ = "";
/**
*
*
*
* Required. The title of the button.
*
*
* string title = 1;
*
* @return The title.
*/
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;
*
* @return The bytes for title.
*/
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;
*
* @param value The title to set.
* @return This builder for chaining.
*/
public Builder setTitle(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
title_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. The title of the button.
*
*
* string title = 1;
*
* @return This builder for chaining.
*/
public Builder clearTitle() {
title_ = getDefaultInstance().getTitle();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Required. The title of the button.
*
*
* string title = 1;
*
* @param value The bytes for title to set.
* @return This builder for chaining.
*/
public Builder setTitleBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
title_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction
openUriAction_;
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 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return Whether the openUriAction field is set.
*/
public boolean hasOpenUriAction() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Required. Action to take when a user taps on the button.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction open_uri_action = 2 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The openUriAction.
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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;
} else {
openUriActionBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder setOpenUriAction(
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction.Builder
builderForValue) {
if (openUriActionBuilder_ == null) {
openUriAction_ = builderForValue.build();
} else {
openUriActionBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder mergeOpenUriAction(
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction value) {
if (openUriActionBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)
&& openUriAction_ != null
&& openUriAction_
!= com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button
.OpenUriAction.getDefaultInstance()) {
getOpenUriActionBuilder().mergeFrom(value);
} else {
openUriAction_ = value;
}
} else {
openUriActionBuilder_.mergeFrom(value);
}
if (openUriAction_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder clearOpenUriAction() {
bitField0_ = (bitField0_ & ~0x00000002);
openUriAction_ = null;
if (openUriActionBuilder_ != null) {
openUriActionBuilder_.dispose();
openUriActionBuilder_ = null;
}
onChanged();
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.OpenUriAction
.Builder
getOpenUriActionBuilder() {
bitField0_ |= 0x00000002;
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.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() {
@java.lang.Override
public Button parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int TITLE_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object title_ = "";
/**
*
*
*
* Optional. The title of the card.
*
*
* string title = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The title.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for title.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
private volatile java.lang.Object subtitle_ = "";
/**
*
*
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The subtitle.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for subtitle.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
private volatile java.lang.Object formattedText_ = "";
/**
*
*
*
* Required, unless image is present. The body text of the card.
*
*
* string formatted_text = 3;
*
* @return The formattedText.
*/
@java.lang.Override
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;
*
* @return The bytes for formattedText.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the image field is set.
*/
@java.lang.Override
public boolean hasImage() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Optional. The image for the card.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The image.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder getImageOrBuilder() {
return image_ == null
? com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance()
: image_;
}
public static final int BUTTONS_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private java.util.List
buttons_;
/**
*
*
*
* Optional. The collection of card buttons.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List
getButtonsList() {
return buttons_;
}
/**
*
*
*
* Optional. The collection of card buttons.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public int getButtonsCount() {
return buttons_.size();
}
/**
*
*
*
* Optional. The collection of card buttons.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.ButtonOrBuilder
getButtonsOrBuilder(int index) {
return buttons_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subtitle_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, subtitle_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(formattedText_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, formattedText_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(4, getImage());
}
for (int i = 0; i < buttons_.size(); i++) {
output.writeMessage(5, buttons_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subtitle_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, subtitle_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(formattedText_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, formattedText_);
}
if (((bitField0_ & 0x00000001) != 0)) {
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 += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.v2.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;
if (!getTitle().equals(other.getTitle())) return false;
if (!getSubtitle().equals(other.getSubtitle())) return false;
if (!getFormattedText().equals(other.getFormattedText())) return false;
if (hasImage() != other.hasImage()) return false;
if (hasImage()) {
if (!getImage().equals(other.getImage())) return false;
}
if (!getButtonsList().equals(other.getButtonsList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + 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) + getUnknownFields().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);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* The 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;
}
@java.lang.Override
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) {
getImageFieldBuilder();
getButtonsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
title_ = "";
subtitle_ = "";
formattedText_ = "";
image_ = null;
if (imageBuilder_ != null) {
imageBuilder_.dispose();
imageBuilder_ = null;
}
if (buttonsBuilder_ == null) {
buttons_ = java.util.Collections.emptyList();
} else {
buttons_ = null;
buttonsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_BasicCard_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard result) {
if (buttonsBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0)) {
buttons_ = java.util.Collections.unmodifiableList(buttons_);
bitField0_ = (bitField0_ & ~0x00000010);
}
result.buttons_ = buttons_;
} else {
result.buttons_ = buttonsBuilder_.build();
}
}
private void buildPartial0(com.google.cloud.dialogflow.v2.Intent.Message.BasicCard result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.title_ = title_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.subtitle_ = subtitle_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.formattedText_ = formattedText_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000008) != 0)) {
result.image_ = imageBuilder_ == null ? image_ : imageBuilder_.build();
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.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_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getSubtitle().isEmpty()) {
subtitle_ = other.subtitle_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getFormattedText().isEmpty()) {
formattedText_ = other.formattedText_;
bitField0_ |= 0x00000004;
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.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
title_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
subtitle_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
formattedText_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
input.readMessage(getImageFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
case 42:
{
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button m =
input.readMessage(
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.parser(),
extensionRegistry);
if (buttonsBuilder_ == null) {
ensureButtonsIsMutable();
buttons_.add(m);
} else {
buttonsBuilder_.addMessage(m);
}
break;
} // case 42
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object title_ = "";
/**
*
*
*
* Optional. The title of the card.
*
*
* string title = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The title.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for title.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The title to set.
* @return This builder for chaining.
*/
public Builder setTitle(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
title_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Optional. The title of the card.
*
*
* string title = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearTitle() {
title_ = getDefaultInstance().getTitle();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Optional. The title of the card.
*
*
* string title = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for title to set.
* @return This builder for chaining.
*/
public Builder setTitleBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
title_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object subtitle_ = "";
/**
*
*
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The subtitle.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for subtitle.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The subtitle to set.
* @return This builder for chaining.
*/
public Builder setSubtitle(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
subtitle_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearSubtitle() {
subtitle_ = getDefaultInstance().getSubtitle();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Optional. The subtitle of the card.
*
*
* string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for subtitle to set.
* @return This builder for chaining.
*/
public Builder setSubtitleBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
subtitle_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object formattedText_ = "";
/**
*
*
*
* Required, unless image is present. The body text of the card.
*
*
* string formatted_text = 3;
*
* @return The formattedText.
*/
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;
*
* @return The bytes for formattedText.
*/
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;
*
* @param value The formattedText to set.
* @return This builder for chaining.
*/
public Builder setFormattedText(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
formattedText_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Required, unless image is present. The body text of the card.
*
*
* string formatted_text = 3;
*
* @return This builder for chaining.
*/
public Builder clearFormattedText() {
formattedText_ = getDefaultInstance().getFormattedText();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* Required, unless image is present. The body text of the card.
*
*
* string formatted_text = 3;
*
* @param value The bytes for formattedText to set.
* @return This builder for chaining.
*/
public Builder setFormattedTextBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
formattedText_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private com.google.cloud.dialogflow.v2.Intent.Message.Image image_;
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 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the image field is set.
*/
public boolean hasImage() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Optional. The image for the card.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The image.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setImage(com.google.cloud.dialogflow.v2.Intent.Message.Image value) {
if (imageBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
image_ = value;
} else {
imageBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Optional. The image for the card.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setImage(
com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder builderForValue) {
if (imageBuilder_ == null) {
image_ = builderForValue.build();
} else {
imageBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Optional. The image for the card.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder mergeImage(com.google.cloud.dialogflow.v2.Intent.Message.Image value) {
if (imageBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)
&& image_ != null
&& image_
!= com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance()) {
getImageBuilder().mergeFrom(value);
} else {
image_ = value;
}
} else {
imageBuilder_.mergeFrom(value);
}
if (image_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
*
*
* Optional. The image for the card.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearImage() {
bitField0_ = (bitField0_ & ~0x00000008);
image_ = null;
if (imageBuilder_ != null) {
imageBuilder_.dispose();
imageBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Optional. The image for the card.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder getImageBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getImageFieldBuilder().getBuilder();
}
/**
*
*
*
* Optional. The image for the card.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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) != 0)) {
buttons_ =
new java.util.ArrayList<
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button>(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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List<
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.Builder>
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) != 0), getParentForChildren(), isClean());
buttons_ = null;
}
return buttonsBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.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() {
@java.lang.Override
public BasicCard parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.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 [(.google.api.field_behavior) = REQUIRED];
*
* @return The title.
*/
java.lang.String getTitle();
/**
*
*
*
* Required. The text shown the in the suggestion chip.
*
*
* string title = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for title.
*/
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
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Suggestion();
}
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;
}
@java.lang.Override
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;
@SuppressWarnings("serial")
private volatile java.lang.Object title_ = "";
/**
*
*
*
* Required. The text shown the in the suggestion chip.
*
*
* string title = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The title.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for title.
*/
@java.lang.Override
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;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.v2.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;
if (!getTitle().equals(other.getTitle())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TITLE_FIELD_NUMBER;
hash = (53 * hash) + getTitle().hashCode();
hash = (29 * hash) + getUnknownFields().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);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.Suggestion prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* The 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;
}
@java.lang.Override
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() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
title_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_Suggestion_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.Suggestion
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.Suggestion.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.v2.Intent.Message.Suggestion result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.title_ = title_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.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_;
bitField0_ |= 0x00000001;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
title_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object title_ = "";
/**
*
*
*
* Required. The text shown the in the suggestion chip.
*
*
* string title = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The title.
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for title.
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The title to set.
* @return This builder for chaining.
*/
public Builder setTitle(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
title_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. The text shown the in the suggestion chip.
*
*
* string title = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearTitle() {
title_ = getDefaultInstance().getTitle();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Required. The text shown the in the suggestion chip.
*
*
* string title = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for title to set.
* @return This builder for chaining.
*/
public Builder setTitleBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
title_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.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() {
@java.lang.Override
public Suggestion parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.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 [(.google.api.field_behavior) = REQUIRED];
*
*/
java.util.List getSuggestionsList();
/**
*
*
*
* Required. The list of suggested replies.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
int getSuggestionsCount();
/**
*
*
*
* Required. The list of suggested replies.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Suggestions();
}
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;
}
@java.lang.Override
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;
@SuppressWarnings("serial")
private java.util.List suggestions_;
/**
*
*
*
* Required. The list of suggested replies.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public java.util.List
getSuggestionsList() {
return suggestions_;
}
/**
*
*
*
* Required. The list of suggested replies.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public int getSuggestionsCount() {
return suggestions_.size();
}
/**
*
*
*
* Required. The list of suggested replies.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.Suggestion suggestions = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.SuggestionOrBuilder
getSuggestionsOrBuilder(int index) {
return suggestions_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
for (int i = 0; i < suggestions_.size(); i++) {
output.writeMessage(1, suggestions_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
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 += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.v2.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;
if (!getSuggestionsList().equals(other.getSuggestionsList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getSuggestionsCount() > 0) {
hash = (37 * hash) + SUGGESTIONS_FIELD_NUMBER;
hash = (53 * hash) + getSuggestionsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().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);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.Suggestions prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* The 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;
}
@java.lang.Override
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() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (suggestionsBuilder_ == null) {
suggestions_ = java.util.Collections.emptyList();
} else {
suggestions_ = null;
suggestionsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_Suggestions_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.Suggestions
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.Suggestions.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.dialogflow.v2.Intent.Message.Suggestions result) {
if (suggestionsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
suggestions_ = java.util.Collections.unmodifiableList(suggestions_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.suggestions_ = suggestions_;
} else {
result.suggestions_ = suggestionsBuilder_.build();
}
}
private void buildPartial0(
com.google.cloud.dialogflow.v2.Intent.Message.Suggestions result) {
int from_bitField0_ = bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.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.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
com.google.cloud.dialogflow.v2.Intent.Message.Suggestion m =
input.readMessage(
com.google.cloud.dialogflow.v2.Intent.Message.Suggestion.parser(),
extensionRegistry);
if (suggestionsBuilder_ == null) {
ensureSuggestionsIsMutable();
suggestions_.add(m);
} else {
suggestionsBuilder_.addMessage(m);
}
break;
} // case 10
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.util.List
suggestions_ = java.util.Collections.emptyList();
private void ensureSuggestionsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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) != 0),
getParentForChildren(),
isClean());
suggestions_ = null;
}
return suggestionsBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.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() {
@java.lang.Override
public Suggestions parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.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 [(.google.api.field_behavior) = REQUIRED];
*
* @return The destinationName.
*/
java.lang.String getDestinationName();
/**
*
*
*
* Required. The name of the app or site this chip is linking to.
*
*
* string destination_name = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for destinationName.
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
* @return The uri.
*/
java.lang.String getUri();
/**
*
*
*
* Required. The URI of the app or site to open when the user taps the
* suggestion chip.
*
*
* string uri = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for uri.
*/
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
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new LinkOutSuggestion();
}
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;
}
@java.lang.Override
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;
@SuppressWarnings("serial")
private volatile java.lang.Object destinationName_ = "";
/**
*
*
*
* Required. The name of the app or site this chip is linking to.
*
*
* string destination_name = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The destinationName.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for destinationName.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
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 [(.google.api.field_behavior) = REQUIRED];
*
* @return The uri.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for uri.
*/
@java.lang.Override
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;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, destinationName_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uri_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, destinationName_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uri_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uri_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.v2.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;
if (!getDestinationName().equals(other.getDestinationName())) return false;
if (!getUri().equals(other.getUri())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + DESTINATION_NAME_FIELD_NUMBER;
hash = (53 * hash) + getDestinationName().hashCode();
hash = (37 * hash) + URI_FIELD_NUMBER;
hash = (53 * hash) + getUri().hashCode();
hash = (29 * hash) + getUnknownFields().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);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* The 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;
}
@java.lang.Override
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() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
destinationName_ = "";
uri_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_LinkOutSuggestion_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion
.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.destinationName_ = destinationName_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.uri_ = uri_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.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_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getUri().isEmpty()) {
uri_ = other.uri_;
bitField0_ |= 0x00000002;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
destinationName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
uri_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object destinationName_ = "";
/**
*
*
*
* Required. The name of the app or site this chip is linking to.
*
*
* string destination_name = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The destinationName.
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for destinationName.
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The destinationName to set.
* @return This builder for chaining.
*/
public Builder setDestinationName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
destinationName_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. The name of the app or site this chip is linking to.
*
*
* string destination_name = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearDestinationName() {
destinationName_ = getDefaultInstance().getDestinationName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Required. The name of the app or site this chip is linking to.
*
*
* string destination_name = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for destinationName to set.
* @return This builder for chaining.
*/
public Builder setDestinationNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
destinationName_ = value;
bitField0_ |= 0x00000001;
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 [(.google.api.field_behavior) = REQUIRED];
*
* @return The uri.
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for uri.
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The uri to set.
* @return This builder for chaining.
*/
public Builder setUri(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
uri_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Required. The URI of the app or site to open when the user taps the
* suggestion chip.
*
*
* string uri = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearUri() {
uri_ = getDefaultInstance().getUri();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Required. The URI of the app or site to open when the user taps the
* suggestion chip.
*
*
* string uri = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for uri to set.
* @return This builder for chaining.
*/
public Builder setUriBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
uri_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.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() {
@java.lang.Override
public LinkOutSuggestion parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The title.
*/
java.lang.String getTitle();
/**
*
*
*
* Optional. The overall title of the list.
*
*
* string title = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for title.
*/
com.google.protobuf.ByteString getTitleBytes();
/**
*
*
*
* Required. List items.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2 [(.google.api.field_behavior) = REQUIRED];
*
*/
java.util.List getItemsList();
/**
*
*
*
* Required. List items.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
int getItemsCount();
/**
*
*
*
* Required. List items.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.ItemOrBuilder getItemsOrBuilder(
int index);
/**
*
*
*
* Optional. Subtitle of the list.
*
*
* string subtitle = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The subtitle.
*/
java.lang.String getSubtitle();
/**
*
*
*
* Optional. Subtitle of the list.
*
*
* string subtitle = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for subtitle.
*/
com.google.protobuf.ByteString getSubtitleBytes();
}
/**
*
*
*
* 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();
subtitle_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new ListSelect();
}
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;
}
@java.lang.Override
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 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return Whether the info field is set.
*/
boolean hasInfo();
/**
*
*
*
* Required. Additional information about this option.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The info.
*/
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo getInfo();
/**
*
*
*
* Required. Additional information about this option.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfoOrBuilder getInfoOrBuilder();
/**
*
*
*
* Required. The title of the list item.
*
*
* string title = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The title.
*/
java.lang.String getTitle();
/**
*
*
*
* Required. The title of the list item.
*
*
* string title = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for title.
*/
com.google.protobuf.ByteString getTitleBytes();
/**
*
*
*
* Optional. The main text describing the item.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The description.
*/
java.lang.String getDescription();
/**
*
*
*
* Optional. The main text describing the item.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for description.
*/
com.google.protobuf.ByteString getDescriptionBytes();
/**
*
*
*
* Optional. The image to display.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the image field is set.
*/
boolean hasImage();
/**
*
*
*
* Optional. The image to display.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The image.
*/
com.google.cloud.dialogflow.v2.Intent.Message.Image getImage();
/**
*
*
*
* Optional. The image to display.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Item();
}
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;
}
@java.lang.Override
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);
}
private int bitField0_;
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 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return Whether the info field is set.
*/
@java.lang.Override
public boolean hasInfo() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Required. Additional information about this option.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The info.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfoOrBuilder
getInfoOrBuilder() {
return info_ == null
? com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.getDefaultInstance()
: info_;
}
public static final int TITLE_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object title_ = "";
/**
*
*
*
* Required. The title of the list item.
*
*
* string title = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The title.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for title.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
private volatile java.lang.Object description_ = "";
/**
*
*
*
* Optional. The main text describing the item.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The description.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for description.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the image field is set.
*/
@java.lang.Override
public boolean hasImage() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Optional. The image to display.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The image.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder getImageOrBuilder() {
return image_ == null
? com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance()
: image_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getInfo());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, title_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(4, getImage());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInfo());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, title_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getImage());
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.v2.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;
if (hasInfo() != other.hasInfo()) return false;
if (hasInfo()) {
if (!getInfo().equals(other.getInfo())) return false;
}
if (!getTitle().equals(other.getTitle())) return false;
if (!getDescription().equals(other.getDescription())) return false;
if (hasImage() != other.hasImage()) return false;
if (hasImage()) {
if (!getImage().equals(other.getImage())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
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) + getUnknownFields().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);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* 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;
}
@java.lang.Override
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) {
getInfoFieldBuilder();
getImageFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
info_ = null;
if (infoBuilder_ != null) {
infoBuilder_.dispose();
infoBuilder_ = null;
}
title_ = "";
description_ = "";
image_ = null;
if (imageBuilder_ != null) {
imageBuilder_.dispose();
imageBuilder_ = null;
}
return this;
}
@java.lang.Override
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;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item
.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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 (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.info_ = infoBuilder_ == null ? info_ : infoBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.title_ = title_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.description_ = description_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.image_ = imageBuilder_ == null ? image_ : imageBuilder_.build();
to_bitField0_ |= 0x00000002;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.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_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.hasImage()) {
mergeImage(other.getImage());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
input.readMessage(getInfoFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
title_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
description_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
input.readMessage(getImageFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info_;
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 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return Whether the info field is set.
*/
public boolean hasInfo() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Required. Additional information about this option.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The info.
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder setInfo(
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo value) {
if (infoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
info_ = value;
} else {
infoBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. Additional information about this option.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder setInfo(
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.Builder
builderForValue) {
if (infoBuilder_ == null) {
info_ = builderForValue.build();
} else {
infoBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. Additional information about this option.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder mergeInfo(
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo value) {
if (infoBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)
&& info_ != null
&& info_
!= com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo
.getDefaultInstance()) {
getInfoBuilder().mergeFrom(value);
} else {
info_ = value;
}
} else {
infoBuilder_.mergeFrom(value);
}
if (info_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
*
*
* Required. Additional information about this option.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder clearInfo() {
bitField0_ = (bitField0_ & ~0x00000001);
info_ = null;
if (infoBuilder_ != null) {
infoBuilder_.dispose();
infoBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Required. Additional information about this option.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.Builder
getInfoBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getInfoFieldBuilder().getBuilder();
}
/**
*
*
*
* Required. Additional information about this option.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
* @return The title.
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for title.
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The title to set.
* @return This builder for chaining.
*/
public Builder setTitle(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
title_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Required. The title of the list item.
*
*
* string title = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearTitle() {
title_ = getDefaultInstance().getTitle();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Required. The title of the list item.
*
*
* string title = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for title to set.
* @return This builder for chaining.
*/
public Builder setTitleBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
title_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
*
*
*
* Optional. The main text describing the item.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The description.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for description.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Optional. The main text describing the item.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* Optional. The main text describing the item.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private com.google.cloud.dialogflow.v2.Intent.Message.Image image_;
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 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the image field is set.
*/
public boolean hasImage() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Optional. The image to display.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The image.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setImage(com.google.cloud.dialogflow.v2.Intent.Message.Image value) {
if (imageBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
image_ = value;
} else {
imageBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Optional. The image to display.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setImage(
com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder builderForValue) {
if (imageBuilder_ == null) {
image_ = builderForValue.build();
} else {
imageBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Optional. The image to display.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder mergeImage(com.google.cloud.dialogflow.v2.Intent.Message.Image value) {
if (imageBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)
&& image_ != null
&& image_
!= com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance()) {
getImageBuilder().mergeFrom(value);
} else {
image_ = value;
}
} else {
imageBuilder_.mergeFrom(value);
}
if (image_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
*
*
* Optional. The image to display.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearImage() {
bitField0_ = (bitField0_ & ~0x00000008);
image_ = null;
if (imageBuilder_ != null) {
imageBuilder_.dispose();
imageBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Optional. The image to display.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder getImageBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getImageFieldBuilder().getBuilder();
}
/**
*
*
*
* Optional. The image to display.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.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
- () {
@java.lang.Override
public Item parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser
- parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser
- getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int TITLE_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object title_ = "";
/**
*
*
*
* Optional. The overall title of the list.
*
*
* string title = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The title.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for title.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
private java.util.List items_;
/**
*
*
*
* Required. List items.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public java.util.List
getItemsList() {
return items_;
}
/**
*
*
*
* Required. List items.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public int getItemsCount() {
return items_.size();
}
/**
*
*
*
* Required. List items.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.ItemOrBuilder
getItemsOrBuilder(int index) {
return items_.get(index);
}
public static final int SUBTITLE_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object subtitle_ = "";
/**
*
*
*
* Optional. Subtitle of the list.
*
*
* string subtitle = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The subtitle.
*/
@java.lang.Override
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. Subtitle of the list.
*
*
* string subtitle = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for subtitle.
*/
@java.lang.Override
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;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_);
}
for (int i = 0; i < items_.size(); i++) {
output.writeMessage(2, items_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subtitle_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, subtitle_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
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));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subtitle_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, subtitle_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.v2.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;
if (!getTitle().equals(other.getTitle())) return false;
if (!getItemsList().equals(other.getItemsList())) return false;
if (!getSubtitle().equals(other.getSubtitle())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TITLE_FIELD_NUMBER;
hash = (53 * hash) + getTitle().hashCode();
if (getItemsCount() > 0) {
hash = (37 * hash) + ITEMS_FIELD_NUMBER;
hash = (53 * hash) + getItemsList().hashCode();
}
hash = (37 * hash) + SUBTITLE_FIELD_NUMBER;
hash = (53 * hash) + getSubtitle().hashCode();
hash = (29 * hash) + getUnknownFields().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);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* The 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;
}
@java.lang.Override
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() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
title_ = "";
if (itemsBuilder_ == null) {
items_ = java.util.Collections.emptyList();
} else {
items_ = null;
itemsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
subtitle_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_ListSelect_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.ListSelect
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect result) {
if (itemsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
items_ = java.util.Collections.unmodifiableList(items_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.items_ = items_;
} else {
result.items_ = itemsBuilder_.build();
}
}
private void buildPartial0(
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.title_ = title_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.subtitle_ = subtitle_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.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_;
bitField0_ |= 0x00000001;
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_);
}
}
}
if (!other.getSubtitle().isEmpty()) {
subtitle_ = other.subtitle_;
bitField0_ |= 0x00000004;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
title_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item m =
input.readMessage(
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item.parser(),
extensionRegistry);
if (itemsBuilder_ == null) {
ensureItemsIsMutable();
items_.add(m);
} else {
itemsBuilder_.addMessage(m);
}
break;
} // case 18
case 26:
{
subtitle_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object title_ = "";
/**
*
*
*
* Optional. The overall title of the list.
*
*
* string title = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The title.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for title.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The title to set.
* @return This builder for chaining.
*/
public Builder setTitle(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
title_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Optional. The overall title of the list.
*
*
* string title = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearTitle() {
title_ = getDefaultInstance().getTitle();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Optional. The overall title of the list.
*
*
* string title = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for title to set.
* @return This builder for chaining.
*/
public Builder setTitleBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
title_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.util.List
items_ = java.util.Collections.emptyList();
private void ensureItemsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
items_ =
new java.util.ArrayList<
com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item>(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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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) != 0), getParentForChildren(), isClean());
items_ = null;
}
return itemsBuilder_;
}
private java.lang.Object subtitle_ = "";
/**
*
*
*
* Optional. Subtitle of the list.
*
*
* string subtitle = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The subtitle.
*/
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. Subtitle of the list.
*
*
* string subtitle = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for subtitle.
*/
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. Subtitle of the list.
*
*
* string subtitle = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The subtitle to set.
* @return This builder for chaining.
*/
public Builder setSubtitle(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
subtitle_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Optional. Subtitle of the list.
*
*
* string subtitle = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearSubtitle() {
subtitle_ = getDefaultInstance().getSubtitle();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* Optional. Subtitle of the list.
*
*
* string subtitle = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for subtitle to set.
* @return This builder for chaining.
*/
public Builder setSubtitleBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
subtitle_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.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() {
@java.lang.Override
public ListSelect parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.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 [(.google.api.field_behavior) = REQUIRED];
*
*/
java.util.List
getItemsList();
/**
*
*
*
* Required. Carousel items.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
int getItemsCount();
/**
*
*
*
* Required. Carousel items.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new CarouselSelect();
}
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;
}
@java.lang.Override
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 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return Whether the info field is set.
*/
boolean hasInfo();
/**
*
*
*
* Required. Additional info about the option item.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The info.
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfoOrBuilder getInfoOrBuilder();
/**
*
*
*
* Required. Title of the carousel item.
*
*
* string title = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The title.
*/
java.lang.String getTitle();
/**
*
*
*
* Required. Title of the carousel item.
*
*
* string title = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for title.
*/
com.google.protobuf.ByteString getTitleBytes();
/**
*
*
*
* Optional. The body text of the card.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The description.
*/
java.lang.String getDescription();
/**
*
*
*
* Optional. The body text of the card.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for description.
*/
com.google.protobuf.ByteString getDescriptionBytes();
/**
*
*
*
* Optional. The image to display.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the image field is set.
*/
boolean hasImage();
/**
*
*
*
* Optional. The image to display.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The image.
*/
com.google.cloud.dialogflow.v2.Intent.Message.Image getImage();
/**
*
*
*
* Optional. The image to display.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Item();
}
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;
}
@java.lang.Override
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);
}
private int bitField0_;
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 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return Whether the info field is set.
*/
@java.lang.Override
public boolean hasInfo() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Required. Additional info about the option item.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The info.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfoOrBuilder
getInfoOrBuilder() {
return info_ == null
? com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.getDefaultInstance()
: info_;
}
public static final int TITLE_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object title_ = "";
/**
*
*
*
* Required. Title of the carousel item.
*
*
* string title = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return The title.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for title.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
private volatile java.lang.Object description_ = "";
/**
*
*
*
* Optional. The body text of the card.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The description.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for description.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the image field is set.
*/
@java.lang.Override
public boolean hasImage() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Optional. The image to display.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The image.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder getImageOrBuilder() {
return image_ == null
? com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance()
: image_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getInfo());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, title_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(4, getImage());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getInfo());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, title_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getImage());
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.v2.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;
if (hasInfo() != other.hasInfo()) return false;
if (hasInfo()) {
if (!getInfo().equals(other.getInfo())) return false;
}
if (!getTitle().equals(other.getTitle())) return false;
if (!getDescription().equals(other.getDescription())) return false;
if (hasImage() != other.hasImage()) return false;
if (hasImage()) {
if (!getImage().equals(other.getImage())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
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) + getUnknownFields().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);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* 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;
}
@java.lang.Override
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) {
getInfoFieldBuilder();
getImageFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
info_ = null;
if (infoBuilder_ != null) {
infoBuilder_.dispose();
infoBuilder_ = null;
}
title_ = "";
description_ = "";
image_ = null;
if (imageBuilder_ != null) {
imageBuilder_.dispose();
imageBuilder_ = null;
}
return this;
}
@java.lang.Override
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;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item
.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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 (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.info_ = infoBuilder_ == null ? info_ : infoBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.title_ = title_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.description_ = description_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.image_ = imageBuilder_ == null ? image_ : imageBuilder_.build();
to_bitField0_ |= 0x00000002;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other
instanceof com.google.cloud.dialogflow.v2.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_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.hasImage()) {
mergeImage(other.getImage());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
input.readMessage(getInfoFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
title_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
description_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
input.readMessage(getImageFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info_;
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 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return Whether the info field is set.
*/
public boolean hasInfo() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Required. Additional info about the option item.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The info.
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder setInfo(
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo value) {
if (infoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
info_ = value;
} else {
infoBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. Additional info about the option item.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder setInfo(
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.Builder
builderForValue) {
if (infoBuilder_ == null) {
info_ = builderForValue.build();
} else {
infoBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. Additional info about the option item.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder mergeInfo(
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo value) {
if (infoBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)
&& info_ != null
&& info_
!= com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo
.getDefaultInstance()) {
getInfoBuilder().mergeFrom(value);
} else {
info_ = value;
}
} else {
infoBuilder_.mergeFrom(value);
}
if (info_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
*
*
* Required. Additional info about the option item.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public Builder clearInfo() {
bitField0_ = (bitField0_ & ~0x00000001);
info_ = null;
if (infoBuilder_ != null) {
infoBuilder_.dispose();
infoBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Required. Additional info about the option item.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.Builder
getInfoBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getInfoFieldBuilder().getBuilder();
}
/**
*
*
*
* Required. Additional info about the option item.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo info = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
* @return The title.
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for title.
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The title to set.
* @return This builder for chaining.
*/
public Builder setTitle(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
title_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Required. Title of the carousel item.
*
*
* string title = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearTitle() {
title_ = getDefaultInstance().getTitle();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Required. Title of the carousel item.
*
*
* string title = 2 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for title to set.
* @return This builder for chaining.
*/
public Builder setTitleBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
title_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
*
*
*
* Optional. The body text of the card.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The description.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for description.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Optional. The body text of the card.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* Optional. The body text of the card.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private com.google.cloud.dialogflow.v2.Intent.Message.Image image_;
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 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the image field is set.
*/
public boolean hasImage() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Optional. The image to display.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The image.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setImage(com.google.cloud.dialogflow.v2.Intent.Message.Image value) {
if (imageBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
image_ = value;
} else {
imageBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Optional. The image to display.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setImage(
com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder builderForValue) {
if (imageBuilder_ == null) {
image_ = builderForValue.build();
} else {
imageBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Optional. The image to display.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder mergeImage(com.google.cloud.dialogflow.v2.Intent.Message.Image value) {
if (imageBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)
&& image_ != null
&& image_
!= com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance()) {
getImageBuilder().mergeFrom(value);
} else {
image_ = value;
}
} else {
imageBuilder_.mergeFrom(value);
}
if (image_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
*
*
* Optional. The image to display.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearImage() {
bitField0_ = (bitField0_ & ~0x00000008);
image_ = null;
if (imageBuilder_ != null) {
imageBuilder_.dispose();
imageBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Optional. The image to display.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder getImageBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getImageFieldBuilder().getBuilder();
}
/**
*
*
*
* Optional. The image to display.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.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
- () {
@java.lang.Override
public Item parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser
- parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser
- getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int ITEMS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List
items_;
/**
*
*
*
* Required. Carousel items.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public java.util.List
getItemsList() {
return items_;
}
/**
*
*
*
* Required. Carousel items.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public int getItemsCount() {
return items_.size();
}
/**
*
*
*
* Required. Carousel items.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item items = 1 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.ItemOrBuilder
getItemsOrBuilder(int index) {
return items_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
for (int i = 0; i < items_.size(); i++) {
output.writeMessage(1, items_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
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 += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.v2.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;
if (!getItemsList().equals(other.getItemsList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getItemsCount() > 0) {
hash = (37 * hash) + ITEMS_FIELD_NUMBER;
hash = (53 * hash) + getItemsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().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);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* The 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;
}
@java.lang.Override
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() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (itemsBuilder_ == null) {
items_ = java.util.Collections.emptyList();
} else {
items_ = null;
itemsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_CarouselSelect_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect result) {
if (itemsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
items_ = java.util.Collections.unmodifiableList(items_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.items_ = items_;
} else {
result.items_ = itemsBuilder_.build();
}
}
private void buildPartial0(
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect result) {
int from_bitField0_ = bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.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.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item m =
input.readMessage(
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item
.parser(),
extensionRegistry);
if (itemsBuilder_ == null) {
ensureItemsIsMutable();
items_.add(m);
} else {
itemsBuilder_.addMessage(m);
}
break;
} // case 10
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.util.List
items_ = java.util.Collections.emptyList();
private void ensureItemsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
items_ =
new java.util.ArrayList<
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item>(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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
*/
public java.util.List<
com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Item.Builder>
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) != 0), getParentForChildren(), isClean());
items_ = null;
}
return itemsBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.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() {
@java.lang.Override
public CarouselSelect parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.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 [(.google.api.field_behavior) = REQUIRED];
*
* @return The key.
*/
java.lang.String getKey();
/**
*
*
*
* Required. A unique key that will be sent back to the agent if this
* response is given.
*
*
* string key = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for key.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the synonyms.
*/
java.util.List getSynonymsList();
/**
*
*
*
* Optional. A list of synonyms that can also be used to trigger this
* item in dialog.
*
*
* repeated string synonyms = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of synonyms.
*/
int getSynonymsCount();
/**
*
*
*
* Optional. A list of synonyms that can also be used to trigger this
* item in dialog.
*
*
* repeated string synonyms = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The synonyms at the given index.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the synonyms at the given index.
*/
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.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new SelectItemInfo();
}
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;
}
@java.lang.Override
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);
}
public static final int KEY_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
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 [(.google.api.field_behavior) = REQUIRED];
*
* @return The key.
*/
@java.lang.Override
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 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for key.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList synonyms_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Optional. A list of synonyms that can also be used to trigger this
* item in dialog.
*
*
* repeated string synonyms = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the synonyms.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of synonyms.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The synonyms at the given index.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the synonyms at the given index.
*/
public com.google.protobuf.ByteString getSynonymsBytes(int index) {
return synonyms_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) {
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));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) {
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 += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.v2.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;
if (!getKey().equals(other.getKey())) return false;
if (!getSynonymsList().equals(other.getSynonymsList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + 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) + getUnknownFields().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);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* 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;
}
@java.lang.Override
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() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
key_ = "";
synonyms_ = com.google.protobuf.LazyStringArrayList.emptyList();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_SelectItemInfo_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.key_ = key_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
synonyms_.makeImmutable();
result.synonyms_ = synonyms_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.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_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.synonyms_.isEmpty()) {
if (synonyms_.isEmpty()) {
synonyms_ = other.synonyms_;
bitField0_ |= 0x00000002;
} else {
ensureSynonymsIsMutable();
synonyms_.addAll(other.synonyms_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
key_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
java.lang.String s = input.readStringRequireUtf8();
ensureSynonymsIsMutable();
synonyms_.add(s);
break;
} // case 18
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int 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 [(.google.api.field_behavior) = REQUIRED];
*
* @return The key.
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
* @return The bytes for key.
*/
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 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The key to set.
* @return This builder for chaining.
*/
public Builder setKey(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
key_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. A unique key that will be sent back to the agent if this
* response is given.
*
*
* string key = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @return This builder for chaining.
*/
public Builder clearKey() {
key_ = getDefaultInstance().getKey();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Required. A unique key that will be sent back to the agent if this
* response is given.
*
*
* string key = 1 [(.google.api.field_behavior) = REQUIRED];
*
* @param value The bytes for key to set.
* @return This builder for chaining.
*/
public Builder setKeyBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
key_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList synonyms_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureSynonymsIsMutable() {
if (!synonyms_.isModifiable()) {
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return A list containing the synonyms.
*/
public com.google.protobuf.ProtocolStringList getSynonymsList() {
synonyms_.makeImmutable();
return synonyms_;
}
/**
*
*
*
* Optional. A list of synonyms that can also be used to trigger this
* item in dialog.
*
*
* repeated string synonyms = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The count of synonyms.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the element to return.
* @return The synonyms at the given index.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index of the value to return.
* @return The bytes of the synonyms at the given index.
*/
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param index The index to set the value at.
* @param value The synonyms to set.
* @return This builder for chaining.
*/
public Builder setSynonyms(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureSynonymsIsMutable();
synonyms_.set(index, value);
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The synonyms to add.
* @return This builder for chaining.
*/
public Builder addSynonyms(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureSynonymsIsMutable();
synonyms_.add(value);
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param values The synonyms to add.
* @return This builder for chaining.
*/
public Builder addAllSynonyms(java.lang.Iterable values) {
ensureSynonymsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, synonyms_);
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearSynonyms() {
synonyms_ = com.google.protobuf.LazyStringArrayList.emptyList();
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 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes of the synonyms to add.
* @return This builder for chaining.
*/
public Builder addSynonymsBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureSynonymsIsMutable();
synonyms_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.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() {
@java.lang.Override
public SelectItemInfo parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.SelectItemInfo
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface MediaContentOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.MediaContent)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Optional. What type of media is the content (ie "audio").
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType media_type = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for mediaType.
*/
int getMediaTypeValue();
/**
*
*
*
* Optional. What type of media is the content (ie "audio").
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType media_type = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The mediaType.
*/
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType getMediaType();
/**
*
*
*
* Required. List of media objects.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2;
*
*/
java.util.List
getMediaObjectsList();
/**
*
*
*
* Required. List of media objects.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2;
*
*/
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
getMediaObjects(int index);
/**
*
*
*
* Required. List of media objects.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2;
*
*/
int getMediaObjectsCount();
/**
*
*
*
* Required. List of media objects.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2;
*
*/
java.util.List<
? extends
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent
.ResponseMediaObjectOrBuilder>
getMediaObjectsOrBuilderList();
/**
*
*
*
* Required. List of media objects.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2;
*
*/
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObjectOrBuilder
getMediaObjectsOrBuilder(int index);
}
/**
*
*
*
* The media content card for Actions on Google.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.MediaContent}
*/
public static final class MediaContent extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.MediaContent)
MediaContentOrBuilder {
private static final long serialVersionUID = 0L;
// Use MediaContent.newBuilder() to construct.
private MediaContent(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private MediaContent() {
mediaType_ = 0;
mediaObjects_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new MediaContent();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_MediaContent_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_MediaContent_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.class,
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.Builder.class);
}
/**
*
*
*
* Format of response media type.
*
*
* Protobuf enum {@code
* google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType}
*/
public enum ResponseMediaType implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* Unspecified.
*
*
* RESPONSE_MEDIA_TYPE_UNSPECIFIED = 0;
*/
RESPONSE_MEDIA_TYPE_UNSPECIFIED(0),
/**
*
*
*
* Response media type is audio.
*
*
* AUDIO = 1;
*/
AUDIO(1),
UNRECOGNIZED(-1),
;
/**
*
*
*
* Unspecified.
*
*
* RESPONSE_MEDIA_TYPE_UNSPECIFIED = 0;
*/
public static final int RESPONSE_MEDIA_TYPE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Response media type is audio.
*
*
* AUDIO = 1;
*/
public static final int AUDIO_VALUE = 1;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ResponseMediaType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static ResponseMediaType forNumber(int value) {
switch (value) {
case 0:
return RESPONSE_MEDIA_TYPE_UNSPECIFIED;
case 1:
return AUDIO;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public ResponseMediaType findValueByNumber(int number) {
return ResponseMediaType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
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.MediaContent.getDescriptor()
.getEnumTypes()
.get(0);
}
private static final ResponseMediaType[] VALUES = values();
public static ResponseMediaType 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 ResponseMediaType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType)
}
public interface ResponseMediaObjectOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Required. Name of media card.
*
*
* string name = 1;
*
* @return The name.
*/
java.lang.String getName();
/**
*
*
*
* Required. Name of media card.
*
*
* string name = 1;
*
* @return The bytes for name.
*/
com.google.protobuf.ByteString getNameBytes();
/**
*
*
*
* Optional. Description of media card.
*
*
* string description = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The description.
*/
java.lang.String getDescription();
/**
*
*
*
* Optional. Description of media card.
*
*
* string description = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for description.
*/
com.google.protobuf.ByteString getDescriptionBytes();
/**
*
*
*
* Optional. Image to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image large_image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the largeImage field is set.
*/
boolean hasLargeImage();
/**
*
*
*
* Optional. Image to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image large_image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The largeImage.
*/
com.google.cloud.dialogflow.v2.Intent.Message.Image getLargeImage();
/**
*
*
*
* Optional. Image to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image large_image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder getLargeImageOrBuilder();
/**
*
*
*
* Optional. Icon to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image icon = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the icon field is set.
*/
boolean hasIcon();
/**
*
*
*
* Optional. Icon to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image icon = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The icon.
*/
com.google.cloud.dialogflow.v2.Intent.Message.Image getIcon();
/**
*
*
*
* Optional. Icon to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image icon = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder getIconOrBuilder();
/**
*
*
*
* Required. Url where the media is stored.
*
*
* string content_url = 5;
*
* @return The contentUrl.
*/
java.lang.String getContentUrl();
/**
*
*
*
* Required. Url where the media is stored.
*
*
* string content_url = 5;
*
* @return The bytes for contentUrl.
*/
com.google.protobuf.ByteString getContentUrlBytes();
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject.ImageCase
getImageCase();
}
/**
*
*
*
* Response media object for media content card.
*
*
* Protobuf type {@code
* google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject}
*/
public static final class ResponseMediaObject extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject)
ResponseMediaObjectOrBuilder {
private static final long serialVersionUID = 0L;
// Use ResponseMediaObject.newBuilder() to construct.
private ResponseMediaObject(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ResponseMediaObject() {
name_ = "";
description_ = "";
contentUrl_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new ResponseMediaObject();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_MediaContent_ResponseMediaObject_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_MediaContent_ResponseMediaObject_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
.class,
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
.Builder.class);
}
private int imageCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object image_;
public enum ImageCase
implements
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
LARGE_IMAGE(3),
ICON(4),
IMAGE_NOT_SET(0);
private final int value;
private ImageCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ImageCase valueOf(int value) {
return forNumber(value);
}
public static ImageCase forNumber(int value) {
switch (value) {
case 3:
return LARGE_IMAGE;
case 4:
return ICON;
case 0:
return IMAGE_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public ImageCase getImageCase() {
return ImageCase.forNumber(imageCase_);
}
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* Required. Name of media card.
*
*
* string name = 1;
*
* @return The name.
*/
@java.lang.Override
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. Name of media card.
*
*
* string name = 1;
*
* @return The bytes for name.
*/
@java.lang.Override
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 DESCRIPTION_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object description_ = "";
/**
*
*
*
* Optional. Description of media card.
*
*
* string description = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The description.
*/
@java.lang.Override
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. Description of media card.
*
*
* string description = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for description.
*/
@java.lang.Override
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 LARGE_IMAGE_FIELD_NUMBER = 3;
/**
*
*
*
* Optional. Image to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image large_image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the largeImage field is set.
*/
@java.lang.Override
public boolean hasLargeImage() {
return imageCase_ == 3;
}
/**
*
*
*
* Optional. Image to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image large_image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The largeImage.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.Image getLargeImage() {
if (imageCase_ == 3) {
return (com.google.cloud.dialogflow.v2.Intent.Message.Image) image_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance();
}
/**
*
*
*
* Optional. Image to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image large_image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder
getLargeImageOrBuilder() {
if (imageCase_ == 3) {
return (com.google.cloud.dialogflow.v2.Intent.Message.Image) image_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance();
}
public static final int ICON_FIELD_NUMBER = 4;
/**
*
*
*
* Optional. Icon to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image icon = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the icon field is set.
*/
@java.lang.Override
public boolean hasIcon() {
return imageCase_ == 4;
}
/**
*
*
*
* Optional. Icon to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image icon = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The icon.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.Image getIcon() {
if (imageCase_ == 4) {
return (com.google.cloud.dialogflow.v2.Intent.Message.Image) image_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance();
}
/**
*
*
*
* Optional. Icon to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image icon = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder getIconOrBuilder() {
if (imageCase_ == 4) {
return (com.google.cloud.dialogflow.v2.Intent.Message.Image) image_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance();
}
public static final int CONTENT_URL_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private volatile java.lang.Object contentUrl_ = "";
/**
*
*
*
* Required. Url where the media is stored.
*
*
* string content_url = 5;
*
* @return The contentUrl.
*/
@java.lang.Override
public java.lang.String getContentUrl() {
java.lang.Object ref = contentUrl_;
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();
contentUrl_ = s;
return s;
}
}
/**
*
*
*
* Required. Url where the media is stored.
*
*
* string content_url = 5;
*
* @return The bytes for contentUrl.
*/
@java.lang.Override
public com.google.protobuf.ByteString getContentUrlBytes() {
java.lang.Object ref = contentUrl_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
contentUrl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_);
}
if (imageCase_ == 3) {
output.writeMessage(3, (com.google.cloud.dialogflow.v2.Intent.Message.Image) image_);
}
if (imageCase_ == 4) {
output.writeMessage(4, (com.google.cloud.dialogflow.v2.Intent.Message.Image) image_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentUrl_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, contentUrl_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_);
}
if (imageCase_ == 3) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
3, (com.google.cloud.dialogflow.v2.Intent.Message.Image) image_);
}
if (imageCase_ == 4) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
4, (com.google.cloud.dialogflow.v2.Intent.Message.Image) image_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentUrl_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, contentUrl_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj
instanceof
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject other =
(com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject) obj;
if (!getName().equals(other.getName())) return false;
if (!getDescription().equals(other.getDescription())) return false;
if (!getContentUrl().equals(other.getContentUrl())) return false;
if (!getImageCase().equals(other.getImageCase())) return false;
switch (imageCase_) {
case 3:
if (!getLargeImage().equals(other.getLargeImage())) return false;
break;
case 4:
if (!getIcon().equals(other.getIcon())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
hash = (37 * hash) + CONTENT_URL_FIELD_NUMBER;
hash = (53 * hash) + getContentUrl().hashCode();
switch (imageCase_) {
case 3:
hash = (37 * hash) + LARGE_IMAGE_FIELD_NUMBER;
hash = (53 * hash) + getLargeImage().hashCode();
break;
case 4:
hash = (37 * hash) + ICON_FIELD_NUMBER;
hash = (53 * hash) + getIcon().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
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.MediaContent.ResponseMediaObject
parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
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.MediaContent.ResponseMediaObject
parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
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.MediaContent.ResponseMediaObject
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.MediaContent.ResponseMediaObject
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.MediaContent.ResponseMediaObject
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.MediaContent.ResponseMediaObject
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.MediaContent.ResponseMediaObject
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.MediaContent.ResponseMediaObject
parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Response media object for media content card.
*
*
* Protobuf type {@code
* google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject)
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent
.ResponseMediaObjectOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_MediaContent_ResponseMediaObject_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_MediaContent_ResponseMediaObject_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
.class,
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
.Builder.class);
}
// Construct using
// com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
description_ = "";
if (largeImageBuilder_ != null) {
largeImageBuilder_.clear();
}
if (iconBuilder_ != null) {
iconBuilder_.clear();
}
contentUrl_ = "";
imageCase_ = 0;
image_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_MediaContent_ResponseMediaObject_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
build() {
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
buildPartial() {
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject result =
new com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject(
this);
if (bitField0_ != 0) {
buildPartial0(result);
}
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.description_ = description_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.contentUrl_ = contentUrl_;
}
}
private void buildPartialOneofs(
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
result) {
result.imageCase_ = imageCase_;
result.image_ = this.image_;
if (imageCase_ == 3 && largeImageBuilder_ != null) {
result.image_ = largeImageBuilder_.build();
}
if (imageCase_ == 4 && iconBuilder_ != null) {
result.image_ = iconBuilder_.build();
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other
instanceof
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject) {
return mergeFrom(
(com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject)
other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
other) {
if (other
== com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getContentUrl().isEmpty()) {
contentUrl_ = other.contentUrl_;
bitField0_ |= 0x00000010;
onChanged();
}
switch (other.getImageCase()) {
case LARGE_IMAGE:
{
mergeLargeImage(other.getLargeImage());
break;
}
case ICON:
{
mergeIcon(other.getIcon());
break;
}
case IMAGE_NOT_SET:
{
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
description_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
input.readMessage(
getLargeImageFieldBuilder().getBuilder(), extensionRegistry);
imageCase_ = 3;
break;
} // case 26
case 34:
{
input.readMessage(getIconFieldBuilder().getBuilder(), extensionRegistry);
imageCase_ = 4;
break;
} // case 34
case 42:
{
contentUrl_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 42
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int imageCase_ = 0;
private java.lang.Object image_;
public ImageCase getImageCase() {
return ImageCase.forNumber(imageCase_);
}
public Builder clearImage() {
imageCase_ = 0;
image_ = null;
onChanged();
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
*
*
* Required. Name of media card.
*
*
* string name = 1;
*
* @return The name.
*/
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. Name of media card.
*
*
* string name = 1;
*
* @return The bytes for name.
*/
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. Name of media card.
*
*
* string name = 1;
*
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. Name of media card.
*
*
* string name = 1;
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Required. Name of media card.
*
*
* string name = 1;
*
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
*
*
*
* Optional. Description of media card.
*
*
* string description = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The description.
*/
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. Description of media card.
*
*
* string description = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for description.
*/
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. Description of media card.
*
*
* string description = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. Description of media card.
*
*
* string description = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Optional. Description of media card.
*
*
* string description = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
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>
largeImageBuilder_;
/**
*
*
*
* Optional. Image to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image large_image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the largeImage field is set.
*/
@java.lang.Override
public boolean hasLargeImage() {
return imageCase_ == 3;
}
/**
*
*
*
* Optional. Image to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image large_image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The largeImage.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.Image getLargeImage() {
if (largeImageBuilder_ == null) {
if (imageCase_ == 3) {
return (com.google.cloud.dialogflow.v2.Intent.Message.Image) image_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance();
} else {
if (imageCase_ == 3) {
return largeImageBuilder_.getMessage();
}
return com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance();
}
}
/**
*
*
*
* Optional. Image to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image large_image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setLargeImage(com.google.cloud.dialogflow.v2.Intent.Message.Image value) {
if (largeImageBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
image_ = value;
onChanged();
} else {
largeImageBuilder_.setMessage(value);
}
imageCase_ = 3;
return this;
}
/**
*
*
*
* Optional. Image to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image large_image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setLargeImage(
com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder builderForValue) {
if (largeImageBuilder_ == null) {
image_ = builderForValue.build();
onChanged();
} else {
largeImageBuilder_.setMessage(builderForValue.build());
}
imageCase_ = 3;
return this;
}
/**
*
*
*
* Optional. Image to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image large_image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder mergeLargeImage(
com.google.cloud.dialogflow.v2.Intent.Message.Image value) {
if (largeImageBuilder_ == null) {
if (imageCase_ == 3
&& image_
!= com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance()) {
image_ =
com.google.cloud.dialogflow.v2.Intent.Message.Image.newBuilder(
(com.google.cloud.dialogflow.v2.Intent.Message.Image) image_)
.mergeFrom(value)
.buildPartial();
} else {
image_ = value;
}
onChanged();
} else {
if (imageCase_ == 3) {
largeImageBuilder_.mergeFrom(value);
} else {
largeImageBuilder_.setMessage(value);
}
}
imageCase_ = 3;
return this;
}
/**
*
*
*
* Optional. Image to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image large_image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearLargeImage() {
if (largeImageBuilder_ == null) {
if (imageCase_ == 3) {
imageCase_ = 0;
image_ = null;
onChanged();
}
} else {
if (imageCase_ == 3) {
imageCase_ = 0;
image_ = null;
}
largeImageBuilder_.clear();
}
return this;
}
/**
*
*
*
* Optional. Image to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image large_image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder
getLargeImageBuilder() {
return getLargeImageFieldBuilder().getBuilder();
}
/**
*
*
*
* Optional. Image to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image large_image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder
getLargeImageOrBuilder() {
if ((imageCase_ == 3) && (largeImageBuilder_ != null)) {
return largeImageBuilder_.getMessageOrBuilder();
} else {
if (imageCase_ == 3) {
return (com.google.cloud.dialogflow.v2.Intent.Message.Image) image_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance();
}
}
/**
*
*
*
* Optional. Image to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image large_image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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>
getLargeImageFieldBuilder() {
if (largeImageBuilder_ == null) {
if (!(imageCase_ == 3)) {
image_ = com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance();
}
largeImageBuilder_ =
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) image_,
getParentForChildren(),
isClean());
image_ = null;
}
imageCase_ = 3;
onChanged();
return largeImageBuilder_;
}
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>
iconBuilder_;
/**
*
*
*
* Optional. Icon to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image icon = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the icon field is set.
*/
@java.lang.Override
public boolean hasIcon() {
return imageCase_ == 4;
}
/**
*
*
*
* Optional. Icon to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image icon = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The icon.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.Image getIcon() {
if (iconBuilder_ == null) {
if (imageCase_ == 4) {
return (com.google.cloud.dialogflow.v2.Intent.Message.Image) image_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance();
} else {
if (imageCase_ == 4) {
return iconBuilder_.getMessage();
}
return com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance();
}
}
/**
*
*
*
* Optional. Icon to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image icon = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setIcon(com.google.cloud.dialogflow.v2.Intent.Message.Image value) {
if (iconBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
image_ = value;
onChanged();
} else {
iconBuilder_.setMessage(value);
}
imageCase_ = 4;
return this;
}
/**
*
*
*
* Optional. Icon to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image icon = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setIcon(
com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder builderForValue) {
if (iconBuilder_ == null) {
image_ = builderForValue.build();
onChanged();
} else {
iconBuilder_.setMessage(builderForValue.build());
}
imageCase_ = 4;
return this;
}
/**
*
*
*
* Optional. Icon to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image icon = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder mergeIcon(com.google.cloud.dialogflow.v2.Intent.Message.Image value) {
if (iconBuilder_ == null) {
if (imageCase_ == 4
&& image_
!= com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance()) {
image_ =
com.google.cloud.dialogflow.v2.Intent.Message.Image.newBuilder(
(com.google.cloud.dialogflow.v2.Intent.Message.Image) image_)
.mergeFrom(value)
.buildPartial();
} else {
image_ = value;
}
onChanged();
} else {
if (imageCase_ == 4) {
iconBuilder_.mergeFrom(value);
} else {
iconBuilder_.setMessage(value);
}
}
imageCase_ = 4;
return this;
}
/**
*
*
*
* Optional. Icon to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image icon = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearIcon() {
if (iconBuilder_ == null) {
if (imageCase_ == 4) {
imageCase_ = 0;
image_ = null;
onChanged();
}
} else {
if (imageCase_ == 4) {
imageCase_ = 0;
image_ = null;
}
iconBuilder_.clear();
}
return this;
}
/**
*
*
*
* Optional. Icon to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image icon = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder getIconBuilder() {
return getIconFieldBuilder().getBuilder();
}
/**
*
*
*
* Optional. Icon to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image icon = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder getIconOrBuilder() {
if ((imageCase_ == 4) && (iconBuilder_ != null)) {
return iconBuilder_.getMessageOrBuilder();
} else {
if (imageCase_ == 4) {
return (com.google.cloud.dialogflow.v2.Intent.Message.Image) image_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance();
}
}
/**
*
*
*
* Optional. Icon to display above media content.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image icon = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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>
getIconFieldBuilder() {
if (iconBuilder_ == null) {
if (!(imageCase_ == 4)) {
image_ = com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance();
}
iconBuilder_ =
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) image_,
getParentForChildren(),
isClean());
image_ = null;
}
imageCase_ = 4;
onChanged();
return iconBuilder_;
}
private java.lang.Object contentUrl_ = "";
/**
*
*
*
* Required. Url where the media is stored.
*
*
* string content_url = 5;
*
* @return The contentUrl.
*/
public java.lang.String getContentUrl() {
java.lang.Object ref = contentUrl_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
contentUrl_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. Url where the media is stored.
*
*
* string content_url = 5;
*
* @return The bytes for contentUrl.
*/
public com.google.protobuf.ByteString getContentUrlBytes() {
java.lang.Object ref = contentUrl_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
contentUrl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. Url where the media is stored.
*
*
* string content_url = 5;
*
* @param value The contentUrl to set.
* @return This builder for chaining.
*/
public Builder setContentUrl(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
contentUrl_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Required. Url where the media is stored.
*
*
* string content_url = 5;
*
* @return This builder for chaining.
*/
public Builder clearContentUrl() {
contentUrl_ = getDefaultInstance().getContentUrl();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
*
*
* Required. Url where the media is stored.
*
*
* string content_url = 5;
*
* @param value The bytes for contentUrl to set.
* @return This builder for chaining.
*/
public Builder setContentUrlBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
contentUrl_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject)
private static final com.google.cloud.dialogflow.v2.Intent.Message.MediaContent
.ResponseMediaObject
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject();
}
public static com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ResponseMediaObject parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int MEDIA_TYPE_FIELD_NUMBER = 1;
private int mediaType_ = 0;
/**
*
*
*
* Optional. What type of media is the content (ie "audio").
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType media_type = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for mediaType.
*/
@java.lang.Override
public int getMediaTypeValue() {
return mediaType_;
}
/**
*
*
*
* Optional. What type of media is the content (ie "audio").
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType media_type = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The mediaType.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType
getMediaType() {
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType result =
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType.forNumber(
mediaType_);
return result == null
? com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType
.UNRECOGNIZED
: result;
}
public static final int MEDIA_OBJECTS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List<
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject>
mediaObjects_;
/**
*
*
*
* Required. List of media objects.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2;
*
*/
@java.lang.Override
public java.util.List<
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject>
getMediaObjectsList() {
return mediaObjects_;
}
/**
*
*
*
* Required. List of media objects.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2;
*
*/
@java.lang.Override
public java.util.List<
? extends
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent
.ResponseMediaObjectOrBuilder>
getMediaObjectsOrBuilderList() {
return mediaObjects_;
}
/**
*
*
*
* Required. List of media objects.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2;
*
*/
@java.lang.Override
public int getMediaObjectsCount() {
return mediaObjects_.size();
}
/**
*
*
*
* Required. List of media objects.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
getMediaObjects(int index) {
return mediaObjects_.get(index);
}
/**
*
*
*
* Required. List of media objects.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObjectOrBuilder
getMediaObjectsOrBuilder(int index) {
return mediaObjects_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (mediaType_
!= com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType
.RESPONSE_MEDIA_TYPE_UNSPECIFIED
.getNumber()) {
output.writeEnum(1, mediaType_);
}
for (int i = 0; i < mediaObjects_.size(); i++) {
output.writeMessage(2, mediaObjects_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (mediaType_
!= com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType
.RESPONSE_MEDIA_TYPE_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, mediaType_);
}
for (int i = 0; i < mediaObjects_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, mediaObjects_.get(i));
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.v2.Intent.Message.MediaContent)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent other =
(com.google.cloud.dialogflow.v2.Intent.Message.MediaContent) obj;
if (mediaType_ != other.mediaType_) return false;
if (!getMediaObjectsList().equals(other.getMediaObjectsList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + MEDIA_TYPE_FIELD_NUMBER;
hash = (53 * hash) + mediaType_;
if (getMediaObjectsCount() > 0) {
hash = (37 * hash) + MEDIA_OBJECTS_FIELD_NUMBER;
hash = (53 * hash) + getMediaObjectsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.Message.MediaContent parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.MediaContent 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.MediaContent parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.MediaContent 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.MediaContent parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.MediaContent 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.MediaContent 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.MediaContent 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.MediaContent 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.MediaContent 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.MediaContent 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.MediaContent parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* The media content card for Actions on Google.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.MediaContent}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.MediaContent)
com.google.cloud.dialogflow.v2.Intent.Message.MediaContentOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_MediaContent_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_MediaContent_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.class,
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
mediaType_ = 0;
if (mediaObjectsBuilder_ == null) {
mediaObjects_ = java.util.Collections.emptyList();
} else {
mediaObjects_ = null;
mediaObjectsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_MediaContent_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.MediaContent
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.MediaContent build() {
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.MediaContent buildPartial() {
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent result =
new com.google.cloud.dialogflow.v2.Intent.Message.MediaContent(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent result) {
if (mediaObjectsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
mediaObjects_ = java.util.Collections.unmodifiableList(mediaObjects_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.mediaObjects_ = mediaObjects_;
} else {
result.mediaObjects_ = mediaObjectsBuilder_.build();
}
}
private void buildPartial0(
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.mediaType_ = mediaType_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent.Message.MediaContent) {
return mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.MediaContent) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.Message.MediaContent other) {
if (other
== com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.getDefaultInstance())
return this;
if (other.mediaType_ != 0) {
setMediaTypeValue(other.getMediaTypeValue());
}
if (mediaObjectsBuilder_ == null) {
if (!other.mediaObjects_.isEmpty()) {
if (mediaObjects_.isEmpty()) {
mediaObjects_ = other.mediaObjects_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureMediaObjectsIsMutable();
mediaObjects_.addAll(other.mediaObjects_);
}
onChanged();
}
} else {
if (!other.mediaObjects_.isEmpty()) {
if (mediaObjectsBuilder_.isEmpty()) {
mediaObjectsBuilder_.dispose();
mediaObjectsBuilder_ = null;
mediaObjects_ = other.mediaObjects_;
bitField0_ = (bitField0_ & ~0x00000002);
mediaObjectsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getMediaObjectsFieldBuilder()
: null;
} else {
mediaObjectsBuilder_.addAllMessages(other.mediaObjects_);
}
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8:
{
mediaType_ = input.readEnum();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18:
{
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
m =
input.readMessage(
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent
.ResponseMediaObject.parser(),
extensionRegistry);
if (mediaObjectsBuilder_ == null) {
ensureMediaObjectsIsMutable();
mediaObjects_.add(m);
} else {
mediaObjectsBuilder_.addMessage(m);
}
break;
} // case 18
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int mediaType_ = 0;
/**
*
*
*
* Optional. What type of media is the content (ie "audio").
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType media_type = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for mediaType.
*/
@java.lang.Override
public int getMediaTypeValue() {
return mediaType_;
}
/**
*
*
*
* Optional. What type of media is the content (ie "audio").
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType media_type = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The enum numeric value on the wire for mediaType to set.
* @return This builder for chaining.
*/
public Builder setMediaTypeValue(int value) {
mediaType_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Optional. What type of media is the content (ie "audio").
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType media_type = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The mediaType.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType
getMediaType() {
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType result =
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType
.forNumber(mediaType_);
return result == null
? com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType
.UNRECOGNIZED
: result;
}
/**
*
*
*
* Optional. What type of media is the content (ie "audio").
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType media_type = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The mediaType to set.
* @return This builder for chaining.
*/
public Builder setMediaType(
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
mediaType_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Optional. What type of media is the content (ie "audio").
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaType media_type = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return This builder for chaining.
*/
public Builder clearMediaType() {
bitField0_ = (bitField0_ & ~0x00000001);
mediaType_ = 0;
onChanged();
return this;
}
private java.util.List<
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject>
mediaObjects_ = java.util.Collections.emptyList();
private void ensureMediaObjectsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
mediaObjects_ =
new java.util.ArrayList<
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject>(
mediaObjects_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject,
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
.Builder,
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent
.ResponseMediaObjectOrBuilder>
mediaObjectsBuilder_;
/**
*
*
*
* Required. List of media objects.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2;
*
*/
public java.util.List<
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject>
getMediaObjectsList() {
if (mediaObjectsBuilder_ == null) {
return java.util.Collections.unmodifiableList(mediaObjects_);
} else {
return mediaObjectsBuilder_.getMessageList();
}
}
/**
*
*
*
* Required. List of media objects.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2;
*
*/
public int getMediaObjectsCount() {
if (mediaObjectsBuilder_ == null) {
return mediaObjects_.size();
} else {
return mediaObjectsBuilder_.getCount();
}
}
/**
*
*
*
* Required. List of media objects.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2;
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
getMediaObjects(int index) {
if (mediaObjectsBuilder_ == null) {
return mediaObjects_.get(index);
} else {
return mediaObjectsBuilder_.getMessage(index);
}
}
/**
*
*
*
* Required. List of media objects.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2;
*
*/
public Builder setMediaObjects(
int index,
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject value) {
if (mediaObjectsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMediaObjectsIsMutable();
mediaObjects_.set(index, value);
onChanged();
} else {
mediaObjectsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Required. List of media objects.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2;
*
*/
public Builder setMediaObjects(
int index,
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject.Builder
builderForValue) {
if (mediaObjectsBuilder_ == null) {
ensureMediaObjectsIsMutable();
mediaObjects_.set(index, builderForValue.build());
onChanged();
} else {
mediaObjectsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Required. List of media objects.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2;
*
*/
public Builder addMediaObjects(
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject value) {
if (mediaObjectsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMediaObjectsIsMutable();
mediaObjects_.add(value);
onChanged();
} else {
mediaObjectsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Required. List of media objects.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2;
*
*/
public Builder addMediaObjects(
int index,
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject value) {
if (mediaObjectsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMediaObjectsIsMutable();
mediaObjects_.add(index, value);
onChanged();
} else {
mediaObjectsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Required. List of media objects.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2;
*
*/
public Builder addMediaObjects(
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject.Builder
builderForValue) {
if (mediaObjectsBuilder_ == null) {
ensureMediaObjectsIsMutable();
mediaObjects_.add(builderForValue.build());
onChanged();
} else {
mediaObjectsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Required. List of media objects.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2;
*
*/
public Builder addMediaObjects(
int index,
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject.Builder
builderForValue) {
if (mediaObjectsBuilder_ == null) {
ensureMediaObjectsIsMutable();
mediaObjects_.add(index, builderForValue.build());
onChanged();
} else {
mediaObjectsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Required. List of media objects.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2;
*
*/
public Builder addAllMediaObjects(
java.lang.Iterable<
? extends
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent
.ResponseMediaObject>
values) {
if (mediaObjectsBuilder_ == null) {
ensureMediaObjectsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, mediaObjects_);
onChanged();
} else {
mediaObjectsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Required. List of media objects.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2;
*
*/
public Builder clearMediaObjects() {
if (mediaObjectsBuilder_ == null) {
mediaObjects_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
mediaObjectsBuilder_.clear();
}
return this;
}
/**
*
*
*
* Required. List of media objects.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2;
*
*/
public Builder removeMediaObjects(int index) {
if (mediaObjectsBuilder_ == null) {
ensureMediaObjectsIsMutable();
mediaObjects_.remove(index);
onChanged();
} else {
mediaObjectsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Required. List of media objects.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2;
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
.Builder
getMediaObjectsBuilder(int index) {
return getMediaObjectsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Required. List of media objects.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2;
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.MediaContent
.ResponseMediaObjectOrBuilder
getMediaObjectsOrBuilder(int index) {
if (mediaObjectsBuilder_ == null) {
return mediaObjects_.get(index);
} else {
return mediaObjectsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Required. List of media objects.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2;
*
*/
public java.util.List<
? extends
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent
.ResponseMediaObjectOrBuilder>
getMediaObjectsOrBuilderList() {
if (mediaObjectsBuilder_ != null) {
return mediaObjectsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(mediaObjects_);
}
}
/**
*
*
*
* Required. List of media objects.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2;
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
.Builder
addMediaObjectsBuilder() {
return getMediaObjectsFieldBuilder()
.addBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
.getDefaultInstance());
}
/**
*
*
*
* Required. List of media objects.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2;
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
.Builder
addMediaObjectsBuilder(int index) {
return getMediaObjectsFieldBuilder()
.addBuilder(
index,
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
.getDefaultInstance());
}
/**
*
*
*
* Required. List of media objects.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject media_objects = 2;
*
*/
public java.util.List<
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
.Builder>
getMediaObjectsBuilderList() {
return getMediaObjectsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject,
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
.Builder,
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent
.ResponseMediaObjectOrBuilder>
getMediaObjectsFieldBuilder() {
if (mediaObjectsBuilder_ == null) {
mediaObjectsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject,
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.ResponseMediaObject
.Builder,
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent
.ResponseMediaObjectOrBuilder>(
mediaObjects_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
mediaObjects_ = null;
}
return mediaObjectsBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.MediaContent)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.MediaContent)
private static final com.google.cloud.dialogflow.v2.Intent.Message.MediaContent
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Message.MediaContent();
}
public static com.google.cloud.dialogflow.v2.Intent.Message.MediaContent
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public MediaContent parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.MediaContent
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface BrowseCarouselCardOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Required. List of items in the Browse Carousel Card. Minimum of two
* items, maximum of ten.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1;
*
*/
java.util.List<
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem>
getItemsList();
/**
*
*
*
* Required. List of items in the Browse Carousel Card. Minimum of two
* items, maximum of ten.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1;
*
*/
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem
getItems(int index);
/**
*
*
*
* Required. List of items in the Browse Carousel Card. Minimum of two
* items, maximum of ten.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1;
*
*/
int getItemsCount();
/**
*
*
*
* Required. List of items in the Browse Carousel Card. Minimum of two
* items, maximum of ten.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1;
*
*/
java.util.List<
? extends
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItemOrBuilder>
getItemsOrBuilderList();
/**
*
*
*
* Required. List of items in the Browse Carousel Card. Minimum of two
* items, maximum of ten.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1;
*
*/
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItemOrBuilder
getItemsOrBuilder(int index);
/**
*
*
*
* Optional. Settings for displaying the image. Applies to every image in
* [items][google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.items].
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions image_display_options = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for imageDisplayOptions.
*/
int getImageDisplayOptionsValue();
/**
*
*
*
* Optional. Settings for displaying the image. Applies to every image in
* [items][google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.items].
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions image_display_options = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The imageDisplayOptions.
*/
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions
getImageDisplayOptions();
}
/**
*
*
*
* Browse Carousel Card for Actions on Google.
* https://developers.google.com/actions/assistant/responses#browsing_carousel
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard}
*/
public static final class BrowseCarouselCard extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard)
BrowseCarouselCardOrBuilder {
private static final long serialVersionUID = 0L;
// Use BrowseCarouselCard.newBuilder() to construct.
private BrowseCarouselCard(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private BrowseCarouselCard() {
items_ = java.util.Collections.emptyList();
imageDisplayOptions_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new BrowseCarouselCard();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_BrowseCarouselCard_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_BrowseCarouselCard_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.class,
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.Builder.class);
}
/**
*
*
*
* Image display options for Actions on Google. This should be used for
* when the image's aspect ratio does not match the image container's
* aspect ratio.
*
*
* Protobuf enum {@code
* google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions}
*/
public enum ImageDisplayOptions implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* Fill the gaps between the image and the image container with gray
* bars.
*
*
* IMAGE_DISPLAY_OPTIONS_UNSPECIFIED = 0;
*/
IMAGE_DISPLAY_OPTIONS_UNSPECIFIED(0),
/**
*
*
*
* Fill the gaps between the image and the image container with gray
* bars.
*
*
* GRAY = 1;
*/
GRAY(1),
/**
*
*
*
* Fill the gaps between the image and the image container with white
* bars.
*
*
* WHITE = 2;
*/
WHITE(2),
/**
*
*
*
* Image is scaled such that the image width and height match or exceed
* the container dimensions. This may crop the top and bottom of the
* image if the scaled image height is greater than the container
* height, or crop the left and right of the image if the scaled image
* width is greater than the container width. This is similar to "Zoom
* Mode" on a widescreen TV when playing a 4:3 video.
*
*
* CROPPED = 3;
*/
CROPPED(3),
/**
*
*
*
* Pad the gaps between image and image frame with a blurred copy of the
* same image.
*
*
* BLURRED_BACKGROUND = 4;
*/
BLURRED_BACKGROUND(4),
UNRECOGNIZED(-1),
;
/**
*
*
*
* Fill the gaps between the image and the image container with gray
* bars.
*
*
* IMAGE_DISPLAY_OPTIONS_UNSPECIFIED = 0;
*/
public static final int IMAGE_DISPLAY_OPTIONS_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Fill the gaps between the image and the image container with gray
* bars.
*
*
* GRAY = 1;
*/
public static final int GRAY_VALUE = 1;
/**
*
*
*
* Fill the gaps between the image and the image container with white
* bars.
*
*
* WHITE = 2;
*/
public static final int WHITE_VALUE = 2;
/**
*
*
*
* Image is scaled such that the image width and height match or exceed
* the container dimensions. This may crop the top and bottom of the
* image if the scaled image height is greater than the container
* height, or crop the left and right of the image if the scaled image
* width is greater than the container width. This is similar to "Zoom
* Mode" on a widescreen TV when playing a 4:3 video.
*
*
* CROPPED = 3;
*/
public static final int CROPPED_VALUE = 3;
/**
*
*
*
* Pad the gaps between image and image frame with a blurred copy of the
* same image.
*
*
* BLURRED_BACKGROUND = 4;
*/
public static final int BLURRED_BACKGROUND_VALUE = 4;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ImageDisplayOptions valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static ImageDisplayOptions forNumber(int value) {
switch (value) {
case 0:
return IMAGE_DISPLAY_OPTIONS_UNSPECIFIED;
case 1:
return GRAY;
case 2:
return WHITE;
case 3:
return CROPPED;
case 4:
return BLURRED_BACKGROUND;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public ImageDisplayOptions findValueByNumber(int number) {
return ImageDisplayOptions.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
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.BrowseCarouselCard.getDescriptor()
.getEnumTypes()
.get(0);
}
private static final ImageDisplayOptions[] VALUES = values();
public static ImageDisplayOptions 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 ImageDisplayOptions(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions)
}
public interface BrowseCarouselCardItemOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Required. Action to present to the user.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction open_uri_action = 1;
*
*
* @return Whether the openUriAction field is set.
*/
boolean hasOpenUriAction();
/**
*
*
*
* Required. Action to present to the user.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction open_uri_action = 1;
*
*
* @return The openUriAction.
*/
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem
.OpenUrlAction
getOpenUriAction();
/**
*
*
*
* Required. Action to present to the user.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction open_uri_action = 1;
*
*/
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem
.OpenUrlActionOrBuilder
getOpenUriActionOrBuilder();
/**
*
*
*
* Required. Title of the carousel item. Maximum of two lines of text.
*
*
* string title = 2;
*
* @return The title.
*/
java.lang.String getTitle();
/**
*
*
*
* Required. Title of the carousel item. Maximum of two lines of text.
*
*
* string title = 2;
*
* @return The bytes for title.
*/
com.google.protobuf.ByteString getTitleBytes();
/**
*
*
*
* Optional. Description of the carousel item. Maximum of four lines of
* text.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The description.
*/
java.lang.String getDescription();
/**
*
*
*
* Optional. Description of the carousel item. Maximum of four lines of
* text.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for description.
*/
com.google.protobuf.ByteString getDescriptionBytes();
/**
*
*
*
* Optional. Hero image for the carousel item.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the image field is set.
*/
boolean hasImage();
/**
*
*
*
* Optional. Hero image for the carousel item.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The image.
*/
com.google.cloud.dialogflow.v2.Intent.Message.Image getImage();
/**
*
*
*
* Optional. Hero image for the carousel item.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder getImageOrBuilder();
/**
*
*
*
* Optional. Text that appears at the bottom of the Browse Carousel
* Card. Maximum of one line of text.
*
*
* string footer = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The footer.
*/
java.lang.String getFooter();
/**
*
*
*
* Optional. Text that appears at the bottom of the Browse Carousel
* Card. Maximum of one line of text.
*
*
* string footer = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for footer.
*/
com.google.protobuf.ByteString getFooterBytes();
}
/**
*
*
*
* Browsing carousel tile
*
*
* Protobuf type {@code
* google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem}
*/
public static final class BrowseCarouselCardItem
extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem)
BrowseCarouselCardItemOrBuilder {
private static final long serialVersionUID = 0L;
// Use BrowseCarouselCardItem.newBuilder() to construct.
private BrowseCarouselCardItem(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private BrowseCarouselCardItem() {
title_ = "";
description_ = "";
footer_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new BrowseCarouselCardItem();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.class,
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.Builder.class);
}
public interface OpenUrlActionOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Required. URL
*
*
* string url = 1;
*
* @return The url.
*/
java.lang.String getUrl();
/**
*
*
*
* Required. URL
*
*
* string url = 1;
*
* @return The bytes for url.
*/
com.google.protobuf.ByteString getUrlBytes();
/**
*
*
*
* Optional. Specifies the type of viewer that is used when opening
* the URL. Defaults to opening via web browser.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint url_type_hint = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for urlTypeHint.
*/
int getUrlTypeHintValue();
/**
*
*
*
* Optional. Specifies the type of viewer that is used when opening
* the URL. Defaults to opening via web browser.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint url_type_hint = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The urlTypeHint.
*/
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem
.OpenUrlAction.UrlTypeHint
getUrlTypeHint();
}
/**
*
*
*
* Actions on Google action to open a given url.
*
*
* Protobuf type {@code
* google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction}
*/
public static final class OpenUrlAction extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction)
OpenUrlActionOrBuilder {
private static final long serialVersionUID = 0L;
// Use OpenUrlAction.newBuilder() to construct.
private OpenUrlAction(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private OpenUrlAction() {
url_ = "";
urlTypeHint_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new OpenUrlAction();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_OpenUrlAction_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_OpenUrlAction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction.class,
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction.Builder.class);
}
/**
*
*
*
* Type of the URI.
*
*
* Protobuf enum {@code
* google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint}
*/
public enum UrlTypeHint implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* Unspecified
*
*
* URL_TYPE_HINT_UNSPECIFIED = 0;
*/
URL_TYPE_HINT_UNSPECIFIED(0),
/**
*
*
*
* Url would be an amp action
*
*
* AMP_ACTION = 1;
*/
AMP_ACTION(1),
/**
*
*
*
* URL that points directly to AMP content, or to a canonical URL
* which refers to AMP content via <link rel="amphtml">.
*
*
* AMP_CONTENT = 2;
*/
AMP_CONTENT(2),
UNRECOGNIZED(-1),
;
/**
*
*
*
* Unspecified
*
*
* URL_TYPE_HINT_UNSPECIFIED = 0;
*/
public static final int URL_TYPE_HINT_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Url would be an amp action
*
*
* AMP_ACTION = 1;
*/
public static final int AMP_ACTION_VALUE = 1;
/**
*
*
*
* URL that points directly to AMP content, or to a canonical URL
* which refers to AMP content via <link rel="amphtml">.
*
*
* AMP_CONTENT = 2;
*/
public static final int AMP_CONTENT_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;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static UrlTypeHint valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static UrlTypeHint forNumber(int value) {
switch (value) {
case 0:
return URL_TYPE_HINT_UNSPECIFIED;
case 1:
return AMP_ACTION;
case 2:
return AMP_CONTENT;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public UrlTypeHint findValueByNumber(int number) {
return UrlTypeHint.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
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.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction.getDescriptor()
.getEnumTypes()
.get(0);
}
private static final UrlTypeHint[] VALUES = values();
public static UrlTypeHint 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 UrlTypeHint(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint)
}
public static final int URL_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object url_ = "";
/**
*
*
*
* Required. URL
*
*
* string url = 1;
*
* @return The url.
*/
@java.lang.Override
public java.lang.String getUrl() {
java.lang.Object ref = url_;
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();
url_ = s;
return s;
}
}
/**
*
*
*
* Required. URL
*
*
* string url = 1;
*
* @return The bytes for url.
*/
@java.lang.Override
public com.google.protobuf.ByteString getUrlBytes() {
java.lang.Object ref = url_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
url_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int URL_TYPE_HINT_FIELD_NUMBER = 3;
private int urlTypeHint_ = 0;
/**
*
*
*
* Optional. Specifies the type of viewer that is used when opening
* the URL. Defaults to opening via web browser.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint url_type_hint = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for urlTypeHint.
*/
@java.lang.Override
public int getUrlTypeHintValue() {
return urlTypeHint_;
}
/**
*
*
*
* Optional. Specifies the type of viewer that is used when opening
* the URL. Defaults to opening via web browser.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint url_type_hint = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The urlTypeHint.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint
getUrlTypeHint() {
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem
.OpenUrlAction.UrlTypeHint
result =
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint.forNumber(urlTypeHint_);
return result == null
? com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint.UNRECOGNIZED
: result;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_);
}
if (urlTypeHint_
!= com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint.URL_TYPE_HINT_UNSPECIFIED
.getNumber()) {
output.writeEnum(3, urlTypeHint_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_);
}
if (urlTypeHint_
!= com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint.URL_TYPE_HINT_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, urlTypeHint_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj
instanceof
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem
.OpenUrlAction
other =
(com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction)
obj;
if (!getUrl().equals(other.getUrl())) return false;
if (urlTypeHint_ != other.urlTypeHint_) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + URL_FIELD_NUMBER;
hash = (53 * hash) + getUrl().hashCode();
hash = (37 * hash) + URL_TYPE_HINT_FIELD_NUMBER;
hash = (53 * hash) + urlTypeHint_;
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction
parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction
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.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction
parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction
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.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction
parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction
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.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction
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.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction
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.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction
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.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction
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.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction
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.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction
parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction
prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Actions on Google action to open a given url.
*
*
* Protobuf type {@code
* google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction)
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlActionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_OpenUrlAction_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_OpenUrlAction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction.class,
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction.Builder.class);
}
// Construct using
// com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
url_ = "";
urlTypeHint_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_OpenUrlAction_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction
build() {
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction
result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction
buildPartial() {
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction
result =
new com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction
result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.url_ = url_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.urlTypeHint_ = urlTypeHint_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other
instanceof
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction) {
return mergeFrom(
(com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction)
other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction
other) {
if (other
== com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction.getDefaultInstance()) return this;
if (!other.getUrl().isEmpty()) {
url_ = other.url_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.urlTypeHint_ != 0) {
setUrlTypeHintValue(other.getUrlTypeHintValue());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
url_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 24:
{
urlTypeHint_ = input.readEnum();
bitField0_ |= 0x00000002;
break;
} // case 24
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object url_ = "";
/**
*
*
*
* Required. URL
*
*
* string url = 1;
*
* @return The url.
*/
public java.lang.String getUrl() {
java.lang.Object ref = url_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
url_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. URL
*
*
* string url = 1;
*
* @return The bytes for url.
*/
public com.google.protobuf.ByteString getUrlBytes() {
java.lang.Object ref = url_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
url_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. URL
*
*
* string url = 1;
*
* @param value The url to set.
* @return This builder for chaining.
*/
public Builder setUrl(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
url_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. URL
*
*
* string url = 1;
*
* @return This builder for chaining.
*/
public Builder clearUrl() {
url_ = getDefaultInstance().getUrl();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Required. URL
*
*
* string url = 1;
*
* @param value The bytes for url to set.
* @return This builder for chaining.
*/
public Builder setUrlBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
url_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private int urlTypeHint_ = 0;
/**
*
*
*
* Optional. Specifies the type of viewer that is used when opening
* the URL. Defaults to opening via web browser.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint url_type_hint = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for urlTypeHint.
*/
@java.lang.Override
public int getUrlTypeHintValue() {
return urlTypeHint_;
}
/**
*
*
*
* Optional. Specifies the type of viewer that is used when opening
* the URL. Defaults to opening via web browser.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint url_type_hint = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The enum numeric value on the wire for urlTypeHint to set.
* @return This builder for chaining.
*/
public Builder setUrlTypeHintValue(int value) {
urlTypeHint_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. Specifies the type of viewer that is used when opening
* the URL. Defaults to opening via web browser.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint url_type_hint = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The urlTypeHint.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint
getUrlTypeHint() {
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint
result =
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint.forNumber(urlTypeHint_);
return result == null
? com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint.UNRECOGNIZED
: result;
}
/**
*
*
*
* Optional. Specifies the type of viewer that is used when opening
* the URL. Defaults to opening via web browser.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint url_type_hint = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The urlTypeHint to set.
* @return This builder for chaining.
*/
public Builder setUrlTypeHint(
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint
value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
urlTypeHint_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Optional. Specifies the type of viewer that is used when opening
* the URL. Defaults to opening via web browser.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction.UrlTypeHint url_type_hint = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return This builder for chaining.
*/
public Builder clearUrlTypeHint() {
bitField0_ = (bitField0_ & ~0x00000002);
urlTypeHint_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction)
private static final com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction();
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public OpenUrlAction parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int OPEN_URI_ACTION_FIELD_NUMBER = 1;
private com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction
openUriAction_;
/**
*
*
*
* Required. Action to present to the user.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction open_uri_action = 1;
*
*
* @return Whether the openUriAction field is set.
*/
@java.lang.Override
public boolean hasOpenUriAction() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Required. Action to present to the user.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction open_uri_action = 1;
*
*
* @return The openUriAction.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction
getOpenUriAction() {
return openUriAction_ == null
? com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction.getDefaultInstance()
: openUriAction_;
}
/**
*
*
*
* Required. Action to present to the user.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction open_uri_action = 1;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlActionOrBuilder
getOpenUriActionOrBuilder() {
return openUriAction_ == null
? com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction.getDefaultInstance()
: openUriAction_;
}
public static final int TITLE_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object title_ = "";
/**
*
*
*
* Required. Title of the carousel item. Maximum of two lines of text.
*
*
* string title = 2;
*
* @return The title.
*/
@java.lang.Override
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. Maximum of two lines of text.
*
*
* string title = 2;
*
* @return The bytes for title.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
private volatile java.lang.Object description_ = "";
/**
*
*
*
* Optional. Description of the carousel item. Maximum of four lines of
* text.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The description.
*/
@java.lang.Override
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. Description of the carousel item. Maximum of four lines of
* text.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for description.
*/
@java.lang.Override
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. Hero image for the carousel item.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the image field is set.
*/
@java.lang.Override
public boolean hasImage() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Optional. Hero image for the carousel item.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The image.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.Image getImage() {
return image_ == null
? com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance()
: image_;
}
/**
*
*
*
* Optional. Hero image for the carousel item.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder getImageOrBuilder() {
return image_ == null
? com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance()
: image_;
}
public static final int FOOTER_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private volatile java.lang.Object footer_ = "";
/**
*
*
*
* Optional. Text that appears at the bottom of the Browse Carousel
* Card. Maximum of one line of text.
*
*
* string footer = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The footer.
*/
@java.lang.Override
public java.lang.String getFooter() {
java.lang.Object ref = footer_;
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();
footer_ = s;
return s;
}
}
/**
*
*
*
* Optional. Text that appears at the bottom of the Browse Carousel
* Card. Maximum of one line of text.
*
*
* string footer = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for footer.
*/
@java.lang.Override
public com.google.protobuf.ByteString getFooterBytes() {
java.lang.Object ref = footer_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
footer_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getOpenUriAction());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, title_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(4, getImage());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(footer_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, footer_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOpenUriAction());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, title_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getImage());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(footer_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, footer_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj
instanceof
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem
other =
(com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem)
obj;
if (hasOpenUriAction() != other.hasOpenUriAction()) return false;
if (hasOpenUriAction()) {
if (!getOpenUriAction().equals(other.getOpenUriAction())) return false;
}
if (!getTitle().equals(other.getTitle())) return false;
if (!getDescription().equals(other.getDescription())) return false;
if (hasImage() != other.hasImage()) return false;
if (hasImage()) {
if (!getImage().equals(other.getImage())) return false;
}
if (!getFooter().equals(other.getFooter())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasOpenUriAction()) {
hash = (37 * hash) + OPEN_URI_ACTION_FIELD_NUMBER;
hash = (53 * hash) + getOpenUriAction().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 = (37 * hash) + FOOTER_FIELD_NUMBER;
hash = (53 * hash) + getFooter().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem
parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem
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.BrowseCarouselCard
.BrowseCarouselCardItem
parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem
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.BrowseCarouselCard
.BrowseCarouselCardItem
parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem
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.BrowseCarouselCard
.BrowseCarouselCardItem
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.BrowseCarouselCard
.BrowseCarouselCardItem
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.BrowseCarouselCard
.BrowseCarouselCardItem
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.BrowseCarouselCard
.BrowseCarouselCardItem
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.BrowseCarouselCard
.BrowseCarouselCardItem
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.BrowseCarouselCard
.BrowseCarouselCardItem
parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem
prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Browsing carousel tile
*
*
* Protobuf type {@code
* google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem)
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItemOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.class,
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.Builder.class);
}
// Construct using
// com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getOpenUriActionFieldBuilder();
getImageFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
openUriAction_ = null;
if (openUriActionBuilder_ != null) {
openUriActionBuilder_.dispose();
openUriActionBuilder_ = null;
}
title_ = "";
description_ = "";
image_ = null;
if (imageBuilder_ != null) {
imageBuilder_.dispose();
imageBuilder_ = null;
}
footer_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_BrowseCarouselCard_BrowseCarouselCardItem_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem
build() {
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem
result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem
buildPartial() {
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem
result =
new com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem
result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.openUriAction_ =
openUriActionBuilder_ == null ? openUriAction_ : openUriActionBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.title_ = title_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.description_ = description_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.image_ = imageBuilder_ == null ? image_ : imageBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.footer_ = footer_;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other
instanceof
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem) {
return mergeFrom(
(com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem)
other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem
other) {
if (other
== com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.getDefaultInstance()) return this;
if (other.hasOpenUriAction()) {
mergeOpenUriAction(other.getOpenUriAction());
}
if (!other.getTitle().isEmpty()) {
title_ = other.title_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.hasImage()) {
mergeImage(other.getImage());
}
if (!other.getFooter().isEmpty()) {
footer_ = other.footer_;
bitField0_ |= 0x00000010;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
input.readMessage(
getOpenUriActionFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
title_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
description_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
input.readMessage(getImageFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
case 42:
{
footer_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 42
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction
openUriAction_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction,
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction.Builder,
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlActionOrBuilder>
openUriActionBuilder_;
/**
*
*
*
* Required. Action to present to the user.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction open_uri_action = 1;
*
*
* @return Whether the openUriAction field is set.
*/
public boolean hasOpenUriAction() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Required. Action to present to the user.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction open_uri_action = 1;
*
*
* @return The openUriAction.
*/
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction
getOpenUriAction() {
if (openUriActionBuilder_ == null) {
return openUriAction_ == null
? com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction.getDefaultInstance()
: openUriAction_;
} else {
return openUriActionBuilder_.getMessage();
}
}
/**
*
*
*
* Required. Action to present to the user.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction open_uri_action = 1;
*
*/
public Builder setOpenUriAction(
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction
value) {
if (openUriActionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
openUriAction_ = value;
} else {
openUriActionBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. Action to present to the user.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction open_uri_action = 1;
*
*/
public Builder setOpenUriAction(
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction.Builder
builderForValue) {
if (openUriActionBuilder_ == null) {
openUriAction_ = builderForValue.build();
} else {
openUriActionBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. Action to present to the user.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction open_uri_action = 1;
*
*/
public Builder mergeOpenUriAction(
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction
value) {
if (openUriActionBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)
&& openUriAction_ != null
&& openUriAction_
!= com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction.getDefaultInstance()) {
getOpenUriActionBuilder().mergeFrom(value);
} else {
openUriAction_ = value;
}
} else {
openUriActionBuilder_.mergeFrom(value);
}
if (openUriAction_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
*
*
* Required. Action to present to the user.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction open_uri_action = 1;
*
*/
public Builder clearOpenUriAction() {
bitField0_ = (bitField0_ & ~0x00000001);
openUriAction_ = null;
if (openUriActionBuilder_ != null) {
openUriActionBuilder_.dispose();
openUriActionBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Required. Action to present to the user.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction open_uri_action = 1;
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction.Builder
getOpenUriActionBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getOpenUriActionFieldBuilder().getBuilder();
}
/**
*
*
*
* Required. Action to present to the user.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction open_uri_action = 1;
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlActionOrBuilder
getOpenUriActionOrBuilder() {
if (openUriActionBuilder_ != null) {
return openUriActionBuilder_.getMessageOrBuilder();
} else {
return openUriAction_ == null
? com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction.getDefaultInstance()
: openUriAction_;
}
}
/**
*
*
*
* Required. Action to present to the user.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem.OpenUrlAction open_uri_action = 1;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction,
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction.Builder,
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlActionOrBuilder>
getOpenUriActionFieldBuilder() {
if (openUriActionBuilder_ == null) {
openUriActionBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction,
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlAction.Builder,
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.OpenUrlActionOrBuilder>(
getOpenUriAction(), getParentForChildren(), isClean());
openUriAction_ = null;
}
return openUriActionBuilder_;
}
private java.lang.Object title_ = "";
/**
*
*
*
* Required. Title of the carousel item. Maximum of two lines of text.
*
*
* string title = 2;
*
* @return The title.
*/
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. Maximum of two lines of text.
*
*
* string title = 2;
*
* @return The bytes for title.
*/
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. Maximum of two lines of text.
*
*
* string title = 2;
*
* @param value The title to set.
* @return This builder for chaining.
*/
public Builder setTitle(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
title_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Required. Title of the carousel item. Maximum of two lines of text.
*
*
* string title = 2;
*
* @return This builder for chaining.
*/
public Builder clearTitle() {
title_ = getDefaultInstance().getTitle();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Required. Title of the carousel item. Maximum of two lines of text.
*
*
* string title = 2;
*
* @param value The bytes for title to set.
* @return This builder for chaining.
*/
public Builder setTitleBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
title_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
*
*
*
* Optional. Description of the carousel item. Maximum of four lines of
* text.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The description.
*/
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. Description of the carousel item. Maximum of four lines of
* text.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for description.
*/
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. Description of the carousel item. Maximum of four lines of
* text.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Optional. Description of the carousel item. Maximum of four lines of
* text.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* Optional. Description of the carousel item. Maximum of four lines of
* text.
*
*
* string description = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private com.google.cloud.dialogflow.v2.Intent.Message.Image image_;
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. Hero image for the carousel item.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the image field is set.
*/
public boolean hasImage() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Optional. Hero image for the carousel item.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The image.
*/
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. Hero image for the carousel item.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setImage(com.google.cloud.dialogflow.v2.Intent.Message.Image value) {
if (imageBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
image_ = value;
} else {
imageBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Optional. Hero image for the carousel item.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setImage(
com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder builderForValue) {
if (imageBuilder_ == null) {
image_ = builderForValue.build();
} else {
imageBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Optional. Hero image for the carousel item.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder mergeImage(com.google.cloud.dialogflow.v2.Intent.Message.Image value) {
if (imageBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)
&& image_ != null
&& image_
!= com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance()) {
getImageBuilder().mergeFrom(value);
} else {
image_ = value;
}
} else {
imageBuilder_.mergeFrom(value);
}
if (image_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
*
*
* Optional. Hero image for the carousel item.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearImage() {
bitField0_ = (bitField0_ & ~0x00000008);
image_ = null;
if (imageBuilder_ != null) {
imageBuilder_.dispose();
imageBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Optional. Hero image for the carousel item.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder getImageBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getImageFieldBuilder().getBuilder();
}
/**
*
*
*
* Optional. Hero image for the carousel item.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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. Hero image for the carousel item.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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.lang.Object footer_ = "";
/**
*
*
*
* Optional. Text that appears at the bottom of the Browse Carousel
* Card. Maximum of one line of text.
*
*
* string footer = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The footer.
*/
public java.lang.String getFooter() {
java.lang.Object ref = footer_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
footer_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Optional. Text that appears at the bottom of the Browse Carousel
* Card. Maximum of one line of text.
*
*
* string footer = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for footer.
*/
public com.google.protobuf.ByteString getFooterBytes() {
java.lang.Object ref = footer_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
footer_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Optional. Text that appears at the bottom of the Browse Carousel
* Card. Maximum of one line of text.
*
*
* string footer = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The footer to set.
* @return This builder for chaining.
*/
public Builder setFooter(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
footer_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Optional. Text that appears at the bottom of the Browse Carousel
* Card. Maximum of one line of text.
*
*
* string footer = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearFooter() {
footer_ = getDefaultInstance().getFooter();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
*
*
* Optional. Text that appears at the bottom of the Browse Carousel
* Card. Maximum of one line of text.
*
*
* string footer = 5 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for footer to set.
* @return This builder for chaining.
*/
public Builder setFooterBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
footer_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem)
private static final com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem();
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public BrowseCarouselCardItem parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int ITEMS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List<
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem>
items_;
/**
*
*
*
* Required. List of items in the Browse Carousel Card. Minimum of two
* items, maximum of ten.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1;
*
*/
@java.lang.Override
public java.util.List<
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem>
getItemsList() {
return items_;
}
/**
*
*
*
* Required. List of items in the Browse Carousel Card. Minimum of two
* items, maximum of ten.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1;
*
*/
@java.lang.Override
public java.util.List<
? extends
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItemOrBuilder>
getItemsOrBuilderList() {
return items_;
}
/**
*
*
*
* Required. List of items in the Browse Carousel Card. Minimum of two
* items, maximum of ten.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1;
*
*/
@java.lang.Override
public int getItemsCount() {
return items_.size();
}
/**
*
*
*
* Required. List of items in the Browse Carousel Card. Minimum of two
* items, maximum of ten.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem
getItems(int index) {
return items_.get(index);
}
/**
*
*
*
* Required. List of items in the Browse Carousel Card. Minimum of two
* items, maximum of ten.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItemOrBuilder
getItemsOrBuilder(int index) {
return items_.get(index);
}
public static final int IMAGE_DISPLAY_OPTIONS_FIELD_NUMBER = 2;
private int imageDisplayOptions_ = 0;
/**
*
*
*
* Optional. Settings for displaying the image. Applies to every image in
* [items][google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.items].
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions image_display_options = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for imageDisplayOptions.
*/
@java.lang.Override
public int getImageDisplayOptionsValue() {
return imageDisplayOptions_;
}
/**
*
*
*
* Optional. Settings for displaying the image. Applies to every image in
* [items][google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.items].
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions image_display_options = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The imageDisplayOptions.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions
getImageDisplayOptions() {
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions
result =
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions
.forNumber(imageDisplayOptions_);
return result == null
? com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions
.UNRECOGNIZED
: result;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
for (int i = 0; i < items_.size(); i++) {
output.writeMessage(1, items_.get(i));
}
if (imageDisplayOptions_
!= com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions
.IMAGE_DISPLAY_OPTIONS_UNSPECIFIED
.getNumber()) {
output.writeEnum(2, imageDisplayOptions_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
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));
}
if (imageDisplayOptions_
!= com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions
.IMAGE_DISPLAY_OPTIONS_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, imageDisplayOptions_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard other =
(com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard) obj;
if (!getItemsList().equals(other.getItemsList())) return false;
if (imageDisplayOptions_ != other.imageDisplayOptions_) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getItemsCount() > 0) {
hash = (37 * hash) + ITEMS_FIELD_NUMBER;
hash = (53 * hash) + getItemsList().hashCode();
}
hash = (37 * hash) + IMAGE_DISPLAY_OPTIONS_FIELD_NUMBER;
hash = (53 * hash) + imageDisplayOptions_;
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard 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.BrowseCarouselCard parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard 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.BrowseCarouselCard parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard 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.BrowseCarouselCard 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.BrowseCarouselCard 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.BrowseCarouselCard
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.BrowseCarouselCard
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.BrowseCarouselCard 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.BrowseCarouselCard parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Browse Carousel Card for Actions on Google.
* https://developers.google.com/actions/assistant/responses#browsing_carousel
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard)
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCardOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_BrowseCarouselCard_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_BrowseCarouselCard_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.class,
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.Builder.class);
}
// Construct using
// com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (itemsBuilder_ == null) {
items_ = java.util.Collections.emptyList();
} else {
items_ = null;
itemsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
imageDisplayOptions_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_BrowseCarouselCard_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard build() {
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard buildPartial() {
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard result =
new com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard result) {
if (itemsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
items_ = java.util.Collections.unmodifiableList(items_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.items_ = items_;
} else {
result.items_ = itemsBuilder_.build();
}
}
private void buildPartial0(
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.imageDisplayOptions_ = imageDisplayOptions_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard) {
return mergeFrom(
(com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard other) {
if (other
== com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.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_);
}
}
}
if (other.imageDisplayOptions_ != 0) {
setImageDisplayOptionsValue(other.getImageDisplayOptionsValue());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem
m =
input.readMessage(
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.parser(),
extensionRegistry);
if (itemsBuilder_ == null) {
ensureItemsIsMutable();
items_.add(m);
} else {
itemsBuilder_.addMessage(m);
}
break;
} // case 10
case 16:
{
imageDisplayOptions_ = input.readEnum();
bitField0_ |= 0x00000002;
break;
} // case 16
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.util.List<
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem>
items_ = java.util.Collections.emptyList();
private void ensureItemsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
items_ =
new java.util.ArrayList<
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem>(items_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem,
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.Builder,
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItemOrBuilder>
itemsBuilder_;
/**
*
*
*
* Required. List of items in the Browse Carousel Card. Minimum of two
* items, maximum of ten.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1;
*
*/
public java.util.List<
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem>
getItemsList() {
if (itemsBuilder_ == null) {
return java.util.Collections.unmodifiableList(items_);
} else {
return itemsBuilder_.getMessageList();
}
}
/**
*
*
*
* Required. List of items in the Browse Carousel Card. Minimum of two
* items, maximum of ten.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1;
*
*/
public int getItemsCount() {
if (itemsBuilder_ == null) {
return items_.size();
} else {
return itemsBuilder_.getCount();
}
}
/**
*
*
*
* Required. List of items in the Browse Carousel Card. Minimum of two
* items, maximum of ten.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1;
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem
getItems(int index) {
if (itemsBuilder_ == null) {
return items_.get(index);
} else {
return itemsBuilder_.getMessage(index);
}
}
/**
*
*
*
* Required. List of items in the Browse Carousel Card. Minimum of two
* items, maximum of ten.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1;
*
*/
public Builder setItems(
int index,
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem
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 of items in the Browse Carousel Card. Minimum of two
* items, maximum of ten.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1;
*
*/
public Builder setItems(
int index,
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem
.Builder
builderForValue) {
if (itemsBuilder_ == null) {
ensureItemsIsMutable();
items_.set(index, builderForValue.build());
onChanged();
} else {
itemsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Required. List of items in the Browse Carousel Card. Minimum of two
* items, maximum of ten.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1;
*
*/
public Builder addItems(
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem
value) {
if (itemsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureItemsIsMutable();
items_.add(value);
onChanged();
} else {
itemsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Required. List of items in the Browse Carousel Card. Minimum of two
* items, maximum of ten.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1;
*
*/
public Builder addItems(
int index,
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem
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 of items in the Browse Carousel Card. Minimum of two
* items, maximum of ten.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1;
*
*/
public Builder addItems(
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem
.Builder
builderForValue) {
if (itemsBuilder_ == null) {
ensureItemsIsMutable();
items_.add(builderForValue.build());
onChanged();
} else {
itemsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Required. List of items in the Browse Carousel Card. Minimum of two
* items, maximum of ten.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1;
*
*/
public Builder addItems(
int index,
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem
.Builder
builderForValue) {
if (itemsBuilder_ == null) {
ensureItemsIsMutable();
items_.add(index, builderForValue.build());
onChanged();
} else {
itemsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Required. List of items in the Browse Carousel Card. Minimum of two
* items, maximum of ten.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1;
*
*/
public Builder addAllItems(
java.lang.Iterable<
? extends
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem>
values) {
if (itemsBuilder_ == null) {
ensureItemsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, items_);
onChanged();
} else {
itemsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Required. List of items in the Browse Carousel Card. Minimum of two
* items, maximum of ten.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1;
*
*/
public Builder clearItems() {
if (itemsBuilder_ == null) {
items_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
itemsBuilder_.clear();
}
return this;
}
/**
*
*
*
* Required. List of items in the Browse Carousel Card. Minimum of two
* items, maximum of ten.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1;
*
*/
public Builder removeItems(int index) {
if (itemsBuilder_ == null) {
ensureItemsIsMutable();
items_.remove(index);
onChanged();
} else {
itemsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Required. List of items in the Browse Carousel Card. Minimum of two
* items, maximum of ten.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1;
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.Builder
getItemsBuilder(int index) {
return getItemsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Required. List of items in the Browse Carousel Card. Minimum of two
* items, maximum of ten.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1;
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItemOrBuilder
getItemsOrBuilder(int index) {
if (itemsBuilder_ == null) {
return items_.get(index);
} else {
return itemsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Required. List of items in the Browse Carousel Card. Minimum of two
* items, maximum of ten.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1;
*
*/
public java.util.List<
? extends
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItemOrBuilder>
getItemsOrBuilderList() {
if (itemsBuilder_ != null) {
return itemsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(items_);
}
}
/**
*
*
*
* Required. List of items in the Browse Carousel Card. Minimum of two
* items, maximum of ten.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1;
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.Builder
addItemsBuilder() {
return getItemsFieldBuilder()
.addBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.getDefaultInstance());
}
/**
*
*
*
* Required. List of items in the Browse Carousel Card. Minimum of two
* items, maximum of ten.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1;
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.Builder
addItemsBuilder(int index) {
return getItemsFieldBuilder()
.addBuilder(
index,
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.getDefaultInstance());
}
/**
*
*
*
* Required. List of items in the Browse Carousel Card. Minimum of two
* items, maximum of ten.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.BrowseCarouselCardItem items = 1;
*
*/
public java.util.List<
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.Builder>
getItemsBuilderList() {
return getItemsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem,
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.Builder,
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItemOrBuilder>
getItemsFieldBuilder() {
if (itemsBuilder_ == null) {
itemsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem,
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItem.Builder,
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.BrowseCarouselCardItemOrBuilder>(
items_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
items_ = null;
}
return itemsBuilder_;
}
private int imageDisplayOptions_ = 0;
/**
*
*
*
* Optional. Settings for displaying the image. Applies to every image in
* [items][google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.items].
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions image_display_options = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for imageDisplayOptions.
*/
@java.lang.Override
public int getImageDisplayOptionsValue() {
return imageDisplayOptions_;
}
/**
*
*
*
* Optional. Settings for displaying the image. Applies to every image in
* [items][google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.items].
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions image_display_options = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The enum numeric value on the wire for imageDisplayOptions to set.
* @return This builder for chaining.
*/
public Builder setImageDisplayOptionsValue(int value) {
imageDisplayOptions_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. Settings for displaying the image. Applies to every image in
* [items][google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.items].
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions image_display_options = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The imageDisplayOptions.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions
getImageDisplayOptions() {
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions
result =
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.ImageDisplayOptions.forNumber(imageDisplayOptions_);
return result == null
? com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions
.UNRECOGNIZED
: result;
}
/**
*
*
*
* Optional. Settings for displaying the image. Applies to every image in
* [items][google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.items].
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions image_display_options = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The imageDisplayOptions to set.
* @return This builder for chaining.
*/
public Builder setImageDisplayOptions(
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions
value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
imageDisplayOptions_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Optional. Settings for displaying the image. Applies to every image in
* [items][google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.items].
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.ImageDisplayOptions image_display_options = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return This builder for chaining.
*/
public Builder clearImageDisplayOptions() {
bitField0_ = (bitField0_ & ~0x00000002);
imageDisplayOptions_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard)
private static final com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard();
}
public static com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public BrowseCarouselCard parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TableCardOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.TableCard)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Required. Title of the card.
*
*
* string title = 1;
*
* @return The title.
*/
java.lang.String getTitle();
/**
*
*
*
* Required. Title of the card.
*
*
* string title = 1;
*
* @return The bytes for title.
*/
com.google.protobuf.ByteString getTitleBytes();
/**
*
*
*
* Optional. Subtitle to the title.
*
*
* string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The subtitle.
*/
java.lang.String getSubtitle();
/**
*
*
*
* Optional. Subtitle to the title.
*
*
* string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for subtitle.
*/
com.google.protobuf.ByteString getSubtitleBytes();
/**
*
*
*
* Optional. Image which should be displayed on the card.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the image field is set.
*/
boolean hasImage();
/**
*
*
*
* Optional. Image which should be displayed on the card.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The image.
*/
com.google.cloud.dialogflow.v2.Intent.Message.Image getImage();
/**
*
*
*
* Optional. Image which should be displayed on the card.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder getImageOrBuilder();
/**
*
*
*
* Optional. Display properties for the columns in this table.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
java.util.List
getColumnPropertiesList();
/**
*
*
*
* Optional. Display properties for the columns in this table.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties getColumnProperties(int index);
/**
*
*
*
* Optional. Display properties for the columns in this table.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
int getColumnPropertiesCount();
/**
*
*
*
* Optional. Display properties for the columns in this table.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
java.util.List<
? extends com.google.cloud.dialogflow.v2.Intent.Message.ColumnPropertiesOrBuilder>
getColumnPropertiesOrBuilderList();
/**
*
*
*
* Optional. Display properties for the columns in this table.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
com.google.cloud.dialogflow.v2.Intent.Message.ColumnPropertiesOrBuilder
getColumnPropertiesOrBuilder(int index);
/**
*
*
*
* Optional. Rows in this table of data.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
java.util.List getRowsList();
/**
*
*
*
* Optional. Rows in this table of data.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow getRows(int index);
/**
*
*
*
* Optional. Rows in this table of data.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
int getRowsCount();
/**
*
*
*
* Optional. Rows in this table of data.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
java.util.List extends com.google.cloud.dialogflow.v2.Intent.Message.TableCardRowOrBuilder>
getRowsOrBuilderList();
/**
*
*
*
* Optional. Rows in this table of data.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
com.google.cloud.dialogflow.v2.Intent.Message.TableCardRowOrBuilder getRowsOrBuilder(
int index);
/**
*
*
*
* Optional. List of buttons for the card.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*/
java.util.List
getButtonsList();
/**
*
*
*
* Optional. List of buttons for the card.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*/
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button getButtons(int index);
/**
*
*
*
* Optional. List of buttons for the card.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*/
int getButtonsCount();
/**
*
*
*
* Optional. List of buttons for the card.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*/
java.util.List<
? extends com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.ButtonOrBuilder>
getButtonsOrBuilderList();
/**
*
*
*
* Optional. List of buttons for the card.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*/
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.ButtonOrBuilder getButtonsOrBuilder(
int index);
}
/**
*
*
*
* Table card for Actions on Google.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.TableCard}
*/
public static final class TableCard extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.TableCard)
TableCardOrBuilder {
private static final long serialVersionUID = 0L;
// Use TableCard.newBuilder() to construct.
private TableCard(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TableCard() {
title_ = "";
subtitle_ = "";
columnProperties_ = java.util.Collections.emptyList();
rows_ = java.util.Collections.emptyList();
buttons_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new TableCard();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_TableCard_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_TableCard_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.TableCard.class,
com.google.cloud.dialogflow.v2.Intent.Message.TableCard.Builder.class);
}
private int bitField0_;
public static final int TITLE_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object title_ = "";
/**
*
*
*
* Required. Title of the card.
*
*
* string title = 1;
*
* @return The title.
*/
@java.lang.Override
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 card.
*
*
* string title = 1;
*
* @return The bytes for title.
*/
@java.lang.Override
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;
@SuppressWarnings("serial")
private volatile java.lang.Object subtitle_ = "";
/**
*
*
*
* Optional. Subtitle to the title.
*
*
* string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The subtitle.
*/
@java.lang.Override
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. Subtitle to the title.
*
*
* string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for subtitle.
*/
@java.lang.Override
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_FIELD_NUMBER = 3;
private com.google.cloud.dialogflow.v2.Intent.Message.Image image_;
/**
*
*
*
* Optional. Image which should be displayed on the card.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the image field is set.
*/
@java.lang.Override
public boolean hasImage() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Optional. Image which should be displayed on the card.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The image.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.Image getImage() {
return image_ == null
? com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance()
: image_;
}
/**
*
*
*
* Optional. Image which should be displayed on the card.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder getImageOrBuilder() {
return image_ == null
? com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance()
: image_;
}
public static final int COLUMN_PROPERTIES_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private java.util.List
columnProperties_;
/**
*
*
*
* Optional. Display properties for the columns in this table.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List
getColumnPropertiesList() {
return columnProperties_;
}
/**
*
*
*
* Optional. Display properties for the columns in this table.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List<
? extends com.google.cloud.dialogflow.v2.Intent.Message.ColumnPropertiesOrBuilder>
getColumnPropertiesOrBuilderList() {
return columnProperties_;
}
/**
*
*
*
* Optional. Display properties for the columns in this table.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public int getColumnPropertiesCount() {
return columnProperties_.size();
}
/**
*
*
*
* Optional. Display properties for the columns in this table.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties getColumnProperties(
int index) {
return columnProperties_.get(index);
}
/**
*
*
*
* Optional. Display properties for the columns in this table.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.ColumnPropertiesOrBuilder
getColumnPropertiesOrBuilder(int index) {
return columnProperties_.get(index);
}
public static final int ROWS_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private java.util.List rows_;
/**
*
*
*
* Optional. Rows in this table of data.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List
getRowsList() {
return rows_;
}
/**
*
*
*
* Optional. Rows in this table of data.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List<
? extends com.google.cloud.dialogflow.v2.Intent.Message.TableCardRowOrBuilder>
getRowsOrBuilderList() {
return rows_;
}
/**
*
*
*
* Optional. Rows in this table of data.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public int getRowsCount() {
return rows_.size();
}
/**
*
*
*
* Optional. Rows in this table of data.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow getRows(int index) {
return rows_.get(index);
}
/**
*
*
*
* Optional. Rows in this table of data.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.TableCardRowOrBuilder getRowsOrBuilder(
int index) {
return rows_.get(index);
}
public static final int BUTTONS_FIELD_NUMBER = 6;
@SuppressWarnings("serial")
private java.util.List
buttons_;
/**
*
*
*
* Optional. List of buttons for the card.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List
getButtonsList() {
return buttons_;
}
/**
*
*
*
* Optional. List of buttons for the card.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List<
? extends com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.ButtonOrBuilder>
getButtonsOrBuilderList() {
return buttons_;
}
/**
*
*
*
* Optional. List of buttons for the card.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public int getButtonsCount() {
return buttons_.size();
}
/**
*
*
*
* Optional. List of buttons for the card.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button getButtons(int index) {
return buttons_.get(index);
}
/**
*
*
*
* Optional. List of buttons for the card.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.ButtonOrBuilder
getButtonsOrBuilder(int index) {
return buttons_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subtitle_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, subtitle_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(3, getImage());
}
for (int i = 0; i < columnProperties_.size(); i++) {
output.writeMessage(4, columnProperties_.get(i));
}
for (int i = 0; i < rows_.size(); i++) {
output.writeMessage(5, rows_.get(i));
}
for (int i = 0; i < buttons_.size(); i++) {
output.writeMessage(6, buttons_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subtitle_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, subtitle_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getImage());
}
for (int i = 0; i < columnProperties_.size(); i++) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(4, columnProperties_.get(i));
}
for (int i = 0; i < rows_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, rows_.get(i));
}
for (int i = 0; i < buttons_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, buttons_.get(i));
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.v2.Intent.Message.TableCard)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Message.TableCard other =
(com.google.cloud.dialogflow.v2.Intent.Message.TableCard) obj;
if (!getTitle().equals(other.getTitle())) return false;
if (!getSubtitle().equals(other.getSubtitle())) return false;
if (hasImage() != other.hasImage()) return false;
if (hasImage()) {
if (!getImage().equals(other.getImage())) return false;
}
if (!getColumnPropertiesList().equals(other.getColumnPropertiesList())) return false;
if (!getRowsList().equals(other.getRowsList())) return false;
if (!getButtonsList().equals(other.getButtonsList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TITLE_FIELD_NUMBER;
hash = (53 * hash) + getTitle().hashCode();
hash = (37 * hash) + SUBTITLE_FIELD_NUMBER;
hash = (53 * hash) + getSubtitle().hashCode();
if (hasImage()) {
hash = (37 * hash) + IMAGE_FIELD_NUMBER;
hash = (53 * hash) + getImage().hashCode();
}
if (getColumnPropertiesCount() > 0) {
hash = (37 * hash) + COLUMN_PROPERTIES_FIELD_NUMBER;
hash = (53 * hash) + getColumnPropertiesList().hashCode();
}
if (getRowsCount() > 0) {
hash = (37 * hash) + ROWS_FIELD_NUMBER;
hash = (53 * hash) + getRowsList().hashCode();
}
if (getButtonsCount() > 0) {
hash = (37 * hash) + BUTTONS_FIELD_NUMBER;
hash = (53 * hash) + getButtonsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.Message.TableCard parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.TableCard 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.TableCard parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.TableCard 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.TableCard parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.TableCard 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.TableCard 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.TableCard 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.TableCard 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.TableCard 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.TableCard 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.TableCard parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.TableCard prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Table card for Actions on Google.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.TableCard}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.TableCard)
com.google.cloud.dialogflow.v2.Intent.Message.TableCardOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_TableCard_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_TableCard_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.TableCard.class,
com.google.cloud.dialogflow.v2.Intent.Message.TableCard.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.Intent.Message.TableCard.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getImageFieldBuilder();
getColumnPropertiesFieldBuilder();
getRowsFieldBuilder();
getButtonsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
title_ = "";
subtitle_ = "";
image_ = null;
if (imageBuilder_ != null) {
imageBuilder_.dispose();
imageBuilder_ = null;
}
if (columnPropertiesBuilder_ == null) {
columnProperties_ = java.util.Collections.emptyList();
} else {
columnProperties_ = null;
columnPropertiesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
if (rowsBuilder_ == null) {
rows_ = java.util.Collections.emptyList();
} else {
rows_ = null;
rowsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
if (buttonsBuilder_ == null) {
buttons_ = java.util.Collections.emptyList();
} else {
buttons_ = null;
buttonsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000020);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_TableCard_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.TableCard getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.TableCard.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.TableCard build() {
com.google.cloud.dialogflow.v2.Intent.Message.TableCard result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.TableCard buildPartial() {
com.google.cloud.dialogflow.v2.Intent.Message.TableCard result =
new com.google.cloud.dialogflow.v2.Intent.Message.TableCard(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.dialogflow.v2.Intent.Message.TableCard result) {
if (columnPropertiesBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)) {
columnProperties_ = java.util.Collections.unmodifiableList(columnProperties_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.columnProperties_ = columnProperties_;
} else {
result.columnProperties_ = columnPropertiesBuilder_.build();
}
if (rowsBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0)) {
rows_ = java.util.Collections.unmodifiableList(rows_);
bitField0_ = (bitField0_ & ~0x00000010);
}
result.rows_ = rows_;
} else {
result.rows_ = rowsBuilder_.build();
}
if (buttonsBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0)) {
buttons_ = java.util.Collections.unmodifiableList(buttons_);
bitField0_ = (bitField0_ & ~0x00000020);
}
result.buttons_ = buttons_;
} else {
result.buttons_ = buttonsBuilder_.build();
}
}
private void buildPartial0(com.google.cloud.dialogflow.v2.Intent.Message.TableCard result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.title_ = title_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.subtitle_ = subtitle_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.image_ = imageBuilder_ == null ? image_ : imageBuilder_.build();
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent.Message.TableCard) {
return mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.TableCard) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.Message.TableCard other) {
if (other == com.google.cloud.dialogflow.v2.Intent.Message.TableCard.getDefaultInstance())
return this;
if (!other.getTitle().isEmpty()) {
title_ = other.title_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getSubtitle().isEmpty()) {
subtitle_ = other.subtitle_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasImage()) {
mergeImage(other.getImage());
}
if (columnPropertiesBuilder_ == null) {
if (!other.columnProperties_.isEmpty()) {
if (columnProperties_.isEmpty()) {
columnProperties_ = other.columnProperties_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureColumnPropertiesIsMutable();
columnProperties_.addAll(other.columnProperties_);
}
onChanged();
}
} else {
if (!other.columnProperties_.isEmpty()) {
if (columnPropertiesBuilder_.isEmpty()) {
columnPropertiesBuilder_.dispose();
columnPropertiesBuilder_ = null;
columnProperties_ = other.columnProperties_;
bitField0_ = (bitField0_ & ~0x00000008);
columnPropertiesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getColumnPropertiesFieldBuilder()
: null;
} else {
columnPropertiesBuilder_.addAllMessages(other.columnProperties_);
}
}
}
if (rowsBuilder_ == null) {
if (!other.rows_.isEmpty()) {
if (rows_.isEmpty()) {
rows_ = other.rows_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensureRowsIsMutable();
rows_.addAll(other.rows_);
}
onChanged();
}
} else {
if (!other.rows_.isEmpty()) {
if (rowsBuilder_.isEmpty()) {
rowsBuilder_.dispose();
rowsBuilder_ = null;
rows_ = other.rows_;
bitField0_ = (bitField0_ & ~0x00000010);
rowsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getRowsFieldBuilder()
: null;
} else {
rowsBuilder_.addAllMessages(other.rows_);
}
}
}
if (buttonsBuilder_ == null) {
if (!other.buttons_.isEmpty()) {
if (buttons_.isEmpty()) {
buttons_ = other.buttons_;
bitField0_ = (bitField0_ & ~0x00000020);
} else {
ensureButtonsIsMutable();
buttons_.addAll(other.buttons_);
}
onChanged();
}
} else {
if (!other.buttons_.isEmpty()) {
if (buttonsBuilder_.isEmpty()) {
buttonsBuilder_.dispose();
buttonsBuilder_ = null;
buttons_ = other.buttons_;
bitField0_ = (bitField0_ & ~0x00000020);
buttonsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getButtonsFieldBuilder()
: null;
} else {
buttonsBuilder_.addAllMessages(other.buttons_);
}
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
title_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
subtitle_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
input.readMessage(getImageFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties m =
input.readMessage(
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.parser(),
extensionRegistry);
if (columnPropertiesBuilder_ == null) {
ensureColumnPropertiesIsMutable();
columnProperties_.add(m);
} else {
columnPropertiesBuilder_.addMessage(m);
}
break;
} // case 34
case 42:
{
com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow m =
input.readMessage(
com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow.parser(),
extensionRegistry);
if (rowsBuilder_ == null) {
ensureRowsIsMutable();
rows_.add(m);
} else {
rowsBuilder_.addMessage(m);
}
break;
} // case 42
case 50:
{
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button m =
input.readMessage(
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.parser(),
extensionRegistry);
if (buttonsBuilder_ == null) {
ensureButtonsIsMutable();
buttons_.add(m);
} else {
buttonsBuilder_.addMessage(m);
}
break;
} // case 50
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object title_ = "";
/**
*
*
*
* Required. Title of the card.
*
*
* string title = 1;
*
* @return The title.
*/
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 card.
*
*
* string title = 1;
*
* @return The bytes for title.
*/
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 card.
*
*
* string title = 1;
*
* @param value The title to set.
* @return This builder for chaining.
*/
public Builder setTitle(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
title_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. Title of the card.
*
*
* string title = 1;
*
* @return This builder for chaining.
*/
public Builder clearTitle() {
title_ = getDefaultInstance().getTitle();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Required. Title of the card.
*
*
* string title = 1;
*
* @param value The bytes for title to set.
* @return This builder for chaining.
*/
public Builder setTitleBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
title_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object subtitle_ = "";
/**
*
*
*
* Optional. Subtitle to the title.
*
*
* string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The subtitle.
*/
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. Subtitle to the title.
*
*
* string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for subtitle.
*/
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. Subtitle to the title.
*
*
* string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The subtitle to set.
* @return This builder for chaining.
*/
public Builder setSubtitle(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
subtitle_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. Subtitle to the title.
*
*
* string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearSubtitle() {
subtitle_ = getDefaultInstance().getSubtitle();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Optional. Subtitle to the title.
*
*
* string subtitle = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for subtitle to set.
* @return This builder for chaining.
*/
public Builder setSubtitleBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
subtitle_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private com.google.cloud.dialogflow.v2.Intent.Message.Image image_;
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. Image which should be displayed on the card.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the image field is set.
*/
public boolean hasImage() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Optional. Image which should be displayed on the card.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The image.
*/
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. Image which should be displayed on the card.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setImage(com.google.cloud.dialogflow.v2.Intent.Message.Image value) {
if (imageBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
image_ = value;
} else {
imageBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Optional. Image which should be displayed on the card.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setImage(
com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder builderForValue) {
if (imageBuilder_ == null) {
image_ = builderForValue.build();
} else {
imageBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Optional. Image which should be displayed on the card.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder mergeImage(com.google.cloud.dialogflow.v2.Intent.Message.Image value) {
if (imageBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)
&& image_ != null
&& image_
!= com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance()) {
getImageBuilder().mergeFrom(value);
} else {
image_ = value;
}
} else {
imageBuilder_.mergeFrom(value);
}
if (image_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
*
*
* Optional. Image which should be displayed on the card.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearImage() {
bitField0_ = (bitField0_ & ~0x00000004);
image_ = null;
if (imageBuilder_ != null) {
imageBuilder_.dispose();
imageBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Optional. Image which should be displayed on the card.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder getImageBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getImageFieldBuilder().getBuilder();
}
/**
*
*
*
* Optional. Image which should be displayed on the card.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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. Image which should be displayed on the card.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 3 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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
columnProperties_ = java.util.Collections.emptyList();
private void ensureColumnPropertiesIsMutable() {
if (!((bitField0_ & 0x00000008) != 0)) {
columnProperties_ =
new java.util.ArrayList<
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties>(
columnProperties_);
bitField0_ |= 0x00000008;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties,
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.Builder,
com.google.cloud.dialogflow.v2.Intent.Message.ColumnPropertiesOrBuilder>
columnPropertiesBuilder_;
/**
*
*
*
* Optional. Display properties for the columns in this table.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List
getColumnPropertiesList() {
if (columnPropertiesBuilder_ == null) {
return java.util.Collections.unmodifiableList(columnProperties_);
} else {
return columnPropertiesBuilder_.getMessageList();
}
}
/**
*
*
*
* Optional. Display properties for the columns in this table.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public int getColumnPropertiesCount() {
if (columnPropertiesBuilder_ == null) {
return columnProperties_.size();
} else {
return columnPropertiesBuilder_.getCount();
}
}
/**
*
*
*
* Optional. Display properties for the columns in this table.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties getColumnProperties(
int index) {
if (columnPropertiesBuilder_ == null) {
return columnProperties_.get(index);
} else {
return columnPropertiesBuilder_.getMessage(index);
}
}
/**
*
*
*
* Optional. Display properties for the columns in this table.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setColumnProperties(
int index, com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties value) {
if (columnPropertiesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureColumnPropertiesIsMutable();
columnProperties_.set(index, value);
onChanged();
} else {
columnPropertiesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. Display properties for the columns in this table.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setColumnProperties(
int index,
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.Builder
builderForValue) {
if (columnPropertiesBuilder_ == null) {
ensureColumnPropertiesIsMutable();
columnProperties_.set(index, builderForValue.build());
onChanged();
} else {
columnPropertiesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. Display properties for the columns in this table.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addColumnProperties(
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties value) {
if (columnPropertiesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureColumnPropertiesIsMutable();
columnProperties_.add(value);
onChanged();
} else {
columnPropertiesBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Optional. Display properties for the columns in this table.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addColumnProperties(
int index, com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties value) {
if (columnPropertiesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureColumnPropertiesIsMutable();
columnProperties_.add(index, value);
onChanged();
} else {
columnPropertiesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. Display properties for the columns in this table.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addColumnProperties(
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.Builder
builderForValue) {
if (columnPropertiesBuilder_ == null) {
ensureColumnPropertiesIsMutable();
columnProperties_.add(builderForValue.build());
onChanged();
} else {
columnPropertiesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. Display properties for the columns in this table.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addColumnProperties(
int index,
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.Builder
builderForValue) {
if (columnPropertiesBuilder_ == null) {
ensureColumnPropertiesIsMutable();
columnProperties_.add(index, builderForValue.build());
onChanged();
} else {
columnPropertiesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. Display properties for the columns in this table.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addAllColumnProperties(
java.lang.Iterable<
? extends com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties>
values) {
if (columnPropertiesBuilder_ == null) {
ensureColumnPropertiesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, columnProperties_);
onChanged();
} else {
columnPropertiesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Optional. Display properties for the columns in this table.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearColumnProperties() {
if (columnPropertiesBuilder_ == null) {
columnProperties_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
columnPropertiesBuilder_.clear();
}
return this;
}
/**
*
*
*
* Optional. Display properties for the columns in this table.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder removeColumnProperties(int index) {
if (columnPropertiesBuilder_ == null) {
ensureColumnPropertiesIsMutable();
columnProperties_.remove(index);
onChanged();
} else {
columnPropertiesBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Optional. Display properties for the columns in this table.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.Builder
getColumnPropertiesBuilder(int index) {
return getColumnPropertiesFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Optional. Display properties for the columns in this table.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.ColumnPropertiesOrBuilder
getColumnPropertiesOrBuilder(int index) {
if (columnPropertiesBuilder_ == null) {
return columnProperties_.get(index);
} else {
return columnPropertiesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Optional. Display properties for the columns in this table.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List<
? extends com.google.cloud.dialogflow.v2.Intent.Message.ColumnPropertiesOrBuilder>
getColumnPropertiesOrBuilderList() {
if (columnPropertiesBuilder_ != null) {
return columnPropertiesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(columnProperties_);
}
}
/**
*
*
*
* Optional. Display properties for the columns in this table.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.Builder
addColumnPropertiesBuilder() {
return getColumnPropertiesFieldBuilder()
.addBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties
.getDefaultInstance());
}
/**
*
*
*
* Optional. Display properties for the columns in this table.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.Builder
addColumnPropertiesBuilder(int index) {
return getColumnPropertiesFieldBuilder()
.addBuilder(
index,
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties
.getDefaultInstance());
}
/**
*
*
*
* Optional. Display properties for the columns in this table.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties column_properties = 4 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List<
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.Builder>
getColumnPropertiesBuilderList() {
return getColumnPropertiesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties,
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.Builder,
com.google.cloud.dialogflow.v2.Intent.Message.ColumnPropertiesOrBuilder>
getColumnPropertiesFieldBuilder() {
if (columnPropertiesBuilder_ == null) {
columnPropertiesBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties,
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.Builder,
com.google.cloud.dialogflow.v2.Intent.Message.ColumnPropertiesOrBuilder>(
columnProperties_,
((bitField0_ & 0x00000008) != 0),
getParentForChildren(),
isClean());
columnProperties_ = null;
}
return columnPropertiesBuilder_;
}
private java.util.List rows_ =
java.util.Collections.emptyList();
private void ensureRowsIsMutable() {
if (!((bitField0_ & 0x00000010) != 0)) {
rows_ =
new java.util.ArrayList(
rows_);
bitField0_ |= 0x00000010;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow,
com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow.Builder,
com.google.cloud.dialogflow.v2.Intent.Message.TableCardRowOrBuilder>
rowsBuilder_;
/**
*
*
*
* Optional. Rows in this table of data.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List
getRowsList() {
if (rowsBuilder_ == null) {
return java.util.Collections.unmodifiableList(rows_);
} else {
return rowsBuilder_.getMessageList();
}
}
/**
*
*
*
* Optional. Rows in this table of data.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public int getRowsCount() {
if (rowsBuilder_ == null) {
return rows_.size();
} else {
return rowsBuilder_.getCount();
}
}
/**
*
*
*
* Optional. Rows in this table of data.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow getRows(int index) {
if (rowsBuilder_ == null) {
return rows_.get(index);
} else {
return rowsBuilder_.getMessage(index);
}
}
/**
*
*
*
* Optional. Rows in this table of data.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setRows(
int index, com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow value) {
if (rowsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRowsIsMutable();
rows_.set(index, value);
onChanged();
} else {
rowsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. Rows in this table of data.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setRows(
int index,
com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow.Builder builderForValue) {
if (rowsBuilder_ == null) {
ensureRowsIsMutable();
rows_.set(index, builderForValue.build());
onChanged();
} else {
rowsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. Rows in this table of data.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addRows(com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow value) {
if (rowsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRowsIsMutable();
rows_.add(value);
onChanged();
} else {
rowsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Optional. Rows in this table of data.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addRows(
int index, com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow value) {
if (rowsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRowsIsMutable();
rows_.add(index, value);
onChanged();
} else {
rowsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. Rows in this table of data.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addRows(
com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow.Builder builderForValue) {
if (rowsBuilder_ == null) {
ensureRowsIsMutable();
rows_.add(builderForValue.build());
onChanged();
} else {
rowsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. Rows in this table of data.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addRows(
int index,
com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow.Builder builderForValue) {
if (rowsBuilder_ == null) {
ensureRowsIsMutable();
rows_.add(index, builderForValue.build());
onChanged();
} else {
rowsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. Rows in this table of data.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addAllRows(
java.lang.Iterable extends com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow>
values) {
if (rowsBuilder_ == null) {
ensureRowsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rows_);
onChanged();
} else {
rowsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Optional. Rows in this table of data.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearRows() {
if (rowsBuilder_ == null) {
rows_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
} else {
rowsBuilder_.clear();
}
return this;
}
/**
*
*
*
* Optional. Rows in this table of data.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder removeRows(int index) {
if (rowsBuilder_ == null) {
ensureRowsIsMutable();
rows_.remove(index);
onChanged();
} else {
rowsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Optional. Rows in this table of data.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow.Builder getRowsBuilder(
int index) {
return getRowsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Optional. Rows in this table of data.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.TableCardRowOrBuilder getRowsOrBuilder(
int index) {
if (rowsBuilder_ == null) {
return rows_.get(index);
} else {
return rowsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Optional. Rows in this table of data.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List<
? extends com.google.cloud.dialogflow.v2.Intent.Message.TableCardRowOrBuilder>
getRowsOrBuilderList() {
if (rowsBuilder_ != null) {
return rowsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(rows_);
}
}
/**
*
*
*
* Optional. Rows in this table of data.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow.Builder addRowsBuilder() {
return getRowsFieldBuilder()
.addBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow.getDefaultInstance());
}
/**
*
*
*
* Optional. Rows in this table of data.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow.Builder addRowsBuilder(
int index) {
return getRowsFieldBuilder()
.addBuilder(
index,
com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow.getDefaultInstance());
}
/**
*
*
*
* Optional. Rows in this table of data.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardRow rows = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List
getRowsBuilderList() {
return getRowsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow,
com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow.Builder,
com.google.cloud.dialogflow.v2.Intent.Message.TableCardRowOrBuilder>
getRowsFieldBuilder() {
if (rowsBuilder_ == null) {
rowsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow,
com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow.Builder,
com.google.cloud.dialogflow.v2.Intent.Message.TableCardRowOrBuilder>(
rows_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean());
rows_ = null;
}
return rowsBuilder_;
}
private java.util.List
buttons_ = java.util.Collections.emptyList();
private void ensureButtonsIsMutable() {
if (!((bitField0_ & 0x00000020) != 0)) {
buttons_ =
new java.util.ArrayList<
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button>(buttons_);
bitField0_ |= 0x00000020;
}
}
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. List of buttons for the card.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List
getButtonsList() {
if (buttonsBuilder_ == null) {
return java.util.Collections.unmodifiableList(buttons_);
} else {
return buttonsBuilder_.getMessageList();
}
}
/**
*
*
*
* Optional. List of buttons for the card.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public int getButtonsCount() {
if (buttonsBuilder_ == null) {
return buttons_.size();
} else {
return buttonsBuilder_.getCount();
}
}
/**
*
*
*
* Optional. List of buttons for the card.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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. List of buttons for the card.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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. List of buttons for the card.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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. List of buttons for the card.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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. List of buttons for the card.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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. List of buttons for the card.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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. List of buttons for the card.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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. List of buttons for the card.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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. List of buttons for the card.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearButtons() {
if (buttonsBuilder_ == null) {
buttons_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
} else {
buttonsBuilder_.clear();
}
return this;
}
/**
*
*
*
* Optional. List of buttons for the card.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder removeButtons(int index) {
if (buttonsBuilder_ == null) {
ensureButtonsIsMutable();
buttons_.remove(index);
onChanged();
} else {
buttonsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Optional. List of buttons for the card.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.Builder
getButtonsBuilder(int index) {
return getButtonsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Optional. List of buttons for the card.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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. List of buttons for the card.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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. List of buttons for the card.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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. List of buttons for the card.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*/
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. List of buttons for the card.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button buttons = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List<
com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Button.Builder>
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_ & 0x00000020) != 0), getParentForChildren(), isClean());
buttons_ = null;
}
return buttonsBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.TableCard)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.TableCard)
private static final com.google.cloud.dialogflow.v2.Intent.Message.TableCard DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Message.TableCard();
}
public static com.google.cloud.dialogflow.v2.Intent.Message.TableCard getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TableCard parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.TableCard getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ColumnPropertiesOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.ColumnProperties)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Required. Column heading.
*
*
* string header = 1;
*
* @return The header.
*/
java.lang.String getHeader();
/**
*
*
*
* Required. Column heading.
*
*
* string header = 1;
*
* @return The bytes for header.
*/
com.google.protobuf.ByteString getHeaderBytes();
/**
*
*
*
* Optional. Defines text alignment for all cells in this column.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment horizontal_alignment = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for horizontalAlignment.
*/
int getHorizontalAlignmentValue();
/**
*
*
*
* Optional. Defines text alignment for all cells in this column.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment horizontal_alignment = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The horizontalAlignment.
*/
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment
getHorizontalAlignment();
}
/**
*
*
*
* Column properties for
* [TableCard][google.cloud.dialogflow.v2.Intent.Message.TableCard].
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.ColumnProperties}
*/
public static final class ColumnProperties extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.ColumnProperties)
ColumnPropertiesOrBuilder {
private static final long serialVersionUID = 0L;
// Use ColumnProperties.newBuilder() to construct.
private ColumnProperties(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ColumnProperties() {
header_ = "";
horizontalAlignment_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new ColumnProperties();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_ColumnProperties_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_ColumnProperties_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.class,
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.Builder.class);
}
/**
*
*
*
* Text alignments within a cell.
*
*
* Protobuf enum {@code
* google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment}
*/
public enum HorizontalAlignment implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* Text is aligned to the leading edge of the column.
*
*
* HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0;
*/
HORIZONTAL_ALIGNMENT_UNSPECIFIED(0),
/**
*
*
*
* Text is aligned to the leading edge of the column.
*
*
* LEADING = 1;
*/
LEADING(1),
/**
*
*
*
* Text is centered in the column.
*
*
* CENTER = 2;
*/
CENTER(2),
/**
*
*
*
* Text is aligned to the trailing edge of the column.
*
*
* TRAILING = 3;
*/
TRAILING(3),
UNRECOGNIZED(-1),
;
/**
*
*
*
* Text is aligned to the leading edge of the column.
*
*
* HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0;
*/
public static final int HORIZONTAL_ALIGNMENT_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Text is aligned to the leading edge of the column.
*
*
* LEADING = 1;
*/
public static final int LEADING_VALUE = 1;
/**
*
*
*
* Text is centered in the column.
*
*
* CENTER = 2;
*/
public static final int CENTER_VALUE = 2;
/**
*
*
*
* Text is aligned to the trailing edge of the column.
*
*
* TRAILING = 3;
*/
public static final int TRAILING_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static HorizontalAlignment valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static HorizontalAlignment forNumber(int value) {
switch (value) {
case 0:
return HORIZONTAL_ALIGNMENT_UNSPECIFIED;
case 1:
return LEADING;
case 2:
return CENTER;
case 3:
return TRAILING;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap
internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public HorizontalAlignment findValueByNumber(int number) {
return HorizontalAlignment.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
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.ColumnProperties.getDescriptor()
.getEnumTypes()
.get(0);
}
private static final HorizontalAlignment[] VALUES = values();
public static HorizontalAlignment 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 HorizontalAlignment(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment)
}
public static final int HEADER_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object header_ = "";
/**
*
*
*
* Required. Column heading.
*
*
* string header = 1;
*
* @return The header.
*/
@java.lang.Override
public java.lang.String getHeader() {
java.lang.Object ref = header_;
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();
header_ = s;
return s;
}
}
/**
*
*
*
* Required. Column heading.
*
*
* string header = 1;
*
* @return The bytes for header.
*/
@java.lang.Override
public com.google.protobuf.ByteString getHeaderBytes() {
java.lang.Object ref = header_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
header_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int HORIZONTAL_ALIGNMENT_FIELD_NUMBER = 2;
private int horizontalAlignment_ = 0;
/**
*
*
*
* Optional. Defines text alignment for all cells in this column.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment horizontal_alignment = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for horizontalAlignment.
*/
@java.lang.Override
public int getHorizontalAlignmentValue() {
return horizontalAlignment_;
}
/**
*
*
*
* Optional. Defines text alignment for all cells in this column.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment horizontal_alignment = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The horizontalAlignment.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment
getHorizontalAlignment() {
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment result =
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment
.forNumber(horizontalAlignment_);
return result == null
? com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment
.UNRECOGNIZED
: result;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(header_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, header_);
}
if (horizontalAlignment_
!= com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment
.HORIZONTAL_ALIGNMENT_UNSPECIFIED
.getNumber()) {
output.writeEnum(2, horizontalAlignment_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(header_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, header_);
}
if (horizontalAlignment_
!= com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment
.HORIZONTAL_ALIGNMENT_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, horizontalAlignment_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties other =
(com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties) obj;
if (!getHeader().equals(other.getHeader())) return false;
if (horizontalAlignment_ != other.horizontalAlignment_) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + HEADER_FIELD_NUMBER;
hash = (53 * hash) + getHeader().hashCode();
hash = (37 * hash) + HORIZONTAL_ALIGNMENT_FIELD_NUMBER;
hash = (53 * hash) + horizontalAlignment_;
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties 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.ColumnProperties parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties 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.ColumnProperties parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties 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.ColumnProperties 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.ColumnProperties 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.ColumnProperties
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.ColumnProperties
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.ColumnProperties 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.ColumnProperties parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Column properties for
* [TableCard][google.cloud.dialogflow.v2.Intent.Message.TableCard].
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.ColumnProperties}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.ColumnProperties)
com.google.cloud.dialogflow.v2.Intent.Message.ColumnPropertiesOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_ColumnProperties_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_ColumnProperties_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.class,
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.Builder.class);
}
// Construct using
// com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
header_ = "";
horizontalAlignment_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_ColumnProperties_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties build() {
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties buildPartial() {
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties result =
new com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.header_ = header_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.horizontalAlignment_ = horizontalAlignment_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties) {
return mergeFrom(
(com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties other) {
if (other
== com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties
.getDefaultInstance()) return this;
if (!other.getHeader().isEmpty()) {
header_ = other.header_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.horizontalAlignment_ != 0) {
setHorizontalAlignmentValue(other.getHorizontalAlignmentValue());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
header_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 16:
{
horizontalAlignment_ = input.readEnum();
bitField0_ |= 0x00000002;
break;
} // case 16
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object header_ = "";
/**
*
*
*
* Required. Column heading.
*
*
* string header = 1;
*
* @return The header.
*/
public java.lang.String getHeader() {
java.lang.Object ref = header_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
header_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. Column heading.
*
*
* string header = 1;
*
* @return The bytes for header.
*/
public com.google.protobuf.ByteString getHeaderBytes() {
java.lang.Object ref = header_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
header_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. Column heading.
*
*
* string header = 1;
*
* @param value The header to set.
* @return This builder for chaining.
*/
public Builder setHeader(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
header_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. Column heading.
*
*
* string header = 1;
*
* @return This builder for chaining.
*/
public Builder clearHeader() {
header_ = getDefaultInstance().getHeader();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Required. Column heading.
*
*
* string header = 1;
*
* @param value The bytes for header to set.
* @return This builder for chaining.
*/
public Builder setHeaderBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
header_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private int horizontalAlignment_ = 0;
/**
*
*
*
* Optional. Defines text alignment for all cells in this column.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment horizontal_alignment = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for horizontalAlignment.
*/
@java.lang.Override
public int getHorizontalAlignmentValue() {
return horizontalAlignment_;
}
/**
*
*
*
* Optional. Defines text alignment for all cells in this column.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment horizontal_alignment = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The enum numeric value on the wire for horizontalAlignment to set.
* @return This builder for chaining.
*/
public Builder setHorizontalAlignmentValue(int value) {
horizontalAlignment_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. Defines text alignment for all cells in this column.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment horizontal_alignment = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The horizontalAlignment.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment
getHorizontalAlignment() {
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment
result =
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment
.forNumber(horizontalAlignment_);
return result == null
? com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment
.UNRECOGNIZED
: result;
}
/**
*
*
*
* Optional. Defines text alignment for all cells in this column.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment horizontal_alignment = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The horizontalAlignment to set.
* @return This builder for chaining.
*/
public Builder setHorizontalAlignment(
com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment
value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
horizontalAlignment_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Optional. Defines text alignment for all cells in this column.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.ColumnProperties.HorizontalAlignment horizontal_alignment = 2 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return This builder for chaining.
*/
public Builder clearHorizontalAlignment() {
bitField0_ = (bitField0_ & ~0x00000002);
horizontalAlignment_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.ColumnProperties)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.ColumnProperties)
private static final com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties();
}
public static com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ColumnProperties parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.ColumnProperties
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TableCardRowOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.TableCardRow)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Optional. List of cells that make up this row.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
java.util.List getCellsList();
/**
*
*
*
* Optional. List of cells that make up this row.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell getCells(int index);
/**
*
*
*
* Optional. List of cells that make up this row.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
int getCellsCount();
/**
*
*
*
* Optional. List of cells that make up this row.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
java.util.List extends com.google.cloud.dialogflow.v2.Intent.Message.TableCardCellOrBuilder>
getCellsOrBuilderList();
/**
*
*
*
* Optional. List of cells that make up this row.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCellOrBuilder getCellsOrBuilder(
int index);
/**
*
*
*
* Optional. Whether to add a visual divider after this row.
*
*
* bool divider_after = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The dividerAfter.
*/
boolean getDividerAfter();
}
/**
*
*
*
* Row of [TableCard][google.cloud.dialogflow.v2.Intent.Message.TableCard].
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.TableCardRow}
*/
public static final class TableCardRow extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.TableCardRow)
TableCardRowOrBuilder {
private static final long serialVersionUID = 0L;
// Use TableCardRow.newBuilder() to construct.
private TableCardRow(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TableCardRow() {
cells_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new TableCardRow();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_TableCardRow_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_TableCardRow_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow.class,
com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow.Builder.class);
}
public static final int CELLS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List cells_;
/**
*
*
*
* Optional. List of cells that make up this row.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List
getCellsList() {
return cells_;
}
/**
*
*
*
* Optional. List of cells that make up this row.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List<
? extends com.google.cloud.dialogflow.v2.Intent.Message.TableCardCellOrBuilder>
getCellsOrBuilderList() {
return cells_;
}
/**
*
*
*
* Optional. List of cells that make up this row.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public int getCellsCount() {
return cells_.size();
}
/**
*
*
*
* Optional. List of cells that make up this row.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell getCells(int index) {
return cells_.get(index);
}
/**
*
*
*
* Optional. List of cells that make up this row.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.TableCardCellOrBuilder getCellsOrBuilder(
int index) {
return cells_.get(index);
}
public static final int DIVIDER_AFTER_FIELD_NUMBER = 2;
private boolean dividerAfter_ = false;
/**
*
*
*
* Optional. Whether to add a visual divider after this row.
*
*
* bool divider_after = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The dividerAfter.
*/
@java.lang.Override
public boolean getDividerAfter() {
return dividerAfter_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
for (int i = 0; i < cells_.size(); i++) {
output.writeMessage(1, cells_.get(i));
}
if (dividerAfter_ != false) {
output.writeBool(2, dividerAfter_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < cells_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, cells_.get(i));
}
if (dividerAfter_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, dividerAfter_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow other =
(com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow) obj;
if (!getCellsList().equals(other.getCellsList())) return false;
if (getDividerAfter() != other.getDividerAfter()) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getCellsCount() > 0) {
hash = (37 * hash) + CELLS_FIELD_NUMBER;
hash = (53 * hash) + getCellsList().hashCode();
}
hash = (37 * hash) + DIVIDER_AFTER_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDividerAfter());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow 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.TableCardRow parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow 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.TableCardRow parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow 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.TableCardRow 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.TableCardRow 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.TableCardRow 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.TableCardRow 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.TableCardRow 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.TableCardRow parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Row of [TableCard][google.cloud.dialogflow.v2.Intent.Message.TableCard].
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.TableCardRow}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.TableCardRow)
com.google.cloud.dialogflow.v2.Intent.Message.TableCardRowOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_TableCardRow_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_TableCardRow_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow.class,
com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (cellsBuilder_ == null) {
cells_ = java.util.Collections.emptyList();
} else {
cells_ = null;
cellsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
dividerAfter_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_TableCardRow_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow build() {
com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow buildPartial() {
com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow result =
new com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow result) {
if (cellsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
cells_ = java.util.Collections.unmodifiableList(cells_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.cells_ = cells_;
} else {
result.cells_ = cellsBuilder_.build();
}
}
private void buildPartial0(
com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.dividerAfter_ = dividerAfter_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow) {
return mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow other) {
if (other
== com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow.getDefaultInstance())
return this;
if (cellsBuilder_ == null) {
if (!other.cells_.isEmpty()) {
if (cells_.isEmpty()) {
cells_ = other.cells_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureCellsIsMutable();
cells_.addAll(other.cells_);
}
onChanged();
}
} else {
if (!other.cells_.isEmpty()) {
if (cellsBuilder_.isEmpty()) {
cellsBuilder_.dispose();
cellsBuilder_ = null;
cells_ = other.cells_;
bitField0_ = (bitField0_ & ~0x00000001);
cellsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getCellsFieldBuilder()
: null;
} else {
cellsBuilder_.addAllMessages(other.cells_);
}
}
}
if (other.getDividerAfter() != false) {
setDividerAfter(other.getDividerAfter());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell m =
input.readMessage(
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell.parser(),
extensionRegistry);
if (cellsBuilder_ == null) {
ensureCellsIsMutable();
cells_.add(m);
} else {
cellsBuilder_.addMessage(m);
}
break;
} // case 10
case 16:
{
dividerAfter_ = input.readBool();
bitField0_ |= 0x00000002;
break;
} // case 16
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.util.List cells_ =
java.util.Collections.emptyList();
private void ensureCellsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
cells_ =
new java.util.ArrayList<
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell>(cells_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell,
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell.Builder,
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCellOrBuilder>
cellsBuilder_;
/**
*
*
*
* Optional. List of cells that make up this row.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List
getCellsList() {
if (cellsBuilder_ == null) {
return java.util.Collections.unmodifiableList(cells_);
} else {
return cellsBuilder_.getMessageList();
}
}
/**
*
*
*
* Optional. List of cells that make up this row.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public int getCellsCount() {
if (cellsBuilder_ == null) {
return cells_.size();
} else {
return cellsBuilder_.getCount();
}
}
/**
*
*
*
* Optional. List of cells that make up this row.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell getCells(int index) {
if (cellsBuilder_ == null) {
return cells_.get(index);
} else {
return cellsBuilder_.getMessage(index);
}
}
/**
*
*
*
* Optional. List of cells that make up this row.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setCells(
int index, com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell value) {
if (cellsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCellsIsMutable();
cells_.set(index, value);
onChanged();
} else {
cellsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. List of cells that make up this row.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setCells(
int index,
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell.Builder builderForValue) {
if (cellsBuilder_ == null) {
ensureCellsIsMutable();
cells_.set(index, builderForValue.build());
onChanged();
} else {
cellsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. List of cells that make up this row.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addCells(com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell value) {
if (cellsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCellsIsMutable();
cells_.add(value);
onChanged();
} else {
cellsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Optional. List of cells that make up this row.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addCells(
int index, com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell value) {
if (cellsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCellsIsMutable();
cells_.add(index, value);
onChanged();
} else {
cellsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. List of cells that make up this row.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addCells(
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell.Builder builderForValue) {
if (cellsBuilder_ == null) {
ensureCellsIsMutable();
cells_.add(builderForValue.build());
onChanged();
} else {
cellsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. List of cells that make up this row.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addCells(
int index,
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell.Builder builderForValue) {
if (cellsBuilder_ == null) {
ensureCellsIsMutable();
cells_.add(index, builderForValue.build());
onChanged();
} else {
cellsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. List of cells that make up this row.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addAllCells(
java.lang.Iterable<
? extends com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell>
values) {
if (cellsBuilder_ == null) {
ensureCellsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, cells_);
onChanged();
} else {
cellsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Optional. List of cells that make up this row.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearCells() {
if (cellsBuilder_ == null) {
cells_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
cellsBuilder_.clear();
}
return this;
}
/**
*
*
*
* Optional. List of cells that make up this row.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder removeCells(int index) {
if (cellsBuilder_ == null) {
ensureCellsIsMutable();
cells_.remove(index);
onChanged();
} else {
cellsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Optional. List of cells that make up this row.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell.Builder getCellsBuilder(
int index) {
return getCellsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Optional. List of cells that make up this row.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.TableCardCellOrBuilder
getCellsOrBuilder(int index) {
if (cellsBuilder_ == null) {
return cells_.get(index);
} else {
return cellsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Optional. List of cells that make up this row.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List<
? extends com.google.cloud.dialogflow.v2.Intent.Message.TableCardCellOrBuilder>
getCellsOrBuilderList() {
if (cellsBuilder_ != null) {
return cellsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(cells_);
}
}
/**
*
*
*
* Optional. List of cells that make up this row.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell.Builder
addCellsBuilder() {
return getCellsFieldBuilder()
.addBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell.getDefaultInstance());
}
/**
*
*
*
* Optional. List of cells that make up this row.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell.Builder addCellsBuilder(
int index) {
return getCellsFieldBuilder()
.addBuilder(
index,
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell.getDefaultInstance());
}
/**
*
*
*
* Optional. List of cells that make up this row.
*
*
*
* repeated .google.cloud.dialogflow.v2.Intent.Message.TableCardCell cells = 1 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List
getCellsBuilderList() {
return getCellsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell,
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell.Builder,
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCellOrBuilder>
getCellsFieldBuilder() {
if (cellsBuilder_ == null) {
cellsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell,
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell.Builder,
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCellOrBuilder>(
cells_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
cells_ = null;
}
return cellsBuilder_;
}
private boolean dividerAfter_;
/**
*
*
*
* Optional. Whether to add a visual divider after this row.
*
*
* bool divider_after = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The dividerAfter.
*/
@java.lang.Override
public boolean getDividerAfter() {
return dividerAfter_;
}
/**
*
*
*
* Optional. Whether to add a visual divider after this row.
*
*
* bool divider_after = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The dividerAfter to set.
* @return This builder for chaining.
*/
public Builder setDividerAfter(boolean value) {
dividerAfter_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Optional. Whether to add a visual divider after this row.
*
*
* bool divider_after = 2 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearDividerAfter() {
bitField0_ = (bitField0_ & ~0x00000002);
dividerAfter_ = false;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.TableCardRow)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.TableCardRow)
private static final com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow();
}
public static com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TableCardRow parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.TableCardRow
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TableCardCellOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.TableCardCell)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Required. Text in this cell.
*
*
* string text = 1;
*
* @return The text.
*/
java.lang.String getText();
/**
*
*
*
* Required. Text in this cell.
*
*
* string text = 1;
*
* @return The bytes for text.
*/
com.google.protobuf.ByteString getTextBytes();
}
/**
*
*
*
* Cell of
* [TableCardRow][google.cloud.dialogflow.v2.Intent.Message.TableCardRow].
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.TableCardCell}
*/
public static final class TableCardCell extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.TableCardCell)
TableCardCellOrBuilder {
private static final long serialVersionUID = 0L;
// Use TableCardCell.newBuilder() to construct.
private TableCardCell(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TableCardCell() {
text_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new TableCardCell();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_TableCardCell_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_TableCardCell_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell.class,
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell.Builder.class);
}
public static final int TEXT_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object text_ = "";
/**
*
*
*
* Required. Text in this cell.
*
*
* string text = 1;
*
* @return The text.
*/
@java.lang.Override
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. Text in this cell.
*
*
* string text = 1;
*
* @return The bytes for text.
*/
@java.lang.Override
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;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell other =
(com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell) obj;
if (!getText().equals(other.getText())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TEXT_FIELD_NUMBER;
hash = (53 * hash) + getText().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell 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.TableCardCell parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell 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.TableCardCell parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell 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.TableCardCell 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.TableCardCell 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.TableCardCell 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.TableCardCell 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.TableCardCell 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.TableCardCell parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Cell of
* [TableCardRow][google.cloud.dialogflow.v2.Intent.Message.TableCardRow].
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.TableCardCell}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.TableCardCell)
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCellOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_TableCardCell_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_TableCardCell_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell.class,
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
text_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_TableCardCell_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell build() {
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell buildPartial() {
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell result =
new com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.text_ = text_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell) {
return mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell other) {
if (other
== com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell.getDefaultInstance())
return this;
if (!other.getText().isEmpty()) {
text_ = other.text_;
bitField0_ |= 0x00000001;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
text_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object text_ = "";
/**
*
*
*
* Required. Text in this cell.
*
*
* string text = 1;
*
* @return The text.
*/
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. Text in this cell.
*
*
* string text = 1;
*
* @return The bytes for text.
*/
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. Text in this cell.
*
*
* string text = 1;
*
* @param value The text to set.
* @return This builder for chaining.
*/
public Builder setText(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
text_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. Text in this cell.
*
*
* string text = 1;
*
* @return This builder for chaining.
*/
public Builder clearText() {
text_ = getDefaultInstance().getText();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Required. Text in this cell.
*
*
* string text = 1;
*
* @param value The bytes for text to set.
* @return This builder for chaining.
*/
public Builder setTextBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
text_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.TableCardCell)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.TableCardCell)
private static final com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell();
}
public static com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TableCardCell parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.TableCardCell
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int messageCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object message_;
public enum MessageCase
implements
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
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),
BROWSE_CAROUSEL_CARD(22),
TABLE_CARD(23),
MEDIA_CONTENT(24),
MESSAGE_NOT_SET(0);
private final int value;
private MessageCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static MessageCase valueOf(int value) {
return forNumber(value);
}
public static MessageCase forNumber(int value) {
switch (value) {
case 1:
return TEXT;
case 2:
return 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 22:
return BROWSE_CAROUSEL_CARD;
case 23:
return TABLE_CARD;
case 24:
return MEDIA_CONTENT;
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;
*
* @return Whether the text field is set.
*/
@java.lang.Override
public boolean hasText() {
return messageCase_ == 1;
}
/**
*
*
*
* The text response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Text text = 1;
*
* @return The text.
*/
@java.lang.Override
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;
*/
@java.lang.Override
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;
*
* @return Whether the image field is set.
*/
@java.lang.Override
public boolean hasImage() {
return messageCase_ == 2;
}
/**
*
*
*
* The image response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 2;
*
* @return The image.
*/
@java.lang.Override
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;
*/
@java.lang.Override
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;
*
* @return Whether the quickReplies field is set.
*/
@java.lang.Override
public boolean hasQuickReplies() {
return messageCase_ == 3;
}
/**
*
*
*
* The quick replies response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.QuickReplies quick_replies = 3;
*
* @return The quickReplies.
*/
@java.lang.Override
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;
*/
@java.lang.Override
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;
*
* @return Whether the card field is set.
*/
@java.lang.Override
public boolean hasCard() {
return messageCase_ == 4;
}
/**
*
*
*
* The card response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Card card = 4;
*
* @return The card.
*/
@java.lang.Override
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;
*/
@java.lang.Override
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;
/**
*
*
*
* A custom platform-specific response.
*
*
* .google.protobuf.Struct payload = 5;
*
* @return Whether the payload field is set.
*/
@java.lang.Override
public boolean hasPayload() {
return messageCase_ == 5;
}
/**
*
*
*
* A custom platform-specific response.
*
*
* .google.protobuf.Struct payload = 5;
*
* @return The payload.
*/
@java.lang.Override
public com.google.protobuf.Struct getPayload() {
if (messageCase_ == 5) {
return (com.google.protobuf.Struct) message_;
}
return com.google.protobuf.Struct.getDefaultInstance();
}
/**
*
*
*
* A custom platform-specific response.
*
*
* .google.protobuf.Struct payload = 5;
*/
@java.lang.Override
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;
*
* @return Whether the simpleResponses field is set.
*/
@java.lang.Override
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;
*
* @return The simpleResponses.
*/
@java.lang.Override
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;
*/
@java.lang.Override
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;
*
* @return Whether the basicCard field is set.
*/
@java.lang.Override
public boolean hasBasicCard() {
return messageCase_ == 8;
}
/**
*
*
*
* The basic card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard basic_card = 8;
*
* @return The basicCard.
*/
@java.lang.Override
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;
*/
@java.lang.Override
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;
*
* @return Whether the suggestions field is set.
*/
@java.lang.Override
public boolean hasSuggestions() {
return messageCase_ == 9;
}
/**
*
*
*
* The suggestion chips for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Suggestions suggestions = 9;
*
* @return The suggestions.
*/
@java.lang.Override
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;
*/
@java.lang.Override
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;
*
*
* @return Whether the linkOutSuggestion field is set.
*/
@java.lang.Override
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;
*
*
* @return The linkOutSuggestion.
*/
@java.lang.Override
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;
*
*/
@java.lang.Override
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;
*
* @return Whether the listSelect field is set.
*/
@java.lang.Override
public boolean hasListSelect() {
return messageCase_ == 11;
}
/**
*
*
*
* The list card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.ListSelect list_select = 11;
*
* @return The listSelect.
*/
@java.lang.Override
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;
*/
@java.lang.Override
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;
*
* @return Whether the carouselSelect field is set.
*/
@java.lang.Override
public boolean hasCarouselSelect() {
return messageCase_ == 12;
}
/**
*
*
*
* The carousel card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect carousel_select = 12;
*
* @return The carouselSelect.
*/
@java.lang.Override
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;
*/
@java.lang.Override
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 BROWSE_CAROUSEL_CARD_FIELD_NUMBER = 22;
/**
*
*
*
* Browse carousel card for Actions on Google.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard browse_carousel_card = 22;
*
*
* @return Whether the browseCarouselCard field is set.
*/
@java.lang.Override
public boolean hasBrowseCarouselCard() {
return messageCase_ == 22;
}
/**
*
*
*
* Browse carousel card for Actions on Google.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard browse_carousel_card = 22;
*
*
* @return The browseCarouselCard.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
getBrowseCarouselCard() {
if (messageCase_ == 22) {
return (com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.getDefaultInstance();
}
/**
*
*
*
* Browse carousel card for Actions on Google.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard browse_carousel_card = 22;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCardOrBuilder
getBrowseCarouselCardOrBuilder() {
if (messageCase_ == 22) {
return (com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.getDefaultInstance();
}
public static final int TABLE_CARD_FIELD_NUMBER = 23;
/**
*
*
*
* Table card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.TableCard table_card = 23;
*
* @return Whether the tableCard field is set.
*/
@java.lang.Override
public boolean hasTableCard() {
return messageCase_ == 23;
}
/**
*
*
*
* Table card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.TableCard table_card = 23;
*
* @return The tableCard.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.TableCard getTableCard() {
if (messageCase_ == 23) {
return (com.google.cloud.dialogflow.v2.Intent.Message.TableCard) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.TableCard.getDefaultInstance();
}
/**
*
*
*
* Table card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.TableCard table_card = 23;
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.TableCardOrBuilder
getTableCardOrBuilder() {
if (messageCase_ == 23) {
return (com.google.cloud.dialogflow.v2.Intent.Message.TableCard) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.TableCard.getDefaultInstance();
}
public static final int MEDIA_CONTENT_FIELD_NUMBER = 24;
/**
*
*
*
* The media content card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.MediaContent media_content = 24;
*
* @return Whether the mediaContent field is set.
*/
@java.lang.Override
public boolean hasMediaContent() {
return messageCase_ == 24;
}
/**
*
*
*
* The media content card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.MediaContent media_content = 24;
*
* @return The mediaContent.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.MediaContent getMediaContent() {
if (messageCase_ == 24) {
return (com.google.cloud.dialogflow.v2.Intent.Message.MediaContent) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.getDefaultInstance();
}
/**
*
*
*
* The media content card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.MediaContent media_content = 24;
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.MediaContentOrBuilder
getMediaContentOrBuilder() {
if (messageCase_ == 24) {
return (com.google.cloud.dialogflow.v2.Intent.Message.MediaContent) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.getDefaultInstance();
}
public static final int PLATFORM_FIELD_NUMBER = 6;
private int platform_ = 0;
/**
*
*
*
* Optional. The platform that this message is intended for.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Platform platform = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for platform.
*/
@java.lang.Override
public int getPlatformValue() {
return platform_;
}
/**
*
*
*
* Optional. The platform that this message is intended for.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Platform platform = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The platform.
*/
@java.lang.Override
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.forNumber(platform_);
return result == null
? com.google.cloud.dialogflow.v2.Intent.Message.Platform.UNRECOGNIZED
: result;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (messageCase_ == 1) {
output.writeMessage(1, (com.google.cloud.dialogflow.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_);
}
if (messageCase_ == 22) {
output.writeMessage(
22, (com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard) message_);
}
if (messageCase_ == 23) {
output.writeMessage(23, (com.google.cloud.dialogflow.v2.Intent.Message.TableCard) message_);
}
if (messageCase_ == 24) {
output.writeMessage(
24, (com.google.cloud.dialogflow.v2.Intent.Message.MediaContent) message_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (messageCase_ == 1) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
1, (com.google.cloud.dialogflow.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_);
}
if (messageCase_ == 22) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
22, (com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard) message_);
}
if (messageCase_ == 23) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
23, (com.google.cloud.dialogflow.v2.Intent.Message.TableCard) message_);
}
if (messageCase_ == 24) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
24, (com.google.cloud.dialogflow.v2.Intent.Message.MediaContent) message_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.v2.Intent.Message)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.Intent.Message other =
(com.google.cloud.dialogflow.v2.Intent.Message) obj;
if (platform_ != other.platform_) return false;
if (!getMessageCase().equals(other.getMessageCase())) return false;
switch (messageCase_) {
case 1:
if (!getText().equals(other.getText())) return false;
break;
case 2:
if (!getImage().equals(other.getImage())) return false;
break;
case 3:
if (!getQuickReplies().equals(other.getQuickReplies())) return false;
break;
case 4:
if (!getCard().equals(other.getCard())) return false;
break;
case 5:
if (!getPayload().equals(other.getPayload())) return false;
break;
case 7:
if (!getSimpleResponses().equals(other.getSimpleResponses())) return false;
break;
case 8:
if (!getBasicCard().equals(other.getBasicCard())) return false;
break;
case 9:
if (!getSuggestions().equals(other.getSuggestions())) return false;
break;
case 10:
if (!getLinkOutSuggestion().equals(other.getLinkOutSuggestion())) return false;
break;
case 11:
if (!getListSelect().equals(other.getListSelect())) return false;
break;
case 12:
if (!getCarouselSelect().equals(other.getCarouselSelect())) return false;
break;
case 22:
if (!getBrowseCarouselCard().equals(other.getBrowseCarouselCard())) return false;
break;
case 23:
if (!getTableCard().equals(other.getTableCard())) return false;
break;
case 24:
if (!getMediaContent().equals(other.getMediaContent())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + 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 22:
hash = (37 * hash) + BROWSE_CAROUSEL_CARD_FIELD_NUMBER;
hash = (53 * hash) + getBrowseCarouselCard().hashCode();
break;
case 23:
hash = (37 * hash) + TABLE_CARD_FIELD_NUMBER;
hash = (53 * hash) + getTableCard().hashCode();
break;
case 24:
hash = (37 * hash) + MEDIA_CONTENT_FIELD_NUMBER;
hash = (53 * hash) + getMediaContent().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().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);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.Message prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* A rich response message.
* Corresponds to the intent `Response` field in the Dialogflow console.
* For more information, see
* [Rich response
* messages](https://cloud.google.com/dialogflow/docs/intents-rich-messages).
*
*
* 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;
}
@java.lang.Override
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() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (textBuilder_ != null) {
textBuilder_.clear();
}
if (imageBuilder_ != null) {
imageBuilder_.clear();
}
if (quickRepliesBuilder_ != null) {
quickRepliesBuilder_.clear();
}
if (cardBuilder_ != null) {
cardBuilder_.clear();
}
if (payloadBuilder_ != null) {
payloadBuilder_.clear();
}
if (simpleResponsesBuilder_ != null) {
simpleResponsesBuilder_.clear();
}
if (basicCardBuilder_ != null) {
basicCardBuilder_.clear();
}
if (suggestionsBuilder_ != null) {
suggestionsBuilder_.clear();
}
if (linkOutSuggestionBuilder_ != null) {
linkOutSuggestionBuilder_.clear();
}
if (listSelectBuilder_ != null) {
listSelectBuilder_.clear();
}
if (carouselSelectBuilder_ != null) {
carouselSelectBuilder_.clear();
}
if (browseCarouselCardBuilder_ != null) {
browseCarouselCardBuilder_.clear();
}
if (tableCardBuilder_ != null) {
tableCardBuilder_.clear();
}
if (mediaContentBuilder_ != null) {
mediaContentBuilder_.clear();
}
platform_ = 0;
messageCase_ = 0;
message_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.v2.IntentProto
.internal_static_google_cloud_dialogflow_v2_Intent_Message_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.Intent.Message.getDefaultInstance();
}
@java.lang.Override
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;
}
@java.lang.Override
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 (bitField0_ != 0) {
buildPartial0(result);
}
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.dialogflow.v2.Intent.Message result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00004000) != 0)) {
result.platform_ = platform_;
}
}
private void buildPartialOneofs(com.google.cloud.dialogflow.v2.Intent.Message result) {
result.messageCase_ = messageCase_;
result.message_ = this.message_;
if (messageCase_ == 1 && textBuilder_ != null) {
result.message_ = textBuilder_.build();
}
if (messageCase_ == 2 && imageBuilder_ != null) {
result.message_ = imageBuilder_.build();
}
if (messageCase_ == 3 && quickRepliesBuilder_ != null) {
result.message_ = quickRepliesBuilder_.build();
}
if (messageCase_ == 4 && cardBuilder_ != null) {
result.message_ = cardBuilder_.build();
}
if (messageCase_ == 5 && payloadBuilder_ != null) {
result.message_ = payloadBuilder_.build();
}
if (messageCase_ == 7 && simpleResponsesBuilder_ != null) {
result.message_ = simpleResponsesBuilder_.build();
}
if (messageCase_ == 8 && basicCardBuilder_ != null) {
result.message_ = basicCardBuilder_.build();
}
if (messageCase_ == 9 && suggestionsBuilder_ != null) {
result.message_ = suggestionsBuilder_.build();
}
if (messageCase_ == 10 && linkOutSuggestionBuilder_ != null) {
result.message_ = linkOutSuggestionBuilder_.build();
}
if (messageCase_ == 11 && listSelectBuilder_ != null) {
result.message_ = listSelectBuilder_.build();
}
if (messageCase_ == 12 && carouselSelectBuilder_ != null) {
result.message_ = carouselSelectBuilder_.build();
}
if (messageCase_ == 22 && browseCarouselCardBuilder_ != null) {
result.message_ = browseCarouselCardBuilder_.build();
}
if (messageCase_ == 23 && tableCardBuilder_ != null) {
result.message_ = tableCardBuilder_.build();
}
if (messageCase_ == 24 && mediaContentBuilder_ != null) {
result.message_ = mediaContentBuilder_.build();
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.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 BROWSE_CAROUSEL_CARD:
{
mergeBrowseCarouselCard(other.getBrowseCarouselCard());
break;
}
case TABLE_CARD:
{
mergeTableCard(other.getTableCard());
break;
}
case MEDIA_CONTENT:
{
mergeMediaContent(other.getMediaContent());
break;
}
case MESSAGE_NOT_SET:
{
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
input.readMessage(getTextFieldBuilder().getBuilder(), extensionRegistry);
messageCase_ = 1;
break;
} // case 10
case 18:
{
input.readMessage(getImageFieldBuilder().getBuilder(), extensionRegistry);
messageCase_ = 2;
break;
} // case 18
case 26:
{
input.readMessage(getQuickRepliesFieldBuilder().getBuilder(), extensionRegistry);
messageCase_ = 3;
break;
} // case 26
case 34:
{
input.readMessage(getCardFieldBuilder().getBuilder(), extensionRegistry);
messageCase_ = 4;
break;
} // case 34
case 42:
{
input.readMessage(getPayloadFieldBuilder().getBuilder(), extensionRegistry);
messageCase_ = 5;
break;
} // case 42
case 48:
{
platform_ = input.readEnum();
bitField0_ |= 0x00004000;
break;
} // case 48
case 58:
{
input.readMessage(
getSimpleResponsesFieldBuilder().getBuilder(), extensionRegistry);
messageCase_ = 7;
break;
} // case 58
case 66:
{
input.readMessage(getBasicCardFieldBuilder().getBuilder(), extensionRegistry);
messageCase_ = 8;
break;
} // case 66
case 74:
{
input.readMessage(getSuggestionsFieldBuilder().getBuilder(), extensionRegistry);
messageCase_ = 9;
break;
} // case 74
case 82:
{
input.readMessage(
getLinkOutSuggestionFieldBuilder().getBuilder(), extensionRegistry);
messageCase_ = 10;
break;
} // case 82
case 90:
{
input.readMessage(getListSelectFieldBuilder().getBuilder(), extensionRegistry);
messageCase_ = 11;
break;
} // case 90
case 98:
{
input.readMessage(
getCarouselSelectFieldBuilder().getBuilder(), extensionRegistry);
messageCase_ = 12;
break;
} // case 98
case 178:
{
input.readMessage(
getBrowseCarouselCardFieldBuilder().getBuilder(), extensionRegistry);
messageCase_ = 22;
break;
} // case 178
case 186:
{
input.readMessage(getTableCardFieldBuilder().getBuilder(), extensionRegistry);
messageCase_ = 23;
break;
} // case 186
case 194:
{
input.readMessage(getMediaContentFieldBuilder().getBuilder(), extensionRegistry);
messageCase_ = 24;
break;
} // case 194
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int 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 int bitField0_;
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;
*
* @return Whether the text field is set.
*/
@java.lang.Override
public boolean hasText() {
return messageCase_ == 1;
}
/**
*
*
*
* The text response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Text text = 1;
*
* @return The text.
*/
@java.lang.Override
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);
} else {
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;
*/
@java.lang.Override
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;
*
* @return Whether the image field is set.
*/
@java.lang.Override
public boolean hasImage() {
return messageCase_ == 2;
}
/**
*
*
*
* The image response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Image image = 2;
*
* @return The image.
*/
@java.lang.Override
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);
} else {
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;
*/
@java.lang.Override
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;
*
* @return Whether the quickReplies field is set.
*/
@java.lang.Override
public boolean hasQuickReplies() {
return messageCase_ == 3;
}
/**
*
*
*
* The quick replies response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.QuickReplies quick_replies = 3;
*
* @return The quickReplies.
*/
@java.lang.Override
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);
} else {
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;
*/
@java.lang.Override
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;
*
* @return Whether the card field is set.
*/
@java.lang.Override
public boolean hasCard() {
return messageCase_ == 4;
}
/**
*
*
*
* The card response.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Card card = 4;
*
* @return The card.
*/
@java.lang.Override
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);
} else {
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;
*/
@java.lang.Override
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_;
/**
*
*
*
* A custom platform-specific response.
*
*
* .google.protobuf.Struct payload = 5;
*
* @return Whether the payload field is set.
*/
@java.lang.Override
public boolean hasPayload() {
return messageCase_ == 5;
}
/**
*
*
*
* A custom platform-specific response.
*
*
* .google.protobuf.Struct payload = 5;
*
* @return The payload.
*/
@java.lang.Override
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();
}
}
/**
*
*
*
* A custom platform-specific response.
*
*
* .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;
}
/**
*
*
*
* A custom platform-specific response.
*
*
* .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;
}
/**
*
*
*
* A custom platform-specific response.
*
*
* .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);
} else {
payloadBuilder_.setMessage(value);
}
}
messageCase_ = 5;
return this;
}
/**
*
*
*
* A custom platform-specific response.
*
*
* .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;
}
/**
*
*
*
* A custom platform-specific response.
*
*
* .google.protobuf.Struct payload = 5;
*/
public com.google.protobuf.Struct.Builder getPayloadBuilder() {
return getPayloadFieldBuilder().getBuilder();
}
/**
*
*
*
* A custom platform-specific response.
*
*
* .google.protobuf.Struct payload = 5;
*/
@java.lang.Override
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();
}
}
/**
*
*
*
* A custom platform-specific response.
*
*
* .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;
*
*
* @return Whether the simpleResponses field is set.
*/
@java.lang.Override
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;
*
*
* @return The simpleResponses.
*/
@java.lang.Override
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);
} 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 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;
*
*/
@java.lang.Override
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;
*
* @return Whether the basicCard field is set.
*/
@java.lang.Override
public boolean hasBasicCard() {
return messageCase_ == 8;
}
/**
*
*
*
* The basic card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BasicCard basic_card = 8;
*
* @return The basicCard.
*/
@java.lang.Override
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);
} 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 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;
*/
@java.lang.Override
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;
*
* @return Whether the suggestions field is set.
*/
@java.lang.Override
public boolean hasSuggestions() {
return messageCase_ == 9;
}
/**
*
*
*
* The suggestion chips for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Suggestions suggestions = 9;
*
* @return The suggestions.
*/
@java.lang.Override
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);
} 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 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;
*/
@java.lang.Override
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;
*
*
* @return Whether the linkOutSuggestion field is set.
*/
@java.lang.Override
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;
*
*
* @return The linkOutSuggestion.
*/
@java.lang.Override
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);
} 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 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;
*
*/
@java.lang.Override
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;
*
* @return Whether the listSelect field is set.
*/
@java.lang.Override
public boolean hasListSelect() {
return messageCase_ == 11;
}
/**
*
*
*
* The list card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.ListSelect list_select = 11;
*
* @return The listSelect.
*/
@java.lang.Override
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);
} 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 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;
*/
@java.lang.Override
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;
*
*
* @return Whether the carouselSelect field is set.
*/
@java.lang.Override
public boolean hasCarouselSelect() {
return messageCase_ == 12;
}
/**
*
*
*
* The carousel card response for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect carousel_select = 12;
*
*
* @return The carouselSelect.
*/
@java.lang.Override
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);
} 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 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;
*
*/
@java.lang.Override
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 com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard,
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.Builder,
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCardOrBuilder>
browseCarouselCardBuilder_;
/**
*
*
*
* Browse carousel card for Actions on Google.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard browse_carousel_card = 22;
*
*
* @return Whether the browseCarouselCard field is set.
*/
@java.lang.Override
public boolean hasBrowseCarouselCard() {
return messageCase_ == 22;
}
/**
*
*
*
* Browse carousel card for Actions on Google.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard browse_carousel_card = 22;
*
*
* @return The browseCarouselCard.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
getBrowseCarouselCard() {
if (browseCarouselCardBuilder_ == null) {
if (messageCase_ == 22) {
return (com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.getDefaultInstance();
} else {
if (messageCase_ == 22) {
return browseCarouselCardBuilder_.getMessage();
}
return com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.getDefaultInstance();
}
}
/**
*
*
*
* Browse carousel card for Actions on Google.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard browse_carousel_card = 22;
*
*/
public Builder setBrowseCarouselCard(
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard value) {
if (browseCarouselCardBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
message_ = value;
onChanged();
} else {
browseCarouselCardBuilder_.setMessage(value);
}
messageCase_ = 22;
return this;
}
/**
*
*
*
* Browse carousel card for Actions on Google.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard browse_carousel_card = 22;
*
*/
public Builder setBrowseCarouselCard(
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.Builder
builderForValue) {
if (browseCarouselCardBuilder_ == null) {
message_ = builderForValue.build();
onChanged();
} else {
browseCarouselCardBuilder_.setMessage(builderForValue.build());
}
messageCase_ = 22;
return this;
}
/**
*
*
*
* Browse carousel card for Actions on Google.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard browse_carousel_card = 22;
*
*/
public Builder mergeBrowseCarouselCard(
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard value) {
if (browseCarouselCardBuilder_ == null) {
if (messageCase_ == 22
&& message_
!= com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.getDefaultInstance()) {
message_ =
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.newBuilder(
(com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard) message_)
.mergeFrom(value)
.buildPartial();
} else {
message_ = value;
}
onChanged();
} else {
if (messageCase_ == 22) {
browseCarouselCardBuilder_.mergeFrom(value);
} else {
browseCarouselCardBuilder_.setMessage(value);
}
}
messageCase_ = 22;
return this;
}
/**
*
*
*
* Browse carousel card for Actions on Google.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard browse_carousel_card = 22;
*
*/
public Builder clearBrowseCarouselCard() {
if (browseCarouselCardBuilder_ == null) {
if (messageCase_ == 22) {
messageCase_ = 0;
message_ = null;
onChanged();
}
} else {
if (messageCase_ == 22) {
messageCase_ = 0;
message_ = null;
}
browseCarouselCardBuilder_.clear();
}
return this;
}
/**
*
*
*
* Browse carousel card for Actions on Google.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard browse_carousel_card = 22;
*
*/
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.Builder
getBrowseCarouselCardBuilder() {
return getBrowseCarouselCardFieldBuilder().getBuilder();
}
/**
*
*
*
* Browse carousel card for Actions on Google.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard browse_carousel_card = 22;
*
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCardOrBuilder
getBrowseCarouselCardOrBuilder() {
if ((messageCase_ == 22) && (browseCarouselCardBuilder_ != null)) {
return browseCarouselCardBuilder_.getMessageOrBuilder();
} else {
if (messageCase_ == 22) {
return (com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.getDefaultInstance();
}
}
/**
*
*
*
* Browse carousel card for Actions on Google.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard browse_carousel_card = 22;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard,
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.Builder,
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCardOrBuilder>
getBrowseCarouselCardFieldBuilder() {
if (browseCarouselCardBuilder_ == null) {
if (!(messageCase_ == 22)) {
message_ =
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard
.getDefaultInstance();
}
browseCarouselCardBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard,
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard.Builder,
com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCardOrBuilder>(
(com.google.cloud.dialogflow.v2.Intent.Message.BrowseCarouselCard) message_,
getParentForChildren(),
isClean());
message_ = null;
}
messageCase_ = 22;
onChanged();
return browseCarouselCardBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.TableCard,
com.google.cloud.dialogflow.v2.Intent.Message.TableCard.Builder,
com.google.cloud.dialogflow.v2.Intent.Message.TableCardOrBuilder>
tableCardBuilder_;
/**
*
*
*
* Table card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.TableCard table_card = 23;
*
* @return Whether the tableCard field is set.
*/
@java.lang.Override
public boolean hasTableCard() {
return messageCase_ == 23;
}
/**
*
*
*
* Table card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.TableCard table_card = 23;
*
* @return The tableCard.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.TableCard getTableCard() {
if (tableCardBuilder_ == null) {
if (messageCase_ == 23) {
return (com.google.cloud.dialogflow.v2.Intent.Message.TableCard) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.TableCard.getDefaultInstance();
} else {
if (messageCase_ == 23) {
return tableCardBuilder_.getMessage();
}
return com.google.cloud.dialogflow.v2.Intent.Message.TableCard.getDefaultInstance();
}
}
/**
*
*
*
* Table card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.TableCard table_card = 23;
*/
public Builder setTableCard(com.google.cloud.dialogflow.v2.Intent.Message.TableCard value) {
if (tableCardBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
message_ = value;
onChanged();
} else {
tableCardBuilder_.setMessage(value);
}
messageCase_ = 23;
return this;
}
/**
*
*
*
* Table card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.TableCard table_card = 23;
*/
public Builder setTableCard(
com.google.cloud.dialogflow.v2.Intent.Message.TableCard.Builder builderForValue) {
if (tableCardBuilder_ == null) {
message_ = builderForValue.build();
onChanged();
} else {
tableCardBuilder_.setMessage(builderForValue.build());
}
messageCase_ = 23;
return this;
}
/**
*
*
*
* Table card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.TableCard table_card = 23;
*/
public Builder mergeTableCard(com.google.cloud.dialogflow.v2.Intent.Message.TableCard value) {
if (tableCardBuilder_ == null) {
if (messageCase_ == 23
&& message_
!= com.google.cloud.dialogflow.v2.Intent.Message.TableCard.getDefaultInstance()) {
message_ =
com.google.cloud.dialogflow.v2.Intent.Message.TableCard.newBuilder(
(com.google.cloud.dialogflow.v2.Intent.Message.TableCard) message_)
.mergeFrom(value)
.buildPartial();
} else {
message_ = value;
}
onChanged();
} else {
if (messageCase_ == 23) {
tableCardBuilder_.mergeFrom(value);
} else {
tableCardBuilder_.setMessage(value);
}
}
messageCase_ = 23;
return this;
}
/**
*
*
*
* Table card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.TableCard table_card = 23;
*/
public Builder clearTableCard() {
if (tableCardBuilder_ == null) {
if (messageCase_ == 23) {
messageCase_ = 0;
message_ = null;
onChanged();
}
} else {
if (messageCase_ == 23) {
messageCase_ = 0;
message_ = null;
}
tableCardBuilder_.clear();
}
return this;
}
/**
*
*
*
* Table card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.TableCard table_card = 23;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.TableCard.Builder getTableCardBuilder() {
return getTableCardFieldBuilder().getBuilder();
}
/**
*
*
*
* Table card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.TableCard table_card = 23;
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.TableCardOrBuilder
getTableCardOrBuilder() {
if ((messageCase_ == 23) && (tableCardBuilder_ != null)) {
return tableCardBuilder_.getMessageOrBuilder();
} else {
if (messageCase_ == 23) {
return (com.google.cloud.dialogflow.v2.Intent.Message.TableCard) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.TableCard.getDefaultInstance();
}
}
/**
*
*
*
* Table card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.TableCard table_card = 23;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.TableCard,
com.google.cloud.dialogflow.v2.Intent.Message.TableCard.Builder,
com.google.cloud.dialogflow.v2.Intent.Message.TableCardOrBuilder>
getTableCardFieldBuilder() {
if (tableCardBuilder_ == null) {
if (!(messageCase_ == 23)) {
message_ = com.google.cloud.dialogflow.v2.Intent.Message.TableCard.getDefaultInstance();
}
tableCardBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.TableCard,
com.google.cloud.dialogflow.v2.Intent.Message.TableCard.Builder,
com.google.cloud.dialogflow.v2.Intent.Message.TableCardOrBuilder>(
(com.google.cloud.dialogflow.v2.Intent.Message.TableCard) message_,
getParentForChildren(),
isClean());
message_ = null;
}
messageCase_ = 23;
onChanged();
return tableCardBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent,
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.Builder,
com.google.cloud.dialogflow.v2.Intent.Message.MediaContentOrBuilder>
mediaContentBuilder_;
/**
*
*
*
* The media content card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.MediaContent media_content = 24;
*
* @return Whether the mediaContent field is set.
*/
@java.lang.Override
public boolean hasMediaContent() {
return messageCase_ == 24;
}
/**
*
*
*
* The media content card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.MediaContent media_content = 24;
*
* @return The mediaContent.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.MediaContent getMediaContent() {
if (mediaContentBuilder_ == null) {
if (messageCase_ == 24) {
return (com.google.cloud.dialogflow.v2.Intent.Message.MediaContent) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.getDefaultInstance();
} else {
if (messageCase_ == 24) {
return mediaContentBuilder_.getMessage();
}
return com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.getDefaultInstance();
}
}
/**
*
*
*
* The media content card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.MediaContent media_content = 24;
*/
public Builder setMediaContent(
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent value) {
if (mediaContentBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
message_ = value;
onChanged();
} else {
mediaContentBuilder_.setMessage(value);
}
messageCase_ = 24;
return this;
}
/**
*
*
*
* The media content card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.MediaContent media_content = 24;
*/
public Builder setMediaContent(
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.Builder builderForValue) {
if (mediaContentBuilder_ == null) {
message_ = builderForValue.build();
onChanged();
} else {
mediaContentBuilder_.setMessage(builderForValue.build());
}
messageCase_ = 24;
return this;
}
/**
*
*
*
* The media content card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.MediaContent media_content = 24;
*/
public Builder mergeMediaContent(
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent value) {
if (mediaContentBuilder_ == null) {
if (messageCase_ == 24
&& message_
!= com.google.cloud.dialogflow.v2.Intent.Message.MediaContent
.getDefaultInstance()) {
message_ =
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.newBuilder(
(com.google.cloud.dialogflow.v2.Intent.Message.MediaContent) message_)
.mergeFrom(value)
.buildPartial();
} else {
message_ = value;
}
onChanged();
} else {
if (messageCase_ == 24) {
mediaContentBuilder_.mergeFrom(value);
} else {
mediaContentBuilder_.setMessage(value);
}
}
messageCase_ = 24;
return this;
}
/**
*
*
*
* The media content card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.MediaContent media_content = 24;
*/
public Builder clearMediaContent() {
if (mediaContentBuilder_ == null) {
if (messageCase_ == 24) {
messageCase_ = 0;
message_ = null;
onChanged();
}
} else {
if (messageCase_ == 24) {
messageCase_ = 0;
message_ = null;
}
mediaContentBuilder_.clear();
}
return this;
}
/**
*
*
*
* The media content card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.MediaContent media_content = 24;
*/
public com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.Builder
getMediaContentBuilder() {
return getMediaContentFieldBuilder().getBuilder();
}
/**
*
*
*
* The media content card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.MediaContent media_content = 24;
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.Intent.Message.MediaContentOrBuilder
getMediaContentOrBuilder() {
if ((messageCase_ == 24) && (mediaContentBuilder_ != null)) {
return mediaContentBuilder_.getMessageOrBuilder();
} else {
if (messageCase_ == 24) {
return (com.google.cloud.dialogflow.v2.Intent.Message.MediaContent) message_;
}
return com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.getDefaultInstance();
}
}
/**
*
*
*
* The media content card for Actions on Google.
*
*
* .google.cloud.dialogflow.v2.Intent.Message.MediaContent media_content = 24;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent,
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.Builder,
com.google.cloud.dialogflow.v2.Intent.Message.MediaContentOrBuilder>
getMediaContentFieldBuilder() {
if (mediaContentBuilder_ == null) {
if (!(messageCase_ == 24)) {
message_ =
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.getDefaultInstance();
}
mediaContentBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent,
com.google.cloud.dialogflow.v2.Intent.Message.MediaContent.Builder,
com.google.cloud.dialogflow.v2.Intent.Message.MediaContentOrBuilder>(
(com.google.cloud.dialogflow.v2.Intent.Message.MediaContent) message_,
getParentForChildren(),
isClean());
message_ = null;
}
messageCase_ = 24;
onChanged();
return mediaContentBuilder_;
}
private int platform_ = 0;
/**
*
*
*
* Optional. The platform that this message is intended for.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Platform platform = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for platform.
*/
@java.lang.Override
public int getPlatformValue() {
return platform_;
}
/**
*
*
*
* Optional. The platform that this message is intended for.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Platform platform = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The enum numeric value on the wire for platform to set.
* @return This builder for chaining.
*/
public Builder setPlatformValue(int value) {
platform_ = value;
bitField0_ |= 0x00004000;
onChanged();
return this;
}
/**
*
*
*
* Optional. The platform that this message is intended for.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Platform platform = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The platform.
*/
@java.lang.Override
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.forNumber(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 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The platform to set.
* @return This builder for chaining.
*/
public Builder setPlatform(com.google.cloud.dialogflow.v2.Intent.Message.Platform value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00004000;
platform_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Optional. The platform that this message is intended for.
*
*
*
* .google.cloud.dialogflow.v2.Intent.Message.Platform platform = 6 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return This builder for chaining.
*/
public Builder clearPlatform() {
bitField0_ = (bitField0_ & ~0x00004000);
platform_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.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() {
@java.lang.Override
public Message parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.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 {
/**
*
*
*