Class ImmutableMergeParameters


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

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

    • Method Detail

      • sha

        public String sha()
        SHA that pull request head must match to allow merge.
        Specified by:
        sha in class MergeParameters
        Returns:
        the string
      • withSha

        public final ImmutableMergeParameters withSha​(String value)
        Copy the current immutable object by setting a value for the sha attribute. An equals check used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for sha
        Returns:
        A modified copy of the this object
      • withCommitMessage

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

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

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

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

        public final ImmutableMergeParameters withMergeMethod​(MergeMethod value)
        Copy the current immutable object by setting a value for the mergeMethod attribute. A value equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for mergeMethod
        Returns:
        A modified copy of the this object
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableMergeParameters 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: sha, commitMessage, commitTitle, mergeMethod.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

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