Package com.spotify.github.v3.issues
Class ImmutablePullRequest
- java.lang.Object
-
- com.spotify.github.v3.issues.ImmutablePullRequest
-
- All Implemented Interfaces:
PullRequest
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutablePullRequest extends Object implements PullRequest
Immutable implementation ofPullRequest.Use the builder to create immutable instances:
ImmutablePullRequest.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutablePullRequest.BuilderBuilds instances of typeImmutablePullRequest.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutablePullRequest.Builderbuilder()Creates a builder forImmutablePullRequest.static ImmutablePullRequestcopyOf(PullRequest instance)Creates an immutable copy of aPullRequestvalue.URIdiffUrl()Diff URL.booleanequals(Object another)This instance is equal to all instances ofImmutablePullRequestthat have equal attribute values.inthashCode()Computes a hash code from attributes:url,htmlUrl,diffUrl,patchUrl.URIhtmlUrl()HTML URL.URIpatchUrl()Patch URL.StringtoString()Prints the immutable valuePullRequestwith attribute values.URIurl()URL.ImmutablePullRequestwithDiffUrl(URI value)Copy the current immutable object by setting a value for thediffUrlattribute.ImmutablePullRequestwithHtmlUrl(URI value)Copy the current immutable object by setting a value for thehtmlUrlattribute.ImmutablePullRequestwithPatchUrl(URI value)Copy the current immutable object by setting a value for thepatchUrlattribute.ImmutablePullRequestwithUrl(URI value)Copy the current immutable object by setting a value for theurlattribute.
-
-
-
Method Detail
-
url
@Nullable public URI url()
URL.- Specified by:
urlin interfacePullRequest
-
htmlUrl
@Nullable public URI htmlUrl()
HTML URL.- Specified by:
htmlUrlin interfacePullRequest
-
diffUrl
@Nullable public URI diffUrl()
Diff URL.- Specified by:
diffUrlin interfacePullRequest
-
patchUrl
@Nullable public URI patchUrl()
Patch URL.- Specified by:
patchUrlin interfacePullRequest
-
withUrl
public final ImmutablePullRequest 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 ImmutablePullRequest 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
-
withDiffUrl
public final ImmutablePullRequest withDiffUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thediffUrlattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for diffUrl (can benull)- Returns:
- A modified copy of the
thisobject
-
withPatchUrl
public final ImmutablePullRequest withPatchUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thepatchUrlattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for patchUrl (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutablePullRequestthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:url,htmlUrl,diffUrl,patchUrl.
-
toString
public String toString()
Prints the immutable valuePullRequestwith attribute values.
-
copyOf
public static ImmutablePullRequest copyOf(PullRequest instance)
Creates an immutable copy of aPullRequestvalue. 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 PullRequest instance
-
builder
public static ImmutablePullRequest.Builder builder()
Creates a builder forImmutablePullRequest.ImmutablePullRequest.builder() .url(java.net.URI | null) // nullableurl.htmlUrl(java.net.URI | null) // nullablehtmlUrl.diffUrl(java.net.URI | null) // nullablediffUrl.patchUrl(java.net.URI | null) // nullablepatchUrl.build();- Returns:
- A new ImmutablePullRequest builder
-
-