Package com.spotify.github.v3.search
Class ImmutableSearchIssue.Builder
- java.lang.Object
-
- com.spotify.github.v3.search.ImmutableSearchIssue.Builder
-
- Enclosing class:
- ImmutableSearchIssue
@NotThreadSafe public static final class ImmutableSearchIssue.Builder extends Object
Builds instances of typeImmutableSearchIssue. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis 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 ImmutableSearchIssue.BuilderaddAllLabels(Iterable<? extends Label> elements)Adds elements tolabelslist.ImmutableSearchIssue.BuilderaddLabels(Label element)Adds one element tolabelslist.ImmutableSearchIssue.BuilderaddLabels(Label... elements)Adds elements tolabelslist.ImmutableSearchIssue.Builderassignee(User assignee)Initializes the optional valueassigneeto assignee.ImmutableSearchIssue.Builderassignee(Optional<? extends User> assignee)Initializes the optional valueassigneeto assignee.ImmutableSearchIssue.Builderbody(String body)Initializes the optional valuebodyto body.ImmutableSearchIssue.Builderbody(Optional<String> body)Initializes the optional valuebodyto body.ImmutableSearchIssuebuild()Builds a newImmutableSearchIssue.ImmutableSearchIssue.BuilderclosedAt(GitHubInstant closedAt)Initializes the optional valueclosedAtto closedAt.ImmutableSearchIssue.BuilderclosedAt(Optional<? extends GitHubInstant> closedAt)Initializes the optional valueclosedAtto closedAt.ImmutableSearchIssue.Buildercomments(Integer comments)Initializes the value for thecommentsattribute.ImmutableSearchIssue.BuildercommentsUrl(URI commentsUrl)Initializes the value for thecommentsUrlattribute.ImmutableSearchIssue.BuildercreatedAt(GitHubInstant createdAt)Initializes the value for thecreatedAtattribute.ImmutableSearchIssue.BuildereventsUrl(URI eventsUrl)Initializes the optional valueeventsUrlto eventsUrl.ImmutableSearchIssue.BuildereventsUrl(Optional<? extends URI> eventsUrl)Initializes the optional valueeventsUrlto eventsUrl.ImmutableSearchIssue.Builderfrom(CloseTracking instance)Fill a builder with attribute values from the providedcom.spotify.github.CloseTrackinginstance.ImmutableSearchIssue.Builderfrom(UpdateTracking instance)Fill a builder with attribute values from the providedcom.spotify.github.UpdateTrackinginstance.ImmutableSearchIssue.Builderfrom(Issue instance)Fill a builder with attribute values from the providedcom.spotify.github.v3.issues.Issueinstance.ImmutableSearchIssue.Builderfrom(SearchIssue instance)Fill a builder with attribute values from the providedcom.spotify.github.v3.search.SearchIssueinstance.ImmutableSearchIssue.BuilderhtmlUrl(URI htmlUrl)Initializes the value for thehtmlUrlattribute.ImmutableSearchIssue.Builderid(Long id)Initializes the value for theidattribute.ImmutableSearchIssue.Builderlabels(Iterable<? extends Label> elements)Sets or replaces all elements forlabelslist.ImmutableSearchIssue.BuilderlabelsUrl(String labelsUrl)Initializes the value for thelabelsUrlattribute.ImmutableSearchIssue.Builderlocked(Boolean locked)Initializes the value for thelockedattribute.ImmutableSearchIssue.Buildermilestone(Milestone milestone)Initializes the optional valuemilestoneto milestone.ImmutableSearchIssue.Buildermilestone(Optional<? extends Milestone> milestone)Initializes the optional valuemilestoneto milestone.ImmutableSearchIssue.Buildernumber(Integer number)Initializes the value for thenumberattribute.ImmutableSearchIssue.BuilderpullRequest(PullRequest pullRequest)Initializes the optional valuepullRequestto pullRequest.ImmutableSearchIssue.BuilderpullRequest(Optional<? extends PullRequest> pullRequest)Initializes the optional valuepullRequestto pullRequest.ImmutableSearchIssue.BuilderrepositoryUrl(URI repositoryUrl)Initializes the optional valuerepositoryUrlto repositoryUrl.ImmutableSearchIssue.BuilderrepositoryUrl(Optional<? extends URI> repositoryUrl)Initializes the optional valuerepositoryUrlto repositoryUrl.ImmutableSearchIssue.Builderscore(Float score)Initializes the value for thescoreattribute.ImmutableSearchIssue.Builderstate(String state)Initializes the value for thestateattribute.ImmutableSearchIssue.Buildertitle(String title)Initializes the value for thetitleattribute.ImmutableSearchIssue.BuilderupdatedAt(GitHubInstant updatedAt)Initializes the value for theupdatedAtattribute.ImmutableSearchIssue.Builderurl(URI url)Initializes the value for theurlattribute.ImmutableSearchIssue.Builderuser(User user)Initializes the value for theuserattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder from(SearchIssue instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.search.SearchIssueinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder from(CloseTracking instance)
Fill a builder with attribute values from the providedcom.spotify.github.CloseTrackinginstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder from(Issue instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.issues.Issueinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder from(UpdateTracking instance)
Fill a builder with attribute values from the providedcom.spotify.github.UpdateTrackinginstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
createdAt
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder createdAt(@Nullable GitHubInstant createdAt)
Initializes the value for thecreatedAtattribute.- Parameters:
createdAt- The value for createdAt (can benull)- Returns:
thisbuilder for use in a chained invocation
-
updatedAt
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder updatedAt(@Nullable GitHubInstant updatedAt)
Initializes the value for theupdatedAtattribute.- Parameters:
updatedAt- The value for updatedAt (can benull)- Returns:
thisbuilder for use in a chained invocation
-
closedAt
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder closedAt(GitHubInstant closedAt)
Initializes the optional valueclosedAtto closedAt.- Parameters:
closedAt- The value for closedAt- Returns:
thisbuilder for chained invocation
-
closedAt
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder closedAt(Optional<? extends GitHubInstant> closedAt)
Initializes the optional valueclosedAtto closedAt.- Parameters:
closedAt- The value for closedAt- Returns:
thisbuilder for use in a chained invocation
-
id
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder id(@Nullable Long id)
Initializes the value for theidattribute.- Parameters:
id- The value for id (can benull)- Returns:
thisbuilder for use in a chained invocation
-
url
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder url(@Nullable URI url)
Initializes the value for theurlattribute.- Parameters:
url- The value for url (can benull)- Returns:
thisbuilder for use in a chained invocation
-
eventsUrl
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder eventsUrl(URI eventsUrl)
Initializes the optional valueeventsUrlto eventsUrl.- Parameters:
eventsUrl- The value for eventsUrl- Returns:
thisbuilder for chained invocation
-
eventsUrl
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder eventsUrl(Optional<? extends URI> eventsUrl)
Initializes the optional valueeventsUrlto eventsUrl.- Parameters:
eventsUrl- The value for eventsUrl- Returns:
thisbuilder for use in a chained invocation
-
repositoryUrl
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder repositoryUrl(URI repositoryUrl)
Initializes the optional valuerepositoryUrlto repositoryUrl.- Parameters:
repositoryUrl- The value for repositoryUrl- Returns:
thisbuilder for chained invocation
-
repositoryUrl
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder repositoryUrl(Optional<? extends URI> repositoryUrl)
Initializes the optional valuerepositoryUrlto repositoryUrl.- Parameters:
repositoryUrl- The value for repositoryUrl- Returns:
thisbuilder for use in a chained invocation
-
labelsUrl
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder labelsUrl(@Nullable String labelsUrl)
Initializes the value for thelabelsUrlattribute.- Parameters:
labelsUrl- The value for labelsUrl (can benull)- Returns:
thisbuilder for use in a chained invocation
-
commentsUrl
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder commentsUrl(@Nullable URI commentsUrl)
Initializes the value for thecommentsUrlattribute.- Parameters:
commentsUrl- The value for commentsUrl (can benull)- Returns:
thisbuilder for use in a chained invocation
-
htmlUrl
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder htmlUrl(@Nullable URI htmlUrl)
Initializes the value for thehtmlUrlattribute.- Parameters:
htmlUrl- The value for htmlUrl (can benull)- Returns:
thisbuilder for use in a chained invocation
-
number
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder number(@Nullable Integer number)
Initializes the value for thenumberattribute.- Parameters:
number- The value for number (can benull)- Returns:
thisbuilder for use in a chained invocation
-
state
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder state(@Nullable String state)
Initializes the value for thestateattribute.- Parameters:
state- The value for state (can benull)- Returns:
thisbuilder for use in a chained invocation
-
title
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder title(@Nullable String title)
Initializes the value for thetitleattribute.- Parameters:
title- The value for title (can benull)- Returns:
thisbuilder for use in a chained invocation
-
body
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder body(String body)
Initializes the optional valuebodyto body.- Parameters:
body- The value for body- Returns:
thisbuilder for chained invocation
-
body
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder body(Optional<String> body)
Initializes the optional valuebodyto body.- Parameters:
body- The value for body- Returns:
thisbuilder for use in a chained invocation
-
user
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder user(@Nullable User user)
Initializes the value for theuserattribute.- Parameters:
user- The value for user (can benull)- Returns:
thisbuilder for use in a chained invocation
-
addLabels
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder addLabels(Label element)
Adds one element tolabelslist.- Parameters:
element- A labels element- Returns:
thisbuilder for use in a chained invocation
-
addLabels
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder addLabels(Label... elements)
Adds elements tolabelslist.- Parameters:
elements- An array of labels elements- Returns:
thisbuilder for use in a chained invocation
-
labels
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder labels(@Nullable Iterable<? extends Label> elements)
Sets or replaces all elements forlabelslist.- Parameters:
elements- An iterable of labels elements- Returns:
thisbuilder for use in a chained invocation
-
addAllLabels
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder addAllLabels(Iterable<? extends Label> elements)
Adds elements tolabelslist.- Parameters:
elements- An iterable of labels elements- Returns:
thisbuilder for use in a chained invocation
-
assignee
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder assignee(User assignee)
Initializes the optional valueassigneeto assignee.- Parameters:
assignee- The value for assignee- Returns:
thisbuilder for chained invocation
-
assignee
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder assignee(Optional<? extends User> assignee)
Initializes the optional valueassigneeto assignee.- Parameters:
assignee- The value for assignee- Returns:
thisbuilder for use in a chained invocation
-
milestone
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder milestone(Milestone milestone)
Initializes the optional valuemilestoneto milestone.- Parameters:
milestone- The value for milestone- Returns:
thisbuilder for chained invocation
-
milestone
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder milestone(Optional<? extends Milestone> milestone)
Initializes the optional valuemilestoneto milestone.- Parameters:
milestone- The value for milestone- Returns:
thisbuilder for use in a chained invocation
-
locked
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder locked(@Nullable Boolean locked)
Initializes the value for thelockedattribute.- Parameters:
locked- The value for locked (can benull)- Returns:
thisbuilder for use in a chained invocation
-
comments
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder comments(@Nullable Integer comments)
Initializes the value for thecommentsattribute.- Parameters:
comments- The value for comments (can benull)- Returns:
thisbuilder for use in a chained invocation
-
pullRequest
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder pullRequest(PullRequest pullRequest)
Initializes the optional valuepullRequestto pullRequest.- Parameters:
pullRequest- The value for pullRequest- Returns:
thisbuilder for chained invocation
-
pullRequest
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder pullRequest(Optional<? extends PullRequest> pullRequest)
Initializes the optional valuepullRequestto pullRequest.- Parameters:
pullRequest- The value for pullRequest- Returns:
thisbuilder for use in a chained invocation
-
score
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder score(@Nullable Float score)
Initializes the value for thescoreattribute.- Parameters:
score- The value for score (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableSearchIssue build()
Builds a newImmutableSearchIssue.- Returns:
- An immutable instance of SearchIssue
- Throws:
IllegalStateException- if any required attributes are missing
-
-