Record Class RotationRules
java.lang.Object
java.lang.Record
codes.grow.packages.awssecretsmanager.RotationRules
- Record Components:
automaticallyAfterDays- rotate every N days (1–1000)duration- rotation window length, e.g.3hscheduleExpression-rate(...)orcron(...)expression
public record RotationRules(Integer automaticallyAfterDays, String duration, String scheduleExpression)
extends Record
A rotation schedule. Components are
null when not set.-
Constructor Summary
ConstructorsConstructorDescriptionRotationRules(Integer automaticallyAfterDays, String duration, String scheduleExpression) Creates an instance of aRotationRulesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theautomaticallyAfterDaysrecord component.duration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.static RotationRuleseveryDays(int days) Rotates everydaysdays.final inthashCode()Returns a hash code value for this object.static RotationRulesRotates on a schedule expression.Returns the value of thescheduleExpressionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RotationRules
Creates an instance of aRotationRulesrecord class.- Parameters:
automaticallyAfterDays- the value for theautomaticallyAfterDaysrecord componentduration- the value for thedurationrecord componentscheduleExpression- the value for thescheduleExpressionrecord component
-
-
Method Details
-
everyDays
Rotates everydaysdays.- Parameters:
days- interval in days- Returns:
- the rules
-
schedule
Rotates on a schedule expression.- Parameters:
expression-rate(...)orcron(...)- Returns:
- the rules
-
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). -
automaticallyAfterDays
Returns the value of theautomaticallyAfterDaysrecord component.- Returns:
- the value of the
automaticallyAfterDaysrecord component
-
duration
Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-
scheduleExpression
Returns the value of thescheduleExpressionrecord component.- Returns:
- the value of the
scheduleExpressionrecord component
-