Class ImmutableHealthCheck


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

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

    • Method Detail

      • getNode

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

        public java.lang.String getCheckId()
        Specified by:
        getCheckId in class HealthCheck
        Returns:
        The value of the checkId attribute
      • getName

        public java.lang.String getName()
        Specified by:
        getName in class HealthCheck
        Returns:
        The value of the name attribute
      • getStatus

        public java.lang.String getStatus()
        Specified by:
        getStatus in class HealthCheck
        Returns:
        The value of the status attribute
      • getNotes

        public java.util.Optional<java.lang.String> getNotes()
        Specified by:
        getNotes in class HealthCheck
        Returns:
        The value of the notes attribute
      • getOutput

        public java.util.Optional<java.lang.String> getOutput()
        Specified by:
        getOutput in class HealthCheck
        Returns:
        The value of the output attribute
      • getServiceId

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

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

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

        public final ImmutableHealthCheck 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
      • withCheckId

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

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

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

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

        public final ImmutableHealthCheck withNotes​(java.util.Optional<java.lang.String> optional)
        Copy the current immutable object by setting an optional value for the notes 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 notes
        Returns:
        A modified copy of this object
      • withOutput

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

        public final ImmutableHealthCheck withOutput​(java.util.Optional<java.lang.String> optional)
        Copy the current immutable object by setting an optional value for the output 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 output
        Returns:
        A modified copy of this object
      • withServiceId

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

        public final ImmutableHealthCheck withServiceId​(java.util.Optional<java.lang.String> optional)
        Copy the current immutable object by setting an optional value for the serviceId 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 serviceId
        Returns:
        A modified copy of this object
      • withServiceName

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

        public final ImmutableHealthCheck withServiceName​(java.util.Optional<java.lang.String> optional)
        Copy the current immutable object by setting an optional value for the serviceName 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 serviceName
        Returns:
        A modified copy of this object
      • withServiceTags

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

        public boolean equals​(@Nullable
                              java.lang.Object another)
        This instance is equal to all instances of ImmutableHealthCheck 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, checkId, name, status, notes, output, serviceId, serviceName, serviceTags.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

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

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