Package com.spotify.github.v3
Class ImmutableMilestone
- java.lang.Object
-
- com.spotify.github.v3.ImmutableMilestone
-
- All Implemented Interfaces:
CloseTracking
,UpdateTracking
,Milestone
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableMilestone extends Object implements Milestone
Immutable implementation ofMilestone
.Use the builder to create immutable instances:
ImmutableMilestone.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableMilestone.Builder
Builds instances of typeImmutableMilestone
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableMilestone.Builder
builder()
Creates a builder forImmutableMilestone
.Optional<GitHubInstant>
closedAt()
Closed date.Integer
closedIssues()
Number of closed issuesstatic ImmutableMilestone
copyOf(Milestone instance)
Creates an immutable copy of aMilestone
value.GitHubInstant
createdAt()
Created dateUser
creator()
Creator userOptional<String>
description()
DescriptionOptional<GitHubInstant>
dueOn()
Due dateboolean
equals(Object another)
This instance is equal to all instances ofImmutableMilestone
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:createdAt
,updatedAt
,closedAt
,url
,htmlUrl
,labelsUrl
,id
,number
,state
,title
,description
,creator
,openIssues
,closedIssues
,dueOn
.URI
htmlUrl()
HTML URLInteger
id()
IDURI
labelsUrl()
Labels URLInteger
number()
NumberInteger
openIssues()
Number of open issuesString
state()
The state of the milestone.String
title()
TitleString
toString()
Prints the immutable valueMilestone
with attribute values.GitHubInstant
updatedAt()
Updated dateURI
url()
URLImmutableMilestone
withClosedAt(GitHubInstant value)
Copy the current immutable object by setting a present value for the optionalclosedAt
attribute.ImmutableMilestone
withClosedAt(Optional<? extends GitHubInstant> optional)
Copy the current immutable object by setting an optional value for theclosedAt
attribute.ImmutableMilestone
withClosedIssues(Integer value)
Copy the current immutable object by setting a value for theclosedIssues
attribute.ImmutableMilestone
withCreatedAt(GitHubInstant value)
Copy the current immutable object by setting a value for thecreatedAt
attribute.ImmutableMilestone
withCreator(User value)
Copy the current immutable object by setting a value for thecreator
attribute.ImmutableMilestone
withDescription(String value)
Copy the current immutable object by setting a present value for the optionaldescription
attribute.ImmutableMilestone
withDescription(Optional<String> optional)
Copy the current immutable object by setting an optional value for thedescription
attribute.ImmutableMilestone
withDueOn(GitHubInstant value)
Copy the current immutable object by setting a present value for the optionaldueOn
attribute.ImmutableMilestone
withDueOn(Optional<? extends GitHubInstant> optional)
Copy the current immutable object by setting an optional value for thedueOn
attribute.ImmutableMilestone
withHtmlUrl(URI value)
Copy the current immutable object by setting a value for thehtmlUrl
attribute.ImmutableMilestone
withId(Integer value)
Copy the current immutable object by setting a value for theid
attribute.ImmutableMilestone
withLabelsUrl(URI value)
Copy the current immutable object by setting a value for thelabelsUrl
attribute.ImmutableMilestone
withNumber(Integer value)
Copy the current immutable object by setting a value for thenumber
attribute.ImmutableMilestone
withOpenIssues(Integer value)
Copy the current immutable object by setting a value for theopenIssues
attribute.ImmutableMilestone
withState(String value)
Copy the current immutable object by setting a value for thestate
attribute.ImmutableMilestone
withTitle(String value)
Copy the current immutable object by setting a value for thetitle
attribute.ImmutableMilestone
withUpdatedAt(GitHubInstant value)
Copy the current immutable object by setting a value for theupdatedAt
attribute.ImmutableMilestone
withUrl(URI value)
Copy the current immutable object by setting a value for theurl
attribute.
-
-
-
Method Detail
-
createdAt
@Nullable public GitHubInstant createdAt()
Created date- Specified by:
createdAt
in interfaceUpdateTracking
- Returns:
- The date when the issue was created
-
updatedAt
@Nullable public GitHubInstant updatedAt()
Updated date- Specified by:
updatedAt
in interfaceUpdateTracking
- Returns:
- The date when the issue was updated
-
closedAt
public Optional<GitHubInstant> closedAt()
Closed date.- Specified by:
closedAt
in interfaceCloseTracking
- Returns:
- The date when the issue was closed
-
labelsUrl
@Nullable public URI labelsUrl()
Labels URL
-
state
@Nullable public String state()
The state of the milestone. Either open, closed, or all.
-
description
public Optional<String> description()
Description- Specified by:
description
in interfaceMilestone
-
openIssues
@Nullable public Integer openIssues()
Number of open issues- Specified by:
openIssues
in interfaceMilestone
-
closedIssues
@Nullable public Integer closedIssues()
Number of closed issues- Specified by:
closedIssues
in interfaceMilestone
-
dueOn
public Optional<GitHubInstant> dueOn()
Due date
-
withCreatedAt
public final ImmutableMilestone withCreatedAt(@Nullable GitHubInstant value)
Copy the current immutable object by setting a value for thecreatedAt
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for createdAt (can benull
)- Returns:
- A modified copy of the
this
object
-
withUpdatedAt
public final ImmutableMilestone withUpdatedAt(@Nullable GitHubInstant value)
Copy the current immutable object by setting a value for theupdatedAt
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for updatedAt (can benull
)- Returns:
- A modified copy of the
this
object
-
withClosedAt
public final ImmutableMilestone withClosedAt(GitHubInstant value)
Copy the current immutable object by setting a present value for the optionalclosedAt
attribute.- Parameters:
value
- The value for closedAt- Returns:
- A modified copy of
this
object
-
withClosedAt
public final ImmutableMilestone withClosedAt(Optional<? extends GitHubInstant> optional)
Copy the current immutable object by setting an optional value for theclosedAt
attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for closedAt- Returns:
- A modified copy of
this
object
-
withUrl
public final ImmutableMilestone withUrl(@Nullable URI value)
Copy the current immutable object by setting a value for theurl
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for url (can benull
)- Returns:
- A modified copy of the
this
object
-
withHtmlUrl
public final ImmutableMilestone withHtmlUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thehtmlUrl
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for htmlUrl (can benull
)- Returns:
- A modified copy of the
this
object
-
withLabelsUrl
public final ImmutableMilestone withLabelsUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thelabelsUrl
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for labelsUrl (can benull
)- Returns:
- A modified copy of the
this
object
-
withId
public final ImmutableMilestone withId(@Nullable Integer value)
Copy the current immutable object by setting a value for theid
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for id (can benull
)- Returns:
- A modified copy of the
this
object
-
withNumber
public final ImmutableMilestone withNumber(@Nullable Integer value)
Copy the current immutable object by setting a value for thenumber
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for number (can benull
)- Returns:
- A modified copy of the
this
object
-
withState
public final ImmutableMilestone withState(@Nullable String value)
Copy the current immutable object by setting a value for thestate
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for state (can benull
)- Returns:
- A modified copy of the
this
object
-
withTitle
public final ImmutableMilestone withTitle(@Nullable String value)
Copy the current immutable object by setting a value for thetitle
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for title (can benull
)- Returns:
- A modified copy of the
this
object
-
withDescription
public final ImmutableMilestone withDescription(String value)
Copy the current immutable object by setting a present value for the optionaldescription
attribute.- Parameters:
value
- The value for description- Returns:
- A modified copy of
this
object
-
withDescription
public final ImmutableMilestone withDescription(Optional<String> optional)
Copy the current immutable object by setting an optional value for thedescription
attribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for description- Returns:
- A modified copy of
this
object
-
withCreator
public final ImmutableMilestone withCreator(@Nullable User value)
Copy the current immutable object by setting a value for thecreator
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for creator (can benull
)- Returns:
- A modified copy of the
this
object
-
withOpenIssues
public final ImmutableMilestone withOpenIssues(@Nullable Integer value)
Copy the current immutable object by setting a value for theopenIssues
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for openIssues (can benull
)- Returns:
- A modified copy of the
this
object
-
withClosedIssues
public final ImmutableMilestone withClosedIssues(@Nullable Integer value)
Copy the current immutable object by setting a value for theclosedIssues
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for closedIssues (can benull
)- Returns:
- A modified copy of the
this
object
-
withDueOn
public final ImmutableMilestone withDueOn(GitHubInstant value)
Copy the current immutable object by setting a present value for the optionaldueOn
attribute.- Parameters:
value
- The value for dueOn- Returns:
- A modified copy of
this
object
-
withDueOn
public final ImmutableMilestone withDueOn(Optional<? extends GitHubInstant> optional)
Copy the current immutable object by setting an optional value for thedueOn
attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis
.- Parameters:
optional
- A value for dueOn- Returns:
- A modified copy of
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableMilestone
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:createdAt
,updatedAt
,closedAt
,url
,htmlUrl
,labelsUrl
,id
,number
,state
,title
,description
,creator
,openIssues
,closedIssues
,dueOn
.
-
toString
public String toString()
Prints the immutable valueMilestone
with attribute values.
-
copyOf
public static ImmutableMilestone copyOf(Milestone instance)
Creates an immutable copy of aMilestone
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable Milestone instance
-
builder
public static ImmutableMilestone.Builder builder()
Creates a builder forImmutableMilestone
.ImmutableMilestone.builder() .createdAt(com.spotify.github.GitHubInstant | null) // nullable
createdAt
.updatedAt(com.spotify.github.GitHubInstant | null) // nullableupdatedAt
.closedAt(com.spotify.github.GitHubInstant) // optionalclosedAt
.url(java.net.URI | null) // nullableurl
.htmlUrl(java.net.URI | null) // nullablehtmlUrl
.labelsUrl(java.net.URI | null) // nullablelabelsUrl
.id(Integer | null) // nullableid
.number(Integer | null) // nullablenumber
.state(String | null) // nullablestate
.title(String | null) // nullabletitle
.description(String) // optionaldescription
.creator(com.spotify.github.v3.User | null) // nullablecreator
.openIssues(Integer | null) // nullableopenIssues
.closedIssues(Integer | null) // nullableclosedIssues
.dueOn(com.spotify.github.GitHubInstant) // optionaldueOn
.build();- Returns:
- A new ImmutableMilestone builder
-
-