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.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 ImmutableMilestone
build()
Builds a newImmutableMilestone
.ImmutableMilestone.Builder
closedAt(GitHubInstant closedAt)
Initializes the optional valueclosedAt
to closedAt.ImmutableMilestone.Builder
closedAt(Optional<? extends GitHubInstant> closedAt)
Initializes the optional valueclosedAt
to closedAt.ImmutableMilestone.Builder
closedIssues(Integer closedIssues)
Initializes the value for theclosedIssues
attribute.ImmutableMilestone.Builder
createdAt(GitHubInstant createdAt)
Initializes the value for thecreatedAt
attribute.ImmutableMilestone.Builder
creator(User creator)
Initializes the value for thecreator
attribute.ImmutableMilestone.Builder
description(String description)
Initializes the optional valuedescription
to description.ImmutableMilestone.Builder
description(Optional<String> description)
Initializes the optional valuedescription
to description.ImmutableMilestone.Builder
dueOn(GitHubInstant dueOn)
Initializes the optional valuedueOn
to dueOn.ImmutableMilestone.Builder
dueOn(Optional<? extends GitHubInstant> dueOn)
Initializes the optional valuedueOn
to dueOn.ImmutableMilestone.Builder
from(CloseTracking instance)
Fill a builder with attribute values from the providedcom.spotify.github.CloseTracking
instance.ImmutableMilestone.Builder
from(UpdateTracking instance)
Fill a builder with attribute values from the providedcom.spotify.github.UpdateTracking
instance.ImmutableMilestone.Builder
from(Milestone instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.Milestone
instance.ImmutableMilestone.Builder
htmlUrl(URI htmlUrl)
Initializes the value for thehtmlUrl
attribute.ImmutableMilestone.Builder
id(Integer id)
Initializes the value for theid
attribute.ImmutableMilestone.Builder
labelsUrl(URI labelsUrl)
Initializes the value for thelabelsUrl
attribute.ImmutableMilestone.Builder
number(Integer number)
Initializes the value for thenumber
attribute.ImmutableMilestone.Builder
openIssues(Integer openIssues)
Initializes the value for theopenIssues
attribute.ImmutableMilestone.Builder
state(String state)
Initializes the value for thestate
attribute.ImmutableMilestone.Builder
title(String title)
Initializes the value for thetitle
attribute.ImmutableMilestone.Builder
updatedAt(GitHubInstant updatedAt)
Initializes the value for theupdatedAt
attribute.ImmutableMilestone.Builder
url(URI url)
Initializes the value for theurl
attribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableMilestone.Builder from(Milestone instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.Milestone
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder 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.CloseTracking
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder 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.UpdateTracking
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
createdAt
@CanIgnoreReturnValue public final ImmutableMilestone.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 ImmutableMilestone.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 ImmutableMilestone.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 ImmutableMilestone.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
-
url
@CanIgnoreReturnValue public final ImmutableMilestone.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
-
htmlUrl
@CanIgnoreReturnValue public final ImmutableMilestone.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
-
labelsUrl
@CanIgnoreReturnValue public final ImmutableMilestone.Builder labelsUrl(@Nullable URI labelsUrl)
Initializes the value for thelabelsUrl
attribute.- Parameters:
labelsUrl
- The value for labelsUrl (can benull
)- Returns:
this
builder for use in a chained invocation
-
id
@CanIgnoreReturnValue public final ImmutableMilestone.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
-
number
@CanIgnoreReturnValue public final ImmutableMilestone.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 ImmutableMilestone.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 ImmutableMilestone.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
-
description
@CanIgnoreReturnValue public final ImmutableMilestone.Builder description(String description)
Initializes the optional valuedescription
to description.- Parameters:
description
- The value for description- Returns:
this
builder for chained invocation
-
description
@CanIgnoreReturnValue public final ImmutableMilestone.Builder description(Optional<String> description)
Initializes the optional valuedescription
to description.- Parameters:
description
- The value for description- Returns:
this
builder for use in a chained invocation
-
creator
@CanIgnoreReturnValue public final ImmutableMilestone.Builder creator(@Nullable User creator)
Initializes the value for thecreator
attribute.- Parameters:
creator
- The value for creator (can benull
)- Returns:
this
builder for use in a chained invocation
-
openIssues
@CanIgnoreReturnValue public final ImmutableMilestone.Builder openIssues(@Nullable Integer openIssues)
Initializes the value for theopenIssues
attribute.- Parameters:
openIssues
- The value for openIssues (can benull
)- Returns:
this
builder for use in a chained invocation
-
closedIssues
@CanIgnoreReturnValue public final ImmutableMilestone.Builder closedIssues(@Nullable Integer closedIssues)
Initializes the value for theclosedIssues
attribute.- Parameters:
closedIssues
- The value for closedIssues (can benull
)- Returns:
this
builder for use in a chained invocation
-
dueOn
@CanIgnoreReturnValue public final ImmutableMilestone.Builder dueOn(GitHubInstant dueOn)
Initializes the optional valuedueOn
to dueOn.- Parameters:
dueOn
- The value for dueOn- Returns:
this
builder for chained invocation
-
dueOn
@CanIgnoreReturnValue public final ImmutableMilestone.Builder dueOn(Optional<? extends GitHubInstant> dueOn)
Initializes the optional valuedueOn
to dueOn.- Parameters:
dueOn
- The value for dueOn- Returns:
this
builder 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
-
-