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.Builderis 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 ImmutablePullRequestbuild()Builds a newImmutablePullRequest.ImmutablePullRequest.BuilderdiffUrl(URI diffUrl)Initializes the value for thediffUrlattribute.ImmutablePullRequest.Builderfrom(PullRequest instance)Fill a builder with attribute values from the providedPullRequestinstance.ImmutablePullRequest.BuilderhtmlUrl(URI htmlUrl)Initializes the value for thehtmlUrlattribute.ImmutablePullRequest.BuilderpatchUrl(URI patchUrl)Initializes the value for thepatchUrlattribute.ImmutablePullRequest.Builderurl(URI url)Initializes the value for theurlattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder from(PullRequest instance)
Fill a builder with attribute values from the providedPullRequestinstance. 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:
thisbuilder for use in a chained invocation
-
url
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder url(@Nullable URI url)
Initializes the value for theurlattribute.- Parameters:
url- The value for url (can benull)- Returns:
thisbuilder for use in a chained invocation
-
htmlUrl
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder htmlUrl(@Nullable URI htmlUrl)
Initializes the value for thehtmlUrlattribute.- Parameters:
htmlUrl- The value for htmlUrl (can benull)- Returns:
thisbuilder for use in a chained invocation
-
diffUrl
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder diffUrl(@Nullable URI diffUrl)
Initializes the value for thediffUrlattribute.- Parameters:
diffUrl- The value for diffUrl (can benull)- Returns:
thisbuilder for use in a chained invocation
-
patchUrl
@CanIgnoreReturnValue public final ImmutablePullRequest.Builder patchUrl(@Nullable URI patchUrl)
Initializes the value for thepatchUrlattribute.- Parameters:
patchUrl- The value for patchUrl (can benull)- Returns:
thisbuilder 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
-
-