Package com.orbitz.consul.model.health
Class ImmutableHealthCheck
- java.lang.Object
-
- com.orbitz.consul.model.health.HealthCheck
-
- com.orbitz.consul.model.health.ImmutableHealthCheck
-
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableHealthCheck extends HealthCheckImmutable implementation ofHealthCheck.Use the builder to create immutable instances:
ImmutableHealthCheck.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableHealthCheck.BuilderBuilds instances of typeImmutableHealthCheck.
-
Method Summary
Modifier and Type Method Description static ImmutableHealthCheck.Builderbuilder()Creates a builder forImmutableHealthCheck.static ImmutableHealthCheckcopyOf(HealthCheck instance)Creates an immutable copy of aHealthCheckvalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofImmutableHealthCheckthat have equal attribute values.java.lang.StringgetCheckId()java.lang.StringgetName()java.lang.StringgetNode()java.util.Optional<java.lang.String>getNotes()java.util.Optional<java.lang.String>getOutput()java.util.Optional<java.lang.String>getServiceId()java.util.Optional<java.lang.String>getServiceName()com.google.common.collect.ImmutableList<java.lang.String>getServiceTags()java.lang.StringgetStatus()inthashCode()Computes a hash code from attributes:node,checkId,name,status,notes,output,serviceId,serviceName,serviceTags.java.lang.StringtoString()Prints the immutable valueHealthCheckwith attribute values.ImmutableHealthCheckwithCheckId(java.lang.String value)Copy the current immutable object by setting a value for thecheckIdattribute.ImmutableHealthCheckwithName(java.lang.String value)Copy the current immutable object by setting a value for thenameattribute.ImmutableHealthCheckwithNode(java.lang.String value)Copy the current immutable object by setting a value for thenodeattribute.ImmutableHealthCheckwithNotes(java.lang.String value)Copy the current immutable object by setting a present value for the optionalnotesattribute.ImmutableHealthCheckwithNotes(java.util.Optional<java.lang.String> optional)Copy the current immutable object by setting an optional value for thenotesattribute.ImmutableHealthCheckwithOutput(java.lang.String value)Copy the current immutable object by setting a present value for the optionaloutputattribute.ImmutableHealthCheckwithOutput(java.util.Optional<java.lang.String> optional)Copy the current immutable object by setting an optional value for theoutputattribute.ImmutableHealthCheckwithServiceId(java.lang.String value)Copy the current immutable object by setting a present value for the optionalserviceIdattribute.ImmutableHealthCheckwithServiceId(java.util.Optional<java.lang.String> optional)Copy the current immutable object by setting an optional value for theserviceIdattribute.ImmutableHealthCheckwithServiceName(java.lang.String value)Copy the current immutable object by setting a present value for the optionalserviceNameattribute.ImmutableHealthCheckwithServiceName(java.util.Optional<java.lang.String> optional)Copy the current immutable object by setting an optional value for theserviceNameattribute.ImmutableHealthCheckwithServiceTags(java.lang.Iterable<java.lang.String> elements)Copy the current immutable object with elements that replace the content ofserviceTags.ImmutableHealthCheckwithServiceTags(java.lang.String... elements)Copy the current immutable object with elements that replace the content ofserviceTags.ImmutableHealthCheckwithStatus(java.lang.String value)Copy the current immutable object by setting a value for thestatusattribute.
-
-
-
Method Detail
-
getNode
public java.lang.String getNode()
- Specified by:
getNodein classHealthCheck- Returns:
- The value of the
nodeattribute
-
getCheckId
public java.lang.String getCheckId()
- Specified by:
getCheckIdin classHealthCheck- Returns:
- The value of the
checkIdattribute
-
getName
public java.lang.String getName()
- Specified by:
getNamein classHealthCheck- Returns:
- The value of the
nameattribute
-
getStatus
public java.lang.String getStatus()
- Specified by:
getStatusin classHealthCheck- Returns:
- The value of the
statusattribute
-
getNotes
public java.util.Optional<java.lang.String> getNotes()
- Specified by:
getNotesin classHealthCheck- Returns:
- The value of the
notesattribute
-
getOutput
public java.util.Optional<java.lang.String> getOutput()
- Specified by:
getOutputin classHealthCheck- Returns:
- The value of the
outputattribute
-
getServiceId
public java.util.Optional<java.lang.String> getServiceId()
- Specified by:
getServiceIdin classHealthCheck- Returns:
- The value of the
serviceIdattribute
-
getServiceName
public java.util.Optional<java.lang.String> getServiceName()
- Specified by:
getServiceNamein classHealthCheck- Returns:
- The value of the
serviceNameattribute
-
getServiceTags
public com.google.common.collect.ImmutableList<java.lang.String> getServiceTags()
- Specified by:
getServiceTagsin classHealthCheck- Returns:
- The value of the
serviceTagsattribute
-
withNode
public final ImmutableHealthCheck withNode(java.lang.String value)
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
public final ImmutableHealthCheck withCheckId(java.lang.String value)
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
public final ImmutableHealthCheck withName(java.lang.String value)
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
public final ImmutableHealthCheck withStatus(java.lang.String value)
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
public final ImmutableHealthCheck withNotes(java.lang.String value)
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
public final ImmutableHealthCheck withNotes(java.util.Optional<java.lang.String> optional)
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
public final ImmutableHealthCheck withOutput(java.lang.String value)
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
public final ImmutableHealthCheck withOutput(java.util.Optional<java.lang.String> optional)
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
public final ImmutableHealthCheck withServiceId(java.lang.String value)
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
public final ImmutableHealthCheck withServiceId(java.util.Optional<java.lang.String> optional)
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
public final ImmutableHealthCheck withServiceName(java.lang.String value)
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
public final ImmutableHealthCheck withServiceName(java.util.Optional<java.lang.String> optional)
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
public final ImmutableHealthCheck withServiceTags(java.lang.String... elements)
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
public final ImmutableHealthCheck withServiceTags(java.lang.Iterable<java.lang.String> elements)
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
public boolean equals(@Nullable java.lang.Object another)This instance is equal to all instances ofImmutableHealthCheckthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:node,checkId,name,status,notes,output,serviceId,serviceName,serviceTags.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueHealthCheckwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static ImmutableHealthCheck copyOf(HealthCheck instance)
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
public static ImmutableHealthCheck.Builder 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
-
-