Class ImmutablePullRequestUpdate

  • All Implemented Interfaces:
    PullRequestUpdate

    @ParametersAreNonnullByDefault
    @Generated("org.immutables.processor.ProxyProcessor")
    @Immutable
    @CheckReturnValue
    public final class ImmutablePullRequestUpdate
    extends Object
    implements PullRequestUpdate
    Immutable implementation of PullRequestUpdate.

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

    • Method Detail

      • withTitle

        public final ImmutablePullRequestUpdate withTitle​(String value)
        Copy the current immutable object by setting a present value for the optional title attribute.
        Parameters:
        value - The value for title
        Returns:
        A modified copy of this object
      • withTitle

        public final ImmutablePullRequestUpdate withTitle​(Optional<String> optional)
        Copy the current immutable object by setting an optional value for the title 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 title
        Returns:
        A modified copy of this object
      • withBody

        public final ImmutablePullRequestUpdate withBody​(String value)
        Copy the current immutable object by setting a present value for the optional body attribute.
        Parameters:
        value - The value for body
        Returns:
        A modified copy of this object
      • withBody

        public final ImmutablePullRequestUpdate withBody​(Optional<String> optional)
        Copy the current immutable object by setting an optional value for the body 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 body
        Returns:
        A modified copy of this object
      • withState

        public final ImmutablePullRequestUpdate withState​(String value)
        Copy the current immutable object by setting a present value for the optional state attribute.
        Parameters:
        value - The value for state
        Returns:
        A modified copy of this object
      • withState

        public final ImmutablePullRequestUpdate withState​(Optional<String> optional)
        Copy the current immutable object by setting an optional value for the state 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 state
        Returns:
        A modified copy of this object
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutablePullRequestUpdate that have equal attribute values.
        Overrides:
        equals in class Object
        Returns:
        true if this is equal to another instance
      • hashCode

        public int hashCode()
        Computes a hash code from attributes: title, body, state.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

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