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 classImmutableMilestone.BuilderBuilds instances of typeImmutableMilestone.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableMilestone.Builderbuilder()Creates a builder forImmutableMilestone.Optional<GitHubInstant>closedAt()Closed date.IntegerclosedIssues()Number of closed issuesstatic ImmutableMilestonecopyOf(Milestone instance)Creates an immutable copy of aMilestonevalue.GitHubInstantcreatedAt()Created dateUsercreator()Creator userOptional<String>description()DescriptionOptional<GitHubInstant>dueOn()Due datebooleanequals(Object another)This instance is equal to all instances ofImmutableMilestonethat have equal attribute values.inthashCode()Computes a hash code from attributes:createdAt,updatedAt,closedAt,url,htmlUrl,labelsUrl,id,number,state,title,description,creator,openIssues,closedIssues,dueOn.URIhtmlUrl()HTML URLIntegerid()IDURIlabelsUrl()Labels URLIntegernumber()NumberIntegeropenIssues()Number of open issuesStringstate()The state of the milestone.Stringtitle()TitleStringtoString()Prints the immutable valueMilestonewith attribute values.GitHubInstantupdatedAt()Updated dateURIurl()URLImmutableMilestonewithClosedAt(GitHubInstant value)Copy the current immutable object by setting a present value for the optionalclosedAtattribute.ImmutableMilestonewithClosedAt(Optional<? extends GitHubInstant> optional)Copy the current immutable object by setting an optional value for theclosedAtattribute.ImmutableMilestonewithClosedIssues(Integer value)Copy the current immutable object by setting a value for theclosedIssuesattribute.ImmutableMilestonewithCreatedAt(GitHubInstant value)Copy the current immutable object by setting a value for thecreatedAtattribute.ImmutableMilestonewithCreator(User value)Copy the current immutable object by setting a value for thecreatorattribute.ImmutableMilestonewithDescription(String value)Copy the current immutable object by setting a present value for the optionaldescriptionattribute.ImmutableMilestonewithDescription(Optional<String> optional)Copy the current immutable object by setting an optional value for thedescriptionattribute.ImmutableMilestonewithDueOn(GitHubInstant value)Copy the current immutable object by setting a present value for the optionaldueOnattribute.ImmutableMilestonewithDueOn(Optional<? extends GitHubInstant> optional)Copy the current immutable object by setting an optional value for thedueOnattribute.ImmutableMilestonewithHtmlUrl(URI value)Copy the current immutable object by setting a value for thehtmlUrlattribute.ImmutableMilestonewithId(Integer value)Copy the current immutable object by setting a value for theidattribute.ImmutableMilestonewithLabelsUrl(URI value)Copy the current immutable object by setting a value for thelabelsUrlattribute.ImmutableMilestonewithNumber(Integer value)Copy the current immutable object by setting a value for thenumberattribute.ImmutableMilestonewithOpenIssues(Integer value)Copy the current immutable object by setting a value for theopenIssuesattribute.ImmutableMilestonewithState(String value)Copy the current immutable object by setting a value for thestateattribute.ImmutableMilestonewithTitle(String value)Copy the current immutable object by setting a value for thetitleattribute.ImmutableMilestonewithUpdatedAt(GitHubInstant value)Copy the current immutable object by setting a value for theupdatedAtattribute.ImmutableMilestonewithUrl(URI value)Copy the current immutable object by setting a value for theurlattribute.
-
-
-
Method Detail
-
createdAt
@Nullable public GitHubInstant createdAt()
Created date- Specified by:
createdAtin interfaceUpdateTracking- Returns:
- The date when the issue was created
-
updatedAt
@Nullable public GitHubInstant updatedAt()
Updated date- Specified by:
updatedAtin interfaceUpdateTracking- Returns:
- The date when the issue was updated
-
closedAt
public Optional<GitHubInstant> closedAt()
Closed date.- Specified by:
closedAtin 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:
descriptionin interfaceMilestone
-
openIssues
@Nullable public Integer openIssues()
Number of open issues- Specified by:
openIssuesin interfaceMilestone
-
closedIssues
@Nullable public Integer closedIssues()
Number of closed issues- Specified by:
closedIssuesin 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 thecreatedAtattribute. 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
thisobject
-
withUpdatedAt
public final ImmutableMilestone withUpdatedAt(@Nullable GitHubInstant value)
Copy the current immutable object by setting a value for theupdatedAtattribute. 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
thisobject
-
withClosedAt
public final ImmutableMilestone withClosedAt(GitHubInstant value)
Copy the current immutable object by setting a present value for the optionalclosedAtattribute.- Parameters:
value- The value for closedAt- Returns:
- A modified copy of
thisobject
-
withClosedAt
public final ImmutableMilestone withClosedAt(Optional<? extends GitHubInstant> optional)
Copy the current immutable object by setting an optional value for theclosedAtattribute. 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
thisobject
-
withUrl
public final ImmutableMilestone withUrl(@Nullable URI value)
Copy the current immutable object by setting a value for theurlattribute. 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
thisobject
-
withHtmlUrl
public final ImmutableMilestone withHtmlUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thehtmlUrlattribute. 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
thisobject
-
withLabelsUrl
public final ImmutableMilestone withLabelsUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thelabelsUrlattribute. 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
thisobject
-
withId
public final ImmutableMilestone withId(@Nullable Integer value)
Copy the current immutable object by setting a value for theidattribute. 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
thisobject
-
withNumber
public final ImmutableMilestone withNumber(@Nullable Integer value)
Copy the current immutable object by setting a value for thenumberattribute. 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
thisobject
-
withState
public final ImmutableMilestone withState(@Nullable String value)
Copy the current immutable object by setting a value for thestateattribute. 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
thisobject
-
withTitle
public final ImmutableMilestone withTitle(@Nullable String value)
Copy the current immutable object by setting a value for thetitleattribute. 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
thisobject
-
withDescription
public final ImmutableMilestone withDescription(String value)
Copy the current immutable object by setting a present value for the optionaldescriptionattribute.- Parameters:
value- The value for description- Returns:
- A modified copy of
thisobject
-
withDescription
public final ImmutableMilestone withDescription(Optional<String> optional)
Copy the current immutable object by setting an optional value for thedescriptionattribute. 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
thisobject
-
withCreator
public final ImmutableMilestone withCreator(@Nullable User value)
Copy the current immutable object by setting a value for thecreatorattribute. 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
thisobject
-
withOpenIssues
public final ImmutableMilestone withOpenIssues(@Nullable Integer value)
Copy the current immutable object by setting a value for theopenIssuesattribute. 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
thisobject
-
withClosedIssues
public final ImmutableMilestone withClosedIssues(@Nullable Integer value)
Copy the current immutable object by setting a value for theclosedIssuesattribute. 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
thisobject
-
withDueOn
public final ImmutableMilestone withDueOn(GitHubInstant value)
Copy the current immutable object by setting a present value for the optionaldueOnattribute.- Parameters:
value- The value for dueOn- Returns:
- A modified copy of
thisobject
-
withDueOn
public final ImmutableMilestone withDueOn(Optional<? extends GitHubInstant> optional)
Copy the current immutable object by setting an optional value for thedueOnattribute. 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
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableMilestonethat 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 valueMilestonewith attribute values.
-
copyOf
public static ImmutableMilestone copyOf(Milestone instance)
Creates an immutable copy of aMilestonevalue. 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) // nullablecreatedAt.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
-
-