Class 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.GeneratedMessageV3.Builder<EntityType.Entity.Builder>
    implements EntityType.EntityOrBuilder
     An **entity entry** for an associated entity type.
     
    Protobuf type google.cloud.dialogflow.v2.EntityType.Entity
    • 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.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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

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

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

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

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

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

        public EntityType.Entity.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.Entity.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>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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.
      • setUnknownFields

        public final EntityType.Entity.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.Entity.Builder>
      • mergeUnknownFields

        public final EntityType.Entity.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.Entity.Builder>