Package com.orbitz.consul.model.catalog
Class ImmutableCatalogRegistration
- java.lang.Object
-
- com.orbitz.consul.model.catalog.CatalogRegistration
-
- com.orbitz.consul.model.catalog.ImmutableCatalogRegistration
-
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableCatalogRegistration extends CatalogRegistrationImmutable implementation ofCatalogRegistration.Use the builder to create immutable instances:
ImmutableCatalogRegistration.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableCatalogRegistration.BuilderBuilds instances of typeImmutableCatalogRegistration.
-
Method Summary
Modifier and Type Method Description java.lang.Stringaddress()static ImmutableCatalogRegistration.Builderbuilder()Creates a builder forImmutableCatalogRegistration.java.util.Optional<Check>check()static ImmutableCatalogRegistrationcopyOf(CatalogRegistration instance)Creates an immutable copy of aCatalogRegistrationvalue.java.util.Optional<java.lang.String>datacenter()booleanequals(java.lang.Object another)This 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.java.util.Optional<java.lang.String>id()java.lang.Stringnode()com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String>nodeMeta()java.util.Optional<Service>service()java.util.Optional<java.lang.Boolean>skipNodeUpdate()java.util.Optional<TaggedAddresses>taggedAddresses()java.lang.StringtoString()Prints the immutable valueCatalogRegistrationwith attribute values.ImmutableCatalogRegistrationwithAddress(java.lang.String value)Copy the current immutable object by setting a value for theaddressattribute.ImmutableCatalogRegistrationwithCheck(Check value)Copy the current immutable object by setting a present value for the optionalcheckattribute.ImmutableCatalogRegistrationwithCheck(java.util.Optional<? extends Check> optional)Copy the current immutable object by setting an optional value for thecheckattribute.ImmutableCatalogRegistrationwithDatacenter(java.lang.String value)Copy the current immutable object by setting a present value for the optionaldatacenterattribute.ImmutableCatalogRegistrationwithDatacenter(java.util.Optional<java.lang.String> optional)Copy the current immutable object by setting an optional value for thedatacenterattribute.ImmutableCatalogRegistrationwithId(java.lang.String value)Copy the current immutable object by setting a present value for the optionalidattribute.ImmutableCatalogRegistrationwithId(java.util.Optional<java.lang.String> optional)Copy the current immutable object by setting an optional value for theidattribute.ImmutableCatalogRegistrationwithNode(java.lang.String value)Copy the current immutable object by setting a value for thenodeattribute.ImmutableCatalogRegistrationwithNodeMeta(java.util.Map<java.lang.String,? extends java.lang.String> entries)Copy the current immutable object by replacing thenodeMetamap with the specified map.ImmutableCatalogRegistrationwithService(Service value)Copy the current immutable object by setting a present value for the optionalserviceattribute.ImmutableCatalogRegistrationwithService(java.util.Optional<? extends Service> optional)Copy the current immutable object by setting an optional value for theserviceattribute.ImmutableCatalogRegistrationwithSkipNodeUpdate(boolean value)Copy the current immutable object by setting a present value for the optionalskipNodeUpdateattribute.ImmutableCatalogRegistrationwithSkipNodeUpdate(java.util.Optional<java.lang.Boolean> optional)Copy the current immutable object by setting an optional value for theskipNodeUpdateattribute.ImmutableCatalogRegistrationwithTaggedAddresses(TaggedAddresses value)Copy the current immutable object by setting a present value for the optionaltaggedAddressesattribute.ImmutableCatalogRegistrationwithTaggedAddresses(java.util.Optional<? extends TaggedAddresses> optional)Copy the current immutable object by setting an optional value for thetaggedAddressesattribute.ImmutableCatalogRegistrationwithWriteRequest(WriteRequest value)Copy the current immutable object by setting a present value for the optionalwriteRequestattribute.ImmutableCatalogRegistrationwithWriteRequest(java.util.Optional<? extends WriteRequest> optional)Copy the current immutable object by setting an optional value for thewriteRequestattribute.java.util.Optional<WriteRequest>writeRequest()
-
-
-
Method Detail
-
id
public java.util.Optional<java.lang.String> id()
- Specified by:
idin classCatalogRegistration- Returns:
- The value of the
idattribute
-
datacenter
public java.util.Optional<java.lang.String> datacenter()
- Specified by:
datacenterin classCatalogRegistration- Returns:
- The value of the
datacenterattribute
-
node
public java.lang.String node()
- Specified by:
nodein classCatalogRegistration- Returns:
- The value of the
nodeattribute
-
address
public java.lang.String address()
- Specified by:
addressin classCatalogRegistration- Returns:
- The value of the
addressattribute
-
nodeMeta
public com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> nodeMeta()
- Specified by:
nodeMetain classCatalogRegistration- Returns:
- The value of the
nodeMetaattribute
-
taggedAddresses
public java.util.Optional<TaggedAddresses> taggedAddresses()
- Specified by:
taggedAddressesin classCatalogRegistration- Returns:
- The value of the
taggedAddressesattribute
-
service
public java.util.Optional<Service> service()
- Specified by:
servicein classCatalogRegistration- Returns:
- The value of the
serviceattribute
-
check
public java.util.Optional<Check> check()
- Specified by:
checkin classCatalogRegistration- Returns:
- The value of the
checkattribute
-
writeRequest
public java.util.Optional<WriteRequest> writeRequest()
- Specified by:
writeRequestin classCatalogRegistration- Returns:
- The value of the
writeRequestattribute
-
skipNodeUpdate
public java.util.Optional<java.lang.Boolean> skipNodeUpdate()
- Specified by:
skipNodeUpdatein classCatalogRegistration- Returns:
- The value of the
skipNodeUpdateattribute
-
withId
public final ImmutableCatalogRegistration withId(java.lang.String value)
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
public final ImmutableCatalogRegistration withId(java.util.Optional<java.lang.String> optional)
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
public final ImmutableCatalogRegistration withDatacenter(java.lang.String value)
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
public final ImmutableCatalogRegistration withDatacenter(java.util.Optional<java.lang.String> optional)
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
public final ImmutableCatalogRegistration 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
-
withAddress
public final ImmutableCatalogRegistration withAddress(java.lang.String value)
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
public final ImmutableCatalogRegistration withNodeMeta(java.util.Map<java.lang.String,? extends java.lang.String> entries)
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
public final ImmutableCatalogRegistration withTaggedAddresses(TaggedAddresses value)
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(java.util.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
public final ImmutableCatalogRegistration withService(Service value)
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
public final ImmutableCatalogRegistration withService(java.util.Optional<? extends Service> optional)
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
public final ImmutableCatalogRegistration withCheck(Check value)
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
public final ImmutableCatalogRegistration withCheck(java.util.Optional<? extends Check> optional)
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
public final ImmutableCatalogRegistration withWriteRequest(WriteRequest value)
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(java.util.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
public final ImmutableCatalogRegistration withSkipNodeUpdate(boolean value)
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
public final ImmutableCatalogRegistration withSkipNodeUpdate(java.util.Optional<java.lang.Boolean> optional)
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
public boolean equals(@Nullable java.lang.Object another)This instance is equal to all instances ofImmutableCatalogRegistrationthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:id,datacenter,node,address,nodeMeta,taggedAddresses,service,check,writeRequest,skipNodeUpdate.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueCatalogRegistrationwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static ImmutableCatalogRegistration copyOf(CatalogRegistration instance)
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
public static ImmutableCatalogRegistration.Builder 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(com.orbitz.consul.model.catalog.TaggedAddresses) // optionaltaggedAddresses.service(com.orbitz.consul.model.health.Service) // optionalservice.check(com.orbitz.consul.model.agent.Check) // optionalcheck.writeRequest(com.orbitz.consul.model.catalog.WriteRequest) // optionalwriteRequest.skipNodeUpdate(Boolean) // optionalskipNodeUpdate.build();- Returns:
- A new ImmutableCatalogRegistration builder
-
-