Class CollectionSchema.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, CollectionSchemaOrBuilder, Cloneable
    Enclosing class:
    CollectionSchema

    public static final class CollectionSchema.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<CollectionSchema.Builder>
    implements CollectionSchemaOrBuilder
    
     @brief Collection schema
     
    Protobuf type milvus.proto.schema.CollectionSchema
    • 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<CollectionSchema.Builder>
      • clear

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

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

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

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

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

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

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

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

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

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

        public CollectionSchema.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<CollectionSchema.Builder>
      • isInitialized

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

        public CollectionSchema.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<CollectionSchema.Builder>
        Throws:
        IOException
      • setName

        public CollectionSchema.Builder setName​(String value)
        string name = 1;
        Parameters:
        value - The name to set.
        Returns:
        This builder for chaining.
      • setNameBytes

        public CollectionSchema.Builder setNameBytes​(com.google.protobuf.ByteString value)
        string name = 1;
        Parameters:
        value - The bytes for name to set.
        Returns:
        This builder for chaining.
      • setDescription

        public CollectionSchema.Builder setDescription​(String value)
        string description = 2;
        Parameters:
        value - The description to set.
        Returns:
        This builder for chaining.
      • clearDescription

        public CollectionSchema.Builder clearDescription()
        string description = 2;
        Returns:
        This builder for chaining.
      • setDescriptionBytes

        public CollectionSchema.Builder setDescriptionBytes​(com.google.protobuf.ByteString value)
        string description = 2;
        Parameters:
        value - The bytes for description to set.
        Returns:
        This builder for chaining.
      • getAutoID

        @Deprecated
        public boolean getAutoID()
        Deprecated.
        milvus.proto.schema.CollectionSchema.autoID is deprecated. See schema.proto;l=114
         deprecated later, keep compatible with c++ part now
         
        bool autoID = 3 [deprecated = true];
        Specified by:
        getAutoID in interface CollectionSchemaOrBuilder
        Returns:
        The autoID.
      • setAutoID

        @Deprecated
        public CollectionSchema.Builder setAutoID​(boolean value)
        Deprecated.
        milvus.proto.schema.CollectionSchema.autoID is deprecated. See schema.proto;l=114
         deprecated later, keep compatible with c++ part now
         
        bool autoID = 3 [deprecated = true];
        Parameters:
        value - The autoID to set.
        Returns:
        This builder for chaining.
      • clearAutoID

        @Deprecated
        public CollectionSchema.Builder clearAutoID()
        Deprecated.
        milvus.proto.schema.CollectionSchema.autoID is deprecated. See schema.proto;l=114
         deprecated later, keep compatible with c++ part now
         
        bool autoID = 3 [deprecated = true];
        Returns:
        This builder for chaining.
      • removeFields

        public CollectionSchema.Builder removeFields​(int index)
        repeated .milvus.proto.schema.FieldSchema fields = 4;
      • getFieldsBuilder

        public FieldSchema.Builder getFieldsBuilder​(int index)
        repeated .milvus.proto.schema.FieldSchema fields = 4;
      • addFieldsBuilder

        public FieldSchema.Builder addFieldsBuilder()
        repeated .milvus.proto.schema.FieldSchema fields = 4;
      • addFieldsBuilder

        public FieldSchema.Builder addFieldsBuilder​(int index)
        repeated .milvus.proto.schema.FieldSchema fields = 4;
      • getFieldsBuilderList

        public List<FieldSchema.Builder> getFieldsBuilderList()
        repeated .milvus.proto.schema.FieldSchema fields = 4;
      • getEnableDynamicField

        public boolean getEnableDynamicField()
         mark whether this table has the dynamic field function enabled.
         
        bool enable_dynamic_field = 5;
        Specified by:
        getEnableDynamicField in interface CollectionSchemaOrBuilder
        Returns:
        The enableDynamicField.
      • setEnableDynamicField

        public CollectionSchema.Builder setEnableDynamicField​(boolean value)
         mark whether this table has the dynamic field function enabled.
         
        bool enable_dynamic_field = 5;
        Parameters:
        value - The enableDynamicField to set.
        Returns:
        This builder for chaining.
      • clearEnableDynamicField

        public CollectionSchema.Builder clearEnableDynamicField()
         mark whether this table has the dynamic field function enabled.
         
        bool enable_dynamic_field = 5;
        Returns:
        This builder for chaining.
      • clearProperties

        public CollectionSchema.Builder clearProperties()
        repeated .milvus.proto.common.KeyValuePair properties = 6;
      • removeProperties

        public CollectionSchema.Builder removeProperties​(int index)
        repeated .milvus.proto.common.KeyValuePair properties = 6;
      • getPropertiesBuilder

        public KeyValuePair.Builder getPropertiesBuilder​(int index)
        repeated .milvus.proto.common.KeyValuePair properties = 6;
      • addPropertiesBuilder

        public KeyValuePair.Builder addPropertiesBuilder()
        repeated .milvus.proto.common.KeyValuePair properties = 6;
      • addPropertiesBuilder

        public KeyValuePair.Builder addPropertiesBuilder​(int index)
        repeated .milvus.proto.common.KeyValuePair properties = 6;
      • getPropertiesBuilderList

        public List<KeyValuePair.Builder> getPropertiesBuilderList()
        repeated .milvus.proto.common.KeyValuePair properties = 6;
      • clearFunctions

        public CollectionSchema.Builder clearFunctions()
        repeated .milvus.proto.schema.FunctionSchema functions = 7;
      • removeFunctions

        public CollectionSchema.Builder removeFunctions​(int index)
        repeated .milvus.proto.schema.FunctionSchema functions = 7;
      • getFunctionsBuilder

        public FunctionSchema.Builder getFunctionsBuilder​(int index)
        repeated .milvus.proto.schema.FunctionSchema functions = 7;
      • addFunctionsBuilder

        public FunctionSchema.Builder addFunctionsBuilder()
        repeated .milvus.proto.schema.FunctionSchema functions = 7;
      • addFunctionsBuilder

        public FunctionSchema.Builder addFunctionsBuilder​(int index)
        repeated .milvus.proto.schema.FunctionSchema functions = 7;
      • getFunctionsBuilderList

        public List<FunctionSchema.Builder> getFunctionsBuilderList()
        repeated .milvus.proto.schema.FunctionSchema functions = 7;
      • setDbName

        public CollectionSchema.Builder setDbName​(String value)
        string dbName = 8;
        Parameters:
        value - The dbName to set.
        Returns:
        This builder for chaining.
      • setDbNameBytes

        public CollectionSchema.Builder setDbNameBytes​(com.google.protobuf.ByteString value)
        string dbName = 8;
        Parameters:
        value - The bytes for dbName to set.
        Returns:
        This builder for chaining.
      • clearStructArrayFields

        public CollectionSchema.Builder clearStructArrayFields()
        repeated .milvus.proto.schema.StructArrayFieldSchema struct_array_fields = 9;
      • removeStructArrayFields

        public CollectionSchema.Builder removeStructArrayFields​(int index)
        repeated .milvus.proto.schema.StructArrayFieldSchema struct_array_fields = 9;
      • getStructArrayFieldsBuilder

        public StructArrayFieldSchema.Builder getStructArrayFieldsBuilder​(int index)
        repeated .milvus.proto.schema.StructArrayFieldSchema struct_array_fields = 9;
      • addStructArrayFieldsBuilder

        public StructArrayFieldSchema.Builder addStructArrayFieldsBuilder()
        repeated .milvus.proto.schema.StructArrayFieldSchema struct_array_fields = 9;
      • addStructArrayFieldsBuilder

        public StructArrayFieldSchema.Builder addStructArrayFieldsBuilder​(int index)
        repeated .milvus.proto.schema.StructArrayFieldSchema struct_array_fields = 9;
      • getStructArrayFieldsBuilderList

        public List<StructArrayFieldSchema.Builder> getStructArrayFieldsBuilderList()
        repeated .milvus.proto.schema.StructArrayFieldSchema struct_array_fields = 9;
      • getVersion

        public int getVersion()
         The version of current collection schema updates, increment every time the schema content is updating, 
         
        int32 version = 10;
        Specified by:
        getVersion in interface CollectionSchemaOrBuilder
        Returns:
        The version.
      • setVersion

        public CollectionSchema.Builder setVersion​(int value)
         The version of current collection schema updates, increment every time the schema content is updating, 
         
        int32 version = 10;
        Parameters:
        value - The version to set.
        Returns:
        This builder for chaining.
      • clearVersion

        public CollectionSchema.Builder clearVersion()
         The version of current collection schema updates, increment every time the schema content is updating, 
         
        int32 version = 10;
        Returns:
        This builder for chaining.
      • getExternalSource

        public String getExternalSource()
         0 when the collection is created or the collection schema is updated before 2.6.5.
         the name dbName and description take no effect to it.
         
        string external_source = 11;
        Specified by:
        getExternalSource in interface CollectionSchemaOrBuilder
        Returns:
        The externalSource.
      • getExternalSourceBytes

        public com.google.protobuf.ByteString getExternalSourceBytes()
         0 when the collection is created or the collection schema is updated before 2.6.5.
         the name dbName and description take no effect to it.
         
        string external_source = 11;
        Specified by:
        getExternalSourceBytes in interface CollectionSchemaOrBuilder
        Returns:
        The bytes for externalSource.
      • setExternalSource

        public CollectionSchema.Builder setExternalSource​(String value)
         0 when the collection is created or the collection schema is updated before 2.6.5.
         the name dbName and description take no effect to it.
         
        string external_source = 11;
        Parameters:
        value - The externalSource to set.
        Returns:
        This builder for chaining.
      • clearExternalSource

        public CollectionSchema.Builder clearExternalSource()
         0 when the collection is created or the collection schema is updated before 2.6.5.
         the name dbName and description take no effect to it.
         
        string external_source = 11;
        Returns:
        This builder for chaining.
      • setExternalSourceBytes

        public CollectionSchema.Builder setExternalSourceBytes​(com.google.protobuf.ByteString value)
         0 when the collection is created or the collection schema is updated before 2.6.5.
         the name dbName and description take no effect to it.
         
        string external_source = 11;
        Parameters:
        value - The bytes for externalSource to set.
        Returns:
        This builder for chaining.
      • getExternalSpecBytes

        public com.google.protobuf.ByteString getExternalSpecBytes()
        string external_spec = 12;
        Specified by:
        getExternalSpecBytes in interface CollectionSchemaOrBuilder
        Returns:
        The bytes for externalSpec.
      • setExternalSpec

        public CollectionSchema.Builder setExternalSpec​(String value)
        string external_spec = 12;
        Parameters:
        value - The externalSpec to set.
        Returns:
        This builder for chaining.
      • clearExternalSpec

        public CollectionSchema.Builder clearExternalSpec()
        string external_spec = 12;
        Returns:
        This builder for chaining.
      • setExternalSpecBytes

        public CollectionSchema.Builder setExternalSpecBytes​(com.google.protobuf.ByteString value)
        string external_spec = 12;
        Parameters:
        value - The bytes for externalSpec to set.
        Returns:
        This builder for chaining.
      • setDoPhysicalBackfill

        public CollectionSchema.Builder setDoPhysicalBackfill​(boolean value)
        bool do_physical_backfill = 13;
        Parameters:
        value - The doPhysicalBackfill to set.
        Returns:
        This builder for chaining.
      • clearDoPhysicalBackfill

        public CollectionSchema.Builder clearDoPhysicalBackfill()
        bool do_physical_backfill = 13;
        Returns:
        This builder for chaining.
      • getFileResourceIds

        public long getFileResourceIds​(int index)
        repeated int64 file_resource_ids = 14;
        Specified by:
        getFileResourceIds in interface CollectionSchemaOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The fileResourceIds at the given index.
      • setFileResourceIds

        public CollectionSchema.Builder setFileResourceIds​(int index,
                                                           long value)
        repeated int64 file_resource_ids = 14;
        Parameters:
        index - The index to set the value at.
        value - The fileResourceIds to set.
        Returns:
        This builder for chaining.
      • addFileResourceIds

        public CollectionSchema.Builder addFileResourceIds​(long value)
        repeated int64 file_resource_ids = 14;
        Parameters:
        value - The fileResourceIds to add.
        Returns:
        This builder for chaining.
      • addAllFileResourceIds

        public CollectionSchema.Builder addAllFileResourceIds​(Iterable<? extends Long> values)
        repeated int64 file_resource_ids = 14;
        Parameters:
        values - The fileResourceIds to add.
        Returns:
        This builder for chaining.
      • clearFileResourceIds

        public CollectionSchema.Builder clearFileResourceIds()
        repeated int64 file_resource_ids = 14;
        Returns:
        This builder for chaining.
      • setEnableNamespace

        public CollectionSchema.Builder setEnableNamespace​(boolean value)
        bool enable_namespace = 15;
        Parameters:
        value - The enableNamespace to set.
        Returns:
        This builder for chaining.
      • clearEnableNamespace

        public CollectionSchema.Builder clearEnableNamespace()
        bool enable_namespace = 15;
        Returns:
        This builder for chaining.
      • setUnknownFields

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

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