Package com.spotify.github.v3.prs
Class ImmutableCommentLinks
- java.lang.Object
-
- com.spotify.github.v3.prs.ImmutableCommentLinks
-
- All Implemented Interfaces:
Links
,CommentLinks
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableCommentLinks extends Object implements CommentLinks
Immutable implementation ofCommentLinks
.Use the builder to create immutable instances:
ImmutableCommentLinks.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableCommentLinks.Builder
Builds instances of typeImmutableCommentLinks
.-
Nested classes/interfaces inherited from interface com.spotify.github.Links
Links.Href<T>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableCommentLinks.Builder
builder()
Creates a builder forImmutableCommentLinks
.static ImmutableCommentLinks
copyOf(CommentLinks instance)
Creates an immutable copy of aCommentLinks
value.boolean
equals(Object another)
This instance is equal to all instances ofImmutableCommentLinks
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:self
,html
,pullRequest
.Links.Href<URI>
html()
Link to the HTML representaion of this item.Links.Href<URI>
pullRequest()
Link to the pull request that this comment belongs to.Links.Href<URI>
self()
Link to this entity in the API.String
toString()
Prints the immutable valueCommentLinks
with attribute values.ImmutableCommentLinks
withHtml(Links.Href<URI> value)
Copy the current immutable object by setting a value for thehtml
attribute.ImmutableCommentLinks
withPullRequest(Links.Href<URI> value)
Copy the current immutable object by setting a value for thepullRequest
attribute.ImmutableCommentLinks
withSelf(Links.Href<URI> value)
Copy the current immutable object by setting a value for theself
attribute.
-
-
-
Method Detail
-
self
@Nullable public Links.Href<URI> self()
Link to this entity in the API.
-
html
@Nullable public Links.Href<URI> html()
Link to the HTML representaion of this item.
-
pullRequest
@Nullable public Links.Href<URI> pullRequest()
Link to the pull request that this comment belongs to.PullRequest
- Specified by:
pullRequest
in interfaceCommentLinks
-
withSelf
public final ImmutableCommentLinks withSelf(@Nullable Links.Href<URI> value)
Copy the current immutable object by setting a value for theself
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for self (can benull
)- Returns:
- A modified copy of the
this
object
-
withHtml
public final ImmutableCommentLinks withHtml(@Nullable Links.Href<URI> value)
Copy the current immutable object by setting a value for thehtml
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for html (can benull
)- Returns:
- A modified copy of the
this
object
-
withPullRequest
public final ImmutableCommentLinks withPullRequest(@Nullable Links.Href<URI> value)
Copy the current immutable object by setting a value for thepullRequest
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for pullRequest (can benull
)- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableCommentLinks
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:self
,html
,pullRequest
.
-
toString
public String toString()
Prints the immutable valueCommentLinks
with attribute values.
-
copyOf
public static ImmutableCommentLinks copyOf(CommentLinks instance)
Creates an immutable copy of aCommentLinks
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 CommentLinks instance
-
builder
public static ImmutableCommentLinks.Builder builder()
Creates a builder forImmutableCommentLinks
.ImmutableCommentLinks.builder() .self(com.spotify.github.Links.Href<java.net.URI> | null) // nullable
self
.html(com.spotify.github.Links.Href<java.net.URI> | null) // nullablehtml
.pullRequest(com.spotify.github.Links.Href<java.net.URI> | null) // nullablepullRequest
.build();- Returns:
- A new ImmutableCommentLinks builder
-
-