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, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionHealthIndicatorImpact(String indicatorName, String id, int severity, String impactDescription, List<ImpactArea> impactAreas) Creates an instance of aHealthIndicatorImpactrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of theimpactAreasrecord component.Returns the value of theimpactDescriptionrecord component.Returns the value of theindicatorNamerecord component.intseverity()Returns the value of theseverityrecord component.final StringtoString()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, waitMethods 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 aHealthIndicatorImpactrecord class.- Parameters:
indicatorName- the value for theindicatorNamerecord componentid- the value for theidrecord componentseverity- the value for theseverityrecord componentimpactDescription- the value for theimpactDescriptionrecord componentimpactAreas- the value for theimpactAreasrecord component
-
-
Method Details
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin 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 theindicatorNamerecord component.- Returns:
- the value of the
indicatorNamerecord component
-
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
severity
public int severity()Returns the value of theseverityrecord component.- Returns:
- the value of the
severityrecord component
-
impactDescription
Returns the value of theimpactDescriptionrecord component.- Returns:
- the value of the
impactDescriptionrecord component
-
impactAreas
Returns the value of theimpactAreasrecord component.- Returns:
- the value of the
impactAreasrecord component
-