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.55.0
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/dialogflow/v2/intent.proto

package com.google.cloud.dialogflow.v2;

/**
 * 
 * Represents an intent.
 * Intents convert a number of user expressions or patterns into an action. An
 * action is an extraction of a user command or sentence semantics.
 * 
* * Protobuf type {@code google.cloud.dialogflow.v2.Intent} */ public final class Intent extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent) IntentOrBuilder { private static final long serialVersionUID = 0L; // Use Intent.newBuilder() to construct. private Intent(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Intent() { name_ = ""; displayName_ = ""; webhookState_ = 0; priority_ = 0; isFallback_ = false; mlDisabled_ = false; inputContextNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; events_ = com.google.protobuf.LazyStringArrayList.EMPTY; trainingPhrases_ = java.util.Collections.emptyList(); action_ = ""; outputContexts_ = java.util.Collections.emptyList(); resetContexts_ = false; parameters_ = java.util.Collections.emptyList(); messages_ = java.util.Collections.emptyList(); defaultResponsePlatforms_ = java.util.Collections.emptyList(); rootFollowupIntentName_ = ""; parentFollowupIntentName_ = ""; followupIntentInfo_ = java.util.Collections.emptyList(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Intent( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { java.lang.String s = input.readStringRequireUtf8(); name_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); displayName_ = s; break; } case 24: { priority_ = input.readInt32(); break; } case 32: { isFallback_ = input.readBool(); break; } case 48: { int rawValue = input.readEnum(); webhookState_ = rawValue; break; } case 58: { java.lang.String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { inputContextNames_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000040; } inputContextNames_.add(s); break; } case 66: { java.lang.String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { events_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000080; } events_.add(s); break; } case 74: { if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) { trainingPhrases_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000100; } trainingPhrases_.add( input.readMessage(com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.parser(), extensionRegistry)); break; } case 82: { java.lang.String s = input.readStringRequireUtf8(); action_ = s; break; } case 90: { if (!((mutable_bitField0_ & 0x00000400) == 0x00000400)) { outputContexts_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000400; } outputContexts_.add( input.readMessage(com.google.cloud.dialogflow.v2.Context.parser(), extensionRegistry)); break; } case 96: { resetContexts_ = input.readBool(); break; } case 106: { if (!((mutable_bitField0_ & 0x00001000) == 0x00001000)) { parameters_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00001000; } parameters_.add( input.readMessage(com.google.cloud.dialogflow.v2.Intent.Parameter.parser(), extensionRegistry)); break; } case 114: { if (!((mutable_bitField0_ & 0x00002000) == 0x00002000)) { messages_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00002000; } messages_.add( input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.parser(), extensionRegistry)); break; } case 120: { int rawValue = input.readEnum(); if (!((mutable_bitField0_ & 0x00004000) == 0x00004000)) { defaultResponsePlatforms_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00004000; } defaultResponsePlatforms_.add(rawValue); break; } case 122: { int length = input.readRawVarint32(); int oldLimit = input.pushLimit(length); while(input.getBytesUntilLimit() > 0) { int rawValue = input.readEnum(); if (!((mutable_bitField0_ & 0x00004000) == 0x00004000)) { defaultResponsePlatforms_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00004000; } defaultResponsePlatforms_.add(rawValue); } input.popLimit(oldLimit); break; } case 130: { java.lang.String s = input.readStringRequireUtf8(); rootFollowupIntentName_ = s; break; } case 138: { java.lang.String s = input.readStringRequireUtf8(); parentFollowupIntentName_ = s; break; } case 146: { if (!((mutable_bitField0_ & 0x00020000) == 0x00020000)) { followupIntentInfo_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00020000; } followupIntentInfo_.add( input.readMessage(com.google.cloud.dialogflow.v2.Intent.FollowupIntentInfo.parser(), extensionRegistry)); break; } case 152: { mlDisabled_ = input.readBool(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { inputContextNames_ = inputContextNames_.getUnmodifiableView(); } if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { events_ = events_.getUnmodifiableView(); } if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) { trainingPhrases_ = java.util.Collections.unmodifiableList(trainingPhrases_); } if (((mutable_bitField0_ & 0x00000400) == 0x00000400)) { outputContexts_ = java.util.Collections.unmodifiableList(outputContexts_); } if (((mutable_bitField0_ & 0x00001000) == 0x00001000)) { parameters_ = java.util.Collections.unmodifiableList(parameters_); } if (((mutable_bitField0_ & 0x00002000) == 0x00002000)) { messages_ = java.util.Collections.unmodifiableList(messages_); } if (((mutable_bitField0_ & 0x00004000) == 0x00004000)) { defaultResponsePlatforms_ = java.util.Collections.unmodifiableList(defaultResponsePlatforms_); } if (((mutable_bitField0_ & 0x00020000) == 0x00020000)) { followupIntentInfo_ = java.util.Collections.unmodifiableList(followupIntentInfo_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.v2.Intent.class, com.google.cloud.dialogflow.v2.Intent.Builder.class); } /** *
   * Represents the different states that webhooks can be in.
   * 
* * Protobuf enum {@code google.cloud.dialogflow.v2.Intent.WebhookState} */ public enum WebhookState implements com.google.protobuf.ProtocolMessageEnum { /** *
     * Webhook is disabled in the agent and in the intent.
     * 
* * WEBHOOK_STATE_UNSPECIFIED = 0; */ WEBHOOK_STATE_UNSPECIFIED(0), /** *
     * Webhook is enabled in the agent and in the intent.
     * 
* * WEBHOOK_STATE_ENABLED = 1; */ WEBHOOK_STATE_ENABLED(1), /** *
     * Webhook is enabled in the agent and in the intent. Also, each slot
     * filling prompt is forwarded to the webhook.
     * 
* * WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2; */ WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING(2), UNRECOGNIZED(-1), ; /** *
     * Webhook is disabled in the agent and in the intent.
     * 
* * WEBHOOK_STATE_UNSPECIFIED = 0; */ public static final int WEBHOOK_STATE_UNSPECIFIED_VALUE = 0; /** *
     * Webhook is enabled in the agent and in the intent.
     * 
* * WEBHOOK_STATE_ENABLED = 1; */ public static final int WEBHOOK_STATE_ENABLED_VALUE = 1; /** *
     * Webhook is enabled in the agent and in the intent. Also, each slot
     * filling prompt is forwarded to the webhook.
     * 
* * WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2; */ public static final int WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING_VALUE = 2; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static WebhookState valueOf(int value) { return forNumber(value); } public static WebhookState forNumber(int value) { switch (value) { case 0: return WEBHOOK_STATE_UNSPECIFIED; case 1: return WEBHOOK_STATE_ENABLED; case 2: return WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< WebhookState> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public WebhookState findValueByNumber(int number) { return WebhookState.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.cloud.dialogflow.v2.Intent.getDescriptor().getEnumTypes().get(0); } private static final WebhookState[] VALUES = values(); public static WebhookState valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private WebhookState(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.v2.Intent.WebhookState) } public interface TrainingPhraseOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.TrainingPhrase) com.google.protobuf.MessageOrBuilder { /** *
     * Required. The unique identifier of this training phrase.
     * 
* * string name = 1; */ java.lang.String getName(); /** *
     * Required. The unique identifier of this training phrase.
     * 
* * string name = 1; */ com.google.protobuf.ByteString getNameBytes(); /** *
     * Required. The type of the training phrase.
     * 
* * .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2; */ int getTypeValue(); /** *
     * Required. The type of the training phrase.
     * 
* * .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2; */ com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type getType(); /** *
     * Required. The collection of training phrase parts (can be annotated).
     * Fields: `entity_type`, `alias` and `user_defined` should be populated
     * only for the annotated parts of the training phrase.
     * 
* * repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3; */ java.util.List getPartsList(); /** *
     * Required. The collection of training phrase parts (can be annotated).
     * Fields: `entity_type`, `alias` and `user_defined` should be populated
     * only for the annotated parts of the training phrase.
     * 
* * repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3; */ com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part getParts(int index); /** *
     * Required. The collection of training phrase parts (can be annotated).
     * Fields: `entity_type`, `alias` and `user_defined` should be populated
     * only for the annotated parts of the training phrase.
     * 
* * repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3; */ int getPartsCount(); /** *
     * Required. The collection of training phrase parts (can be annotated).
     * Fields: `entity_type`, `alias` and `user_defined` should be populated
     * only for the annotated parts of the training phrase.
     * 
* * repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3; */ java.util.List getPartsOrBuilderList(); /** *
     * Required. The collection of training phrase parts (can be annotated).
     * Fields: `entity_type`, `alias` and `user_defined` should be populated
     * only for the annotated parts of the training phrase.
     * 
* * repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3; */ com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.PartOrBuilder getPartsOrBuilder( int index); /** *
     * Optional. Indicates how many times this example or template was added to
     * the intent. Each time a developer adds an existing sample by editing an
     * intent or training, this counter is increased.
     * 
* * int32 times_added_count = 4; */ int getTimesAddedCount(); } /** *
   * Represents an example or template that the agent is trained on.
   * 
* * Protobuf type {@code google.cloud.dialogflow.v2.Intent.TrainingPhrase} */ public static final class TrainingPhrase extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.TrainingPhrase) TrainingPhraseOrBuilder { private static final long serialVersionUID = 0L; // Use TrainingPhrase.newBuilder() to construct. private TrainingPhrase(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private TrainingPhrase() { name_ = ""; type_ = 0; parts_ = java.util.Collections.emptyList(); timesAddedCount_ = 0; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private TrainingPhrase( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { java.lang.String s = input.readStringRequireUtf8(); name_ = s; break; } case 16: { int rawValue = input.readEnum(); type_ = rawValue; break; } case 26: { if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { parts_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; } parts_.add( input.readMessage(com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.parser(), extensionRegistry)); break; } case 32: { timesAddedCount_ = input.readInt32(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { parts_ = java.util.Collections.unmodifiableList(parts_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_TrainingPhrase_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_TrainingPhrase_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.class, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Builder.class); } /** *
     * Represents different types of training phrases.
     * 
* * Protobuf enum {@code google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type} */ public enum Type implements com.google.protobuf.ProtocolMessageEnum { /** *
       * Not specified. This value should never be used.
       * 
* * TYPE_UNSPECIFIED = 0; */ TYPE_UNSPECIFIED(0), /** *
       * Examples do not contain @-prefixed entity type names, but example parts
       * can be annotated with entity types.
       * 
* * EXAMPLE = 1; */ EXAMPLE(1), /** *
       * Templates are not annotated with entity types, but they can contain
       * @-prefixed entity type names as substrings.
       * 
* * TEMPLATE = 2; */ TEMPLATE(2), UNRECOGNIZED(-1), ; /** *
       * Not specified. This value should never be used.
       * 
* * TYPE_UNSPECIFIED = 0; */ public static final int TYPE_UNSPECIFIED_VALUE = 0; /** *
       * Examples do not contain @-prefixed entity type names, but example parts
       * can be annotated with entity types.
       * 
* * EXAMPLE = 1; */ public static final int EXAMPLE_VALUE = 1; /** *
       * Templates are not annotated with entity types, but they can contain
       * @-prefixed entity type names as substrings.
       * 
* * TEMPLATE = 2; */ public static final int TEMPLATE_VALUE = 2; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static Type valueOf(int value) { return forNumber(value); } public static Type forNumber(int value) { switch (value) { case 0: return TYPE_UNSPECIFIED; case 1: return EXAMPLE; case 2: return TEMPLATE; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< Type> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public Type findValueByNumber(int number) { return Type.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.getDescriptor().getEnumTypes().get(0); } private static final Type[] VALUES = values(); public static Type valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private Type(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type) } public interface PartOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part) com.google.protobuf.MessageOrBuilder { /** *
       * Required. The text corresponding to the example or template,
       * if there are no annotations. For
       * annotated examples, it is the text for one of the example's parts.
       * 
* * string text = 1; */ java.lang.String getText(); /** *
       * Required. The text corresponding to the example or template,
       * if there are no annotations. For
       * annotated examples, it is the text for one of the example's parts.
       * 
* * string text = 1; */ com.google.protobuf.ByteString getTextBytes(); /** *
       * Optional. The entity type name prefixed with `@`. This field is
       * required for the annotated part of the text and applies only to
       * examples.
       * 
* * string entity_type = 2; */ java.lang.String getEntityType(); /** *
       * Optional. The entity type name prefixed with `@`. This field is
       * required for the annotated part of the text and applies only to
       * examples.
       * 
* * string entity_type = 2; */ com.google.protobuf.ByteString getEntityTypeBytes(); /** *
       * Optional. The parameter name for the value extracted from the
       * annotated part of the example.
       * 
* * string alias = 3; */ java.lang.String getAlias(); /** *
       * Optional. The parameter name for the value extracted from the
       * annotated part of the example.
       * 
* * string alias = 3; */ com.google.protobuf.ByteString getAliasBytes(); /** *
       * Optional. Indicates whether the text was manually annotated by the
       * developer.
       * 
* * bool user_defined = 4; */ boolean getUserDefined(); } /** *
     * Represents a part of a training phrase.
     * 
* * Protobuf type {@code google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part} */ public static final class Part extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part) PartOrBuilder { private static final long serialVersionUID = 0L; // Use Part.newBuilder() to construct. private Part(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Part() { text_ = ""; entityType_ = ""; alias_ = ""; userDefined_ = false; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Part( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { java.lang.String s = input.readStringRequireUtf8(); text_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); entityType_ = s; break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); alias_ = s; break; } case 32: { userDefined_ = input.readBool(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_TrainingPhrase_Part_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_TrainingPhrase_Part_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.class, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.Builder.class); } public static final int TEXT_FIELD_NUMBER = 1; private volatile java.lang.Object text_; /** *
       * Required. The text corresponding to the example or template,
       * if there are no annotations. For
       * annotated examples, it is the text for one of the example's parts.
       * 
* * string text = 1; */ public java.lang.String getText() { java.lang.Object ref = text_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); text_ = s; return s; } } /** *
       * Required. The text corresponding to the example or template,
       * if there are no annotations. For
       * annotated examples, it is the text for one of the example's parts.
       * 
* * string text = 1; */ public com.google.protobuf.ByteString getTextBytes() { java.lang.Object ref = text_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); text_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int ENTITY_TYPE_FIELD_NUMBER = 2; private volatile java.lang.Object entityType_; /** *
       * Optional. The entity type name prefixed with `@`. This field is
       * required for the annotated part of the text and applies only to
       * examples.
       * 
* * string entity_type = 2; */ public java.lang.String getEntityType() { java.lang.Object ref = entityType_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); entityType_ = s; return s; } } /** *
       * Optional. The entity type name prefixed with `@`. This field is
       * required for the annotated part of the text and applies only to
       * examples.
       * 
* * string entity_type = 2; */ public com.google.protobuf.ByteString getEntityTypeBytes() { java.lang.Object ref = entityType_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); entityType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int ALIAS_FIELD_NUMBER = 3; private volatile java.lang.Object alias_; /** *
       * Optional. The parameter name for the value extracted from the
       * annotated part of the example.
       * 
* * string alias = 3; */ public java.lang.String getAlias() { java.lang.Object ref = alias_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); alias_ = s; return s; } } /** *
       * Optional. The parameter name for the value extracted from the
       * annotated part of the example.
       * 
* * string alias = 3; */ public com.google.protobuf.ByteString getAliasBytes() { java.lang.Object ref = alias_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); alias_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int USER_DEFINED_FIELD_NUMBER = 4; private boolean userDefined_; /** *
       * Optional. Indicates whether the text was manually annotated by the
       * developer.
       * 
* * bool user_defined = 4; */ public boolean getUserDefined() { return userDefined_; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getTextBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_); } if (!getEntityTypeBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, entityType_); } if (!getAliasBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, alias_); } if (userDefined_ != false) { output.writeBool(4, userDefined_); } unknownFields.writeTo(output); } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getTextBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_); } if (!getEntityTypeBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, entityType_); } if (!getAliasBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, alias_); } if (userDefined_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(4, userDefined_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part)) { return super.equals(obj); } com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part other = (com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part) obj; boolean result = true; result = result && getText() .equals(other.getText()); result = result && getEntityType() .equals(other.getEntityType()); result = result && getAlias() .equals(other.getAlias()); result = result && (getUserDefined() == other.getUserDefined()); result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TEXT_FIELD_NUMBER; hash = (53 * hash) + getText().hashCode(); hash = (37 * hash) + ENTITY_TYPE_FIELD_NUMBER; hash = (53 * hash) + getEntityType().hashCode(); hash = (37 * hash) + ALIAS_FIELD_NUMBER; hash = (53 * hash) + getAlias().hashCode(); hash = (37 * hash) + USER_DEFINED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getUserDefined()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
       * Represents a part of a training phrase.
       * 
