Class ImmutableEventOptions

  • All Implemented Interfaces:
    ParamAdder

    @ParametersAreNonnullByDefault
    @Generated("org.immutables.processor.ProxyProcessor")
    @Immutable
    @CheckReturnValue
    public final class ImmutableEventOptions
    extends EventOptions
    Immutable implementation of EventOptions.

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

    • Method Detail

      • toHeaders

        public com.google.common.collect.ImmutableMap<java.lang.String,​java.lang.String> toHeaders()
        Returns:
        The value of the toHeaders attribute
      • getDatacenter

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

        public java.util.Optional<java.lang.String> getNodeFilter()
        Specified by:
        getNodeFilter in class EventOptions
        Returns:
        The value of the nodeFilter attribute
      • getServiceFilter

        public java.util.Optional<java.lang.String> getServiceFilter()
        Specified by:
        getServiceFilter in class EventOptions
        Returns:
        The value of the serviceFilter attribute
      • getTagFilter

        public java.util.Optional<java.lang.String> getTagFilter()
        Specified by:
        getTagFilter in class EventOptions
        Returns:
        The value of the tagFilter attribute
      • withToHeaders

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

        public final ImmutableEventOptions 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 ImmutableEventOptions 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
      • withNodeFilter

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

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

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

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

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

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

        public boolean equals​(@Nullable
                              java.lang.Object another)
        This instance is equal to all instances of ImmutableEventOptions 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: toHeaders, datacenter, nodeFilter, serviceFilter, tagFilter.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        hashCode value
      • toString

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

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