Class ImmutableHealthCheck
java.lang.Object
org.kiwiproject.consul.model.health.HealthCheck
org.kiwiproject.consul.model.health.ImmutableHealthCheck
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableHealthCheck
extends HealthCheck
Immutable implementation of
HealthCheck.
Use the builder to create immutable instances:
ImmutableHealthCheck.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableHealthCheck. -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableHealthCheck.Builderbuilder()Creates a builder forImmutableHealthCheck.static ImmutableHealthCheckcopyOf(HealthCheck instance) Creates an immutable copy of aHealthCheckvalue.booleanThis instance is equal to all instances ofImmutableHealthCheckthat have equal attribute values.getName()getNode()getNotes()com.google.common.collect.ImmutableList<String>inthashCode()Computes a hash code from attributes:node,checkId,name,status,notes,output,serviceId,serviceName,serviceTags.toString()Prints the immutable valueHealthCheckwith attribute values.final ImmutableHealthCheckwithCheckId(String value) Copy the current immutable object by setting a value for thecheckIdattribute.final ImmutableHealthCheckCopy the current immutable object by setting a value for thenameattribute.final ImmutableHealthCheckCopy the current immutable object by setting a value for thenodeattribute.final ImmutableHealthCheckCopy the current immutable object by setting a present value for the optionalnotesattribute.final ImmutableHealthCheckCopy the current immutable object by setting an optional value for thenotesattribute.final ImmutableHealthCheckwithOutput(String value) Copy the current immutable object by setting a present value for the optionaloutputattribute.final ImmutableHealthCheckwithOutput(Optional<String> optional) Copy the current immutable object by setting an optional value for theoutputattribute.final ImmutableHealthCheckwithServiceId(String value) Copy the current immutable object by setting a present value for the optionalserviceIdattribute.final ImmutableHealthCheckwithServiceId(Optional<String> optional) Copy the current immutable object by setting an optional value for theserviceIdattribute.final ImmutableHealthCheckwithServiceName(String value) Copy the current immutable object by setting a present value for the optionalserviceNameattribute.final ImmutableHealthCheckwithServiceName(Optional<String> optional) Copy the current immutable object by setting an optional value for theserviceNameattribute.final ImmutableHealthCheckwithServiceTags(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofserviceTags.final ImmutableHealthCheckwithServiceTags(String... elements) Copy the current immutable object with elements that replace the content ofserviceTags.final ImmutableHealthCheckwithStatus(String value) Copy the current immutable object by setting a value for thestatusattribute.
-
Method Details
-
getNode
- Specified by:
getNodein classHealthCheck- Returns:
- The value of the
nodeattribute
-
getCheckId
- Specified by:
getCheckIdin classHealthCheck- Returns:
- The value of the
checkIdattribute
-
getName
- Specified by:
getNamein classHealthCheck- Returns:
- The value of the
nameattribute
-
getStatus
- Specified by:
getStatusin classHealthCheck- Returns:
- The value of the
statusattribute
-
getNotes
- Specified by:
getNotesin classHealthCheck- Returns:
- The value of the
notesattribute
-
getOutput
- Specified by:
getOutputin classHealthCheck- Returns:
- The value of the
outputattribute
-
getServiceId
- Specified by:
getServiceIdin classHealthCheck- Returns:
- The value of the
serviceIdattribute
-
getServiceName
- Specified by:
getServiceNamein classHealthCheck- Returns:
- The value of the
serviceNameattribute
-
getServiceTags
- Specified by:
getServiceTagsin classHealthCheck- Returns:
- The value of the
serviceTagsattribute
-
withNode
Copy the current immutable object by setting a value for thenodeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for node- Returns:
- A modified copy of the
thisobject
-
withCheckId
Copy the current immutable object by setting a value for thecheckIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for checkId- Returns:
- A modified copy of the
thisobject
-
withName
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy of the
thisobject
-
withStatus
Copy the current immutable object by setting a value for thestatusattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for status- Returns:
- A modified copy of the
thisobject
-
withNotes
Copy the current immutable object by setting a present value for the optionalnotesattribute.- Parameters:
value- The value for notes- Returns:
- A modified copy of
thisobject
-
withNotes
Copy the current immutable object by setting an optional value for thenotesattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for notes- Returns:
- A modified copy of
thisobject
-
withOutput
Copy the current immutable object by setting a present value for the optionaloutputattribute.- Parameters:
value- The value for output- Returns:
- A modified copy of
thisobject
-
withOutput
Copy the current immutable object by setting an optional value for theoutputattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for output- Returns:
- A modified copy of
thisobject
-
withServiceId
Copy the current immutable object by setting a present value for the optionalserviceIdattribute.- Parameters:
value- The value for serviceId- Returns:
- A modified copy of
thisobject
-
withServiceId
Copy the current immutable object by setting an optional value for theserviceIdattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for serviceId- Returns:
- A modified copy of
thisobject
-
withServiceName
Copy the current immutable object by setting a present value for the optionalserviceNameattribute.- Parameters:
value- The value for serviceName- Returns:
- A modified copy of
thisobject
-
withServiceName
Copy the current immutable object by setting an optional value for theserviceNameattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for serviceName- Returns:
- A modified copy of
thisobject
-
withServiceTags
Copy the current immutable object with elements that replace the content ofserviceTags.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withServiceTags
Copy the current immutable object with elements that replace the content ofserviceTags. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of serviceTags elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableHealthCheckthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:node,checkId,name,status,notes,output,serviceId,serviceName,serviceTags. -
toString
Prints the immutable valueHealthCheckwith attribute values. -
copyOf
Creates an immutable copy of aHealthCheckvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable HealthCheck instance
-
builder
Creates a builder forImmutableHealthCheck.ImmutableHealthCheck.builder() .node(String) // requirednode.checkId(String) // requiredcheckId.name(String) // requiredname.status(String) // requiredstatus.notes(String) // optionalnotes.output(String) // optionaloutput.serviceId(String) // optionalserviceId.serviceName(String) // optionalserviceName.addServiceTags|addAllServiceTags(String) //serviceTagselements .build();- Returns:
- A new ImmutableHealthCheck builder
-