java.lang.Object
java.lang.Record
org.elasticsearch.health.HealthIndicatorImpact
- All Implemented Interfaces:
ToXContent
,ToXContentObject
public record HealthIndicatorImpact(String indicatorName, String id, int severity, String impactDescription, List<ImpactArea> impactAreas)
extends Record
implements ToXContentObject
-
Nested Class Summary
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
ConstructorDescriptionHealthIndicatorImpact
(String indicatorName, String id, int severity, String impactDescription, List<ImpactArea> impactAreas) Creates an instance of aHealthIndicatorImpact
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.Returns the value of theimpactAreas
record component.Returns the value of theimpactDescription
record component.Returns the value of theindicatorName
record component.int
severity()
Returns the value of theseverity
record component.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
-
HealthIndicatorImpact
public HealthIndicatorImpact(String indicatorName, String id, int severity, String impactDescription, List<ImpactArea> impactAreas) Creates an instance of aHealthIndicatorImpact
record class.- Parameters:
indicatorName
- the value for theindicatorName
record componentid
- the value for theid
record componentseverity
- the value for theseverity
record componentimpactDescription
- the value for theimpactDescription
record componentimpactAreas
- the value for theimpactAreas
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
indicatorName
Returns the value of theindicatorName
record component.- Returns:
- the value of the
indicatorName
record component
-
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
severity
public int severity()Returns the value of theseverity
record component.- Returns:
- the value of the
severity
record component
-
impactDescription
Returns the value of theimpactDescription
record component.- Returns:
- the value of the
impactDescription
record component
-
impactAreas
Returns the value of theimpactAreas
record component.- Returns:
- the value of the
impactAreas
record component
-