Class ImmutableCheck
java.lang.Object
org.kiwiproject.consul.model.agent.Check
org.kiwiproject.consul.model.agent.ImmutableCheck
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableCheck
extends Check
Immutable implementation of
Check.
Use the builder to create immutable instances:
ImmutableCheck.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableCheck.Builderbuilder()Creates a builder forImmutableCheck.static ImmutableCheckCreates an immutable copy of aCheckvalue.booleanThis instance is equal to all instances ofImmutableCheckthat have equal attribute values.getArgs()getGrpc()getHttp()getId()getName()getNotes()com.google.common.collect.ImmutableList<String>getTcp()getTtl()inthashCode()Computes a hash code from attributes:id,name,notes,output,args,interval,ttl,http,tcp,grpc,grpcUseTls,serviceId,serviceTags,deregisterCriticalServiceAfter.toString()Prints the immutable valueCheckwith attribute values.final ImmutableCheckCopy the current immutable object by setting a present value for the optionalargsattribute.final ImmutableCheckCopy the current immutable object by setting an optional value for theargsattribute.final ImmutableCheckCopy the current immutable object by setting a present value for the optionalderegisterCriticalServiceAfterattribute.final ImmutableCheckwithDeregisterCriticalServiceAfter(Optional<String> optional) Copy the current immutable object by setting an optional value for thederegisterCriticalServiceAfterattribute.final ImmutableCheckCopy the current immutable object by setting a present value for the optionalgrpcattribute.final ImmutableCheckCopy the current immutable object by setting an optional value for thegrpcattribute.final ImmutableCheckwithGrpcUseTls(boolean value) Copy the current immutable object by setting a present value for the optionalgrpcUseTlsattribute.final ImmutableCheckwithGrpcUseTls(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for thegrpcUseTlsattribute.final ImmutableCheckCopy the current immutable object by setting a present value for the optionalhttpattribute.final ImmutableCheckCopy the current immutable object by setting an optional value for thehttpattribute.final ImmutableCheckCopy the current immutable object by setting a value for theidattribute.final ImmutableCheckwithInterval(String value) Copy the current immutable object by setting a present value for the optionalintervalattribute.final ImmutableCheckwithInterval(Optional<String> optional) Copy the current immutable object by setting an optional value for theintervalattribute.final ImmutableCheckCopy the current immutable object by setting a value for thenameattribute.final ImmutableCheckCopy the current immutable object by setting a present value for the optionalnotesattribute.final ImmutableCheckCopy the current immutable object by setting an optional value for thenotesattribute.final ImmutableCheckwithOutput(String value) Copy the current immutable object by setting a present value for the optionaloutputattribute.final ImmutableCheckwithOutput(Optional<String> optional) Copy the current immutable object by setting an optional value for theoutputattribute.final ImmutableCheckwithServiceId(String value) Copy the current immutable object by setting a present value for the optionalserviceIdattribute.final ImmutableCheckwithServiceId(Optional<String> optional) Copy the current immutable object by setting an optional value for theserviceIdattribute.final ImmutableCheckwithServiceTags(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofserviceTags.final ImmutableCheckwithServiceTags(String... elements) Copy the current immutable object with elements that replace the content ofserviceTags.final ImmutableCheckCopy the current immutable object by setting a present value for the optionaltcpattribute.final ImmutableCheckCopy the current immutable object by setting an optional value for thetcpattribute.final ImmutableCheckCopy the current immutable object by setting a present value for the optionalttlattribute.final ImmutableCheckCopy the current immutable object by setting an optional value for thettlattribute.
-
Method Details
-
getId
-
getName
-
getNotes
-
getOutput
-
getArgs
-
getInterval
- Specified by:
getIntervalin classCheck- Returns:
- The value of the
intervalattribute
-
getTtl
-
getHttp
-
getTcp
-
getGrpc
-
getGrpcUseTls
- Specified by:
getGrpcUseTlsin classCheck- Returns:
- The value of the
grpcUseTlsattribute
-
getServiceId
- Specified by:
getServiceIdin classCheck- Returns:
- The value of the
serviceIdattribute
-
getServiceTags
- Specified by:
getServiceTagsin classCheck- Returns:
- The value of the
serviceTagsattribute
-
getDeregisterCriticalServiceAfter
- Specified by:
getDeregisterCriticalServiceAfterin classCheck- Returns:
- The value of the
deregisterCriticalServiceAfterattribute
-
withId
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- 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
-
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
-
withArgs
Copy the current immutable object by setting a present value for the optionalargsattribute.- Parameters:
value- The value for args- Returns:
- A modified copy of
thisobject
-
withArgs
Copy the current immutable object by setting an optional value for theargsattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for args- Returns:
- A modified copy of
thisobject
-
withInterval
Copy the current immutable object by setting a present value for the optionalintervalattribute.- Parameters:
value- The value for interval- Returns:
- A modified copy of
thisobject
-
withInterval
Copy the current immutable object by setting an optional value for theintervalattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for interval- Returns:
- A modified copy of
thisobject
-
withTtl
Copy the current immutable object by setting a present value for the optionalttlattribute.- Parameters:
value- The value for ttl- Returns:
- A modified copy of
thisobject
-
withTtl
Copy the current immutable object by setting an optional value for thettlattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for ttl- Returns:
- A modified copy of
thisobject
-
withHttp
Copy the current immutable object by setting a present value for the optionalhttpattribute.- Parameters:
value- The value for http- Returns:
- A modified copy of
thisobject
-
withHttp
Copy the current immutable object by setting an optional value for thehttpattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for http- Returns:
- A modified copy of
thisobject
-
withTcp
Copy the current immutable object by setting a present value for the optionaltcpattribute.- Parameters:
value- The value for tcp- Returns:
- A modified copy of
thisobject
-
withTcp
Copy the current immutable object by setting an optional value for thetcpattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for tcp- Returns:
- A modified copy of
thisobject
-
withGrpc
Copy the current immutable object by setting a present value for the optionalgrpcattribute.- Parameters:
value- The value for grpc- Returns:
- A modified copy of
thisobject
-
withGrpc
Copy the current immutable object by setting an optional value for thegrpcattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for grpc- Returns:
- A modified copy of
thisobject
-
withGrpcUseTls
Copy the current immutable object by setting a present value for the optionalgrpcUseTlsattribute.- Parameters:
value- The value for grpcUseTls- Returns:
- A modified copy of
thisobject
-
withGrpcUseTls
Copy the current immutable object by setting an optional value for thegrpcUseTlsattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for grpcUseTls- 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
-
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
-
withDeregisterCriticalServiceAfter
Copy the current immutable object by setting a present value for the optionalderegisterCriticalServiceAfterattribute.- Parameters:
value- The value for deregisterCriticalServiceAfter- Returns:
- A modified copy of
thisobject
-
withDeregisterCriticalServiceAfter
Copy the current immutable object by setting an optional value for thederegisterCriticalServiceAfterattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for deregisterCriticalServiceAfter- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableCheckthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id,name,notes,output,args,interval,ttl,http,tcp,grpc,grpcUseTls,serviceId,serviceTags,deregisterCriticalServiceAfter. -
toString
Prints the immutable valueCheckwith attribute values. -
copyOf
Creates an immutable copy of aCheckvalue. 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 Check instance
-
builder
Creates a builder forImmutableCheck.ImmutableCheck.builder() .id(String) // requiredid.name(String) // requiredname.notes(String) // optionalnotes.output(String) // optionaloutput.args(List<String>) // optionalargs.interval(String) // optionalinterval.ttl(String) // optionalttl.http(String) // optionalhttp.tcp(String) // optionaltcp.grpc(String) // optionalgrpc.grpcUseTls(Boolean) // optionalgrpcUseTls.serviceId(String) // optionalserviceId.addServiceTags|addAllServiceTags(String) //serviceTagselements .deregisterCriticalServiceAfter(String) // optionalderegisterCriticalServiceAfter.build();- Returns:
- A new ImmutableCheck builder
-