Class ImmutableCatalogRegistration
java.lang.Object
org.kiwiproject.consul.model.catalog.CatalogRegistration
org.kiwiproject.consul.model.catalog.ImmutableCatalogRegistration
@Generated("org.immutables.processor.ProxyProcessor")
public final class ImmutableCatalogRegistration
extends CatalogRegistration
Immutable implementation of
CatalogRegistration.
Use the builder to create immutable instances:
ImmutableCatalogRegistration.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableCatalogRegistration. -
Method Summary
Modifier and TypeMethodDescriptionaddress()builder()Creates a builder forImmutableCatalogRegistration.check()static ImmutableCatalogRegistrationcopyOf(CatalogRegistration instance) Creates an immutable copy of aCatalogRegistrationvalue.booleanThis instance is equal to all instances ofImmutableCatalogRegistrationthat have equal attribute values.inthashCode()Computes a hash code from attributes:id,datacenter,node,address,nodeMeta,taggedAddresses,service,check,writeRequest,skipNodeUpdate.id()node()nodeMeta()service()toString()Prints the immutable valueCatalogRegistrationwith attribute values.withAddress(String value) Copy the current immutable object by setting a value for theaddressattribute.Copy the current immutable object by setting an optional value for thecheckattribute.Copy the current immutable object by setting a present value for the optionalcheckattribute.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 present value for the optionalidattribute.Copy the current immutable object by setting an optional value for theidattribute.Copy the current immutable object by setting a value for thenodeattribute.withNodeMeta(Map<String, ? extends String> entries) Copy the current immutable object by replacing thenodeMetamap with the specified map.withService(Optional<? extends Service> optional) Copy the current immutable object by setting an optional value for theserviceattribute.withService(Service value) Copy the current immutable object by setting a present value for the optionalserviceattribute.withSkipNodeUpdate(boolean value) Copy the current immutable object by setting a present value for the optionalskipNodeUpdateattribute.withSkipNodeUpdate(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theskipNodeUpdateattribute.withTaggedAddresses(Optional<? extends TaggedAddresses> optional) Copy the current immutable object by setting an optional value for thetaggedAddressesattribute.Copy the current immutable object by setting a present value for the optionaltaggedAddressesattribute.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
-
id
- Specified by:
idin classCatalogRegistration- Returns:
- The value of the
idattribute
-
datacenter
- Specified by:
datacenterin classCatalogRegistration- Returns:
- The value of the
datacenterattribute
-
node
- Specified by:
nodein classCatalogRegistration- Returns:
- The value of the
nodeattribute
-
address
- Specified by:
addressin classCatalogRegistration- Returns:
- The value of the
addressattribute
-
nodeMeta
- Specified by:
nodeMetain classCatalogRegistration- Returns:
- The value of the
nodeMetaattribute
-
taggedAddresses
- Specified by:
taggedAddressesin classCatalogRegistration- Returns:
- The value of the
taggedAddressesattribute
-
service
- Specified by:
servicein classCatalogRegistration- Returns:
- The value of the
serviceattribute
-
check
- Specified by:
checkin classCatalogRegistration- Returns:
- The value of the
checkattribute
-
writeRequest
- Specified by:
writeRequestin classCatalogRegistration- Returns:
- The value of the
writeRequestattribute
-
skipNodeUpdate
- Specified by:
skipNodeUpdatein classCatalogRegistration- Returns:
- The value of the
skipNodeUpdateattribute
-
withId
Copy the current immutable object by setting a present value for the optionalidattribute.- Parameters:
value- The value for id- Returns:
- A modified copy of
thisobject
-
withId
Copy the current immutable object by setting an optional value for theidattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for id- Returns:
- A modified copy of
thisobject
-
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
-
withAddress
Copy the current immutable object by setting a value for theaddressattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for address- Returns:
- A modified copy of the
thisobject
-
withNodeMeta
Copy the current immutable object by replacing thenodeMetamap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the nodeMeta map- Returns:
- A modified copy of
thisobject
-
withTaggedAddresses
Copy the current immutable object by setting a present value for the optionaltaggedAddressesattribute.- Parameters:
value- The value for taggedAddresses- Returns:
- A modified copy of
thisobject
-
withTaggedAddresses
public final ImmutableCatalogRegistration withTaggedAddresses(Optional<? extends TaggedAddresses> optional) Copy the current immutable object by setting an optional value for thetaggedAddressesattribute. 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 taggedAddresses- Returns:
- A modified copy of
thisobject
-
withService
Copy the current immutable object by setting a present value for the optionalserviceattribute.- Parameters:
value- The value for service- Returns:
- A modified copy of
thisobject
-
withService
Copy the current immutable object by setting an optional value for theserviceattribute. 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 service- Returns:
- A modified copy of
thisobject
-
withCheck
Copy the current immutable object by setting a present value for the optionalcheckattribute.- Parameters:
value- The value for check- Returns:
- A modified copy of
thisobject
-
withCheck
Copy the current immutable object by setting an optional value for thecheckattribute. 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 check- 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 ImmutableCatalogRegistration 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
-
withSkipNodeUpdate
Copy the current immutable object by setting a present value for the optionalskipNodeUpdateattribute.- Parameters:
value- The value for skipNodeUpdate- Returns:
- A modified copy of
thisobject
-
withSkipNodeUpdate
Copy the current immutable object by setting an optional value for theskipNodeUpdateattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for skipNodeUpdate- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableCatalogRegistrationthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id,datacenter,node,address,nodeMeta,taggedAddresses,service,check,writeRequest,skipNodeUpdate. -
toString
Prints the immutable valueCatalogRegistrationwith attribute values. -
copyOf
Creates an immutable copy of aCatalogRegistrationvalue. 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 CatalogRegistration instance
-
builder
Creates a builder forImmutableCatalogRegistration.ImmutableCatalogRegistration.builder() .id(String) // optionalid.datacenter(String) // optionaldatacenter.node(String) // requirednode.address(String) // requiredaddress.putNodeMeta|putAllNodeMeta(String => String) //nodeMetamappings .taggedAddresses(org.kiwiproject.consul.model.catalog.TaggedAddresses) // optionaltaggedAddresses.service(org.kiwiproject.consul.model.health.Service) // optionalservice.check(org.kiwiproject.consul.model.agent.Check) // optionalcheck.writeRequest(org.kiwiproject.consul.model.catalog.WriteRequest) // optionalwriteRequest.skipNodeUpdate(Boolean) // optionalskipNodeUpdate.build();- Returns:
- A new ImmutableCatalogRegistration builder
-