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 class
ImmutablePullRequest.Builder
Builds instances of typeImmutablePullRequest
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutablePullRequest.Builder
builder()
Creates a builder forImmutablePullRequest
.static ImmutablePullRequest
copyOf(PullRequest instance)
Creates an immutable copy of aPullRequest
value.URI
diffUrl()
Diff URL.boolean
equals(Object another)
This instance is equal to all instances ofImmutablePullRequest
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:url
,htmlUrl
,diffUrl
,patchUrl
.URI
htmlUrl()
HTML URL.URI
patchUrl()
Patch URL.String
toString()
Prints the immutable valuePullRequest
with attribute values.URI
url()
URL.ImmutablePullRequest
withDiffUrl(URI value)
Copy the current immutable object by setting a value for thediffUrl
attribute.ImmutablePullRequest
withHtmlUrl(URI value)
Copy the current immutable object by setting a value for thehtmlUrl
attribute.ImmutablePullRequest
withPatchUrl(URI value)
Copy the current immutable object by setting a value for thepatchUrl
attribute.ImmutablePullRequest
withUrl(URI value)
Copy the current immutable object by setting a value for theurl
attribute.
-
-
-
Method Detail
-
url
@Nullable public URI url()
URL.- Specified by:
url
in interfacePullRequest
-
htmlUrl
@Nullable public URI htmlUrl()
HTML URL.- Specified by:
htmlUrl
in interfacePullRequest
-
diffUrl
@Nullable public URI diffUrl()
Diff URL.- Specified by:
diffUrl
in interfacePullRequest
-
patchUrl
@Nullable public URI patchUrl()
Patch URL.- Specified by:
patchUrl
in interfacePullRequest
-
withUrl
public final ImmutablePullRequest 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 ImmutablePullRequest 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
-
withDiffUrl
public final ImmutablePullRequest withDiffUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thediffUrl
attribute. 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
this
object
-
withPatchUrl
public final ImmutablePullRequest withPatchUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thepatchUrl
attribute. 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
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutablePullRequest
that 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 valuePullRequest
with attribute values.
-
copyOf
public static ImmutablePullRequest copyOf(PullRequest instance)
Creates an immutable copy of aPullRequest
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 PullRequest instance
-
builder
public static ImmutablePullRequest.Builder builder()
Creates a builder forImmutablePullRequest
.ImmutablePullRequest.builder() .url(java.net.URI | null) // nullable
url
.htmlUrl(java.net.URI | null) // nullablehtmlUrl
.diffUrl(java.net.URI | null) // nullablediffUrl
.patchUrl(java.net.URI | null) // nullablepatchUrl
.build();- Returns:
- A new ImmutablePullRequest builder
-
-