Class ImmutableCatalogDeregistration
java.lang.Object
org.kiwiproject.consul.model.catalog.CatalogDeregistration
org.kiwiproject.consul.model.catalog.ImmutableCatalogDeregistration
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableCatalogDeregistration
extends CatalogDeregistration
Immutable implementation of
CatalogDeregistration.
Use the builder to create immutable instances:
ImmutableCatalogDeregistration.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableCatalogDeregistration. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableCatalogDeregistration.checkId()copyOf(CatalogDeregistration instance) Creates an immutable copy of aCatalogDeregistrationvalue.booleanThis instance is equal to all instances ofImmutableCatalogDeregistrationthat have equal attribute values.inthashCode()Computes a hash code from attributes:datacenter,node,checkId,serviceId,writeRequest.node()toString()Prints the immutable valueCatalogDeregistrationwith attribute values.withCheckId(String value) Copy the current immutable object by setting a present value for the optionalcheckIdattribute.withCheckId(Optional<String> optional) Copy the current immutable object by setting an optional value for thecheckIdattribute.withDatacenter(String value) Copy the current immutable object by setting a present value for the optionaldatacenterattribute.withDatacenter(Optional<String> optional) Copy the current immutable object by setting an optional value for thedatacenterattribute.Copy the current immutable object by setting a value for thenodeattribute.withServiceId(String value) Copy the current immutable object by setting a present value for the optionalserviceIdattribute.withServiceId(Optional<String> optional) Copy the current immutable object by setting an optional value for theserviceIdattribute.withWriteRequest(Optional<? extends WriteRequest> optional) Copy the current immutable object by setting an optional value for thewriteRequestattribute.withWriteRequest(WriteRequest value) Copy the current immutable object by setting a present value for the optionalwriteRequestattribute.
-
Method Details
-
datacenter
- Specified by:
datacenterin classCatalogDeregistration- Returns:
- The value of the
datacenterattribute
-
node
- Specified by:
nodein classCatalogDeregistration- Returns:
- The value of the
nodeattribute
-
checkId
- Specified by:
checkIdin classCatalogDeregistration- Returns:
- The value of the
checkIdattribute
-
serviceId
- Specified by:
serviceIdin classCatalogDeregistration- Returns:
- The value of the
serviceIdattribute
-
writeRequest
- Specified by:
writeRequestin classCatalogDeregistration- Returns:
- The value of the
writeRequestattribute
-
withDatacenter
Copy the current immutable object by setting a present value for the optionaldatacenterattribute.- Parameters:
value- The value for datacenter- Returns:
- A modified copy of
thisobject
-
withDatacenter
Copy the current immutable object by setting an optional value for thedatacenterattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for datacenter- Returns:
- A modified copy of
thisobject
-
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 present value for the optionalcheckIdattribute.- Parameters:
value- The value for checkId- Returns:
- A modified copy of
thisobject
-
withCheckId
Copy the current immutable object by setting an optional value for thecheckIdattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for checkId- 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
-
withWriteRequest
Copy the current immutable object by setting a present value for the optionalwriteRequestattribute.- Parameters:
value- The value for writeRequest- Returns:
- A modified copy of
thisobject
-
withWriteRequest
public final ImmutableCatalogDeregistration withWriteRequest(Optional<? extends WriteRequest> optional) Copy the current immutable object by setting an optional value for thewriteRequestattribute. 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 writeRequest- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableCatalogDeregistrationthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:datacenter,node,checkId,serviceId,writeRequest. -
toString
Prints the immutable valueCatalogDeregistrationwith attribute values. -
copyOf
Creates an immutable copy of aCatalogDeregistrationvalue. 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 CatalogDeregistration instance
-
builder
Creates a builder forImmutableCatalogDeregistration.ImmutableCatalogDeregistration.builder() .datacenter(String) // optionaldatacenter.node(String) // requirednode.checkId(String) // optionalcheckId.serviceId(String) // optionalserviceId.writeRequest(org.kiwiproject.consul.model.catalog.WriteRequest) // optionalwriteRequest.build();- Returns:
- A new ImmutableCatalogDeregistration builder
-