Record Class Policy
java.lang.Object
java.lang.Record
org.graylog2.indexer.datastream.policy.Policy
public record Policy(@Nullable String policyId, @Nonnull String description, @Nullable String lastUpdatedTime, @Nonnull String defaultState, @Nonnull List<Policy.State> states, @Nullable Policy.IsmTemplate ismTemplate)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordISM Template property with index pattern and priority.static final recordstatic final record -
Constructor Summary
ConstructorsConstructorDescriptionPolicy(String policyId, String description, String lastUpdatedTime, String defaultState, List<Policy.State> states, Policy.IsmTemplate ismTemplate) Creates an instance of aPolicyrecord class.Policy(String description, String defaultState, List<Policy.State> states) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedefaultStaterecord component.Returns the value of thedescriptionrecord 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 theismTemplaterecord component.Returns the value of thelastUpdatedTimerecord component.policyId()Returns the value of thepolicyIdrecord component.states()Returns the value of thestatesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Policy
public Policy(@Nonnull String description, @Nonnull String defaultState, @Nonnull List<Policy.State> states) -
Policy
public Policy(@Nullable String policyId, @Nonnull String description, @Nullable String lastUpdatedTime, @Nonnull String defaultState, @Nonnull List<Policy.State> states, @Nullable Policy.IsmTemplate ismTemplate) Creates an instance of aPolicyrecord class.- Parameters:
policyId- the value for thepolicyIdrecord componentdescription- the value for thedescriptionrecord componentlastUpdatedTime- the value for thelastUpdatedTimerecord componentdefaultState- the value for thedefaultStaterecord componentstates- the value for thestatesrecord componentismTemplate- the value for theismTemplaterecord component
-
-
Method Details
-
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). -
policyId
Returns the value of thepolicyIdrecord component.- Returns:
- the value of the
policyIdrecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
lastUpdatedTime
Returns the value of thelastUpdatedTimerecord component.- Returns:
- the value of the
lastUpdatedTimerecord component
-
defaultState
Returns the value of thedefaultStaterecord component.- Returns:
- the value of the
defaultStaterecord component
-
states
Returns the value of thestatesrecord component.- Returns:
- the value of the
statesrecord component
-
ismTemplate
Returns the value of theismTemplaterecord component.- Returns:
- the value of the
ismTemplaterecord component
-