Package com.spotify.github.v3.prs
Class ImmutablePullRequestLinks.Builder
- java.lang.Object
-
- com.spotify.github.v3.prs.ImmutablePullRequestLinks.Builder
-
- Enclosing class:
- ImmutablePullRequestLinks
@NotThreadSafe public static final class ImmutablePullRequestLinks.Builder extends Object
Builds instances of typeImmutablePullRequestLinks
. Initialize attributes and then invoke thebuild()
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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutablePullRequestLinks
build()
Builds a newImmutablePullRequestLinks
.ImmutablePullRequestLinks.Builder
comments(Links.Href<URI> comments)
Initializes the value for thecomments
attribute.ImmutablePullRequestLinks.Builder
commits(Links.Href<URI> commits)
Initializes the value for thecommits
attribute.ImmutablePullRequestLinks.Builder
from(Links instance)
Fill a builder with attribute values from the providedcom.spotify.github.Links
instance.ImmutablePullRequestLinks.Builder
from(PullRequestLinks instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.prs.PullRequestLinks
instance.ImmutablePullRequestLinks.Builder
html(Links.Href<URI> html)
Initializes the value for thehtml
attribute.ImmutablePullRequestLinks.Builder
issue(Links.Href<URI> issue)
Initializes the value for theissue
attribute.ImmutablePullRequestLinks.Builder
reviewComment(Links.Href<String> reviewComment)
Initializes the value for thereviewComment
attribute.ImmutablePullRequestLinks.Builder
reviewComments(Links.Href<URI> reviewComments)
Initializes the value for thereviewComments
attribute.ImmutablePullRequestLinks.Builder
self(Links.Href<URI> self)
Initializes the value for theself
attribute.ImmutablePullRequestLinks.Builder
statuses(Links.Href<URI> statuses)
Initializes the value for thestatuses
attribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutablePullRequestLinks.Builder from(Links instance)
Fill a builder with attribute values from the providedcom.spotify.github.Links
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutablePullRequestLinks.Builder from(PullRequestLinks instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.prs.PullRequestLinks
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
self
@CanIgnoreReturnValue public final ImmutablePullRequestLinks.Builder self(@Nullable Links.Href<URI> self)
Initializes the value for theself
attribute.- Parameters:
self
- The value for self (can benull
)- Returns:
this
builder for use in a chained invocation
-
html
@CanIgnoreReturnValue public final ImmutablePullRequestLinks.Builder html(@Nullable Links.Href<URI> html)
Initializes the value for thehtml
attribute.- Parameters:
html
- The value for html (can benull
)- Returns:
this
builder for use in a chained invocation
-
issue
@CanIgnoreReturnValue public final ImmutablePullRequestLinks.Builder issue(@Nullable Links.Href<URI> issue)
Initializes the value for theissue
attribute.- Parameters:
issue
- The value for issue (can benull
)- Returns:
this
builder for use in a chained invocation
-
comments
@CanIgnoreReturnValue public final ImmutablePullRequestLinks.Builder comments(@Nullable Links.Href<URI> comments)
Initializes the value for thecomments
attribute.- Parameters:
comments
- The value for comments (can benull
)- Returns:
this
builder for use in a chained invocation
-
reviewComment
@CanIgnoreReturnValue public final ImmutablePullRequestLinks.Builder reviewComment(@Nullable Links.Href<String> reviewComment)
Initializes the value for thereviewComment
attribute.- Parameters:
reviewComment
- The value for reviewComment (can benull
)- Returns:
this
builder for use in a chained invocation
-
reviewComments
@CanIgnoreReturnValue public final ImmutablePullRequestLinks.Builder reviewComments(@Nullable Links.Href<URI> reviewComments)
Initializes the value for thereviewComments
attribute.- Parameters:
reviewComments
- The value for reviewComments (can benull
)- Returns:
this
builder for use in a chained invocation
-
commits
@CanIgnoreReturnValue public final ImmutablePullRequestLinks.Builder commits(@Nullable Links.Href<URI> commits)
Initializes the value for thecommits
attribute.- Parameters:
commits
- The value for commits (can benull
)- Returns:
this
builder for use in a chained invocation
-
statuses
@CanIgnoreReturnValue public final ImmutablePullRequestLinks.Builder statuses(@Nullable Links.Href<URI> statuses)
Initializes the value for thestatuses
attribute.- Parameters:
statuses
- The value for statuses (can benull
)- Returns:
this
builder for use in a chained invocation
-
build
public ImmutablePullRequestLinks build()
Builds a newImmutablePullRequestLinks
.- Returns:
- An immutable instance of PullRequestLinks
- Throws:
IllegalStateException
- if any required attributes are missing
-
-