Record Class RoleInfo

java.lang.Object
java.lang.Record
codes.grow.packages.vault.RoleInfo
Record Components:
dbName - connection name
creationStatements - SQL run to create a user
revocationStatements - SQL run to drop a user
renewStatements - SQL run on renewal
rollbackStatements - SQL run on failure
defaultTtl - default lease TTL
maxTtl - maximum lease TTL
credentialType - credential type, e.g. password

public record RoleInfo(String dbName, List<String> creationStatements, List<String> revocationStatements, List<String> renewStatements, List<String> rollbackStatements, Duration defaultTtl, Duration maxTtl, String credentialType) extends Record
A database role.
  • Constructor Details

    • RoleInfo

      public RoleInfo(String dbName, List<String> creationStatements, List<String> revocationStatements, List<String> renewStatements, List<String> rollbackStatements, Duration defaultTtl, Duration maxTtl, String credentialType)
      Creates the record; lists are copied.
      Parameters:
      dbName - connection name
      creationStatements - creation SQL
      revocationStatements - revocation SQL
      renewStatements - renew SQL
      rollbackStatements - rollback SQL
      defaultTtl - default TTL
      maxTtl - max TTL
      credentialType - credential type
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • dbName

      public String dbName()
      Returns the value of the dbName record component.
      Returns:
      the value of the dbName record component
    • creationStatements

      public List<String> creationStatements()
      Returns the value of the creationStatements record component.
      Returns:
      the value of the creationStatements record component
    • revocationStatements

      public List<String> revocationStatements()
      Returns the value of the revocationStatements record component.
      Returns:
      the value of the revocationStatements record component
    • renewStatements

      public List<String> renewStatements()
      Returns the value of the renewStatements record component.
      Returns:
      the value of the renewStatements record component
    • rollbackStatements

      public List<String> rollbackStatements()
      Returns the value of the rollbackStatements record component.
      Returns:
      the value of the rollbackStatements record component
    • defaultTtl

      public Duration defaultTtl()
      Returns the value of the defaultTtl record component.
      Returns:
      the value of the defaultTtl record component
    • maxTtl

      public Duration maxTtl()
      Returns the value of the maxTtl record component.
      Returns:
      the value of the maxTtl record component
    • credentialType

      public String credentialType()
      Returns the value of the credentialType record component.
      Returns:
      the value of the credentialType record component