* * Protobuf type {@code google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part) com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.PartOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_TrainingPhrase_Part_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_TrainingPhrase_Part_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.class, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.Builder.class); } // Construct using com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); text_ = ""; entityType_ = ""; alias_ = ""; userDefined_ = false; return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_TrainingPhrase_Part_descriptor; } public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part getDefaultInstanceForType() { return com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.getDefaultInstance(); } public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part build() { com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part buildPartial() { com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part result = new com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part(this); result.text_ = text_; result.entityType_ = entityType_; result.alias_ = alias_; result.userDefined_ = userDefined_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part) { return mergeFrom((com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part other) { if (other == com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.getDefaultInstance()) return this; if (!other.getText().isEmpty()) { text_ = other.text_; onChanged(); } if (!other.getEntityType().isEmpty()) { entityType_ = other.entityType_; onChanged(); } if (!other.getAlias().isEmpty()) { alias_ = other.alias_; onChanged(); } if (other.getUserDefined() != false) { setUserDefined(other.getUserDefined()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object text_ = ""; /** *
         * Required. The text corresponding to the example or template,
         * if there are no annotations. For
         * annotated examples, it is the text for one of the example's parts.
         * 
* * string text = 1; */ public java.lang.String getText() { java.lang.Object ref = text_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); text_ = s; return s; } else { return (java.lang.String) ref; } } /** *
         * Required. The text corresponding to the example or template,
         * if there are no annotations. For
         * annotated examples, it is the text for one of the example's parts.
         * 
* * string text = 1; */ public com.google.protobuf.ByteString getTextBytes() { java.lang.Object ref = text_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); text_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
         * Required. The text corresponding to the example or template,
         * if there are no annotations. For
         * annotated examples, it is the text for one of the example's parts.
         * 
* * string text = 1; */ public Builder setText( java.lang.String value) { if (value == null) { throw new NullPointerException(); } text_ = value; onChanged(); return this; } /** *
         * Required. The text corresponding to the example or template,
         * if there are no annotations. For
         * annotated examples, it is the text for one of the example's parts.
         * 
* * string text = 1; */ public Builder clearText() { text_ = getDefaultInstance().getText(); onChanged(); return this; } /** *
         * Required. The text corresponding to the example or template,
         * if there are no annotations. For
         * annotated examples, it is the text for one of the example's parts.
         * 
* * string text = 1; */ public Builder setTextBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); text_ = value; onChanged(); return this; } private java.lang.Object entityType_ = ""; /** *
         * Optional. The entity type name prefixed with `@`. This field is
         * required for the annotated part of the text and applies only to
         * examples.
         * 
* * string entity_type = 2; */ public java.lang.String getEntityType() { java.lang.Object ref = entityType_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); entityType_ = s; return s; } else { return (java.lang.String) ref; } } /** *
         * Optional. The entity type name prefixed with `@`. This field is
         * required for the annotated part of the text and applies only to
         * examples.
         * 
* * string entity_type = 2; */ public com.google.protobuf.ByteString getEntityTypeBytes() { java.lang.Object ref = entityType_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); entityType_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
         * Optional. The entity type name prefixed with `@`. This field is
         * required for the annotated part of the text and applies only to
         * examples.
         * 
* * string entity_type = 2; */ public Builder setEntityType( java.lang.String value) { if (value == null) { throw new NullPointerException(); } entityType_ = value; onChanged(); return this; } /** *
         * Optional. The entity type name prefixed with `@`. This field is
         * required for the annotated part of the text and applies only to
         * examples.
         * 
* * string entity_type = 2; */ public Builder clearEntityType() { entityType_ = getDefaultInstance().getEntityType(); onChanged(); return this; } /** *
         * Optional. The entity type name prefixed with `@`. This field is
         * required for the annotated part of the text and applies only to
         * examples.
         * 
* * string entity_type = 2; */ public Builder setEntityTypeBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); entityType_ = value; onChanged(); return this; } private java.lang.Object alias_ = ""; /** *
         * Optional. The parameter name for the value extracted from the
         * annotated part of the example.
         * 
* * string alias = 3; */ public java.lang.String getAlias() { java.lang.Object ref = alias_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); alias_ = s; return s; } else { return (java.lang.String) ref; } } /** *
         * Optional. The parameter name for the value extracted from the
         * annotated part of the example.
         * 
* * string alias = 3; */ public com.google.protobuf.ByteString getAliasBytes() { java.lang.Object ref = alias_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); alias_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
         * Optional. The parameter name for the value extracted from the
         * annotated part of the example.
         * 
* * string alias = 3; */ public Builder setAlias( java.lang.String value) { if (value == null) { throw new NullPointerException(); } alias_ = value; onChanged(); return this; } /** *
         * Optional. The parameter name for the value extracted from the
         * annotated part of the example.
         * 
* * string alias = 3; */ public Builder clearAlias() { alias_ = getDefaultInstance().getAlias(); onChanged(); return this; } /** *
         * Optional. The parameter name for the value extracted from the
         * annotated part of the example.
         * 
* * string alias = 3; */ public Builder setAliasBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); alias_ = value; onChanged(); return this; } private boolean userDefined_ ; /** *
         * Optional. Indicates whether the text was manually annotated by the
         * developer.
         * 
* * bool user_defined = 4; */ public boolean getUserDefined() { return userDefined_; } /** *
         * Optional. Indicates whether the text was manually annotated by the
         * developer.
         * 
* * bool user_defined = 4; */ public Builder setUserDefined(boolean value) { userDefined_ = value; onChanged(); return this; } /** *
         * Optional. Indicates whether the text was manually annotated by the
         * developer.
         * 
* * bool user_defined = 4; */ public Builder clearUserDefined() { userDefined_ = false; onChanged(); return this; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part) } // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part) private static final com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part(); } public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public Part parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Part(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** *
     * Required. The unique identifier of this training phrase.
     * 
* * string name = 1; */ public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** *
     * Required. The unique identifier of this training phrase.
     * 
* * string name = 1; */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int TYPE_FIELD_NUMBER = 2; private int type_; /** *
     * Required. The type of the training phrase.
     * 
* * .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2; */ public int getTypeValue() { return type_; } /** *
     * Required. The type of the training phrase.
     * 
* * .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2; */ public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type getType() { com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type result = com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type.valueOf(type_); return result == null ? com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type.UNRECOGNIZED : result; } public static final int PARTS_FIELD_NUMBER = 3; private java.util.List parts_; /** *
     * Required. The collection of training phrase parts (can be annotated).
     * Fields: `entity_type`, `alias` and `user_defined` should be populated
     * only for the annotated parts of the training phrase.
     * 
* * repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3; */ public java.util.List getPartsList() { return parts_; } /** *
     * Required. The collection of training phrase parts (can be annotated).
     * Fields: `entity_type`, `alias` and `user_defined` should be populated
     * only for the annotated parts of the training phrase.
     * 
* * repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3; */ public java.util.List getPartsOrBuilderList() { return parts_; } /** *
     * Required. The collection of training phrase parts (can be annotated).
     * Fields: `entity_type`, `alias` and `user_defined` should be populated
     * only for the annotated parts of the training phrase.
     * 
* * repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3; */ public int getPartsCount() { return parts_.size(); } /** *
     * Required. The collection of training phrase parts (can be annotated).
     * Fields: `entity_type`, `alias` and `user_defined` should be populated
     * only for the annotated parts of the training phrase.
     * 
* * repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3; */ public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part getParts(int index) { return parts_.get(index); } /** *
     * Required. The collection of training phrase parts (can be annotated).
     * Fields: `entity_type`, `alias` and `user_defined` should be populated
     * only for the annotated parts of the training phrase.
     * 
* * repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3; */ public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.PartOrBuilder getPartsOrBuilder( int index) { return parts_.get(index); } public static final int TIMES_ADDED_COUNT_FIELD_NUMBER = 4; private int timesAddedCount_; /** *
     * Optional. Indicates how many times this example or template was added to
     * the intent. Each time a developer adds an existing sample by editing an
     * intent or training, this counter is increased.
     * 
* * int32 times_added_count = 4; */ public int getTimesAddedCount() { return timesAddedCount_; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (type_ != com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type.TYPE_UNSPECIFIED.getNumber()) { output.writeEnum(2, type_); } for (int i = 0; i < parts_.size(); i++) { output.writeMessage(3, parts_.get(i)); } if (timesAddedCount_ != 0) { output.writeInt32(4, timesAddedCount_); } unknownFields.writeTo(output); } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (type_ != com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type.TYPE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(2, type_); } for (int i = 0; i < parts_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, parts_.get(i)); } if (timesAddedCount_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(4, timesAddedCount_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.dialogflow.v2.Intent.TrainingPhrase)) { return super.equals(obj); } com.google.cloud.dialogflow.v2.Intent.TrainingPhrase other = (com.google.cloud.dialogflow.v2.Intent.TrainingPhrase) obj; boolean result = true; result = result && getName() .equals(other.getName()); result = result && type_ == other.type_; result = result && getPartsList() .equals(other.getPartsList()); result = result && (getTimesAddedCount() == other.getTimesAddedCount()); result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + type_; if (getPartsCount() > 0) { hash = (37 * hash) + PARTS_FIELD_NUMBER; hash = (53 * hash) + getPartsList().hashCode(); } hash = (37 * hash) + TIMES_ADDED_COUNT_FIELD_NUMBER; hash = (53 * hash) + getTimesAddedCount(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.TrainingPhrase prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * Represents an example or template that the agent is trained on.
     * 
* * Protobuf type {@code google.cloud.dialogflow.v2.Intent.TrainingPhrase} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.TrainingPhrase) com.google.cloud.dialogflow.v2.Intent.TrainingPhraseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_TrainingPhrase_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_TrainingPhrase_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.class, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Builder.class); } // Construct using com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getPartsFieldBuilder(); } } public Builder clear() { super.clear(); name_ = ""; type_ = 0; if (partsBuilder_ == null) { parts_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); } else { partsBuilder_.clear(); } timesAddedCount_ = 0; return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_TrainingPhrase_descriptor; } public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase getDefaultInstanceForType() { return com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.getDefaultInstance(); } public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase build() { com.google.cloud.dialogflow.v2.Intent.TrainingPhrase result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase buildPartial() { com.google.cloud.dialogflow.v2.Intent.TrainingPhrase result = new com.google.cloud.dialogflow.v2.Intent.TrainingPhrase(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.name_ = name_; result.type_ = type_; if (partsBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004)) { parts_ = java.util.Collections.unmodifiableList(parts_); bitField0_ = (bitField0_ & ~0x00000004); } result.parts_ = parts_; } else { result.parts_ = partsBuilder_.build(); } result.timesAddedCount_ = timesAddedCount_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.dialogflow.v2.Intent.TrainingPhrase) { return mergeFrom((com.google.cloud.dialogflow.v2.Intent.TrainingPhrase)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.TrainingPhrase other) { if (other == com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (other.type_ != 0) { setTypeValue(other.getTypeValue()); } if (partsBuilder_ == null) { if (!other.parts_.isEmpty()) { if (parts_.isEmpty()) { parts_ = other.parts_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensurePartsIsMutable(); parts_.addAll(other.parts_); } onChanged(); } } else { if (!other.parts_.isEmpty()) { if (partsBuilder_.isEmpty()) { partsBuilder_.dispose(); partsBuilder_ = null; parts_ = other.parts_; bitField0_ = (bitField0_ & ~0x00000004); partsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getPartsFieldBuilder() : null; } else { partsBuilder_.addAllMessages(other.parts_); } } } if (other.getTimesAddedCount() != 0) { setTimesAddedCount(other.getTimesAddedCount()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.cloud.dialogflow.v2.Intent.TrainingPhrase parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.cloud.dialogflow.v2.Intent.TrainingPhrase) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object name_ = ""; /** *
       * Required. The unique identifier of this training phrase.
       * 
