Package com.spotify.github.v3
Class ImmutableMilestone.Builder
- java.lang.Object
-
- com.spotify.github.v3.ImmutableMilestone.Builder
-
- Enclosing class:
- ImmutableMilestone
@NotThreadSafe public static final class ImmutableMilestone.Builder extends Object
Builds instances of typeImmutableMilestone. 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 ImmutableMilestonebuild()Builds a newImmutableMilestone.ImmutableMilestone.BuilderclosedAt(GitHubInstant closedAt)Initializes the optional valueclosedAtto closedAt.ImmutableMilestone.BuilderclosedAt(Optional<? extends GitHubInstant> closedAt)Initializes the optional valueclosedAtto closedAt.ImmutableMilestone.BuilderclosedIssues(Integer closedIssues)Initializes the value for theclosedIssuesattribute.ImmutableMilestone.BuildercreatedAt(GitHubInstant createdAt)Initializes the value for thecreatedAtattribute.ImmutableMilestone.Buildercreator(User creator)Initializes the value for thecreatorattribute.ImmutableMilestone.Builderdescription(String description)Initializes the optional valuedescriptionto description.ImmutableMilestone.Builderdescription(Optional<String> description)Initializes the optional valuedescriptionto description.ImmutableMilestone.BuilderdueOn(GitHubInstant dueOn)Initializes the optional valuedueOnto dueOn.ImmutableMilestone.BuilderdueOn(Optional<? extends GitHubInstant> dueOn)Initializes the optional valuedueOnto dueOn.ImmutableMilestone.Builderfrom(CloseTracking instance)Fill a builder with attribute values from the providedcom.spotify.github.CloseTrackinginstance.ImmutableMilestone.Builderfrom(UpdateTracking instance)Fill a builder with attribute values from the providedcom.spotify.github.UpdateTrackinginstance.ImmutableMilestone.Builderfrom(Milestone instance)Fill a builder with attribute values from the providedcom.spotify.github.v3.Milestoneinstance.ImmutableMilestone.BuilderhtmlUrl(URI htmlUrl)Initializes the value for thehtmlUrlattribute.ImmutableMilestone.Builderid(Integer id)Initializes the value for theidattribute.ImmutableMilestone.BuilderlabelsUrl(URI labelsUrl)Initializes the value for thelabelsUrlattribute.ImmutableMilestone.Buildernumber(Integer number)Initializes the value for thenumberattribute.ImmutableMilestone.BuilderopenIssues(Integer openIssues)Initializes the value for theopenIssuesattribute.ImmutableMilestone.Builderstate(String state)Initializes the value for thestateattribute.ImmutableMilestone.Buildertitle(String title)Initializes the value for thetitleattribute.ImmutableMilestone.BuilderupdatedAt(GitHubInstant updatedAt)Initializes the value for theupdatedAtattribute.ImmutableMilestone.Builderurl(URI url)Initializes the value for theurlattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableMilestone.Builder from(Milestone instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.Milestoneinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutableMilestone.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 ImmutableMilestone.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 ImmutableMilestone.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 ImmutableMilestone.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 ImmutableMilestone.Builder closedAt(GitHubInstant closedAt)
Initializes the optional valueclosedAtto closedAt.- Parameters:
closedAt- The value for closedAt- Returns:
thisbuilder for chained invocation
-
closedAt
@CanIgnoreReturnValue public final ImmutableMilestone.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
-
url
@CanIgnoreReturnValue public final ImmutableMilestone.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
-
htmlUrl
@CanIgnoreReturnValue public final ImmutableMilestone.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
-
labelsUrl
@CanIgnoreReturnValue public final ImmutableMilestone.Builder labelsUrl(@Nullable URI labelsUrl)
Initializes the value for thelabelsUrlattribute.- Parameters:
labelsUrl- The value for labelsUrl (can benull)- Returns:
thisbuilder for use in a chained invocation
-
id
@CanIgnoreReturnValue public final ImmutableMilestone.Builder id(@Nullable Integer id)
Initializes the value for theidattribute.- Parameters:
id- The value for id (can benull)- Returns:
thisbuilder for use in a chained invocation
-
number
@CanIgnoreReturnValue public final ImmutableMilestone.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 ImmutableMilestone.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 ImmutableMilestone.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
-
description
@CanIgnoreReturnValue public final ImmutableMilestone.Builder description(String description)
Initializes the optional valuedescriptionto description.- Parameters:
description- The value for description- Returns:
thisbuilder for chained invocation
-
description
@CanIgnoreReturnValue public final ImmutableMilestone.Builder description(Optional<String> description)
Initializes the optional valuedescriptionto description.- Parameters:
description- The value for description- Returns:
thisbuilder for use in a chained invocation
-
creator
@CanIgnoreReturnValue public final ImmutableMilestone.Builder creator(@Nullable User creator)
Initializes the value for thecreatorattribute.- Parameters:
creator- The value for creator (can benull)- Returns:
thisbuilder for use in a chained invocation
-
openIssues
@CanIgnoreReturnValue public final ImmutableMilestone.Builder openIssues(@Nullable Integer openIssues)
Initializes the value for theopenIssuesattribute.- Parameters:
openIssues- The value for openIssues (can benull)- Returns:
thisbuilder for use in a chained invocation
-
closedIssues
@CanIgnoreReturnValue public final ImmutableMilestone.Builder closedIssues(@Nullable Integer closedIssues)
Initializes the value for theclosedIssuesattribute.- Parameters:
closedIssues- The value for closedIssues (can benull)- Returns:
thisbuilder for use in a chained invocation
-
dueOn
@CanIgnoreReturnValue public final ImmutableMilestone.Builder dueOn(GitHubInstant dueOn)
Initializes the optional valuedueOnto dueOn.- Parameters:
dueOn- The value for dueOn- Returns:
thisbuilder for chained invocation
-
dueOn
@CanIgnoreReturnValue public final ImmutableMilestone.Builder dueOn(Optional<? extends GitHubInstant> dueOn)
Initializes the optional valuedueOnto dueOn.- Parameters:
dueOn- The value for dueOn- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableMilestone build()
Builds a newImmutableMilestone.- Returns:
- An immutable instance of Milestone
- Throws:
IllegalStateException- if any required attributes are missing
-
-