Class ImmutablePullRequestUpdate.Builder
- java.lang.Object
-
- com.spotify.github.v3.prs.requests.ImmutablePullRequestUpdate.Builder
-
- Enclosing class:
- ImmutablePullRequestUpdate
@NotThreadSafe public static final class ImmutablePullRequestUpdate.Builder extends Object
Builds instances of typeImmutablePullRequestUpdate. 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 ImmutablePullRequestUpdate.Builderbody(String body)Initializes the optional valuebodyto body.ImmutablePullRequestUpdate.Builderbody(Optional<String> body)Initializes the optional valuebodyto body.ImmutablePullRequestUpdatebuild()Builds a newImmutablePullRequestUpdate.ImmutablePullRequestUpdate.Builderfrom(PullRequestUpdate instance)Fill a builder with attribute values from the providedPullRequestUpdateinstance.ImmutablePullRequestUpdate.Builderstate(String state)Initializes the optional valuestateto state.ImmutablePullRequestUpdate.Builderstate(Optional<String> state)Initializes the optional valuestateto state.ImmutablePullRequestUpdate.Buildertitle(String title)Initializes the optional valuetitleto title.ImmutablePullRequestUpdate.Buildertitle(Optional<String> title)Initializes the optional valuetitleto title.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutablePullRequestUpdate.Builder from(PullRequestUpdate instance)
Fill a builder with attribute values from the providedPullRequestUpdateinstance. 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
-
title
@CanIgnoreReturnValue public final ImmutablePullRequestUpdate.Builder title(String title)
Initializes the optional valuetitleto title.- Parameters:
title- The value for title- Returns:
thisbuilder for chained invocation
-
title
@CanIgnoreReturnValue public final ImmutablePullRequestUpdate.Builder title(Optional<String> title)
Initializes the optional valuetitleto title.- Parameters:
title- The value for title- Returns:
thisbuilder for use in a chained invocation
-
body
@CanIgnoreReturnValue public final ImmutablePullRequestUpdate.Builder body(String body)
Initializes the optional valuebodyto body.- Parameters:
body- The value for body- Returns:
thisbuilder for chained invocation
-
body
@CanIgnoreReturnValue public final ImmutablePullRequestUpdate.Builder body(Optional<String> body)
Initializes the optional valuebodyto body.- Parameters:
body- The value for body- Returns:
thisbuilder for use in a chained invocation
-
state
@CanIgnoreReturnValue public final ImmutablePullRequestUpdate.Builder state(String state)
Initializes the optional valuestateto state.- Parameters:
state- The value for state- Returns:
thisbuilder for chained invocation
-
state
@CanIgnoreReturnValue public final ImmutablePullRequestUpdate.Builder state(Optional<String> state)
Initializes the optional valuestateto state.- Parameters:
state- The value for state- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutablePullRequestUpdate build()
Builds a newImmutablePullRequestUpdate.- Returns:
- An immutable instance of PullRequestUpdate
- Throws:
IllegalStateException- if any required attributes are missing
-
-