Class ImmutableReviewRequests

  • All Implemented Interfaces:
    ReviewRequests

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

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

    • Method Detail

      • users

        @Nullable
        public List<User> users()
        Specified by:
        users in interface ReviewRequests
        Returns:
        The value of the users attribute
      • teams

        @Nullable
        public List<Team> teams()
        Specified by:
        teams in interface ReviewRequests
        Returns:
        The value of the teams attribute
      • withUsers

        public final ImmutableReviewRequests withUsers​(@Nullable
                                                       User... elements)
        Copy the current immutable object with elements that replace the content of users.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withUsers

        public final ImmutableReviewRequests withUsers​(@Nullable
                                                       Iterable<? extends User> elements)
        Copy the current immutable object with elements that replace the content of users. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of users elements to set
        Returns:
        A modified copy of this object
      • withTeams

        public final ImmutableReviewRequests withTeams​(@Nullable
                                                       Team... elements)
        Copy the current immutable object with elements that replace the content of teams.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withTeams

        public final ImmutableReviewRequests withTeams​(@Nullable
                                                       Iterable<? extends Team> elements)
        Copy the current immutable object with elements that replace the content of teams. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of teams elements to set
        Returns:
        A modified copy of this object
      • equals

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

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

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

        public static ImmutableReviewRequests.Builder builder()
        Creates a builder for ImmutableReviewRequests.
         ImmutableReviewRequests.builder()
            .users(List&lt;com.spotify.github.v3.User&gt; | null) // nullable users
            .teams(List&lt;com.spotify.github.v3.Team&gt; | null) // nullable teams
            .build();
         
        Returns:
        A new ImmutableReviewRequests builder