Class 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.GeneratedMessageV3.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.v2beta1.EntityType
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

        public EntityType.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<EntityType.Builder>
      • setField

        public EntityType.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                           Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<EntityType.Builder>
      • clearField

        public EntityType.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<EntityType.Builder>
      • clearOneof

        public EntityType.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<EntityType.Builder>
      • setRepeatedField

        public EntityType.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                   int index,
                                                   Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<EntityType.Builder>
      • addRepeatedField

        public EntityType.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                   Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<EntityType.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>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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.v2beta1.EntityTypes.UpdateEntityType]
         and
         [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntityTypes]
         methods. Supported formats:
         - `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`
         - `projects/<Project ID>/locations/<Location 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.v2beta1.EntityTypes.UpdateEntityType]
         and
         [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntityTypes]
         methods. Supported formats:
         - `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`
         - `projects/<Project ID>/locations/<Location 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.v2beta1.EntityTypes.UpdateEntityType]
         and
         [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntityTypes]
         methods. Supported formats:
         - `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`
         - `projects/<Project ID>/locations/<Location 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.v2beta1.EntityTypes.UpdateEntityType]
         and
         [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntityTypes]
         methods. Supported formats:
         - `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`
         - `projects/<Project ID>/locations/<Location 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.v2beta1.EntityTypes.UpdateEntityType]
         and
         [EntityTypes.BatchUpdateEntityTypes][google.cloud.dialogflow.v2beta1.EntityTypes.BatchUpdateEntityTypes]
         methods. Supported formats:
         - `projects/<Project ID>/agent/entityTypes/<Entity Type ID>`
         - `projects/<Project ID>/locations/<Location 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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.v2beta1.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.
      • setUnknownFields

        public final EntityType.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<EntityType.Builder>
      • mergeUnknownFields

        public final EntityType.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<EntityType.Builder>