Class ImmutableServiceQuery


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

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

    • Method Detail

      • getService

        public java.lang.String getService()
        Specified by:
        getService in class ServiceQuery
        Returns:
        The value of the service attribute
      • getOnlyPassing

        public java.util.Optional<java.lang.Boolean> getOnlyPassing()
        Specified by:
        getOnlyPassing in class ServiceQuery
        Returns:
        The value of the onlyPassing attribute
      • getTags

        public java.util.Optional<java.util.List<java.lang.String>> getTags()
        Specified by:
        getTags in class ServiceQuery
        Returns:
        The value of the tags attribute
      • getFailover

        public java.util.Optional<Failover> getFailover()
        Specified by:
        getFailover in class ServiceQuery
        Returns:
        The value of the failover attribute
      • withService

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

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

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

        public final ImmutableServiceQuery withTags​(java.util.List<java.lang.String> value)
        Copy the current immutable object by setting a present value for the optional tags attribute.
        Parameters:
        value - The value for tags
        Returns:
        A modified copy of this object
      • withTags

        public final ImmutableServiceQuery withTags​(java.util.Optional<? extends java.util.List<java.lang.String>> optional)
        Copy the current immutable object by setting an optional value for the tags 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 tags
        Returns:
        A modified copy of this object
      • withFailover

        public final ImmutableServiceQuery withFailover​(Failover value)
        Copy the current immutable object by setting a present value for the optional failover attribute.
        Parameters:
        value - The value for failover
        Returns:
        A modified copy of this object
      • withFailover

        public final ImmutableServiceQuery withFailover​(java.util.Optional<? extends Failover> optional)
        Copy the current immutable object by setting an optional value for the failover 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 failover
        Returns:
        A modified copy of this object
      • equals

        public boolean equals​(@Nullable
                              java.lang.Object another)
        This instance is equal to all instances of ImmutableServiceQuery 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: service, onlyPassing, tags, failover.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

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

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