Package com.orbitz.consul.model.health
Class ImmutableServiceCheck
- java.lang.Object
-
- com.orbitz.consul.model.health.ServiceCheck
-
- com.orbitz.consul.model.health.ImmutableServiceCheck
-
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableServiceCheck extends ServiceCheckImmutable implementation ofServiceCheck.Use the builder to create immutable instances:
ImmutableServiceCheck.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableServiceCheck.BuilderBuilds instances of typeImmutableServiceCheck.
-
Method Summary
Modifier and Type Method Description static ImmutableServiceCheck.Builderbuilder()Creates a builder forImmutableServiceCheck.static ImmutableServiceCheckcopyOf(ServiceCheck instance)Creates an immutable copy of aServiceCheckvalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofImmutableServiceCheckthat have equal attribute values.com.google.common.collect.ImmutableList<HealthCheck>getChecks()NodegetNode()ServicegetService()inthashCode()Computes a hash code from attributes:node,service,checks.java.lang.StringtoString()Prints the immutable valueServiceCheckwith attribute values.ImmutableServiceCheckwithChecks(HealthCheck... elements)Copy the current immutable object with elements that replace the content ofchecks.ImmutableServiceCheckwithChecks(java.lang.Iterable<? extends HealthCheck> elements)Copy the current immutable object with elements that replace the content ofchecks.ImmutableServiceCheckwithNode(Node value)Copy the current immutable object by setting a value for thenodeattribute.ImmutableServiceCheckwithService(Service value)Copy the current immutable object by setting a value for theserviceattribute.
-
-
-
Method Detail
-
getNode
public Node getNode()
- Specified by:
getNodein classServiceCheck- Returns:
- The value of the
nodeattribute
-
getService
public Service getService()
- Specified by:
getServicein classServiceCheck- Returns:
- The value of the
serviceattribute
-
getChecks
public com.google.common.collect.ImmutableList<HealthCheck> getChecks()
- Specified by:
getChecksin classServiceCheck- Returns:
- The value of the
checksattribute
-
withNode
public final ImmutableServiceCheck withNode(Node value)
Copy the current immutable object by setting a value for thenodeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for node- Returns:
- A modified copy of the
thisobject
-
withService
public final ImmutableServiceCheck withService(Service value)
Copy the current immutable object by setting a value for theserviceattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for service- Returns:
- A modified copy of the
thisobject
-
withChecks
public final ImmutableServiceCheck withChecks(HealthCheck... elements)
Copy the current immutable object with elements that replace the content ofchecks.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withChecks
public final ImmutableServiceCheck withChecks(java.lang.Iterable<? extends HealthCheck> elements)
Copy the current immutable object with elements that replace the content ofchecks. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of checks 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 ofImmutableServiceCheckthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:node,service,checks.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueServiceCheckwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static ImmutableServiceCheck copyOf(ServiceCheck instance)
Creates an immutable copy of aServiceCheckvalue. 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 ServiceCheck instance
-
builder
public static ImmutableServiceCheck.Builder builder()
Creates a builder forImmutableServiceCheck.ImmutableServiceCheck.builder() .node(com.orbitz.consul.model.health.Node) // requirednode.service(com.orbitz.consul.model.health.Service) // requiredservice.addChecks|addAllChecks(com.orbitz.consul.model.health.HealthCheck) //checkselements .build();- Returns:
- A new ImmutableServiceCheck builder
-
-