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.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 ImmutableSearchIssue.Builder
addAllLabels(Iterable<? extends Label> elements)
Adds elements tolabels
list.ImmutableSearchIssue.Builder
addLabels(Label element)
Adds one element tolabels
list.ImmutableSearchIssue.Builder
addLabels(Label... elements)
Adds elements tolabels
list.ImmutableSearchIssue.Builder
assignee(User assignee)
Initializes the optional valueassignee
to assignee.ImmutableSearchIssue.Builder
assignee(Optional<? extends User> assignee)
Initializes the optional valueassignee
to assignee.ImmutableSearchIssue.Builder
body(Optional<String> body)
Initializes the value for thebody
attribute.ImmutableSearchIssue
build()
Builds a newImmutableSearchIssue
.ImmutableSearchIssue.Builder
closedAt(GitHubInstant closedAt)
Initializes the optional valueclosedAt
to closedAt.ImmutableSearchIssue.Builder
closedAt(Optional<? extends GitHubInstant> closedAt)
Initializes the optional valueclosedAt
to closedAt.ImmutableSearchIssue.Builder
comments(Integer comments)
Initializes the value for thecomments
attribute.ImmutableSearchIssue.Builder
commentsUrl(URI commentsUrl)
Initializes the value for thecommentsUrl
attribute.ImmutableSearchIssue.Builder
createdAt(GitHubInstant createdAt)
Initializes the value for thecreatedAt
attribute.ImmutableSearchIssue.Builder
eventsUrl(Optional<URI> eventsUrl)
Initializes the value for theeventsUrl
attribute.ImmutableSearchIssue.Builder
from(CloseTracking instance)
Fill a builder with attribute values from the providedcom.spotify.github.CloseTracking
instance.ImmutableSearchIssue.Builder
from(UpdateTracking instance)
Fill a builder with attribute values from the providedcom.spotify.github.UpdateTracking
instance.ImmutableSearchIssue.Builder
from(Issue instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.issues.Issue
instance.ImmutableSearchIssue.Builder
from(SearchIssue instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.search.SearchIssue
instance.ImmutableSearchIssue.Builder
htmlUrl(URI htmlUrl)
Initializes the value for thehtmlUrl
attribute.ImmutableSearchIssue.Builder
id(Integer id)
Initializes the value for theid
attribute.ImmutableSearchIssue.Builder
labels(Iterable<? extends Label> elements)
Sets or replaces all elements forlabels
list.ImmutableSearchIssue.Builder
labelsUrl(String labelsUrl)
Initializes the value for thelabelsUrl
attribute.ImmutableSearchIssue.Builder
locked(Boolean locked)
Initializes the value for thelocked
attribute.ImmutableSearchIssue.Builder
milestone(Milestone milestone)
Initializes the optional valuemilestone
to milestone.ImmutableSearchIssue.Builder
milestone(Optional<? extends Milestone> milestone)
Initializes the optional valuemilestone
to milestone.ImmutableSearchIssue.Builder
number(Integer number)
Initializes the value for thenumber
attribute.ImmutableSearchIssue.Builder
pullRequest(PullRequest pullRequest)
Initializes the optional valuepullRequest
to pullRequest.ImmutableSearchIssue.Builder
pullRequest(Optional<? extends PullRequest> pullRequest)
Initializes the optional valuepullRequest
to pullRequest.ImmutableSearchIssue.Builder
repositoryUrl(Optional<URI> repositoryUrl)
Initializes the value for therepositoryUrl
attribute.ImmutableSearchIssue.Builder
score(Float score)
Initializes the value for thescore
attribute.ImmutableSearchIssue.Builder
state(String state)
Initializes the value for thestate
attribute.ImmutableSearchIssue.Builder
title(String title)
Initializes the value for thetitle
attribute.ImmutableSearchIssue.Builder
updatedAt(GitHubInstant updatedAt)
Initializes the value for theupdatedAt
attribute.ImmutableSearchIssue.Builder
url(URI url)
Initializes the value for theurl
attribute.ImmutableSearchIssue.Builder
user(User user)
Initializes the value for theuser
attribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder from(SearchIssue instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.search.SearchIssue
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder 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.CloseTracking
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder 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.Issue
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder 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.UpdateTracking
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
createdAt
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder createdAt(@Nullable GitHubInstant createdAt)
Initializes the value for thecreatedAt
attribute.- Parameters:
createdAt
- The value for createdAt (can benull
)- Returns:
this
builder for use in a chained invocation
-
updatedAt
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder updatedAt(@Nullable GitHubInstant updatedAt)
Initializes the value for theupdatedAt
attribute.- Parameters:
updatedAt
- The value for updatedAt (can benull
)- Returns:
this
builder for use in a chained invocation
-
closedAt
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder closedAt(GitHubInstant closedAt)
Initializes the optional valueclosedAt
to closedAt.- Parameters:
closedAt
- The value for closedAt- Returns:
this
builder for chained invocation
-
closedAt
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder closedAt(Optional<? extends GitHubInstant> closedAt)
Initializes the optional valueclosedAt
to closedAt.- Parameters:
closedAt
- The value for closedAt- Returns:
this
builder for use in a chained invocation
-
id
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder id(@Nullable Integer id)
Initializes the value for theid
attribute.- Parameters:
id
- The value for id (can benull
)- Returns:
this
builder for use in a chained invocation
-
url
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder url(@Nullable URI url)
Initializes the value for theurl
attribute.- Parameters:
url
- The value for url (can benull
)- Returns:
this
builder for use in a chained invocation
-
eventsUrl
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder eventsUrl(@Nullable Optional<URI> eventsUrl)
Initializes the value for theeventsUrl
attribute.- Parameters:
eventsUrl
- The value for eventsUrl (can benull
)- Returns:
this
builder for use in a chained invocation
-
repositoryUrl
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder repositoryUrl(@Nullable Optional<URI> repositoryUrl)
Initializes the value for therepositoryUrl
attribute.- Parameters:
repositoryUrl
- The value for repositoryUrl (can benull
)- Returns:
this
builder for use in a chained invocation
-
labelsUrl
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder labelsUrl(@Nullable String labelsUrl)
Initializes the value for thelabelsUrl
attribute.- Parameters:
labelsUrl
- The value for labelsUrl (can benull
)- Returns:
this
builder for use in a chained invocation
-
commentsUrl
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder commentsUrl(@Nullable URI commentsUrl)
Initializes the value for thecommentsUrl
attribute.- Parameters:
commentsUrl
- The value for commentsUrl (can benull
)- Returns:
this
builder for use in a chained invocation
-
htmlUrl
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder htmlUrl(@Nullable URI htmlUrl)
Initializes the value for thehtmlUrl
attribute.- Parameters:
htmlUrl
- The value for htmlUrl (can benull
)- Returns:
this
builder for use in a chained invocation
-
number
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder number(@Nullable Integer number)
Initializes the value for thenumber
attribute.- Parameters:
number
- The value for number (can benull
)- Returns:
this
builder for use in a chained invocation
-
state
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder state(@Nullable String state)
Initializes the value for thestate
attribute.- Parameters:
state
- The value for state (can benull
)- Returns:
this
builder for use in a chained invocation
-
title
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder title(@Nullable String title)
Initializes the value for thetitle
attribute.- Parameters:
title
- The value for title (can benull
)- Returns:
this
builder for use in a chained invocation
-
body
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder body(@Nullable Optional<String> body)
Initializes the value for thebody
attribute.- Parameters:
body
- The value for body (can benull
)- Returns:
this
builder for use in a chained invocation
-
user
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder user(@Nullable User user)
Initializes the value for theuser
attribute.- Parameters:
user
- The value for user (can benull
)- Returns:
this
builder for use in a chained invocation
-
addLabels
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder addLabels(Label element)
Adds one element tolabels
list.- Parameters:
element
- A labels element- Returns:
this
builder for use in a chained invocation
-
addLabels
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder addLabels(Label... elements)
Adds elements tolabels
list.- Parameters:
elements
- An array of labels elements- Returns:
this
builder for use in a chained invocation
-
labels
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder labels(@Nullable Iterable<? extends Label> elements)
Sets or replaces all elements forlabels
list.- Parameters:
elements
- An iterable of labels elements- Returns:
this
builder for use in a chained invocation
-
addAllLabels
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder addAllLabels(Iterable<? extends Label> elements)
Adds elements tolabels
list.- Parameters:
elements
- An iterable of labels elements- Returns:
this
builder for use in a chained invocation
-
assignee
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder assignee(User assignee)
Initializes the optional valueassignee
to assignee.- Parameters:
assignee
- The value for assignee- Returns:
this
builder for chained invocation
-
assignee
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder assignee(Optional<? extends User> assignee)
Initializes the optional valueassignee
to assignee.- Parameters:
assignee
- The value for assignee- Returns:
this
builder for use in a chained invocation
-
milestone
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder milestone(Milestone milestone)
Initializes the optional valuemilestone
to milestone.- Parameters:
milestone
- The value for milestone- Returns:
this
builder for chained invocation
-
milestone
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder milestone(Optional<? extends Milestone> milestone)
Initializes the optional valuemilestone
to milestone.- Parameters:
milestone
- The value for milestone- Returns:
this
builder for use in a chained invocation
-
locked
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder locked(@Nullable Boolean locked)
Initializes the value for thelocked
attribute.- Parameters:
locked
- The value for locked (can benull
)- Returns:
this
builder for use in a chained invocation
-
comments
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder comments(@Nullable Integer comments)
Initializes the value for thecomments
attribute.- Parameters:
comments
- The value for comments (can benull
)- Returns:
this
builder for use in a chained invocation
-
pullRequest
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder pullRequest(PullRequest pullRequest)
Initializes the optional valuepullRequest
to pullRequest.- Parameters:
pullRequest
- The value for pullRequest- Returns:
this
builder for chained invocation
-
pullRequest
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder pullRequest(Optional<? extends PullRequest> pullRequest)
Initializes the optional valuepullRequest
to pullRequest.- Parameters:
pullRequest
- The value for pullRequest- Returns:
this
builder for use in a chained invocation
-
score
@CanIgnoreReturnValue public final ImmutableSearchIssue.Builder score(@Nullable Float score)
Initializes the value for thescore
attribute.- Parameters:
score
- The value for score (can benull
)- Returns:
this
builder 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
-
-