* * string name = 1; */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Required. The unique identifier of this training phrase.
       * 
* * string name = 1; */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Required. The unique identifier of this training phrase.
       * 
* * string name = 1; */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /** *
       * Required. The unique identifier of this training phrase.
       * 
* * string name = 1; */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /** *
       * Required. The unique identifier of this training phrase.
       * 
* * string name = 1; */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; } private int type_ = 0; /** *
       * Required. The type of the training phrase.
       * 
* * .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2; */ public int getTypeValue() { return type_; } /** *
       * Required. The type of the training phrase.
       * 
* * .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2; */ public Builder setTypeValue(int value) { type_ = value; onChanged(); return this; } /** *
       * Required. The type of the training phrase.
       * 
* * .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2; */ public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type getType() { com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type result = com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type.valueOf(type_); return result == null ? com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type.UNRECOGNIZED : result; } /** *
       * Required. The type of the training phrase.
       * 
* * .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2; */ public Builder setType(com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type value) { if (value == null) { throw new NullPointerException(); } type_ = value.getNumber(); onChanged(); return this; } /** *
       * Required. The type of the training phrase.
       * 
* * .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Type type = 2; */ public Builder clearType() { type_ = 0; onChanged(); return this; } private java.util.List parts_ = java.util.Collections.emptyList(); private void ensurePartsIsMutable() { if (!((bitField0_ & 0x00000004) == 0x00000004)) { parts_ = new java.util.ArrayList(parts_); bitField0_ |= 0x00000004; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.Builder, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.PartOrBuilder> partsBuilder_; /** *
       * Required. The collection of training phrase parts (can be annotated).
       * Fields: `entity_type`, `alias` and `user_defined` should be populated
       * only for the annotated parts of the training phrase.
       * 
* * repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3; */ public java.util.List getPartsList() { if (partsBuilder_ == null) { return java.util.Collections.unmodifiableList(parts_); } else { return partsBuilder_.getMessageList(); } } /** *
       * Required. The collection of training phrase parts (can be annotated).
       * Fields: `entity_type`, `alias` and `user_defined` should be populated
       * only for the annotated parts of the training phrase.
       * 
* * repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3; */ public int getPartsCount() { if (partsBuilder_ == null) { return parts_.size(); } else { return partsBuilder_.getCount(); } } /** *
       * Required. The collection of training phrase parts (can be annotated).
       * Fields: `entity_type`, `alias` and `user_defined` should be populated
       * only for the annotated parts of the training phrase.
       * 
* * repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3; */ public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part getParts(int index) { if (partsBuilder_ == null) { return parts_.get(index); } else { return partsBuilder_.getMessage(index); } } /** *
       * Required. The collection of training phrase parts (can be annotated).
       * Fields: `entity_type`, `alias` and `user_defined` should be populated
       * only for the annotated parts of the training phrase.
       * 
* * repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3; */ public Builder setParts( int index, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part value) { if (partsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePartsIsMutable(); parts_.set(index, value); onChanged(); } else { partsBuilder_.setMessage(index, value); } return this; } /** *
       * Required. The collection of training phrase parts (can be annotated).
       * Fields: `entity_type`, `alias` and `user_defined` should be populated
       * only for the annotated parts of the training phrase.
       * 
* * repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3; */ public Builder setParts( int index, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.Builder builderForValue) { if (partsBuilder_ == null) { ensurePartsIsMutable(); parts_.set(index, builderForValue.build()); onChanged(); } else { partsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
       * Required. The collection of training phrase parts (can be annotated).
       * Fields: `entity_type`, `alias` and `user_defined` should be populated
       * only for the annotated parts of the training phrase.
       * 
* * repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3; */ public Builder addParts(com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part value) { if (partsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePartsIsMutable(); parts_.add(value); onChanged(); } else { partsBuilder_.addMessage(value); } return this; } /** *
       * Required. The collection of training phrase parts (can be annotated).
       * Fields: `entity_type`, `alias` and `user_defined` should be populated
       * only for the annotated parts of the training phrase.
       * 
* * repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3; */ public Builder addParts( int index, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part value) { if (partsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePartsIsMutable(); parts_.add(index, value); onChanged(); } else { partsBuilder_.addMessage(index, value); } return this; } /** *
       * Required. The collection of training phrase parts (can be annotated).
       * Fields: `entity_type`, `alias` and `user_defined` should be populated
       * only for the annotated parts of the training phrase.
       * 
* * repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3; */ public Builder addParts( com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.Builder builderForValue) { if (partsBuilder_ == null) { ensurePartsIsMutable(); parts_.add(builderForValue.build()); onChanged(); } else { partsBuilder_.addMessage(builderForValue.build()); } return this; } /** *
       * Required. The collection of training phrase parts (can be annotated).
       * Fields: `entity_type`, `alias` and `user_defined` should be populated
       * only for the annotated parts of the training phrase.
       * 
* * repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3; */ public Builder addParts( int index, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.Builder builderForValue) { if (partsBuilder_ == null) { ensurePartsIsMutable(); parts_.add(index, builderForValue.build()); onChanged(); } else { partsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
       * Required. The collection of training phrase parts (can be annotated).
       * Fields: `entity_type`, `alias` and `user_defined` should be populated
       * only for the annotated parts of the training phrase.
       * 
* * repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3; */ public Builder addAllParts( java.lang.Iterable values) { if (partsBuilder_ == null) { ensurePartsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, parts_); onChanged(); } else { partsBuilder_.addAllMessages(values); } return this; } /** *
       * Required. The collection of training phrase parts (can be annotated).
       * Fields: `entity_type`, `alias` and `user_defined` should be populated
       * only for the annotated parts of the training phrase.
       * 
* * repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3; */ public Builder clearParts() { if (partsBuilder_ == null) { parts_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { partsBuilder_.clear(); } return this; } /** *
       * Required. The collection of training phrase parts (can be annotated).
       * Fields: `entity_type`, `alias` and `user_defined` should be populated
       * only for the annotated parts of the training phrase.
       * 
* * repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3; */ public Builder removeParts(int index) { if (partsBuilder_ == null) { ensurePartsIsMutable(); parts_.remove(index); onChanged(); } else { partsBuilder_.remove(index); } return this; } /** *
       * Required. The collection of training phrase parts (can be annotated).
       * Fields: `entity_type`, `alias` and `user_defined` should be populated
       * only for the annotated parts of the training phrase.
       * 
* * repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3; */ public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.Builder getPartsBuilder( int index) { return getPartsFieldBuilder().getBuilder(index); } /** *
       * Required. The collection of training phrase parts (can be annotated).
       * Fields: `entity_type`, `alias` and `user_defined` should be populated
       * only for the annotated parts of the training phrase.
       * 
* * repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3; */ public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.PartOrBuilder getPartsOrBuilder( int index) { if (partsBuilder_ == null) { return parts_.get(index); } else { return partsBuilder_.getMessageOrBuilder(index); } } /** *
       * Required. The collection of training phrase parts (can be annotated).
       * Fields: `entity_type`, `alias` and `user_defined` should be populated
       * only for the annotated parts of the training phrase.
       * 
* * repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3; */ public java.util.List getPartsOrBuilderList() { if (partsBuilder_ != null) { return partsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(parts_); } } /** *
       * Required. The collection of training phrase parts (can be annotated).
       * Fields: `entity_type`, `alias` and `user_defined` should be populated
       * only for the annotated parts of the training phrase.
       * 
* * repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3; */ public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.Builder addPartsBuilder() { return getPartsFieldBuilder().addBuilder( com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.getDefaultInstance()); } /** *
       * Required. The collection of training phrase parts (can be annotated).
       * Fields: `entity_type`, `alias` and `user_defined` should be populated
       * only for the annotated parts of the training phrase.
       * 
* * repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3; */ public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.Builder addPartsBuilder( int index) { return getPartsFieldBuilder().addBuilder( index, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.getDefaultInstance()); } /** *
       * Required. The collection of training phrase parts (can be annotated).
       * Fields: `entity_type`, `alias` and `user_defined` should be populated
       * only for the annotated parts of the training phrase.
       * 
* * repeated .google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part parts = 3; */ public java.util.List getPartsBuilderList() { return getPartsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.Builder, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.PartOrBuilder> getPartsFieldBuilder() { if (partsBuilder_ == null) { partsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.Part.Builder, com.google.cloud.dialogflow.v2.Intent.TrainingPhrase.PartOrBuilder>( parts_, ((bitField0_ & 0x00000004) == 0x00000004), getParentForChildren(), isClean()); parts_ = null; } return partsBuilder_; } private int timesAddedCount_ ; /** *
       * Optional. Indicates how many times this example or template was added to
       * the intent. Each time a developer adds an existing sample by editing an
       * intent or training, this counter is increased.
       * 
* * int32 times_added_count = 4; */ public int getTimesAddedCount() { return timesAddedCount_; } /** *
       * Optional. Indicates how many times this example or template was added to
       * the intent. Each time a developer adds an existing sample by editing an
       * intent or training, this counter is increased.
       * 
* * int32 times_added_count = 4; */ public Builder setTimesAddedCount(int value) { timesAddedCount_ = value; onChanged(); return this; } /** *
       * Optional. Indicates how many times this example or template was added to
       * the intent. Each time a developer adds an existing sample by editing an
       * intent or training, this counter is increased.
       * 
* * int32 times_added_count = 4; */ public Builder clearTimesAddedCount() { timesAddedCount_ = 0; onChanged(); return this; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.TrainingPhrase) } // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.TrainingPhrase) private static final com.google.cloud.dialogflow.v2.Intent.TrainingPhrase DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.TrainingPhrase(); } public static com.google.cloud.dialogflow.v2.Intent.TrainingPhrase getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public TrainingPhrase parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new TrainingPhrase(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public com.google.cloud.dialogflow.v2.Intent.TrainingPhrase getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface ParameterOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Parameter) com.google.protobuf.MessageOrBuilder { /** *
     * The unique identifier of this parameter.
     * 
* * string name = 1; */ java.lang.String getName(); /** *
     * The unique identifier of this parameter.
     * 
* * string name = 1; */ com.google.protobuf.ByteString getNameBytes(); /** *
     * Required. The name of the parameter.
     * 
* * string display_name = 2; */ java.lang.String getDisplayName(); /** *
     * Required. The name of the parameter.
     * 
* * string display_name = 2; */ com.google.protobuf.ByteString getDisplayNameBytes(); /** *
     * Optional. The definition of the parameter value. It can be:
     * - a constant string,
     * - a parameter value defined as `$parameter_name`,
     * - an original parameter value defined as `$parameter_name.original`,
     * - a parameter value from some context defined as
     *   `#context_name.parameter_name`.
     * 
* * string value = 3; */ java.lang.String getValue(); /** *
     * Optional. The definition of the parameter value. It can be:
     * - a constant string,
     * - a parameter value defined as `$parameter_name`,
     * - an original parameter value defined as `$parameter_name.original`,
     * - a parameter value from some context defined as
     *   `#context_name.parameter_name`.
     * 
* * string value = 3; */ com.google.protobuf.ByteString getValueBytes(); /** *
     * Optional. The default value to use when the `value` yields an empty
     * result.
     * Default values can be extracted from contexts by using the following
     * syntax: `#context_name.parameter_name`.
     * 
* * string default_value = 4; */ java.lang.String getDefaultValue(); /** *
     * Optional. The default value to use when the `value` yields an empty
     * result.
     * Default values can be extracted from contexts by using the following
     * syntax: `#context_name.parameter_name`.
     * 
* * string default_value = 4; */ com.google.protobuf.ByteString getDefaultValueBytes(); /** *
     * Optional. The name of the entity type, prefixed with `@`, that
     * describes values of the parameter. If the parameter is
     * required, this must be provided.
     * 
* * string entity_type_display_name = 5; */ java.lang.String getEntityTypeDisplayName(); /** *
     * Optional. The name of the entity type, prefixed with `@`, that
     * describes values of the parameter. If the parameter is
     * required, this must be provided.
     * 
* * string entity_type_display_name = 5; */ com.google.protobuf.ByteString getEntityTypeDisplayNameBytes(); /** *
     * Optional. Indicates whether the parameter is required. That is,
     * whether the intent cannot be completed without collecting the parameter
     * value.
     * 
* * bool mandatory = 6; */ boolean getMandatory(); /** *
     * Optional. The collection of prompts that the agent can present to the
     * user in order to collect value for the parameter.
     * 
* * repeated string prompts = 7; */ java.util.List getPromptsList(); /** *
     * Optional. The collection of prompts that the agent can present to the
     * user in order to collect value for the parameter.
     * 
* * repeated string prompts = 7; */ int getPromptsCount(); /** *
     * Optional. The collection of prompts that the agent can present to the
     * user in order to collect value for the parameter.
     * 
* * repeated string prompts = 7; */ java.lang.String getPrompts(int index); /** *
     * Optional. The collection of prompts that the agent can present to the
     * user in order to collect value for the parameter.
     * 
* * repeated string prompts = 7; */ com.google.protobuf.ByteString getPromptsBytes(int index); /** *
     * Optional. Indicates whether the parameter represents a list of values.
     * 
* * bool is_list = 8; */ boolean getIsList(); } /** *
   * Represents intent parameters.
   * 
* * Protobuf type {@code google.cloud.dialogflow.v2.Intent.Parameter} */ public static final class Parameter extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Parameter) ParameterOrBuilder { private static final long serialVersionUID = 0L; // Use Parameter.newBuilder() to construct. private Parameter(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Parameter() { name_ = ""; displayName_ = ""; value_ = ""; defaultValue_ = ""; entityTypeDisplayName_ = ""; mandatory_ = false; prompts_ = com.google.protobuf.LazyStringArrayList.EMPTY; isList_ = false; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Parameter( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { java.lang.String s = input.readStringRequireUtf8(); name_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); displayName_ = s; break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); value_ = s; break; } case 34: { java.lang.String s = input.readStringRequireUtf8(); defaultValue_ = s; break; } case 42: { java.lang.String s = input.readStringRequireUtf8(); entityTypeDisplayName_ = s; break; } case 48: { mandatory_ = input.readBool(); break; } case 58: { java.lang.String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) { prompts_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000040; } prompts_.add(s); break; } case 64: { isList_ = input.readBool(); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000040) == 0x00000040)) { prompts_ = prompts_.getUnmodifiableView(); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Parameter_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Parameter_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.v2.Intent.Parameter.class, com.google.cloud.dialogflow.v2.Intent.Parameter.Builder.class); } private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** *
     * The unique identifier of this parameter.
     * 
* * string name = 1; */ public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** *
     * The unique identifier of this parameter.
     * 
* * string name = 1; */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DISPLAY_NAME_FIELD_NUMBER = 2; private volatile java.lang.Object displayName_; /** *
     * Required. The name of the parameter.
     * 
* * string display_name = 2; */ public java.lang.String getDisplayName() { java.lang.Object ref = displayName_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); displayName_ = s; return s; } } /** *
     * Required. The name of the parameter.
     * 
* * string display_name = 2; */ public com.google.protobuf.ByteString getDisplayNameBytes() { java.lang.Object ref = displayName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); displayName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int VALUE_FIELD_NUMBER = 3; private volatile java.lang.Object value_; /** *
     * Optional. The definition of the parameter value. It can be:
     * - a constant string,
     * - a parameter value defined as `$parameter_name`,
     * - an original parameter value defined as `$parameter_name.original`,
     * - a parameter value from some context defined as
     *   `#context_name.parameter_name`.
     * 
* * string value = 3; */ public java.lang.String getValue() { java.lang.Object ref = value_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); value_ = s; return s; } } /** *
     * Optional. The definition of the parameter value. It can be:
     * - a constant string,
     * - a parameter value defined as `$parameter_name`,
     * - an original parameter value defined as `$parameter_name.original`,
     * - a parameter value from some context defined as
     *   `#context_name.parameter_name`.
     * 
* * string value = 3; */ public com.google.protobuf.ByteString getValueBytes() { java.lang.Object ref = value_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); value_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DEFAULT_VALUE_FIELD_NUMBER = 4; private volatile java.lang.Object defaultValue_; /** *
     * Optional. The default value to use when the `value` yields an empty
     * result.
     * Default values can be extracted from contexts by using the following
     * syntax: `#context_name.parameter_name`.
     * 
* * string default_value = 4; */ public java.lang.String getDefaultValue() { java.lang.Object ref = defaultValue_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); defaultValue_ = s; return s; } } /** *
     * Optional. The default value to use when the `value` yields an empty
     * result.
     * Default values can be extracted from contexts by using the following
     * syntax: `#context_name.parameter_name`.
     * 
* * string default_value = 4; */ public com.google.protobuf.ByteString getDefaultValueBytes() { java.lang.Object ref = defaultValue_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); defaultValue_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int ENTITY_TYPE_DISPLAY_NAME_FIELD_NUMBER = 5; private volatile java.lang.Object entityTypeDisplayName_; /** *
     * Optional. The name of the entity type, prefixed with `@`, that
     * describes values of the parameter. If the parameter is
     * required, this must be provided.
     * 
* * string entity_type_display_name = 5; */ public java.lang.String getEntityTypeDisplayName() { java.lang.Object ref = entityTypeDisplayName_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); entityTypeDisplayName_ = s; return s; } } /** *
     * Optional. The name of the entity type, prefixed with `@`, that
     * describes values of the parameter. If the parameter is
     * required, this must be provided.
     * 
* * string entity_type_display_name = 5; */ public com.google.protobuf.ByteString getEntityTypeDisplayNameBytes() { java.lang.Object ref = entityTypeDisplayName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); entityTypeDisplayName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int MANDATORY_FIELD_NUMBER = 6; private boolean mandatory_; /** *
     * Optional. Indicates whether the parameter is required. That is,
     * whether the intent cannot be completed without collecting the parameter
     * value.
     * 
* * bool mandatory = 6; */ public boolean getMandatory() { return mandatory_; } public static final int PROMPTS_FIELD_NUMBER = 7; private com.google.protobuf.LazyStringList prompts_; /** *
     * Optional. The collection of prompts that the agent can present to the
     * user in order to collect value for the parameter.
     * 
* * repeated string prompts = 7; */ public com.google.protobuf.ProtocolStringList getPromptsList() { return prompts_; } /** *
     * Optional. The collection of prompts that the agent can present to the
     * user in order to collect value for the parameter.
     * 
* * repeated string prompts = 7; */ public int getPromptsCount() { return prompts_.size(); } /** *
     * Optional. The collection of prompts that the agent can present to the
     * user in order to collect value for the parameter.
     * 
* * repeated string prompts = 7; */ public java.lang.String getPrompts(int index) { return prompts_.get(index); } /** *
     * Optional. The collection of prompts that the agent can present to the
     * user in order to collect value for the parameter.
     * 
* * repeated string prompts = 7; */ public com.google.protobuf.ByteString getPromptsBytes(int index) { return prompts_.getByteString(index); } public static final int IS_LIST_FIELD_NUMBER = 8; private boolean isList_; /** *
     * Optional. Indicates whether the parameter represents a list of values.
     * 
* * bool is_list = 8; */ public boolean getIsList() { return isList_; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (!getDisplayNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); } if (!getValueBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, value_); } if (!getDefaultValueBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, defaultValue_); } if (!getEntityTypeDisplayNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, entityTypeDisplayName_); } if (mandatory_ != false) { output.writeBool(6, mandatory_); } for (int i = 0; i < prompts_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, prompts_.getRaw(i)); } if (isList_ != false) { output.writeBool(8, isList_); } unknownFields.writeTo(output); } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (!getDisplayNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); } if (!getValueBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, value_); } if (!getDefaultValueBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, defaultValue_); } if (!getEntityTypeDisplayNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, entityTypeDisplayName_); } if (mandatory_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(6, mandatory_); } { int dataSize = 0; for (int i = 0; i < prompts_.size(); i++) { dataSize += computeStringSizeNoTag(prompts_.getRaw(i)); } size += dataSize; size += 1 * getPromptsList().size(); } if (isList_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(8, isList_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.dialogflow.v2.Intent.Parameter)) { return super.equals(obj); } com.google.cloud.dialogflow.v2.Intent.Parameter other = (com.google.cloud.dialogflow.v2.Intent.Parameter) obj; boolean result = true; result = result && getName() .equals(other.getName()); result = result && getDisplayName() .equals(other.getDisplayName()); result = result && getValue() .equals(other.getValue()); result = result && getDefaultValue() .equals(other.getDefaultValue()); result = result && getEntityTypeDisplayName() .equals(other.getEntityTypeDisplayName()); result = result && (getMandatory() == other.getMandatory()); result = result && getPromptsList() .equals(other.getPromptsList()); result = result && (getIsList() == other.getIsList()); result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; hash = (53 * hash) + getDisplayName().hashCode(); hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue().hashCode(); hash = (37 * hash) + DEFAULT_VALUE_FIELD_NUMBER; hash = (53 * hash) + getDefaultValue().hashCode(); hash = (37 * hash) + ENTITY_TYPE_DISPLAY_NAME_FIELD_NUMBER; hash = (53 * hash) + getEntityTypeDisplayName().hashCode(); hash = (37 * hash) + MANDATORY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getMandatory()); if (getPromptsCount() > 0) { hash = (37 * hash) + PROMPTS_FIELD_NUMBER; hash = (53 * hash) + getPromptsList().hashCode(); } hash = (37 * hash) + IS_LIST_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getIsList()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.dialogflow.v2.Intent.Parameter parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.Intent.Parameter parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.Parameter parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.Intent.Parameter parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.Parameter parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.Intent.Parameter parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.Parameter parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.Intent.Parameter parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.Parameter parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.Intent.Parameter parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.Parameter parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.Intent.Parameter parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.Parameter prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
     * Represents intent parameters.
     * 
