Class EntityType.Builder

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

public static final class EntityType.Builder extends com.google.protobuf.GeneratedMessage.Builder<EntityType.Builder> implements EntityTypeOrBuilder
 Each intent parameter has a type, called the entity type, which dictates
 exactly how data from an end-user expression is extracted.

 Dialogflow provides predefined system entities that can match many common
 types of data. For example, there are system entities for matching dates,
 times, colors, email addresses, and so on. You can also create your own
 custom entities for matching custom data. For example, you could define a
 vegetable entity that can match the types of vegetables available for
 purchase with a grocery store agent.

 For more information, see the
 [Entity guide](https://cloud.google.com/dialogflow/docs/entities-overview).
 
Protobuf type google.cloud.dialogflow.v2.EntityType
  • 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.Builder>
    • clear

      public EntityType.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.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.Builder>
    • getDefaultInstanceForType

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

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

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

      public EntityType.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.Builder>
    • mergeFrom

      public EntityType.Builder mergeFrom(EntityType 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.Builder>
    • mergeFrom

      public EntityType.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.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       The unique identifier of the entity type.
       Required for
       [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType]
       and
       [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes]
       methods. Format: `projects/<Project ID>/agent/entityTypes/<Entity Type
       ID>`.
       
      string name = 1;
      Specified by:
      getName in interface EntityTypeOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       The unique identifier of the entity type.
       Required for
       [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType]
       and
       [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes]
       methods. Format: `projects/<Project ID>/agent/entityTypes/<Entity Type
       ID>`.
       
      string name = 1;
      Specified by:
      getNameBytes in interface EntityTypeOrBuilder
      Returns:
      The bytes for name.
    • setName

      public EntityType.Builder setName(String value)
       The unique identifier of the entity type.
       Required for
       [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType]
       and
       [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes]
       methods. Format: `projects/<Project ID>/agent/entityTypes/<Entity Type
       ID>`.
       
      string name = 1;
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public EntityType.Builder clearName()
       The unique identifier of the entity type.
       Required for
       [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType]
       and
       [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes]
       methods. Format: `projects/<Project ID>/agent/entityTypes/<Entity Type
       ID>`.
       
      string name = 1;
      Returns:
      This builder for chaining.
    • setNameBytes

      public EntityType.Builder setNameBytes(com.google.protobuf.ByteString value)
       The unique identifier of the entity type.
       Required for
       [EntityTypes.UpdateEntityType][google.cloud.dialogflow.v2.EntityTypes.UpdateEntityType]
       and
       [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2.EntityTypes.BatchUpdateEntityTypes]
       methods. Format: `projects/<Project ID>/agent/entityTypes/<Entity Type
       ID>`.
       
      string name = 1;
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getDisplayName

      public String getDisplayName()
       Required. The name of the entity type.
       
      string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getDisplayName in interface EntityTypeOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.ByteString getDisplayNameBytes()
       Required. The name of the entity type.
       
      string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getDisplayNameBytes in interface EntityTypeOrBuilder
      Returns:
      The bytes for displayName.
    • setDisplayName

      public EntityType.Builder setDisplayName(String value)
       Required. The name of the entity type.
       
      string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The displayName to set.
      Returns:
      This builder for chaining.
    • clearDisplayName

      public EntityType.Builder clearDisplayName()
       Required. The name of the entity type.
       
      string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setDisplayNameBytes

      public EntityType.Builder setDisplayNameBytes(com.google.protobuf.ByteString value)
       Required. The name of the entity type.
       
      string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for displayName to set.
      Returns:
      This builder for chaining.
    • getKindValue

      public int getKindValue()
       Required. Indicates the kind of entity type.
       
      .google.cloud.dialogflow.v2.EntityType.Kind kind = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getKindValue in interface EntityTypeOrBuilder
      Returns:
      The enum numeric value on the wire for kind.
    • setKindValue

      public EntityType.Builder setKindValue(int value)
       Required. Indicates the kind of entity type.
       
      .google.cloud.dialogflow.v2.EntityType.Kind kind = 3 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The enum numeric value on the wire for kind to set.
      Returns:
      This builder for chaining.
    • getKind

      public EntityType.Kind getKind()
       Required. Indicates the kind of entity type.
       
      .google.cloud.dialogflow.v2.EntityType.Kind kind = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getKind in interface EntityTypeOrBuilder
      Returns:
      The kind.
    • setKind

      public EntityType.Builder setKind(EntityType.Kind value)
       Required. Indicates the kind of entity type.
       
      .google.cloud.dialogflow.v2.EntityType.Kind kind = 3 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The kind to set.
      Returns:
      This builder for chaining.
    • clearKind

      public EntityType.Builder clearKind()
       Required. Indicates the kind of entity type.
       
      .google.cloud.dialogflow.v2.EntityType.Kind kind = 3 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • getAutoExpansionModeValue

      public int getAutoExpansionModeValue()
       Optional. Indicates whether the entity type can be automatically
       expanded.
       
      .google.cloud.dialogflow.v2.EntityType.AutoExpansionMode auto_expansion_mode = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAutoExpansionModeValue in interface EntityTypeOrBuilder
      Returns:
      The enum numeric value on the wire for autoExpansionMode.
    • setAutoExpansionModeValue

      public EntityType.Builder setAutoExpansionModeValue(int value)
       Optional. Indicates whether the entity type can be automatically
       expanded.
       
      .google.cloud.dialogflow.v2.EntityType.AutoExpansionMode auto_expansion_mode = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The enum numeric value on the wire for autoExpansionMode to set.
      Returns:
      This builder for chaining.
    • getAutoExpansionMode

      public EntityType.AutoExpansionMode getAutoExpansionMode()
       Optional. Indicates whether the entity type can be automatically
       expanded.
       
      .google.cloud.dialogflow.v2.EntityType.AutoExpansionMode auto_expansion_mode = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getAutoExpansionMode in interface EntityTypeOrBuilder
      Returns:
      The autoExpansionMode.
    • setAutoExpansionMode

      public EntityType.Builder setAutoExpansionMode(EntityType.AutoExpansionMode value)
       Optional. Indicates whether the entity type can be automatically
       expanded.
       
      .google.cloud.dialogflow.v2.EntityType.AutoExpansionMode auto_expansion_mode = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The autoExpansionMode to set.
      Returns:
      This builder for chaining.
    • clearAutoExpansionMode

      public EntityType.Builder clearAutoExpansionMode()
       Optional. Indicates whether the entity type can be automatically
       expanded.
       
      .google.cloud.dialogflow.v2.EntityType.AutoExpansionMode auto_expansion_mode = 4 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • getEntitiesList

      public List<EntityType.Entity> getEntitiesList()
       Optional. The collection of entity entries associated with the entity type.
       
      repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEntitiesList in interface EntityTypeOrBuilder
    • getEntitiesCount

      public int getEntitiesCount()
       Optional. The collection of entity entries associated with the entity type.
       
      repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEntitiesCount in interface EntityTypeOrBuilder
    • getEntities

      public EntityType.Entity getEntities(int index)
       Optional. The collection of entity entries associated with the entity type.
       
      repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEntities in interface EntityTypeOrBuilder
    • setEntities

      public EntityType.Builder setEntities(int index, EntityType.Entity value)
       Optional. The collection of entity entries associated with the entity type.
       
      repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];
    • setEntities

      public EntityType.Builder setEntities(int index, EntityType.Entity.Builder builderForValue)
       Optional. The collection of entity entries associated with the entity type.
       
      repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];
    • addEntities

      public EntityType.Builder addEntities(EntityType.Entity value)
       Optional. The collection of entity entries associated with the entity type.
       
      repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];
    • addEntities

      public EntityType.Builder addEntities(int index, EntityType.Entity value)
       Optional. The collection of entity entries associated with the entity type.
       
      repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];
    • addEntities

      public EntityType.Builder addEntities(EntityType.Entity.Builder builderForValue)
       Optional. The collection of entity entries associated with the entity type.
       
      repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];
    • addEntities

      public EntityType.Builder addEntities(int index, EntityType.Entity.Builder builderForValue)
       Optional. The collection of entity entries associated with the entity type.
       
      repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];
    • addAllEntities

      public EntityType.Builder addAllEntities(Iterable<? extends EntityType.Entity> values)
       Optional. The collection of entity entries associated with the entity type.
       
      repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];
    • clearEntities

      public EntityType.Builder clearEntities()
       Optional. The collection of entity entries associated with the entity type.
       
      repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];
    • removeEntities

      public EntityType.Builder removeEntities(int index)
       Optional. The collection of entity entries associated with the entity type.
       
      repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];
    • getEntitiesBuilder

      public EntityType.Entity.Builder getEntitiesBuilder(int index)
       Optional. The collection of entity entries associated with the entity type.
       
      repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];
    • getEntitiesOrBuilder

      public EntityType.EntityOrBuilder getEntitiesOrBuilder(int index)
       Optional. The collection of entity entries associated with the entity type.
       
      repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEntitiesOrBuilder in interface EntityTypeOrBuilder
    • getEntitiesOrBuilderList

      public List<? extends EntityType.EntityOrBuilder> getEntitiesOrBuilderList()
       Optional. The collection of entity entries associated with the entity type.
       
      repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEntitiesOrBuilderList in interface EntityTypeOrBuilder
    • addEntitiesBuilder

      public EntityType.Entity.Builder addEntitiesBuilder()
       Optional. The collection of entity entries associated with the entity type.
       
      repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];
    • addEntitiesBuilder

      public EntityType.Entity.Builder addEntitiesBuilder(int index)
       Optional. The collection of entity entries associated with the entity type.
       
      repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];
    • getEntitiesBuilderList

      public List<EntityType.Entity.Builder> getEntitiesBuilderList()
       Optional. The collection of entity entries associated with the entity type.
       
      repeated .google.cloud.dialogflow.v2.EntityType.Entity entities = 6 [(.google.api.field_behavior) = OPTIONAL];
    • getEnableFuzzyExtraction

      public boolean getEnableFuzzyExtraction()
       Optional. Enables fuzzy entity extraction during classification.
       
      bool enable_fuzzy_extraction = 7 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getEnableFuzzyExtraction in interface EntityTypeOrBuilder
      Returns:
      The enableFuzzyExtraction.
    • setEnableFuzzyExtraction

      public EntityType.Builder setEnableFuzzyExtraction(boolean value)
       Optional. Enables fuzzy entity extraction during classification.
       
      bool enable_fuzzy_extraction = 7 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The enableFuzzyExtraction to set.
      Returns:
      This builder for chaining.
    • clearEnableFuzzyExtraction

      public EntityType.Builder clearEnableFuzzyExtraction()
       Optional. Enables fuzzy entity extraction during classification.
       
      bool enable_fuzzy_extraction = 7 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.