io.milvus.param.collection

## Class CreateDatabaseParam.Builder

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

- Enclosing class:
    CreateDatabaseParam

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

  Builder for `CreateDatabaseParam` class.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `CreateDatabaseParam` | `build()` Verifies parameters and creates a new `CreateDatabaseParam` instance.
    `CreateDatabaseParam.Builder` | `withDatabaseName(@NonNull java.lang.String databaseName)` Sets the database name.
    `CreateDatabaseParam.Builder` | `withProperty(@NonNull java.lang.String key, @NonNull java.lang.String value)` Basic method to set a key-value property.
    `CreateDatabaseParam.Builder` | `withReplicaNumber(int replicaNumber)` Sets the replica number in database level, then if load collection doesn't have replica number, it will use this replica number.
    `CreateDatabaseParam.Builder` | `withResourceGroups(@NonNull java.util.List<java.lang.String> resourceGroups)` Sets the resource groups in database level, then if load collection doesn't have resource groups, it will use this resource groups.

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

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

- - ### Method Detail

    - #### withDatabaseName

          public CreateDatabaseParam.Builder withDatabaseName(@NonNull
                                                              @NonNull java.lang.String databaseName)

      Sets the database name. Database name cannot be empty or null.
      Parameters:
        `databaseName` - database name
      Returns:
        `Builder`

    - #### withReplicaNumber

          public CreateDatabaseParam.Builder withReplicaNumber(int replicaNumber)

      Sets the replica number in database level, then if load collection doesn't have replica number, it will use this replica number.
      Parameters:
        `replicaNumber` - replica number
      Returns:
        `Builder`

    - #### withResourceGroups

          public CreateDatabaseParam.Builder withResourceGroups(@NonNull
                                                                @NonNull java.util.List<java.lang.String> resourceGroups)

      Sets the resource groups in database level, then if load collection doesn't have resource groups, it will use this resource groups.
      Parameters:
        `resourceGroups` - resource group names
      Returns:
        `Builder`

    - #### withProperty

          public CreateDatabaseParam.Builder withProperty(@NonNull
                                                          @NonNull java.lang.String key,
                                                          @NonNull
                                                          @NonNull java.lang.String value)

      Basic method to set a key-value property.
      Parameters:
        `key` - the key
        `value` - the value
      Returns:
        `Builder`

    - #### build

          public CreateDatabaseParam build()
                                    throws ParamException

      Verifies parameters and creates a new `CreateDatabaseParam` instance.
      Returns:
        `CreateDatabaseParam`
      Throws:
        `ParamException`