Class ImmutablePullRequestParameters

    • Method Detail

      • head

        public Optional<String> head()
        Filter pulls by head user and branch name in the format of user:ref-name. Example: github:new-script-format.
        Specified by:
        head in interface PullRequestParameters
      • sort

        public Optional<String> sort()
        What to sort results by. Can be either created, updated, popularity (comment count) or long-running (age, filtering by pulls updated in the last month). Default: created
        Specified by:
        sort in interface PullRequestParameters
      • direction

        public Optional<String> direction()
        The direction of the sort. Can be either asc or desc. Default: desc when sort is created or sort is not specified, otherwise asc.
        Specified by:
        direction in interface PullRequestParameters
      • withState

        public final ImmutablePullRequestParameters 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 ImmutablePullRequestParameters 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
      • withHead

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

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

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

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

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

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

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

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

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutablePullRequestParameters 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: state, head, base, sort, direction.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

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