Class ImmutablePullRequest

  • All Implemented Interfaces:
    PullRequest

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

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

    • Method Detail

      • withUrl

        public final ImmutablePullRequest withUrl​(@Nullable
                                                  URI value)
        Copy the current immutable object by setting a value for the url attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for url (can be null)
        Returns:
        A modified copy of the this object
      • withHtmlUrl

        public final ImmutablePullRequest withHtmlUrl​(@Nullable
                                                      URI value)
        Copy the current immutable object by setting a value for the htmlUrl attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for htmlUrl (can be null)
        Returns:
        A modified copy of the this object
      • withDiffUrl

        public final ImmutablePullRequest withDiffUrl​(@Nullable
                                                      URI value)
        Copy the current immutable object by setting a value for the diffUrl attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for diffUrl (can be null)
        Returns:
        A modified copy of the this object
      • withPatchUrl

        public final ImmutablePullRequest withPatchUrl​(@Nullable
                                                       URI value)
        Copy the current immutable object by setting a value for the patchUrl attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for patchUrl (can be null)
        Returns:
        A modified copy of the this object
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutablePullRequest 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: url, htmlUrl, diffUrl, patchUrl.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

        public static ImmutablePullRequest copyOf​(PullRequest instance)
        Creates an immutable copy of a PullRequest 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 PullRequest instance
      • builder

        public static ImmutablePullRequest.Builder builder()
        Creates a builder for ImmutablePullRequest.
         ImmutablePullRequest.builder()
            .url(java.net.URI | null) // nullable url
            .htmlUrl(java.net.URI | null) // nullable htmlUrl
            .diffUrl(java.net.URI | null) // nullable diffUrl
            .patchUrl(java.net.URI | null) // nullable patchUrl
            .build();
         
        Returns:
        A new ImmutablePullRequest builder