java.lang.Object
java.lang.Record
org.elasticsearch.health.UserAction
- Record Components:
definition
- The definition of the user action (e.g. message, helpURL)affectedResources
- Optional list of "things" that this action should be taken on (e.g. shards, indices, or policies).
- All Implemented Interfaces:
ToXContent
,ToXContentObject
public record UserAction(UserAction.Definition definition, List<String> affectedResources)
extends Record
implements ToXContentObject
Details a potential action that a user could take to clear an issue identified by a
HealthService
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
Details a potential action that a user could take to clear an issue identified by aHealthService
.Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
Field Summary
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ConstructorsConstructorDescriptionUserAction
(UserAction.Definition definition, List<String> affectedResources) Creates an instance of aUserAction
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaffectedResources
record component.Returns the value of thedefinition
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.toXContent
(XContentBuilder builder, ToXContent.Params params) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Constructor Details
-
UserAction
Creates an instance of aUserAction
record class.- Parameters:
definition
- the value for thedefinition
record componentaffectedResources
- the value for theaffectedResources
record component
-
-
Method Details
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceToXContent
- Throws:
IOException
-
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)
. -
definition
Returns the value of thedefinition
record component.- Returns:
- the value of the
definition
record component
-
affectedResources
Returns the value of theaffectedResources
record component.- Returns:
- the value of the
affectedResources
record component
-