Record Class RandomPasswordOptions

java.lang.Object
java.lang.Record
codes.grow.packages.awssecretsmanager.RandomPasswordOptions
Record Components:
length - Password length 1–4096 (default 32).
excludeCharacters - Characters that must not appear.
excludeNumbers - Whether digits are excluded.
excludePunctuation - Whether punctuation is excluded.
excludeUppercase - Whether uppercase letters are excluded.
excludeLowercase - Whether lowercase letters are excluded.
includeSpace - Whether the space character may appear.
requireEachIncludedType - Whether at least one character of every included type is required (AWS default true).

public record RandomPasswordOptions(Integer length, String excludeCharacters, Boolean excludeNumbers, Boolean excludePunctuation, Boolean excludeUppercase, Boolean excludeLowercase, Boolean includeSpace, Boolean requireEachIncludedType) extends Record
Options of getRandomPassword.

Every component is optional: null means "not set" (the AWS default applies).

  • Constructor Details

    • RandomPasswordOptions

      public RandomPasswordOptions(Integer length, String excludeCharacters, Boolean excludeNumbers, Boolean excludePunctuation, Boolean excludeUppercase, Boolean excludeLowercase, Boolean includeSpace, Boolean requireEachIncludedType)
      Creates an instance of a RandomPasswordOptions record class.
      Parameters:
      length - the value for the length record component
      excludeCharacters - the value for the excludeCharacters record component
      excludeNumbers - the value for the excludeNumbers record component
      excludePunctuation - the value for the excludePunctuation record component
      excludeUppercase - the value for the excludeUppercase record component
      excludeLowercase - the value for the excludeLowercase record component
      includeSpace - the value for the includeSpace record component
      requireEachIncludedType - the value for the requireEachIncludedType record component
  • Method Details

    • none

      public static RandomPasswordOptions none()
      Returns options with every field unset.
      Returns:
      empty options
    • builder

      public static RandomPasswordOptions.Builder builder()
      Starts a builder.
      Returns:
      a new builder
    • toBuilder

      public RandomPasswordOptions.Builder toBuilder()
      Returns a builder pre-filled with these options.
      Returns:
      a new builder
    • 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.
    • length

      public Integer length()
      Returns the value of the length record component.
      Returns:
      the value of the length record component
    • excludeCharacters

      public String excludeCharacters()
      Returns the value of the excludeCharacters record component.
      Returns:
      the value of the excludeCharacters record component
    • excludeNumbers

      public Boolean excludeNumbers()
      Returns the value of the excludeNumbers record component.
      Returns:
      the value of the excludeNumbers record component
    • excludePunctuation

      public Boolean excludePunctuation()
      Returns the value of the excludePunctuation record component.
      Returns:
      the value of the excludePunctuation record component
    • excludeUppercase

      public Boolean excludeUppercase()
      Returns the value of the excludeUppercase record component.
      Returns:
      the value of the excludeUppercase record component
    • excludeLowercase

      public Boolean excludeLowercase()
      Returns the value of the excludeLowercase record component.
      Returns:
      the value of the excludeLowercase record component
    • includeSpace

      public Boolean includeSpace()
      Returns the value of the includeSpace record component.
      Returns:
      the value of the includeSpace record component
    • requireEachIncludedType

      public Boolean requireEachIncludedType()
      Returns the value of the requireEachIncludedType record component.
      Returns:
      the value of the requireEachIncludedType record component