Package com.spotify.github.v3.issues
Class ImmutablePullRequest.Builder
- java.lang.Object
-
- com.spotify.github.v3.issues.ImmutablePullRequest.Builder
-
- Enclosing class:
- ImmutablePullRequest
@NotThreadSafe public static final class ImmutablePullRequest.Builder extends Object
Builds instances of typeImmutablePullRequest
. Initialize attributes and then invoke thebuild()
method to create an immutable instance.Builder
is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutablePullRequest
build()
Builds a newImmutablePullRequest
.ImmutablePullRequest.Builder
diffUrl(URI diffUrl)
Initializes the value for thediffUrl
attribute.ImmutablePullRequest.Builder
from(PullRequest instance)
Fill a builder with attribute values from the providedPullRequest
instance.ImmutablePullRequest.Builder
htmlUrl(URI htmlUrl)
Initializes the value for thehtmlUrl
attribute.ImmutablePullRequest.Builder
patchUrl(URI patchUrl)
Initializes the value for thepatchUrl
attribute.ImmutablePullRequest.Builder
url(URI url)
Initializes the value for theurl
attribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder from(PullRequest instance)
Fill a builder with attribute values from the providedPullRequest
instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
url
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder url(@Nullable URI url)
Initializes the value for theurl
attribute.- Parameters:
url
- The value for url (can benull
)- Returns:
this
builder for use in a chained invocation
-
htmlUrl
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder htmlUrl(@Nullable URI htmlUrl)
Initializes the value for thehtmlUrl
attribute.- Parameters:
htmlUrl
- The value for htmlUrl (can benull
)- Returns:
this
builder for use in a chained invocation
-
diffUrl
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder diffUrl(@Nullable URI diffUrl)
Initializes the value for thediffUrl
attribute.- Parameters:
diffUrl
- The value for diffUrl (can benull
)- Returns:
this
builder for use in a chained invocation
-
patchUrl
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder patchUrl(@Nullable URI patchUrl)
Initializes the value for thepatchUrl
attribute.- Parameters:
patchUrl
- The value for patchUrl (can benull
)- Returns:
this
builder for use in a chained invocation
-
build
public ImmutablePullRequest build()
Builds a newImmutablePullRequest
.- Returns:
- An immutable instance of PullRequest
- Throws:
IllegalStateException
- if any required attributes are missing
-
-