Package com.cloudforge.core.interfaces
Record Class DatabaseSpec.DatabaseRequirement
java.lang.Object
java.lang.Record
com.cloudforge.core.interfaces.DatabaseSpec.DatabaseRequirement
- Record Components:
type- the requirement type (REQUIRED, OPTIONAL, or NONE)engine- the database engine (e.g., "postgres", "mysql")version- the database engine versioninstanceClass- the RDS instance class (e.g., "db.t3.micro")allocatedStorageGB- the allocated storage in GBdatabaseName- the name of the database to createpubliclyAccessible- whether the database should be publicly accessible
- Enclosing interface:
DatabaseSpec
public static record DatabaseSpec.DatabaseRequirement(DatabaseSpec.DatabaseRequirement.RequirementType type, String engine, String version, String instanceClass, int allocatedStorageGB, String databaseName, boolean publiclyAccessible)
extends Record
Database requirement specification.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionDatabaseRequirement(DatabaseSpec.DatabaseRequirement.RequirementType type, String engine, String version, String instanceClass, int allocatedStorageGB, String databaseName, boolean publiclyAccessible) Creates an instance of aDatabaseRequirementrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theallocatedStorageGBrecord component.Returns the value of thedatabaseNamerecord component.engine()Returns the value of theenginerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinstanceClassrecord component.none()booleanReturns the value of thepubliclyAccessiblerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.version()Returns the value of theversionrecord component.withDatabaseName(String databaseName) withInstanceClass(String instanceClass) withStorage(int allocatedStorageGB)
-
Constructor Details
-
DatabaseRequirement
public DatabaseRequirement(DatabaseSpec.DatabaseRequirement.RequirementType type, String engine, String version, String instanceClass, int allocatedStorageGB, String databaseName, boolean publiclyAccessible) Creates an instance of aDatabaseRequirementrecord class.- Parameters:
type- the value for thetyperecord componentengine- the value for theenginerecord componentversion- the value for theversionrecord componentinstanceClass- the value for theinstanceClassrecord componentallocatedStorageGB- the value for theallocatedStorageGBrecord componentdatabaseName- the value for thedatabaseNamerecord componentpubliclyAccessible- the value for thepubliclyAccessiblerecord component
-
-
Method Details
-
required
-
optional
-
none
-
withInstanceClass
-
withStorage
-
withDatabaseName
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
engine
Returns the value of theenginerecord component.- Returns:
- the value of the
enginerecord component
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
instanceClass
Returns the value of theinstanceClassrecord component.- Returns:
- the value of the
instanceClassrecord component
-
allocatedStorageGB
public int allocatedStorageGB()Returns the value of theallocatedStorageGBrecord component.- Returns:
- the value of the
allocatedStorageGBrecord component
-
databaseName
Returns the value of thedatabaseNamerecord component.- Returns:
- the value of the
databaseNamerecord component
-
publiclyAccessible
public boolean publiclyAccessible()Returns the value of thepubliclyAccessiblerecord component.- Returns:
- the value of the
publiclyAccessiblerecord component
-