Class ImmutableCatalogService


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

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

    • Method Detail

      • getNode

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

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

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

        public java.lang.String getServiceName()
        Specified by:
        getServiceName in class CatalogService
        Returns:
        The value of the serviceName attribute
      • getServiceId

        public java.lang.String getServiceId()
        Specified by:
        getServiceId in class CatalogService
        Returns:
        The value of the serviceId attribute
      • getServiceAddress

        public java.lang.String getServiceAddress()
        Specified by:
        getServiceAddress in class CatalogService
        Returns:
        The value of the serviceAddress attribute
      • getServiceEnableTagOverride

        public java.util.Optional<java.lang.Boolean> getServiceEnableTagOverride()
        Specified by:
        getServiceEnableTagOverride in class CatalogService
        Returns:
        The value of the serviceEnableTagOverride attribute
      • getServicePort

        public int getServicePort()
        Specified by:
        getServicePort in class CatalogService
        Returns:
        The value of the servicePort attribute
      • getServiceTags

        public com.google.common.collect.ImmutableList<java.lang.String> getServiceTags()
        Specified by:
        getServiceTags in class CatalogService
        Returns:
        The value of the serviceTags attribute
      • getServiceMeta

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

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

        public final ImmutableCatalogService 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 ImmutableCatalogService 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
      • withDatacenter

        public final ImmutableCatalogService 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 ImmutableCatalogService 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
      • withServiceName

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

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

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

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

        public final ImmutableCatalogService withServiceEnableTagOverride​(java.util.Optional<java.lang.Boolean> optional)
        Copy the current immutable object by setting an optional value for the serviceEnableTagOverride 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 serviceEnableTagOverride
        Returns:
        A modified copy of this object
      • withServicePort

        public final ImmutableCatalogService withServicePort​(int value)
        Copy the current immutable object by setting a value for the servicePort attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for servicePort
        Returns:
        A modified copy of the this object
      • withServiceTags

        public final ImmutableCatalogService withServiceTags​(java.lang.String... elements)
        Copy the current immutable object with elements that replace the content of serviceTags.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withServiceTags

        public final ImmutableCatalogService withServiceTags​(java.lang.Iterable<java.lang.String> elements)
        Copy the current immutable object with elements that replace the content of serviceTags. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of serviceTags elements to set
        Returns:
        A modified copy of this object
      • withServiceMeta

        public final ImmutableCatalogService withServiceMeta​(java.util.Map<java.lang.String,​? extends java.lang.String> entries)
        Copy the current immutable object by replacing the serviceMeta 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 serviceMeta map
        Returns:
        A modified copy of this object
      • withServiceWeights

        public final ImmutableCatalogService withServiceWeights​(ServiceWeights value)
        Copy the current immutable object by setting a present value for the optional serviceWeights attribute.
        Parameters:
        value - The value for serviceWeights
        Returns:
        A modified copy of this object
      • withServiceWeights

        public final ImmutableCatalogService withServiceWeights​(java.util.Optional<? extends ServiceWeights> optional)
        Copy the current immutable object by setting an optional value for the serviceWeights 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 serviceWeights
        Returns:
        A modified copy of this object
      • withNodeMeta

        public final ImmutableCatalogService 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
      • equals

        public boolean equals​(@Nullable
                              java.lang.Object another)
        This instance is equal to all instances of ImmutableCatalogService 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: node, address, datacenter, serviceName, serviceId, serviceAddress, serviceEnableTagOverride, servicePort, serviceTags, serviceMeta, serviceWeights, nodeMeta.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

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

        public static ImmutableCatalogService copyOf​(CatalogService instance)
        Creates an immutable copy of a CatalogService 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 CatalogService instance