Class EntityType.Entity.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<EntityType.Entity.Builder>
com.google.cloud.dialogflow.v2.EntityType.Entity.Builder
All Implemented Interfaces:
EntityType.EntityOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
EntityType.Entity

public static final class EntityType.Entity.Builder extends com.google.protobuf.GeneratedMessage.Builder<EntityType.Entity.Builder> implements EntityType.EntityOrBuilder
 An **entity entry** for an associated entity type.
 
Protobuf type google.cloud.dialogflow.v2.EntityType.Entity
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<EntityType.Entity.Builder>
    • clear

      public EntityType.Entity.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<EntityType.Entity.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<EntityType.Entity.Builder>
    • getDefaultInstanceForType

      public EntityType.Entity getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public EntityType.Entity build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public EntityType.Entity buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public EntityType.Entity.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<EntityType.Entity.Builder>
    • mergeFrom

      public EntityType.Entity.Builder mergeFrom(EntityType.Entity other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<EntityType.Entity.Builder>
    • mergeFrom

      public EntityType.Entity.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<EntityType.Entity.Builder>
      Throws:
      IOException
    • getValue

      public String getValue()
       Required. The primary value associated with this entity entry.
       For example, if the entity type is *vegetable*, the value could be
       *scallions*.
      
       For `KIND_MAP` entity types:
      
       *   A reference value to be used in place of synonyms.
      
       For `KIND_LIST` entity types:
      
       *   A string that can contain references to other entity types (with or
       without aliases).
       
      string value = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getValue in interface EntityType.EntityOrBuilder
      Returns:
      The value.
    • getValueBytes

      public com.google.protobuf.ByteString getValueBytes()
       Required. The primary value associated with this entity entry.
       For example, if the entity type is *vegetable*, the value could be
       *scallions*.
      
       For `KIND_MAP` entity types:
      
       *   A reference value to be used in place of synonyms.
      
       For `KIND_LIST` entity types:
      
       *   A string that can contain references to other entity types (with or
       without aliases).
       
      string value = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getValueBytes in interface EntityType.EntityOrBuilder
      Returns:
      The bytes for value.
    • setValue

      public EntityType.Entity.Builder setValue(String value)
       Required. The primary value associated with this entity entry.
       For example, if the entity type is *vegetable*, the value could be
       *scallions*.
      
       For `KIND_MAP` entity types:
      
       *   A reference value to be used in place of synonyms.
      
       For `KIND_LIST` entity types:
      
       *   A string that can contain references to other entity types (with or
       without aliases).
       
      string value = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The value to set.
      Returns:
      This builder for chaining.
    • clearValue

      public EntityType.Entity.Builder clearValue()
       Required. The primary value associated with this entity entry.
       For example, if the entity type is *vegetable*, the value could be
       *scallions*.
      
       For `KIND_MAP` entity types:
      
       *   A reference value to be used in place of synonyms.
      
       For `KIND_LIST` entity types:
      
       *   A string that can contain references to other entity types (with or
       without aliases).
       
      string value = 1 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setValueBytes

      public EntityType.Entity.Builder setValueBytes(com.google.protobuf.ByteString value)
       Required. The primary value associated with this entity entry.
       For example, if the entity type is *vegetable*, the value could be
       *scallions*.
      
       For `KIND_MAP` entity types:
      
       *   A reference value to be used in place of synonyms.
      
       For `KIND_LIST` entity types:
      
       *   A string that can contain references to other entity types (with or
       without aliases).
       
      string value = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for value to set.
      Returns:
      This builder for chaining.
    • getSynonymsList

      public com.google.protobuf.ProtocolStringList getSynonymsList()
       Required. A collection of value synonyms. For example, if the entity type
       is *vegetable*, and `value` is *scallions*, a synonym could be *green
       onions*.
      
       For `KIND_LIST` entity types:
      
       *   This collection must contain exactly one synonym equal to `value`.
       
      repeated string synonyms = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getSynonymsList in interface EntityType.EntityOrBuilder
      Returns:
      A list containing the synonyms.
    • getSynonymsCount

      public int getSynonymsCount()
       Required. A collection of value synonyms. For example, if the entity type
       is *vegetable*, and `value` is *scallions*, a synonym could be *green
       onions*.
      
       For `KIND_LIST` entity types:
      
       *   This collection must contain exactly one synonym equal to `value`.
       
      repeated string synonyms = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getSynonymsCount in interface EntityType.EntityOrBuilder
      Returns:
      The count of synonyms.
    • getSynonyms

      public String getSynonyms(int index)
       Required. A collection of value synonyms. For example, if the entity type
       is *vegetable*, and `value` is *scallions*, a synonym could be *green
       onions*.
      
       For `KIND_LIST` entity types:
      
       *   This collection must contain exactly one synonym equal to `value`.
       
      repeated string synonyms = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getSynonyms in interface EntityType.EntityOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The synonyms at the given index.
    • getSynonymsBytes

      public com.google.protobuf.ByteString getSynonymsBytes(int index)
       Required. A collection of value synonyms. For example, if the entity type
       is *vegetable*, and `value` is *scallions*, a synonym could be *green
       onions*.
      
       For `KIND_LIST` entity types:
      
       *   This collection must contain exactly one synonym equal to `value`.
       
      repeated string synonyms = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getSynonymsBytes in interface EntityType.EntityOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the synonyms at the given index.
    • setSynonyms

      public EntityType.Entity.Builder setSynonyms(int index, String value)
       Required. A collection of value synonyms. For example, if the entity type
       is *vegetable*, and `value` is *scallions*, a synonym could be *green
       onions*.
      
       For `KIND_LIST` entity types:
      
       *   This collection must contain exactly one synonym equal to `value`.
       
      repeated string synonyms = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      index - The index to set the value at.
      value - The synonyms to set.
      Returns:
      This builder for chaining.
    • addSynonyms

      public EntityType.Entity.Builder addSynonyms(String value)
       Required. A collection of value synonyms. For example, if the entity type
       is *vegetable*, and `value` is *scallions*, a synonym could be *green
       onions*.
      
       For `KIND_LIST` entity types:
      
       *   This collection must contain exactly one synonym equal to `value`.
       
      repeated string synonyms = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The synonyms to add.
      Returns:
      This builder for chaining.
    • addAllSynonyms

      public EntityType.Entity.Builder addAllSynonyms(Iterable<String> values)
       Required. A collection of value synonyms. For example, if the entity type
       is *vegetable*, and `value` is *scallions*, a synonym could be *green
       onions*.
      
       For `KIND_LIST` entity types:
      
       *   This collection must contain exactly one synonym equal to `value`.
       
      repeated string synonyms = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      values - The synonyms to add.
      Returns:
      This builder for chaining.
    • clearSynonyms

      public EntityType.Entity.Builder clearSynonyms()
       Required. A collection of value synonyms. For example, if the entity type
       is *vegetable*, and `value` is *scallions*, a synonym could be *green
       onions*.
      
       For `KIND_LIST` entity types:
      
       *   This collection must contain exactly one synonym equal to `value`.
       
      repeated string synonyms = 2 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • addSynonymsBytes

      public EntityType.Entity.Builder addSynonymsBytes(com.google.protobuf.ByteString value)
       Required. A collection of value synonyms. For example, if the entity type
       is *vegetable*, and `value` is *scallions*, a synonym could be *green
       onions*.
      
       For `KIND_LIST` entity types:
      
       *   This collection must contain exactly one synonym equal to `value`.
       
      repeated string synonyms = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes of the synonyms to add.
      Returns:
      This builder for chaining.