Class DatabaseCreationBuilder

java.lang.Object
com.dtsx.astra.sdk.db.domain.DatabaseCreationBuilder

public class DatabaseCreationBuilder extends Object
Author:
Cedrick LUNVEN (@clunven)
  • Field Details

    • DEFAULT_REGION

      public static final String DEFAULT_REGION
      Default region.
      See Also:
    • DEFAULT_TIER

      public static final String DEFAULT_TIER
      Default tier.
      See Also:
    • DEFAULT_CLOUD

      public static final CloudProviderType DEFAULT_CLOUD
      Default cloud.
    • cloudProvider

      protected CloudProviderType cloudProvider
      CloudProvider where the database lives.
    • region

      protected String region
      Region.
    • tier

      protected String tier
      Database type.
    • name

      protected String name
      Name of the database--user friendly identifier.
    • keyspace

      protected String keyspace
      Keyspace name in database
    • vector

      protected boolean vector
      Option to enable the vector preview.
    • capacityUnits

      protected int capacityUnits
  • Constructor Details

    • DatabaseCreationBuilder

      public DatabaseCreationBuilder()
      Default constructor.
  • Method Details

    • name

      public DatabaseCreationBuilder name(String name)
      Build from the name.
      Parameters:
      name - target db name.
      Returns:
      current instance
    • keyspace

      public DatabaseCreationBuilder keyspace(String keyspace)
      Build from the keyspace.
      Parameters:
      keyspace - target database keyspace.
      Returns:
      current instance
    • cloudProvider

      public DatabaseCreationBuilder cloudProvider(CloudProviderType cloudProvider)
      Build from the cloudProvider.
      Parameters:
      cloudProvider - target db cloudProvider.
      Returns:
      current instance
    • tier

      public DatabaseCreationBuilder tier(String tier)
      Build from the tier.
      Parameters:
      tier - target db tier.
      Returns:
      current instance
    • cloudRegion

      public DatabaseCreationBuilder cloudRegion(String region)
      Build from the region.
      Parameters:
      region - target db region.
      Returns:
      current instance
    • capacityUnit

      public DatabaseCreationBuilder capacityUnit(int unit)
      Build from the capacity unit.
      Parameters:
      unit - target unit region.
      Returns:
      current instance
    • withVector

      public DatabaseCreationBuilder withVector()
      Enable Vector.
      Returns:
      database creation request
    • build

      public DatabaseCreationRequest build()
      Build the immutable beans.
      Returns:
      the immutable instance