* * Protobuf type {@code google.cloud.dialogflow.v2.Intent.Parameter} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Parameter) com.google.cloud.dialogflow.v2.Intent.ParameterOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Parameter_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Parameter_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.v2.Intent.Parameter.class, com.google.cloud.dialogflow.v2.Intent.Parameter.Builder.class); } // Construct using com.google.cloud.dialogflow.v2.Intent.Parameter.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); name_ = ""; displayName_ = ""; value_ = ""; defaultValue_ = ""; entityTypeDisplayName_ = ""; mandatory_ = false; prompts_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000040); isList_ = false; return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Parameter_descriptor; } public com.google.cloud.dialogflow.v2.Intent.Parameter getDefaultInstanceForType() { return com.google.cloud.dialogflow.v2.Intent.Parameter.getDefaultInstance(); } public com.google.cloud.dialogflow.v2.Intent.Parameter build() { com.google.cloud.dialogflow.v2.Intent.Parameter result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.google.cloud.dialogflow.v2.Intent.Parameter buildPartial() { com.google.cloud.dialogflow.v2.Intent.Parameter result = new com.google.cloud.dialogflow.v2.Intent.Parameter(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.name_ = name_; result.displayName_ = displayName_; result.value_ = value_; result.defaultValue_ = defaultValue_; result.entityTypeDisplayName_ = entityTypeDisplayName_; result.mandatory_ = mandatory_; if (((bitField0_ & 0x00000040) == 0x00000040)) { prompts_ = prompts_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000040); } result.prompts_ = prompts_; result.isList_ = isList_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.dialogflow.v2.Intent.Parameter) { return mergeFrom((com.google.cloud.dialogflow.v2.Intent.Parameter)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.Parameter other) { if (other == com.google.cloud.dialogflow.v2.Intent.Parameter.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (!other.getDisplayName().isEmpty()) { displayName_ = other.displayName_; onChanged(); } if (!other.getValue().isEmpty()) { value_ = other.value_; onChanged(); } if (!other.getDefaultValue().isEmpty()) { defaultValue_ = other.defaultValue_; onChanged(); } if (!other.getEntityTypeDisplayName().isEmpty()) { entityTypeDisplayName_ = other.entityTypeDisplayName_; onChanged(); } if (other.getMandatory() != false) { setMandatory(other.getMandatory()); } if (!other.prompts_.isEmpty()) { if (prompts_.isEmpty()) { prompts_ = other.prompts_; bitField0_ = (bitField0_ & ~0x00000040); } else { ensurePromptsIsMutable(); prompts_.addAll(other.prompts_); } onChanged(); } if (other.getIsList() != false) { setIsList(other.getIsList()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.cloud.dialogflow.v2.Intent.Parameter parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.cloud.dialogflow.v2.Intent.Parameter) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object name_ = ""; /** *
       * The unique identifier of this parameter.
       * 
* * string name = 1; */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * The unique identifier of this parameter.
       * 
* * string name = 1; */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * The unique identifier of this parameter.
       * 
* * string name = 1; */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /** *
       * The unique identifier of this parameter.
       * 
* * string name = 1; */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /** *
       * The unique identifier of this parameter.
       * 
* * string name = 1; */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; } private java.lang.Object displayName_ = ""; /** *
       * Required. The name of the parameter.
       * 
* * string display_name = 2; */ public java.lang.String getDisplayName() { java.lang.Object ref = displayName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); displayName_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Required. The name of the parameter.
       * 
* * string display_name = 2; */ public com.google.protobuf.ByteString getDisplayNameBytes() { java.lang.Object ref = displayName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); displayName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Required. The name of the parameter.
       * 
* * string display_name = 2; */ public Builder setDisplayName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } displayName_ = value; onChanged(); return this; } /** *
       * Required. The name of the parameter.
       * 
* * string display_name = 2; */ public Builder clearDisplayName() { displayName_ = getDefaultInstance().getDisplayName(); onChanged(); return this; } /** *
       * Required. The name of the parameter.
       * 
* * string display_name = 2; */ public Builder setDisplayNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); displayName_ = value; onChanged(); return this; } private java.lang.Object value_ = ""; /** *
       * Optional. The definition of the parameter value. It can be:
       * - a constant string,
       * - a parameter value defined as `$parameter_name`,
       * - an original parameter value defined as `$parameter_name.original`,
       * - a parameter value from some context defined as
       *   `#context_name.parameter_name`.
       * 
* * string value = 3; */ public java.lang.String getValue() { java.lang.Object ref = value_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); value_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Optional. The definition of the parameter value. It can be:
       * - a constant string,
       * - a parameter value defined as `$parameter_name`,
       * - an original parameter value defined as `$parameter_name.original`,
       * - a parameter value from some context defined as
       *   `#context_name.parameter_name`.
       * 
* * string value = 3; */ public com.google.protobuf.ByteString getValueBytes() { java.lang.Object ref = value_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); value_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Optional. The definition of the parameter value. It can be:
       * - a constant string,
       * - a parameter value defined as `$parameter_name`,
       * - an original parameter value defined as `$parameter_name.original`,
       * - a parameter value from some context defined as
       *   `#context_name.parameter_name`.
       * 
* * string value = 3; */ public Builder setValue( java.lang.String value) { if (value == null) { throw new NullPointerException(); } value_ = value; onChanged(); return this; } /** *
       * Optional. The definition of the parameter value. It can be:
       * - a constant string,
       * - a parameter value defined as `$parameter_name`,
       * - an original parameter value defined as `$parameter_name.original`,
       * - a parameter value from some context defined as
       *   `#context_name.parameter_name`.
       * 
* * string value = 3; */ public Builder clearValue() { value_ = getDefaultInstance().getValue(); onChanged(); return this; } /** *
       * Optional. The definition of the parameter value. It can be:
       * - a constant string,
       * - a parameter value defined as `$parameter_name`,
       * - an original parameter value defined as `$parameter_name.original`,
       * - a parameter value from some context defined as
       *   `#context_name.parameter_name`.
       * 
* * string value = 3; */ public Builder setValueBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); value_ = value; onChanged(); return this; } private java.lang.Object defaultValue_ = ""; /** *
       * Optional. The default value to use when the `value` yields an empty
       * result.
       * Default values can be extracted from contexts by using the following
       * syntax: `#context_name.parameter_name`.
       * 
* * string default_value = 4; */ public java.lang.String getDefaultValue() { java.lang.Object ref = defaultValue_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); defaultValue_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Optional. The default value to use when the `value` yields an empty
       * result.
       * Default values can be extracted from contexts by using the following
       * syntax: `#context_name.parameter_name`.
       * 
