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).
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionRandomPasswordOptions(Integer length, String excludeCharacters, Boolean excludeNumbers, Boolean excludePunctuation, Boolean excludeUppercase, Boolean excludeLowercase, Boolean includeSpace, Boolean requireEachIncludedType) Creates an instance of aRandomPasswordOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Starts a builder.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexcludeCharactersrecord component.Returns the value of theexcludeLowercaserecord component.Returns the value of theexcludeNumbersrecord component.Returns the value of theexcludePunctuationrecord component.Returns the value of theexcludeUppercaserecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theincludeSpacerecord component.length()Returns the value of thelengthrecord component.static RandomPasswordOptionsnone()Returns options with every field unset.Returns the value of therequireEachIncludedTyperecord component.Returns a builder pre-filled with these options.final StringtoString()Returns a string representation of this record class.
-
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 aRandomPasswordOptionsrecord class.- Parameters:
length- the value for thelengthrecord componentexcludeCharacters- the value for theexcludeCharactersrecord componentexcludeNumbers- the value for theexcludeNumbersrecord componentexcludePunctuation- the value for theexcludePunctuationrecord componentexcludeUppercase- the value for theexcludeUppercaserecord componentexcludeLowercase- the value for theexcludeLowercaserecord componentincludeSpace- the value for theincludeSpacerecord componentrequireEachIncludedType- the value for therequireEachIncludedTyperecord component
-
-
Method Details
-
none
Returns options with every field unset.- Returns:
- empty options
-
builder
Starts a builder.- Returns:
- a new builder
-
toBuilder
Returns a builder pre-filled with these options.- Returns:
- a new builder
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
length
Returns the value of thelengthrecord component.- Returns:
- the value of the
lengthrecord component
-
excludeCharacters
Returns the value of theexcludeCharactersrecord component.- Returns:
- the value of the
excludeCharactersrecord component
-
excludeNumbers
Returns the value of theexcludeNumbersrecord component.- Returns:
- the value of the
excludeNumbersrecord component
-
excludePunctuation
Returns the value of theexcludePunctuationrecord component.- Returns:
- the value of the
excludePunctuationrecord component
-
excludeUppercase
Returns the value of theexcludeUppercaserecord component.- Returns:
- the value of the
excludeUppercaserecord component
-
excludeLowercase
Returns the value of theexcludeLowercaserecord component.- Returns:
- the value of the
excludeLowercaserecord component
-
includeSpace
Returns the value of theincludeSpacerecord component.- Returns:
- the value of the
includeSpacerecord component
-
requireEachIncludedType
Returns the value of therequireEachIncludedTyperecord component.- Returns:
- the value of the
requireEachIncludedTyperecord component
-