Class ImmutableReview.Builder

  • Enclosing class:
    ImmutableReview

    @NotThreadSafe
    public static final class ImmutableReview.Builder
    extends Object
    Builds instances of type ImmutableReview. Initialize attributes and then invoke the build() method to create an immutable instance.

    Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

    • Method Detail

      • from

        @CanIgnoreReturnValue
        public final ImmutableReview.Builder from​(Review instance)
        Fill a builder with attribute values from the provided Review instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • id

        @CanIgnoreReturnValue
        public final ImmutableReview.Builder id​(@Nullable
                                                Integer id)
        Initializes the value for the id attribute.
        Parameters:
        id - The value for id (can be null)
        Returns:
        this builder for use in a chained invocation
      • user

        @CanIgnoreReturnValue
        public final ImmutableReview.Builder user​(@Nullable
                                                  User user)
        Initializes the value for the user attribute.
        Parameters:
        user - The value for user (can be null)
        Returns:
        this builder for use in a chained invocation
      • body

        @CanIgnoreReturnValue
        public final ImmutableReview.Builder body​(@Nullable
                                                  Optional<String> body)
        Initializes the value for the body attribute.
        Parameters:
        body - The value for body (can be null)
        Returns:
        this builder for use in a chained invocation
      • submittedAt

        @CanIgnoreReturnValue
        public final ImmutableReview.Builder submittedAt​(GitHubInstant submittedAt)
        Initializes the optional value submittedAt to submittedAt.
        Parameters:
        submittedAt - The value for submittedAt
        Returns:
        this builder for chained invocation
      • submittedAt

        @CanIgnoreReturnValue
        public final ImmutableReview.Builder submittedAt​(Optional<? extends GitHubInstant> submittedAt)
        Initializes the optional value submittedAt to submittedAt.
        Parameters:
        submittedAt - The value for submittedAt
        Returns:
        this builder for use in a chained invocation
      • state

        @CanIgnoreReturnValue
        public final ImmutableReview.Builder state​(@Nullable
                                                   String state)
        Initializes the value for the state attribute.
        Parameters:
        state - The value for state (can be null)
        Returns:
        this builder for use in a chained invocation
      • htmlUrl

        @CanIgnoreReturnValue
        public final ImmutableReview.Builder htmlUrl​(@Nullable
                                                     URI htmlUrl)
        Initializes the value for the htmlUrl attribute.
        Parameters:
        htmlUrl - The value for htmlUrl (can be null)
        Returns:
        this builder for use in a chained invocation
      • pullRequestUrl

        @CanIgnoreReturnValue
        public final ImmutableReview.Builder pullRequestUrl​(@Nullable
                                                            URI pullRequestUrl)
        Initializes the value for the pullRequestUrl attribute.
        Parameters:
        pullRequestUrl - The value for pullRequestUrl (can be null)
        Returns:
        this builder for use in a chained invocation
      • links

        @CanIgnoreReturnValue
        public final ImmutableReview.Builder links​(@Nullable
                                                   ReviewLinks links)
        Initializes the value for the links attribute.
        Parameters:
        links - The value for links (can be null)
        Returns:
        this builder for use in a chained invocation
      • commitId

        @CanIgnoreReturnValue
        public final ImmutableReview.Builder commitId​(@Nullable
                                                      String commitId)
        Initializes the value for the commitId attribute.
        Parameters:
        commitId - The value for commitId (can be null)
        Returns:
        this builder for use in a chained invocation