* * string default_value = 4; */ public com.google.protobuf.ByteString getDefaultValueBytes() { java.lang.Object ref = defaultValue_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); defaultValue_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Optional. The default value to use when the `value` yields an empty
       * result.
       * Default values can be extracted from contexts by using the following
       * syntax: `#context_name.parameter_name`.
       * 
* * string default_value = 4; */ public Builder setDefaultValue( java.lang.String value) { if (value == null) { throw new NullPointerException(); } defaultValue_ = value; onChanged(); return this; } /** *
       * Optional. The default value to use when the `value` yields an empty
       * result.
       * Default values can be extracted from contexts by using the following
       * syntax: `#context_name.parameter_name`.
       * 
* * string default_value = 4; */ public Builder clearDefaultValue() { defaultValue_ = getDefaultInstance().getDefaultValue(); onChanged(); return this; } /** *
       * Optional. The default value to use when the `value` yields an empty
       * result.
       * Default values can be extracted from contexts by using the following
       * syntax: `#context_name.parameter_name`.
       * 
* * string default_value = 4; */ public Builder setDefaultValueBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); defaultValue_ = value; onChanged(); return this; } private java.lang.Object entityTypeDisplayName_ = ""; /** *
       * Optional. The name of the entity type, prefixed with `@`, that
       * describes values of the parameter. If the parameter is
       * required, this must be provided.
       * 
* * string entity_type_display_name = 5; */ public java.lang.String getEntityTypeDisplayName() { java.lang.Object ref = entityTypeDisplayName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); entityTypeDisplayName_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Optional. The name of the entity type, prefixed with `@`, that
       * describes values of the parameter. If the parameter is
       * required, this must be provided.
       * 
* * string entity_type_display_name = 5; */ public com.google.protobuf.ByteString getEntityTypeDisplayNameBytes() { java.lang.Object ref = entityTypeDisplayName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); entityTypeDisplayName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Optional. The name of the entity type, prefixed with `@`, that
       * describes values of the parameter. If the parameter is
       * required, this must be provided.
       * 
* * string entity_type_display_name = 5; */ public Builder setEntityTypeDisplayName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } entityTypeDisplayName_ = value; onChanged(); return this; } /** *
       * Optional. The name of the entity type, prefixed with `@`, that
       * describes values of the parameter. If the parameter is
       * required, this must be provided.
       * 
* * string entity_type_display_name = 5; */ public Builder clearEntityTypeDisplayName() { entityTypeDisplayName_ = getDefaultInstance().getEntityTypeDisplayName(); onChanged(); return this; } /** *
       * Optional. The name of the entity type, prefixed with `@`, that
       * describes values of the parameter. If the parameter is
       * required, this must be provided.
       * 
* * string entity_type_display_name = 5; */ public Builder setEntityTypeDisplayNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); entityTypeDisplayName_ = value; onChanged(); return this; } private boolean mandatory_ ; /** *
       * Optional. Indicates whether the parameter is required. That is,
       * whether the intent cannot be completed without collecting the parameter
       * value.
       * 
* * bool mandatory = 6; */ public boolean getMandatory() { return mandatory_; } /** *
       * Optional. Indicates whether the parameter is required. That is,
       * whether the intent cannot be completed without collecting the parameter
       * value.
       * 
* * bool mandatory = 6; */ public Builder setMandatory(boolean value) { mandatory_ = value; onChanged(); return this; } /** *
       * Optional. Indicates whether the parameter is required. That is,
       * whether the intent cannot be completed without collecting the parameter
       * value.
       * 
* * bool mandatory = 6; */ public Builder clearMandatory() { mandatory_ = false; onChanged(); return this; } private com.google.protobuf.LazyStringList prompts_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensurePromptsIsMutable() { if (!((bitField0_ & 0x00000040) == 0x00000040)) { prompts_ = new com.google.protobuf.LazyStringArrayList(prompts_); bitField0_ |= 0x00000040; } } /** *
       * Optional. The collection of prompts that the agent can present to the
       * user in order to collect value for the parameter.
       * 
* * repeated string prompts = 7; */ public com.google.protobuf.ProtocolStringList getPromptsList() { return prompts_.getUnmodifiableView(); } /** *
       * Optional. The collection of prompts that the agent can present to the
       * user in order to collect value for the parameter.
       * 
* * repeated string prompts = 7; */ public int getPromptsCount() { return prompts_.size(); } /** *
       * Optional. The collection of prompts that the agent can present to the
       * user in order to collect value for the parameter.
       * 
* * repeated string prompts = 7; */ public java.lang.String getPrompts(int index) { return prompts_.get(index); } /** *
       * Optional. The collection of prompts that the agent can present to the
       * user in order to collect value for the parameter.
       * 
* * repeated string prompts = 7; */ public com.google.protobuf.ByteString getPromptsBytes(int index) { return prompts_.getByteString(index); } /** *
       * Optional. The collection of prompts that the agent can present to the
       * user in order to collect value for the parameter.
       * 
* * repeated string prompts = 7; */ public Builder setPrompts( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensurePromptsIsMutable(); prompts_.set(index, value); onChanged(); return this; } /** *
       * Optional. The collection of prompts that the agent can present to the
       * user in order to collect value for the parameter.
       * 
* * repeated string prompts = 7; */ public Builder addPrompts( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensurePromptsIsMutable(); prompts_.add(value); onChanged(); return this; } /** *
       * Optional. The collection of prompts that the agent can present to the
       * user in order to collect value for the parameter.
       * 
* * repeated string prompts = 7; */ public Builder addAllPrompts( java.lang.Iterable values) { ensurePromptsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, prompts_); onChanged(); return this; } /** *
       * Optional. The collection of prompts that the agent can present to the
       * user in order to collect value for the parameter.
       * 
* * repeated string prompts = 7; */ public Builder clearPrompts() { prompts_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000040); onChanged(); return this; } /** *
       * Optional. The collection of prompts that the agent can present to the
       * user in order to collect value for the parameter.
       * 
* * repeated string prompts = 7; */ public Builder addPromptsBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensurePromptsIsMutable(); prompts_.add(value); onChanged(); return this; } private boolean isList_ ; /** *
       * Optional. Indicates whether the parameter represents a list of values.
       * 
* * bool is_list = 8; */ public boolean getIsList() { return isList_; } /** *
       * Optional. Indicates whether the parameter represents a list of values.
       * 
* * bool is_list = 8; */ public Builder setIsList(boolean value) { isList_ = value; onChanged(); return this; } /** *
       * Optional. Indicates whether the parameter represents a list of values.
       * 
* * bool is_list = 8; */ public Builder clearIsList() { isList_ = false; onChanged(); return this; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Parameter) } // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Parameter) private static final com.google.cloud.dialogflow.v2.Intent.Parameter DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Parameter(); } public static com.google.cloud.dialogflow.v2.Intent.Parameter getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public Parameter parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Parameter(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public com.google.cloud.dialogflow.v2.Intent.Parameter getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface MessageOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message) com.google.protobuf.MessageOrBuilder { /** *
     * The text response.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.Text text = 1; */ boolean hasText(); /** *
     * The text response.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.Text text = 1; */ com.google.cloud.dialogflow.v2.Intent.Message.Text getText(); /** *
     * The text response.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.Text text = 1; */ com.google.cloud.dialogflow.v2.Intent.Message.TextOrBuilder getTextOrBuilder(); /** *
     * The image response.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.Image image = 2; */ boolean hasImage(); /** *
     * The image response.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.Image image = 2; */ com.google.cloud.dialogflow.v2.Intent.Message.Image getImage(); /** *
     * The image response.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.Image image = 2; */ com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder getImageOrBuilder(); /** *
     * The quick replies response.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.QuickReplies quick_replies = 3; */ boolean hasQuickReplies(); /** *
     * The quick replies response.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.QuickReplies quick_replies = 3; */ com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies getQuickReplies(); /** *
     * The quick replies response.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.QuickReplies quick_replies = 3; */ com.google.cloud.dialogflow.v2.Intent.Message.QuickRepliesOrBuilder getQuickRepliesOrBuilder(); /** *
     * The card response.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.Card card = 4; */ boolean hasCard(); /** *
     * The card response.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.Card card = 4; */ com.google.cloud.dialogflow.v2.Intent.Message.Card getCard(); /** *
     * The card response.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.Card card = 4; */ com.google.cloud.dialogflow.v2.Intent.Message.CardOrBuilder getCardOrBuilder(); /** *
     * Returns a response containing a custom, platform-specific payload.
     * See the Intent.Message.Platform type for a description of the
     * structure that may be required for your platform.
     * 
* * .google.protobuf.Struct payload = 5; */ boolean hasPayload(); /** *
     * Returns a response containing a custom, platform-specific payload.
     * See the Intent.Message.Platform type for a description of the
     * structure that may be required for your platform.
     * 
* * .google.protobuf.Struct payload = 5; */ com.google.protobuf.Struct getPayload(); /** *
     * Returns a response containing a custom, platform-specific payload.
     * See the Intent.Message.Platform type for a description of the
     * structure that may be required for your platform.
     * 
* * .google.protobuf.Struct payload = 5; */ com.google.protobuf.StructOrBuilder getPayloadOrBuilder(); /** *
     * The voice and text-only responses for Actions on Google.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.SimpleResponses simple_responses = 7; */ boolean hasSimpleResponses(); /** *
     * The voice and text-only responses for Actions on Google.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.SimpleResponses simple_responses = 7; */ com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses getSimpleResponses(); /** *
     * The voice and text-only responses for Actions on Google.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.SimpleResponses simple_responses = 7; */ com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponsesOrBuilder getSimpleResponsesOrBuilder(); /** *
     * The basic card response for Actions on Google.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.BasicCard basic_card = 8; */ boolean hasBasicCard(); /** *
     * The basic card response for Actions on Google.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.BasicCard basic_card = 8; */ com.google.cloud.dialogflow.v2.Intent.Message.BasicCard getBasicCard(); /** *
     * The basic card response for Actions on Google.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.BasicCard basic_card = 8; */ com.google.cloud.dialogflow.v2.Intent.Message.BasicCardOrBuilder getBasicCardOrBuilder(); /** *
     * The suggestion chips for Actions on Google.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.Suggestions suggestions = 9; */ boolean hasSuggestions(); /** *
     * The suggestion chips for Actions on Google.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.Suggestions suggestions = 9; */ com.google.cloud.dialogflow.v2.Intent.Message.Suggestions getSuggestions(); /** *
     * The suggestion chips for Actions on Google.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.Suggestions suggestions = 9; */ com.google.cloud.dialogflow.v2.Intent.Message.SuggestionsOrBuilder getSuggestionsOrBuilder(); /** *
     * The link out suggestion chip for Actions on Google.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion link_out_suggestion = 10; */ boolean hasLinkOutSuggestion(); /** *
     * The link out suggestion chip for Actions on Google.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion link_out_suggestion = 10; */ com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion getLinkOutSuggestion(); /** *
     * The link out suggestion chip for Actions on Google.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion link_out_suggestion = 10; */ com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestionOrBuilder getLinkOutSuggestionOrBuilder(); /** *
     * The list card response for Actions on Google.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.ListSelect list_select = 11; */ boolean hasListSelect(); /** *
     * The list card response for Actions on Google.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.ListSelect list_select = 11; */ com.google.cloud.dialogflow.v2.Intent.Message.ListSelect getListSelect(); /** *
     * The list card response for Actions on Google.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.ListSelect list_select = 11; */ com.google.cloud.dialogflow.v2.Intent.Message.ListSelectOrBuilder getListSelectOrBuilder(); /** *
     * The carousel card response for Actions on Google.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect carousel_select = 12; */ boolean hasCarouselSelect(); /** *
     * The carousel card response for Actions on Google.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect carousel_select = 12; */ com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect getCarouselSelect(); /** *
     * The carousel card response for Actions on Google.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.CarouselSelect carousel_select = 12; */ com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelectOrBuilder getCarouselSelectOrBuilder(); /** *
     * Optional. The platform that this message is intended for.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.Platform platform = 6; */ int getPlatformValue(); /** *
     * Optional. The platform that this message is intended for.
     * 
* * .google.cloud.dialogflow.v2.Intent.Message.Platform platform = 6; */ com.google.cloud.dialogflow.v2.Intent.Message.Platform getPlatform(); public com.google.cloud.dialogflow.v2.Intent.Message.MessageCase getMessageCase(); } /** *
   * Corresponds to the `Response` field in the Dialogflow console.
   * 
* * Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message} */ public static final class Message extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message) MessageOrBuilder { private static final long serialVersionUID = 0L; // Use Message.newBuilder() to construct. private Message(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Message() { platform_ = 0; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Message( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { com.google.cloud.dialogflow.v2.Intent.Message.Text.Builder subBuilder = null; if (messageCase_ == 1) { subBuilder = ((com.google.cloud.dialogflow.v2.Intent.Message.Text) message_).toBuilder(); } message_ = input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.Text.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.Text) message_); message_ = subBuilder.buildPartial(); } messageCase_ = 1; break; } case 18: { com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder subBuilder = null; if (messageCase_ == 2) { subBuilder = ((com.google.cloud.dialogflow.v2.Intent.Message.Image) message_).toBuilder(); } message_ = input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.Image.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.Image) message_); message_ = subBuilder.buildPartial(); } messageCase_ = 2; break; } case 26: { com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.Builder subBuilder = null; if (messageCase_ == 3) { subBuilder = ((com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies) message_).toBuilder(); } message_ = input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies) message_); message_ = subBuilder.buildPartial(); } messageCase_ = 3; break; } case 34: { com.google.cloud.dialogflow.v2.Intent.Message.Card.Builder subBuilder = null; if (messageCase_ == 4) { subBuilder = ((com.google.cloud.dialogflow.v2.Intent.Message.Card) message_).toBuilder(); } message_ = input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.Card.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.Card) message_); message_ = subBuilder.buildPartial(); } messageCase_ = 4; break; } case 42: { com.google.protobuf.Struct.Builder subBuilder = null; if (messageCase_ == 5) { subBuilder = ((com.google.protobuf.Struct) message_).toBuilder(); } message_ = input.readMessage(com.google.protobuf.Struct.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.google.protobuf.Struct) message_); message_ = subBuilder.buildPartial(); } messageCase_ = 5; break; } case 48: { int rawValue = input.readEnum(); platform_ = rawValue; break; } case 58: { com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses.Builder subBuilder = null; if (messageCase_ == 7) { subBuilder = ((com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses) message_).toBuilder(); } message_ = input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.SimpleResponses) message_); message_ = subBuilder.buildPartial(); } messageCase_ = 7; break; } case 66: { com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.Builder subBuilder = null; if (messageCase_ == 8) { subBuilder = ((com.google.cloud.dialogflow.v2.Intent.Message.BasicCard) message_).toBuilder(); } message_ = input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.BasicCard.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.BasicCard) message_); message_ = subBuilder.buildPartial(); } messageCase_ = 8; break; } case 74: { com.google.cloud.dialogflow.v2.Intent.Message.Suggestions.Builder subBuilder = null; if (messageCase_ == 9) { subBuilder = ((com.google.cloud.dialogflow.v2.Intent.Message.Suggestions) message_).toBuilder(); } message_ = input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.Suggestions.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.Suggestions) message_); message_ = subBuilder.buildPartial(); } messageCase_ = 9; break; } case 82: { com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion.Builder subBuilder = null; if (messageCase_ == 10) { subBuilder = ((com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion) message_).toBuilder(); } message_ = input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.LinkOutSuggestion) message_); message_ = subBuilder.buildPartial(); } messageCase_ = 10; break; } case 90: { com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.Builder subBuilder = null; if (messageCase_ == 11) { subBuilder = ((com.google.cloud.dialogflow.v2.Intent.Message.ListSelect) message_).toBuilder(); } message_ = input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.ListSelect.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.ListSelect) message_); message_ = subBuilder.buildPartial(); } messageCase_ = 11; break; } case 98: { com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.Builder subBuilder = null; if (messageCase_ == 12) { subBuilder = ((com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect) message_).toBuilder(); } message_ = input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.CarouselSelect) message_); message_ = subBuilder.buildPartial(); } messageCase_ = 12; break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.v2.Intent.Message.class, com.google.cloud.dialogflow.v2.Intent.Message.Builder.class); } /** *
     * Represents different platforms that a rich message can be intended for.
     * 
* * Protobuf enum {@code google.cloud.dialogflow.v2.Intent.Message.Platform} */ public enum Platform implements com.google.protobuf.ProtocolMessageEnum { /** *
       * Not specified.
       * 
* * PLATFORM_UNSPECIFIED = 0; */ PLATFORM_UNSPECIFIED(0), /** *
       * Facebook.
       * 
* * FACEBOOK = 1; */ FACEBOOK(1), /** *
       * Slack.
       * 
* * SLACK = 2; */ SLACK(2), /** *
       * Telegram.
       * 
* * TELEGRAM = 3; */ TELEGRAM(3), /** *
       * Kik.
       * 
* * KIK = 4; */ KIK(4), /** *
       * Skype.
       * 
* * SKYPE = 5; */ SKYPE(5), /** *
       * Line.
       * 
* * LINE = 6; */ LINE(6), /** *
       * Viber.
       * 
* * VIBER = 7; */ VIBER(7), /** *
       * Actions on Google.
       * When using Actions on Google, you can choose one of the specific
       * Intent.Message types that mention support for Actions on Google,
       * or you can use the advanced Intent.Message.payload field.
       * The payload field provides access to AoG features not available in the
       * specific message types.
       * If using the Intent.Message.payload field, it should have a structure
       * similar to the JSON message shown here. For more information, see
       * [Actions on Google Webhook
       * Format](https://developers.google.com/actions/dialogflow/webhook)
       * <pre>{
       *   "expectUserResponse": true,
       *   "isSsml": false,
       *   "noInputPrompts": [],
       *   "richResponse": {
       *     "items": [
       *       {
       *         "simpleResponse": {
       *           "displayText": "hi",
       *           "textToSpeech": "hello"
       *         }
       *       }
       *     ],
       *     "suggestions": [
       *       {
       *         "title": "Say this"
       *       },
       *       {
       *         "title": "or this"
       *       }
       *     ]
       *   },
       *   "systemIntent": {
       *     "data": {
       *       "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec",
       *       "listSelect": {
       *         "items": [
       *           {
       *             "optionInfo": {
       *               "key": "key1",
       *               "synonyms": [
       *                 "key one"
       *               ]
       *             },
       *             "title": "must not be empty, but unique"
       *           },
       *           {
       *             "optionInfo": {
       *               "key": "key2",
       *               "synonyms": [
       *                 "key two"
       *               ]
       *             },
       *             "title": "must not be empty, but unique"
       *           }
       *         ]
       *       }
       *     },
       *     "intent": "actions.intent.OPTION"
       *   }
       * }</pre>
       * 
* * ACTIONS_ON_GOOGLE = 8; */ ACTIONS_ON_GOOGLE(8), UNRECOGNIZED(-1), ; /** *
       * Not specified.
       * 
* * PLATFORM_UNSPECIFIED = 0; */ public static final int PLATFORM_UNSPECIFIED_VALUE = 0; /** *
       * Facebook.
       * 
* * FACEBOOK = 1; */ public static final int FACEBOOK_VALUE = 1; /** *
       * Slack.
       * 
* * SLACK = 2; */ public static final int SLACK_VALUE = 2; /** *
       * Telegram.
       * 
* * TELEGRAM = 3; */ public static final int TELEGRAM_VALUE = 3; /** *
       * Kik.
       * 
* * KIK = 4; */ public static final int KIK_VALUE = 4; /** *
       * Skype.
       * 
* * SKYPE = 5; */ public static final int SKYPE_VALUE = 5; /** *
       * Line.
       * 
* * LINE = 6; */ public static final int LINE_VALUE = 6; /** *
       * Viber.
       * 
* * VIBER = 7; */ public static final int VIBER_VALUE = 7; /** *
       * Actions on Google.
       * When using Actions on Google, you can choose one of the specific
       * Intent.Message types that mention support for Actions on Google,
       * or you can use the advanced Intent.Message.payload field.
       * The payload field provides access to AoG features not available in the
       * specific message types.
       * If using the Intent.Message.payload field, it should have a structure
       * similar to the JSON message shown here. For more information, see
       * [Actions on Google Webhook
       * Format](https://developers.google.com/actions/dialogflow/webhook)
       * <pre>{
       *   "expectUserResponse": true,
       *   "isSsml": false,
       *   "noInputPrompts": [],
       *   "richResponse": {
       *     "items": [
       *       {
       *         "simpleResponse": {
       *           "displayText": "hi",
       *           "textToSpeech": "hello"
       *         }
       *       }
       *     ],
       *     "suggestions": [
       *       {
       *         "title": "Say this"
       *       },
       *       {
       *         "title": "or this"
       *       }
       *     ]
       *   },
       *   "systemIntent": {
       *     "data": {
       *       "@type": "type.googleapis.com/google.actions.v2.OptionValueSpec",
       *       "listSelect": {
       *         "items": [
       *           {
       *             "optionInfo": {
       *               "key": "key1",
       *               "synonyms": [
       *                 "key one"
       *               ]
       *             },
       *             "title": "must not be empty, but unique"
       *           },
       *           {
       *             "optionInfo": {
       *               "key": "key2",
       *               "synonyms": [
       *                 "key two"
       *               ]
       *             },
       *             "title": "must not be empty, but unique"
       *           }
       *         ]
       *       }
       *     },
       *     "intent": "actions.intent.OPTION"
       *   }
       * }</pre>
       * 
* * ACTIONS_ON_GOOGLE = 8; */ public static final int ACTIONS_ON_GOOGLE_VALUE = 8; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static Platform valueOf(int value) { return forNumber(value); } public static Platform forNumber(int value) { switch (value) { case 0: return PLATFORM_UNSPECIFIED; case 1: return FACEBOOK; case 2: return SLACK; case 3: return TELEGRAM; case 4: return KIK; case 5: return SKYPE; case 6: return LINE; case 7: return VIBER; case 8: return ACTIONS_ON_GOOGLE; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< Platform> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public Platform findValueByNumber(int number) { return Platform.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return com.google.cloud.dialogflow.v2.Intent.Message.getDescriptor().getEnumTypes().get(0); } private static final Platform[] VALUES = values(); public static Platform valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private Platform(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.dialogflow.v2.Intent.Message.Platform) } public interface TextOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.Text) com.google.protobuf.MessageOrBuilder { /** *
       * Optional. The collection of the agent's responses.
       * 
* * repeated string text = 1; */ java.util.List getTextList(); /** *
       * Optional. The collection of the agent's responses.
       * 
* * repeated string text = 1; */ int getTextCount(); /** *
       * Optional. The collection of the agent's responses.
       * 
* * repeated string text = 1; */ java.lang.String getText(int index); /** *
       * Optional. The collection of the agent's responses.
       * 
* * repeated string text = 1; */ com.google.protobuf.ByteString getTextBytes(int index); } /** *
     * The text response message.
     * 
* * Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.Text} */ public static final class Text extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.Text) TextOrBuilder { private static final long serialVersionUID = 0L; // Use Text.newBuilder() to construct. private Text(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Text() { text_ = com.google.protobuf.LazyStringArrayList.EMPTY; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Text( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { java.lang.String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { text_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000001; } text_.add(s); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { text_ = text_.getUnmodifiableView(); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Text_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Text_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.v2.Intent.Message.Text.class, com.google.cloud.dialogflow.v2.Intent.Message.Text.Builder.class); } public static final int TEXT_FIELD_NUMBER = 1; private com.google.protobuf.LazyStringList text_; /** *
       * Optional. The collection of the agent's responses.
       * 
* * repeated string text = 1; */ public com.google.protobuf.ProtocolStringList getTextList() { return text_; } /** *
       * Optional. The collection of the agent's responses.
       * 
* * repeated string text = 1; */ public int getTextCount() { return text_.size(); } /** *
       * Optional. The collection of the agent's responses.
       * 
* * repeated string text = 1; */ public java.lang.String getText(int index) { return text_.get(index); } /** *
       * Optional. The collection of the agent's responses.
       * 
* * repeated string text = 1; */ public com.google.protobuf.ByteString getTextBytes(int index) { return text_.getByteString(index); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < text_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_.getRaw(i)); } unknownFields.writeTo(output); } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < text_.size(); i++) { dataSize += computeStringSizeNoTag(text_.getRaw(i)); } size += dataSize; size += 1 * getTextList().size(); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.dialogflow.v2.Intent.Message.Text)) { return super.equals(obj); } com.google.cloud.dialogflow.v2.Intent.Message.Text other = (com.google.cloud.dialogflow.v2.Intent.Message.Text) obj; boolean result = true; result = result && getTextList() .equals(other.getTextList()); result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getTextCount() > 0) { hash = (37 * hash) + TEXT_FIELD_NUMBER; hash = (53 * hash) + getTextList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.dialogflow.v2.Intent.Message.Text parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.Intent.Message.Text parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.Message.Text parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.Intent.Message.Text parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.Message.Text parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.Intent.Message.Text parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.Message.Text parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.Intent.Message.Text parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.Message.Text parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.Intent.Message.Text parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.Message.Text parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.Intent.Message.Text parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.Message.Text prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
       * The text response message.
       * 
* * Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.Text} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.Text) com.google.cloud.dialogflow.v2.Intent.Message.TextOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Text_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Text_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.v2.Intent.Message.Text.class, com.google.cloud.dialogflow.v2.Intent.Message.Text.Builder.class); } // Construct using com.google.cloud.dialogflow.v2.Intent.Message.Text.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); text_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Text_descriptor; } public com.google.cloud.dialogflow.v2.Intent.Message.Text getDefaultInstanceForType() { return com.google.cloud.dialogflow.v2.Intent.Message.Text.getDefaultInstance(); } public com.google.cloud.dialogflow.v2.Intent.Message.Text build() { com.google.cloud.dialogflow.v2.Intent.Message.Text result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.google.cloud.dialogflow.v2.Intent.Message.Text buildPartial() { com.google.cloud.dialogflow.v2.Intent.Message.Text result = new com.google.cloud.dialogflow.v2.Intent.Message.Text(this); int from_bitField0_ = bitField0_; if (((bitField0_ & 0x00000001) == 0x00000001)) { text_ = text_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000001); } result.text_ = text_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.dialogflow.v2.Intent.Message.Text) { return mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.Text)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.Message.Text other) { if (other == com.google.cloud.dialogflow.v2.Intent.Message.Text.getDefaultInstance()) return this; if (!other.text_.isEmpty()) { if (text_.isEmpty()) { text_ = other.text_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureTextIsMutable(); text_.addAll(other.text_); } onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.cloud.dialogflow.v2.Intent.Message.Text parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.cloud.dialogflow.v2.Intent.Message.Text) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private com.google.protobuf.LazyStringList text_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureTextIsMutable() { if (!((bitField0_ & 0x00000001) == 0x00000001)) { text_ = new com.google.protobuf.LazyStringArrayList(text_); bitField0_ |= 0x00000001; } } /** *
         * Optional. The collection of the agent's responses.
         * 
* * repeated string text = 1; */ public com.google.protobuf.ProtocolStringList getTextList() { return text_.getUnmodifiableView(); } /** *
         * Optional. The collection of the agent's responses.
         * 
* * repeated string text = 1; */ public int getTextCount() { return text_.size(); } /** *
         * Optional. The collection of the agent's responses.
         * 
* * repeated string text = 1; */ public java.lang.String getText(int index) { return text_.get(index); } /** *
         * Optional. The collection of the agent's responses.
         * 
* * repeated string text = 1; */ public com.google.protobuf.ByteString getTextBytes(int index) { return text_.getByteString(index); } /** *
         * Optional. The collection of the agent's responses.
         * 
* * repeated string text = 1; */ public Builder setText( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureTextIsMutable(); text_.set(index, value); onChanged(); return this; } /** *
         * Optional. The collection of the agent's responses.
         * 
* * repeated string text = 1; */ public Builder addText( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureTextIsMutable(); text_.add(value); onChanged(); return this; } /** *
         * Optional. The collection of the agent's responses.
         * 
* * repeated string text = 1; */ public Builder addAllText( java.lang.Iterable values) { ensureTextIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, text_); onChanged(); return this; } /** *
         * Optional. The collection of the agent's responses.
         * 
* * repeated string text = 1; */ public Builder clearText() { text_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
         * Optional. The collection of the agent's responses.
         * 
* * repeated string text = 1; */ public Builder addTextBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureTextIsMutable(); text_.add(value); onChanged(); return this; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.Text) } // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.Text) private static final com.google.cloud.dialogflow.v2.Intent.Message.Text DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Message.Text(); } public static com.google.cloud.dialogflow.v2.Intent.Message.Text getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public Text parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Text(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public com.google.cloud.dialogflow.v2.Intent.Message.Text getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface ImageOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.Image) com.google.protobuf.MessageOrBuilder { /** *
       * Optional. The public URI to an image file.
       * 
* * string image_uri = 1; */ java.lang.String getImageUri(); /** *
       * Optional. The public URI to an image file.
       * 
* * string image_uri = 1; */ com.google.protobuf.ByteString getImageUriBytes(); /** *
       * Optional. A text description of the image to be used for accessibility,
       * e.g., screen readers.
       * 
* * string accessibility_text = 2; */ java.lang.String getAccessibilityText(); /** *
       * Optional. A text description of the image to be used for accessibility,
       * e.g., screen readers.
       * 
* * string accessibility_text = 2; */ com.google.protobuf.ByteString getAccessibilityTextBytes(); } /** *
     * The image response message.
     * 
* * Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.Image} */ public static final class Image extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.Image) ImageOrBuilder { private static final long serialVersionUID = 0L; // Use Image.newBuilder() to construct. private Image(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Image() { imageUri_ = ""; accessibilityText_ = ""; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Image( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { java.lang.String s = input.readStringRequireUtf8(); imageUri_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); accessibilityText_ = s; break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Image_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Image_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.v2.Intent.Message.Image.class, com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder.class); } public static final int IMAGE_URI_FIELD_NUMBER = 1; private volatile java.lang.Object imageUri_; /** *
       * Optional. The public URI to an image file.
       * 
* * string image_uri = 1; */ public java.lang.String getImageUri() { java.lang.Object ref = imageUri_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); imageUri_ = s; return s; } } /** *
       * Optional. The public URI to an image file.
       * 
* * string image_uri = 1; */ public com.google.protobuf.ByteString getImageUriBytes() { java.lang.Object ref = imageUri_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); imageUri_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int ACCESSIBILITY_TEXT_FIELD_NUMBER = 2; private volatile java.lang.Object accessibilityText_; /** *
       * Optional. A text description of the image to be used for accessibility,
       * e.g., screen readers.
       * 
* * string accessibility_text = 2; */ public java.lang.String getAccessibilityText() { java.lang.Object ref = accessibilityText_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); accessibilityText_ = s; return s; } } /** *
       * Optional. A text description of the image to be used for accessibility,
       * e.g., screen readers.
       * 
* * string accessibility_text = 2; */ public com.google.protobuf.ByteString getAccessibilityTextBytes() { java.lang.Object ref = accessibilityText_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); accessibilityText_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getImageUriBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, imageUri_); } if (!getAccessibilityTextBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, accessibilityText_); } unknownFields.writeTo(output); } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getImageUriBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, imageUri_); } if (!getAccessibilityTextBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, accessibilityText_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.dialogflow.v2.Intent.Message.Image)) { return super.equals(obj); } com.google.cloud.dialogflow.v2.Intent.Message.Image other = (com.google.cloud.dialogflow.v2.Intent.Message.Image) obj; boolean result = true; result = result && getImageUri() .equals(other.getImageUri()); result = result && getAccessibilityText() .equals(other.getAccessibilityText()); result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + IMAGE_URI_FIELD_NUMBER; hash = (53 * hash) + getImageUri().hashCode(); hash = (37 * hash) + ACCESSIBILITY_TEXT_FIELD_NUMBER; hash = (53 * hash) + getAccessibilityText().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.dialogflow.v2.Intent.Message.Image parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.Intent.Message.Image parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.Message.Image parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.Intent.Message.Image parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.Message.Image parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.Intent.Message.Image parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.Message.Image parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.Intent.Message.Image parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.Message.Image parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.Intent.Message.Image parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.Message.Image parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.Intent.Message.Image parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.Message.Image prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
       * The image response message.
       * 
* * Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.Image} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.Image) com.google.cloud.dialogflow.v2.Intent.Message.ImageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Image_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Image_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.v2.Intent.Message.Image.class, com.google.cloud.dialogflow.v2.Intent.Message.Image.Builder.class); } // Construct using com.google.cloud.dialogflow.v2.Intent.Message.Image.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); imageUri_ = ""; accessibilityText_ = ""; return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Image_descriptor; } public com.google.cloud.dialogflow.v2.Intent.Message.Image getDefaultInstanceForType() { return com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance(); } public com.google.cloud.dialogflow.v2.Intent.Message.Image build() { com.google.cloud.dialogflow.v2.Intent.Message.Image result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.google.cloud.dialogflow.v2.Intent.Message.Image buildPartial() { com.google.cloud.dialogflow.v2.Intent.Message.Image result = new com.google.cloud.dialogflow.v2.Intent.Message.Image(this); result.imageUri_ = imageUri_; result.accessibilityText_ = accessibilityText_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.dialogflow.v2.Intent.Message.Image) { return mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.Image)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.Message.Image other) { if (other == com.google.cloud.dialogflow.v2.Intent.Message.Image.getDefaultInstance()) return this; if (!other.getImageUri().isEmpty()) { imageUri_ = other.imageUri_; onChanged(); } if (!other.getAccessibilityText().isEmpty()) { accessibilityText_ = other.accessibilityText_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.cloud.dialogflow.v2.Intent.Message.Image parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.cloud.dialogflow.v2.Intent.Message.Image) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object imageUri_ = ""; /** *
         * Optional. The public URI to an image file.
         * 
* * string image_uri = 1; */ public java.lang.String getImageUri() { java.lang.Object ref = imageUri_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); imageUri_ = s; return s; } else { return (java.lang.String) ref; } } /** *
         * Optional. The public URI to an image file.
         * 
* * string image_uri = 1; */ public com.google.protobuf.ByteString getImageUriBytes() { java.lang.Object ref = imageUri_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); imageUri_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
         * Optional. The public URI to an image file.
         * 
* * string image_uri = 1; */ public Builder setImageUri( java.lang.String value) { if (value == null) { throw new NullPointerException(); } imageUri_ = value; onChanged(); return this; } /** *
         * Optional. The public URI to an image file.
         * 
* * string image_uri = 1; */ public Builder clearImageUri() { imageUri_ = getDefaultInstance().getImageUri(); onChanged(); return this; } /** *
         * Optional. The public URI to an image file.
         * 
* * string image_uri = 1; */ public Builder setImageUriBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); imageUri_ = value; onChanged(); return this; } private java.lang.Object accessibilityText_ = ""; /** *
         * Optional. A text description of the image to be used for accessibility,
         * e.g., screen readers.
         * 
* * string accessibility_text = 2; */ public java.lang.String getAccessibilityText() { java.lang.Object ref = accessibilityText_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); accessibilityText_ = s; return s; } else { return (java.lang.String) ref; } } /** *
         * Optional. A text description of the image to be used for accessibility,
         * e.g., screen readers.
         * 
* * string accessibility_text = 2; */ public com.google.protobuf.ByteString getAccessibilityTextBytes() { java.lang.Object ref = accessibilityText_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); accessibilityText_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
         * Optional. A text description of the image to be used for accessibility,
         * e.g., screen readers.
         * 
* * string accessibility_text = 2; */ public Builder setAccessibilityText( java.lang.String value) { if (value == null) { throw new NullPointerException(); } accessibilityText_ = value; onChanged(); return this; } /** *
         * Optional. A text description of the image to be used for accessibility,
         * e.g., screen readers.
         * 
* * string accessibility_text = 2; */ public Builder clearAccessibilityText() { accessibilityText_ = getDefaultInstance().getAccessibilityText(); onChanged(); return this; } /** *
         * Optional. A text description of the image to be used for accessibility,
         * e.g., screen readers.
         * 
* * string accessibility_text = 2; */ public Builder setAccessibilityTextBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); accessibilityText_ = value; onChanged(); return this; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.Image) } // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.Image) private static final com.google.cloud.dialogflow.v2.Intent.Message.Image DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Message.Image(); } public static com.google.cloud.dialogflow.v2.Intent.Message.Image getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public Image parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Image(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public com.google.cloud.dialogflow.v2.Intent.Message.Image getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface QuickRepliesOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.QuickReplies) com.google.protobuf.MessageOrBuilder { /** *
       * Optional. The title of the collection of quick replies.
       * 
* * string title = 1; */ java.lang.String getTitle(); /** *
       * Optional. The title of the collection of quick replies.
       * 
* * string title = 1; */ com.google.protobuf.ByteString getTitleBytes(); /** *
       * Optional. The collection of quick replies.
       * 
* * repeated string quick_replies = 2; */ java.util.List getQuickRepliesList(); /** *
       * Optional. The collection of quick replies.
       * 
* * repeated string quick_replies = 2; */ int getQuickRepliesCount(); /** *
       * Optional. The collection of quick replies.
       * 
* * repeated string quick_replies = 2; */ java.lang.String getQuickReplies(int index); /** *
       * Optional. The collection of quick replies.
       * 
* * repeated string quick_replies = 2; */ com.google.protobuf.ByteString getQuickRepliesBytes(int index); } /** *
     * The quick replies response message.
     * 
* * Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.QuickReplies} */ public static final class QuickReplies extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.QuickReplies) QuickRepliesOrBuilder { private static final long serialVersionUID = 0L; // Use QuickReplies.newBuilder() to construct. private QuickReplies(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private QuickReplies() { title_ = ""; quickReplies_ = com.google.protobuf.LazyStringArrayList.EMPTY; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private QuickReplies( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { java.lang.String s = input.readStringRequireUtf8(); title_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { quickReplies_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000002; } quickReplies_.add(s); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { quickReplies_ = quickReplies_.getUnmodifiableView(); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_QuickReplies_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_QuickReplies_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.class, com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.Builder.class); } private int bitField0_; public static final int TITLE_FIELD_NUMBER = 1; private volatile java.lang.Object title_; /** *
       * Optional. The title of the collection of quick replies.
       * 
* * string title = 1; */ public java.lang.String getTitle() { java.lang.Object ref = title_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); title_ = s; return s; } } /** *
       * Optional. The title of the collection of quick replies.
       * 
* * string title = 1; */ public com.google.protobuf.ByteString getTitleBytes() { java.lang.Object ref = title_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); title_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int QUICK_REPLIES_FIELD_NUMBER = 2; private com.google.protobuf.LazyStringList quickReplies_; /** *
       * Optional. The collection of quick replies.
       * 
* * repeated string quick_replies = 2; */ public com.google.protobuf.ProtocolStringList getQuickRepliesList() { return quickReplies_; } /** *
       * Optional. The collection of quick replies.
       * 
* * repeated string quick_replies = 2; */ public int getQuickRepliesCount() { return quickReplies_.size(); } /** *
       * Optional. The collection of quick replies.
       * 
* * repeated string quick_replies = 2; */ public java.lang.String getQuickReplies(int index) { return quickReplies_.get(index); } /** *
       * Optional. The collection of quick replies.
       * 
* * repeated string quick_replies = 2; */ public com.google.protobuf.ByteString getQuickRepliesBytes(int index) { return quickReplies_.getByteString(index); } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getTitleBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_); } for (int i = 0; i < quickReplies_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, quickReplies_.getRaw(i)); } unknownFields.writeTo(output); } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getTitleBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_); } { int dataSize = 0; for (int i = 0; i < quickReplies_.size(); i++) { dataSize += computeStringSizeNoTag(quickReplies_.getRaw(i)); } size += dataSize; size += 1 * getQuickRepliesList().size(); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies)) { return super.equals(obj); } com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies other = (com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies) obj; boolean result = true; result = result && getTitle() .equals(other.getTitle()); result = result && getQuickRepliesList() .equals(other.getQuickRepliesList()); result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TITLE_FIELD_NUMBER; hash = (53 * hash) + getTitle().hashCode(); if (getQuickRepliesCount() > 0) { hash = (37 * hash) + QUICK_REPLIES_FIELD_NUMBER; hash = (53 * hash) + getQuickRepliesList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
       * The quick replies response message.
       * 
* * Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.QuickReplies} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.QuickReplies) com.google.cloud.dialogflow.v2.Intent.Message.QuickRepliesOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_QuickReplies_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_QuickReplies_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.class, com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.Builder.class); } // Construct using com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); title_ = ""; quickReplies_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_QuickReplies_descriptor; } public com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies getDefaultInstanceForType() { return com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.getDefaultInstance(); } public com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies build() { com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies buildPartial() { com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies result = new com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.title_ = title_; if (((bitField0_ & 0x00000002) == 0x00000002)) { quickReplies_ = quickReplies_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000002); } result.quickReplies_ = quickReplies_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies) { return mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies other) { if (other == com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies.getDefaultInstance()) return this; if (!other.getTitle().isEmpty()) { title_ = other.title_; onChanged(); } if (!other.quickReplies_.isEmpty()) { if (quickReplies_.isEmpty()) { quickReplies_ = other.quickReplies_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureQuickRepliesIsMutable(); quickReplies_.addAll(other.quickReplies_); } onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object title_ = ""; /** *
         * Optional. The title of the collection of quick replies.
         * 
