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

com.google.cloud.dialogflow.v2.Intent Maven / Gradle / Ivy

There is a newer version: 4.59.0
Show newest version
/*
 * 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 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 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 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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy