io.milvus.param.collection

## Class CollectionSchemaParam.Builder

- java.lang.Object
- - io.milvus.param.collection.CollectionSchemaParam.Builder

Enclosing class:
  CollectionSchemaParam

    public static final class CollectionSchemaParam.Builder
    extends java.lang.Object

Builder for `CollectionSchemaParam` class.

### Method Summary

All Methods Instance Methods Concrete Methods
`CollectionSchemaParam.Builder` `addFieldType(@NonNull FieldType fieldType)` Adds a field.
`CollectionSchemaParam` `build()` Verifies parameters and creates a new `CollectionSchemaParam` instance.
`CollectionSchemaParam.Builder` `withEnableDynamicField(boolean enableDynamicField)` Sets the collection if enableDynamicField.
`CollectionSchemaParam.Builder` `withFieldTypes(@NonNull java.util.List<FieldType> fieldTypes)` Sets the fieldTypes of the schema.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### withEnableDynamicField

    public CollectionSchemaParam.Builder withEnableDynamicField(boolean enableDynamicField)

Sets the collection if enableDynamicField.

Parameters:
  `enableDynamicField` - enableDynamicField of the collection
Returns:
  `Builder`

#### withFieldTypes

    public CollectionSchemaParam.Builder withFieldTypes(@NonNull
                                                        @NonNull java.util.List<FieldType> fieldTypes)

Sets the fieldTypes of the schema. The fieldTypes cannot be empty or null.

Parameters:
  `fieldTypes` - a `List` of `FieldType`
Returns:
  `Builder`
See Also:
  `FieldType`

#### addFieldType

    public CollectionSchemaParam.Builder addFieldType(@NonNull
                                                      @NonNull FieldType fieldType)

Adds a field.

Parameters:
  `fieldType` - a `FieldType` object
Returns:
  `Builder`
See Also:
  `FieldType`

#### build

    public CollectionSchemaParam build()
                                throws ParamException

Verifies parameters and creates a new `CollectionSchemaParam` instance.

Returns:
  `CollectionSchemaParam`
Throws:
  `ParamException`