Class ImmutableEvent


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

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

    • Method Detail

      • getId

        public java.lang.String getId()
        Specified by:
        getId in class Event
        Returns:
        The value of the id attribute
      • getName

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

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

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

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

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

        public int getVersion()
        Specified by:
        getVersion in class Event
        Returns:
        The value of the version attribute
      • getLTime

        public java.lang.Long getLTime()
        Specified by:
        getLTime in class Event
        Returns:
        The value of the lTime attribute
      • withId

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

        public final ImmutableEvent 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
      • withPayload

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

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

        public final ImmutableEvent 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 ImmutableEvent 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 ImmutableEvent 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 ImmutableEvent 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 ImmutableEvent 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 ImmutableEvent 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
      • withVersion

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

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

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

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

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