Class ImmutableCatalogRegistration


  • @ParametersAreNonnullByDefault
    @Generated("org.immutables.processor.ProxyProcessor")
    @Immutable
    @CheckReturnValue
    public final class ImmutableCatalogRegistration
    extends CatalogRegistration
    Immutable implementation of CatalogRegistration.

    Use the builder to create immutable instances: ImmutableCatalogRegistration.builder().

    • Method Detail

      • id

        public java.util.Optional<java.lang.String> id()
        Specified by:
        id in class CatalogRegistration
        Returns:
        The value of the id attribute
      • datacenter

        public java.util.Optional<java.lang.String> datacenter()
        Specified by:
        datacenter in class CatalogRegistration
        Returns:
        The value of the datacenter attribute
      • node

        public java.lang.String node()
        Specified by:
        node in class CatalogRegistration
        Returns:
        The value of the node attribute
      • address

        public java.lang.String address()
        Specified by:
        address in class CatalogRegistration
        Returns:
        The value of the address attribute
      • nodeMeta

        public com.google.common.collect.ImmutableMap<java.lang.String,​java.lang.String> nodeMeta()
        Specified by:
        nodeMeta in class CatalogRegistration
        Returns:
        The value of the nodeMeta attribute
      • skipNodeUpdate

        public java.util.Optional<java.lang.Boolean> skipNodeUpdate()
        Specified by:
        skipNodeUpdate in class CatalogRegistration
        Returns:
        The value of the skipNodeUpdate attribute
      • withId

        public final ImmutableCatalogRegistration withId​(java.lang.String value)
        Copy the current immutable object by setting a present value for the optional id attribute.
        Parameters:
        value - The value for id
        Returns:
        A modified copy of this object
      • withId

        public final ImmutableCatalogRegistration withId​(java.util.Optional<java.lang.String> optional)
        Copy the current immutable object by setting an optional value for the id attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for id
        Returns:
        A modified copy of this object
      • withDatacenter

        public final ImmutableCatalogRegistration withDatacenter​(java.lang.String value)
        Copy the current immutable object by setting a present value for the optional datacenter attribute.
        Parameters:
        value - The value for datacenter
        Returns:
        A modified copy of this object
      • withDatacenter

        public final ImmutableCatalogRegistration withDatacenter​(java.util.Optional<java.lang.String> optional)
        Copy the current immutable object by setting an optional value for the datacenter attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for datacenter
        Returns:
        A modified copy of this object
      • withNode

        public final ImmutableCatalogRegistration withNode​(java.lang.String value)
        Copy the current immutable object by setting a value for the node attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for node
        Returns:
        A modified copy of the this object
      • withAddress

        public final ImmutableCatalogRegistration withAddress​(java.lang.String value)
        Copy the current immutable object by setting a value for the address attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for address
        Returns:
        A modified copy of the this object
      • withNodeMeta

        public final ImmutableCatalogRegistration withNodeMeta​(java.util.Map<java.lang.String,​? extends java.lang.String> entries)
        Copy the current immutable object by replacing the nodeMeta map 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 returning this.
        Parameters:
        entries - The entries to be added to the nodeMeta map
        Returns:
        A modified copy of this object
      • withTaggedAddresses

        public final ImmutableCatalogRegistration withTaggedAddresses​(TaggedAddresses value)
        Copy the current immutable object by setting a present value for the optional taggedAddresses attribute.
        Parameters:
        value - The value for taggedAddresses
        Returns:
        A modified copy of this object
      • withTaggedAddresses

        public final ImmutableCatalogRegistration withTaggedAddresses​(java.util.Optional<? extends TaggedAddresses> optional)
        Copy the current immutable object by setting an optional value for the taggedAddresses attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for taggedAddresses
        Returns:
        A modified copy of this object
      • withService

        public final ImmutableCatalogRegistration withService​(Service value)
        Copy the current immutable object by setting a present value for the optional service attribute.
        Parameters:
        value - The value for service
        Returns:
        A modified copy of this object
      • withService

        public final ImmutableCatalogRegistration withService​(java.util.Optional<? extends Service> optional)
        Copy the current immutable object by setting an optional value for the service attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for service
        Returns:
        A modified copy of this object
      • withCheck

        public final ImmutableCatalogRegistration withCheck​(Check value)
        Copy the current immutable object by setting a present value for the optional check attribute.
        Parameters:
        value - The value for check
        Returns:
        A modified copy of this object
      • withCheck

        public final ImmutableCatalogRegistration withCheck​(java.util.Optional<? extends Check> optional)
        Copy the current immutable object by setting an optional value for the check attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for check
        Returns:
        A modified copy of this object
      • withWriteRequest

        public final ImmutableCatalogRegistration withWriteRequest​(WriteRequest value)
        Copy the current immutable object by setting a present value for the optional writeRequest attribute.
        Parameters:
        value - The value for writeRequest
        Returns:
        A modified copy of this object
      • withWriteRequest

        public final ImmutableCatalogRegistration withWriteRequest​(java.util.Optional<? extends WriteRequest> optional)
        Copy the current immutable object by setting an optional value for the writeRequest attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for writeRequest
        Returns:
        A modified copy of this object
      • withSkipNodeUpdate

        public final ImmutableCatalogRegistration withSkipNodeUpdate​(boolean value)
        Copy the current immutable object by setting a present value for the optional skipNodeUpdate attribute.
        Parameters:
        value - The value for skipNodeUpdate
        Returns:
        A modified copy of this object
      • withSkipNodeUpdate

        public final ImmutableCatalogRegistration withSkipNodeUpdate​(java.util.Optional<java.lang.Boolean> optional)
        Copy the current immutable object by setting an optional value for the skipNodeUpdate attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for skipNodeUpdate
        Returns:
        A modified copy of this object
      • equals

        public boolean equals​(@Nullable
                              java.lang.Object another)
        This instance is equal to all instances of ImmutableCatalogRegistration that have equal attribute values.
        Overrides:
        equals in class java.lang.Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: id, datacenter, node, address, nodeMeta, taggedAddresses, service, check, writeRequest, skipNodeUpdate.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

        public java.lang.String toString()
        Prints the immutable value CatalogRegistration with attribute values.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representation of the value
      • copyOf

        public static ImmutableCatalogRegistration copyOf​(CatalogRegistration instance)
        Creates an immutable copy of a CatalogRegistration value. 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 for ImmutableCatalogRegistration.
         ImmutableCatalogRegistration.builder()
            .id(String) // optional id
            .datacenter(String) // optional datacenter
            .node(String) // required node
            .address(String) // required address
            .putNodeMeta|putAllNodeMeta(String => String) // nodeMeta mappings
            .taggedAddresses(com.orbitz.consul.model.catalog.TaggedAddresses) // optional taggedAddresses
            .service(com.orbitz.consul.model.health.Service) // optional service
            .check(com.orbitz.consul.model.agent.Check) // optional check
            .writeRequest(com.orbitz.consul.model.catalog.WriteRequest) // optional writeRequest
            .skipNodeUpdate(Boolean) // optional skipNodeUpdate
            .build();
         
        Returns:
        A new ImmutableCatalogRegistration builder