* * string title = 1; */ public java.lang.String getTitle() { java.lang.Object ref = title_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); title_ = s; return s; } else { return (java.lang.String) ref; } } /** *
         * Optional. The title of the collection of quick replies.
         * 
* * string title = 1; */ public com.google.protobuf.ByteString getTitleBytes() { java.lang.Object ref = title_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); title_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
         * Optional. The title of the collection of quick replies.
         * 
* * string title = 1; */ public Builder setTitle( java.lang.String value) { if (value == null) { throw new NullPointerException(); } title_ = value; onChanged(); return this; } /** *
         * Optional. The title of the collection of quick replies.
         * 
* * string title = 1; */ public Builder clearTitle() { title_ = getDefaultInstance().getTitle(); onChanged(); return this; } /** *
         * Optional. The title of the collection of quick replies.
         * 
* * string title = 1; */ public Builder setTitleBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); title_ = value; onChanged(); return this; } private com.google.protobuf.LazyStringList quickReplies_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureQuickRepliesIsMutable() { if (!((bitField0_ & 0x00000002) == 0x00000002)) { quickReplies_ = new com.google.protobuf.LazyStringArrayList(quickReplies_); bitField0_ |= 0x00000002; } } /** *
         * Optional. The collection of quick replies.
         * 
* * repeated string quick_replies = 2; */ public com.google.protobuf.ProtocolStringList getQuickRepliesList() { return quickReplies_.getUnmodifiableView(); } /** *
         * Optional. The collection of quick replies.
         * 
* * repeated string quick_replies = 2; */ public int getQuickRepliesCount() { return quickReplies_.size(); } /** *
         * Optional. The collection of quick replies.
         * 
* * repeated string quick_replies = 2; */ public java.lang.String getQuickReplies(int index) { return quickReplies_.get(index); } /** *
         * Optional. The collection of quick replies.
         * 
* * repeated string quick_replies = 2; */ public com.google.protobuf.ByteString getQuickRepliesBytes(int index) { return quickReplies_.getByteString(index); } /** *
         * Optional. The collection of quick replies.
         * 
* * repeated string quick_replies = 2; */ public Builder setQuickReplies( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureQuickRepliesIsMutable(); quickReplies_.set(index, value); onChanged(); return this; } /** *
         * Optional. The collection of quick replies.
         * 
* * repeated string quick_replies = 2; */ public Builder addQuickReplies( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureQuickRepliesIsMutable(); quickReplies_.add(value); onChanged(); return this; } /** *
         * Optional. The collection of quick replies.
         * 
* * repeated string quick_replies = 2; */ public Builder addAllQuickReplies( java.lang.Iterable values) { ensureQuickRepliesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, quickReplies_); onChanged(); return this; } /** *
         * Optional. The collection of quick replies.
         * 
* * repeated string quick_replies = 2; */ public Builder clearQuickReplies() { quickReplies_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
         * Optional. The collection of quick replies.
         * 
* * repeated string quick_replies = 2; */ public Builder addQuickRepliesBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureQuickRepliesIsMutable(); quickReplies_.add(value); onChanged(); return this; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.QuickReplies) } // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.QuickReplies) private static final com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies(); } public static com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { public QuickReplies parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new QuickReplies(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } public com.google.cloud.dialogflow.v2.Intent.Message.QuickReplies getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface CardOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.Card) com.google.protobuf.MessageOrBuilder { /** *
       * Optional. The title of the card.
       * 
* * string title = 1; */ java.lang.String getTitle(); /** *
       * Optional. The title of the card.
       * 
* * string title = 1; */ com.google.protobuf.ByteString getTitleBytes(); /** *
       * Optional. The subtitle of the card.
       * 
* * string subtitle = 2; */ java.lang.String getSubtitle(); /** *
       * Optional. The subtitle of the card.
       * 
* * string subtitle = 2; */ com.google.protobuf.ByteString getSubtitleBytes(); /** *
       * Optional. The public URI to an image file for the card.
       * 
* * string image_uri = 3; */ java.lang.String getImageUri(); /** *
       * Optional. The public URI to an image file for the card.
       * 
* * string image_uri = 3; */ com.google.protobuf.ByteString getImageUriBytes(); /** *
       * Optional. The collection of card buttons.
       * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4; */ java.util.List getButtonsList(); /** *
       * Optional. The collection of card buttons.
       * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4; */ com.google.cloud.dialogflow.v2.Intent.Message.Card.Button getButtons(int index); /** *
       * Optional. The collection of card buttons.
       * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4; */ int getButtonsCount(); /** *
       * Optional. The collection of card buttons.
       * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4; */ java.util.List getButtonsOrBuilderList(); /** *
       * Optional. The collection of card buttons.
       * 
* * repeated .google.cloud.dialogflow.v2.Intent.Message.Card.Button buttons = 4; */ com.google.cloud.dialogflow.v2.Intent.Message.Card.ButtonOrBuilder getButtonsOrBuilder( int index); } /** *
     * The card response message.
     * 
* * Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.Card} */ public static final class Card extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.Card) CardOrBuilder { private static final long serialVersionUID = 0L; // Use Card.newBuilder() to construct. private Card(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Card() { title_ = ""; subtitle_ = ""; imageUri_ = ""; buttons_ = java.util.Collections.emptyList(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Card( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { java.lang.String s = input.readStringRequireUtf8(); title_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); subtitle_ = s; break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); imageUri_ = s; break; } case 34: { if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { buttons_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000008; } buttons_.add( input.readMessage(com.google.cloud.dialogflow.v2.Intent.Message.Card.Button.parser(), extensionRegistry)); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { buttons_ = java.util.Collections.unmodifiableList(buttons_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Card_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Card_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.v2.Intent.Message.Card.class, com.google.cloud.dialogflow.v2.Intent.Message.Card.Builder.class); } public interface ButtonOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.dialogflow.v2.Intent.Message.Card.Button) com.google.protobuf.MessageOrBuilder { /** *
         * Optional. The text to show on the button.
         * 
* * string text = 1; */ java.lang.String getText(); /** *
         * Optional. The text to show on the button.
         * 
* * string text = 1; */ com.google.protobuf.ByteString getTextBytes(); /** *
         * Optional. The text to send back to the Dialogflow API or a URI to
         * open.
         * 
* * string postback = 2; */ java.lang.String getPostback(); /** *
         * Optional. The text to send back to the Dialogflow API or a URI to
         * open.
         * 
* * string postback = 2; */ com.google.protobuf.ByteString getPostbackBytes(); } /** *
       * Optional. Contains information about a button.
       * 
* * Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.Card.Button} */ public static final class Button extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.Intent.Message.Card.Button) ButtonOrBuilder { private static final long serialVersionUID = 0L; // Use Button.newBuilder() to construct. private Button(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Button() { text_ = ""; postback_ = ""; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Button( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { java.lang.String s = input.readStringRequireUtf8(); text_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); postback_ = s; break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Card_Button_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Card_Button_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.v2.Intent.Message.Card.Button.class, com.google.cloud.dialogflow.v2.Intent.Message.Card.Button.Builder.class); } public static final int TEXT_FIELD_NUMBER = 1; private volatile java.lang.Object text_; /** *
         * Optional. The text to show on the button.
         * 
* * string text = 1; */ public java.lang.String getText() { java.lang.Object ref = text_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); text_ = s; return s; } } /** *
         * Optional. The text to show on the button.
         * 
* * string text = 1; */ public com.google.protobuf.ByteString getTextBytes() { java.lang.Object ref = text_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); text_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int POSTBACK_FIELD_NUMBER = 2; private volatile java.lang.Object postback_; /** *
         * Optional. The text to send back to the Dialogflow API or a URI to
         * open.
         * 
* * string postback = 2; */ public java.lang.String getPostback() { java.lang.Object ref = postback_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); postback_ = s; return s; } } /** *
         * Optional. The text to send back to the Dialogflow API or a URI to
         * open.
         * 
* * string postback = 2; */ public com.google.protobuf.ByteString getPostbackBytes() { java.lang.Object ref = postback_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); postback_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getTextBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_); } if (!getPostbackBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, postback_); } unknownFields.writeTo(output); } public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getTextBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_); } if (!getPostbackBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, postback_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.dialogflow.v2.Intent.Message.Card.Button)) { return super.equals(obj); } com.google.cloud.dialogflow.v2.Intent.Message.Card.Button other = (com.google.cloud.dialogflow.v2.Intent.Message.Card.Button) obj; boolean result = true; result = result && getText() .equals(other.getText()); result = result && getPostback() .equals(other.getPostback()); result = result && unknownFields.equals(other.unknownFields); return result; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TEXT_FIELD_NUMBER; hash = (53 * hash) + getText().hashCode(); hash = (37 * hash) + POSTBACK_FIELD_NUMBER; hash = (53 * hash) + getPostback().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.dialogflow.v2.Intent.Message.Card.Button parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.Intent.Message.Card.Button parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.Message.Card.Button parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.Intent.Message.Card.Button parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.Message.Card.Button parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.v2.Intent.Message.Card.Button parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.Message.Card.Button parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.Intent.Message.Card.Button parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.Message.Card.Button parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.Intent.Message.Card.Button parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static com.google.cloud.dialogflow.v2.Intent.Message.Card.Button parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.v2.Intent.Message.Card.Button parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.cloud.dialogflow.v2.Intent.Message.Card.Button prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
         * Optional. Contains information about a button.
         * 
* * Protobuf type {@code google.cloud.dialogflow.v2.Intent.Message.Card.Button} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.Intent.Message.Card.Button) com.google.cloud.dialogflow.v2.Intent.Message.Card.ButtonOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Card_Button_descriptor; } protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Card_Button_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.v2.Intent.Message.Card.Button.class, com.google.cloud.dialogflow.v2.Intent.Message.Card.Button.Builder.class); } // Construct using com.google.cloud.dialogflow.v2.Intent.Message.Card.Button.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } public Builder clear() { super.clear(); text_ = ""; postback_ = ""; return this; } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.dialogflow.v2.IntentProto.internal_static_google_cloud_dialogflow_v2_Intent_Message_Card_Button_descriptor; } public com.google.cloud.dialogflow.v2.Intent.Message.Card.Button getDefaultInstanceForType() { return com.google.cloud.dialogflow.v2.Intent.Message.Card.Button.getDefaultInstance(); } public com.google.cloud.dialogflow.v2.Intent.Message.Card.Button build() { com.google.cloud.dialogflow.v2.Intent.Message.Card.Button result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public com.google.cloud.dialogflow.v2.Intent.Message.Card.Button buildPartial() { com.google.cloud.dialogflow.v2.Intent.Message.Card.Button result = new com.google.cloud.dialogflow.v2.Intent.Message.Card.Button(this); result.text_ = text_; result.postback_ = postback_; onBuilt(); return result; } public Builder clone() { return (Builder) super.clone(); } public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.dialogflow.v2.Intent.Message.Card.Button) { return mergeFrom((com.google.cloud.dialogflow.v2.Intent.Message.Card.Button)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.dialogflow.v2.Intent.Message.Card.Button other) { if (other == com.google.cloud.dialogflow.v2.Intent.Message.Card.Button.getDefaultInstance()) return this; if (!other.getText().isEmpty()) { text_ = other.text_; onChanged(); } if (!other.getPostback().isEmpty()) { postback_ = other.postback_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } public final boolean isInitialized() { return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.cloud.dialogflow.v2.Intent.Message.Card.Button parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.cloud.dialogflow.v2.Intent.Message.Card.Button) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object text_ = ""; /** *
           * Optional. The text to show on the button.
           * 
* * string text = 1; */ public java.lang.String getText() { java.lang.Object ref = text_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); text_ = s; return s; } else { return (java.lang.String) ref; } } /** *
           * Optional. The text to show on the button.
           * 
* * string text = 1; */ public com.google.protobuf.ByteString getTextBytes() { java.lang.Object ref = text_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); text_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
           * Optional. The text to show on the button.
           * 
* * string text = 1; */ public Builder setText( java.lang.String value) { if (value == null) { throw new NullPointerException(); } text_ = value; onChanged(); return this; } /** *
           * Optional. The text to show on the button.
           * 
* * string text = 1; */ public Builder clearText() { text_ = getDefaultInstance().getText(); onChanged(); return this; } /** *
           * Optional. The text to show on the button.
           * 
* * string text = 1; */ public Builder setTextBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); text_ = value; onChanged(); return this; } private java.lang.Object postback_ = ""; /** *
           * Optional. The text to send back to the Dialogflow API or a URI to
           * open.
           * 
* * string postback = 2; */ public java.lang.String getPostback() { java.lang.Object ref = postback_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); postback_ = s; return s; } else { return (java.lang.String) ref; } } /** *
           * Optional. The text to send back to the Dialogflow API or a URI to
           * open.
           * 
* * string postback = 2; */ public com.google.protobuf.ByteString getPostbackBytes() { java.lang.Object ref = postback_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); postback_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
           * Optional. The text to send back to the Dialogflow API or a URI to
           * open.
           * 
* * string postback = 2; */ public Builder setPostback( java.lang.String value) { if (value == null) { throw new NullPointerException(); } postback_ = value; onChanged(); return this; } /** *
           * Optional. The text to send back to the Dialogflow API or a URI to
           * open.
           * 
* * string postback = 2; */ public Builder clearPostback() { postback_ = getDefaultInstance().getPostback(); onChanged(); return this; } /** *
           * Optional. The text to send back to the Dialogflow API or a URI to
           * open.
           * 
* * string postback = 2; */ public Builder setPostbackBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); postback_ = value; onChanged(); return this; } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.Intent.Message.Card.Button) } // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.Intent.Message.Card.Button) private static final com.google.cloud.dialogflow.v2.Intent.Message.Card.Button DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.Intent.Message.Card.Button(); } public static com.google.cloud.dialogflow.v2.Intent.Message.Card.Button getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser




© 2015 - 2024 Weber Informatics LLC | Privacy Policy