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.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 ImmutablePullRequestUpdate.Builder
body(String body)
Initializes the optional valuebody
to body.ImmutablePullRequestUpdate.Builder
body(Optional<String> body)
Initializes the optional valuebody
to body.ImmutablePullRequestUpdate
build()
Builds a newImmutablePullRequestUpdate
.ImmutablePullRequestUpdate.Builder
from(PullRequestUpdate instance)
Fill a builder with attribute values from the providedPullRequestUpdate
instance.ImmutablePullRequestUpdate.Builder
state(String state)
Initializes the optional valuestate
to state.ImmutablePullRequestUpdate.Builder
state(Optional<String> state)
Initializes the optional valuestate
to state.ImmutablePullRequestUpdate.Builder
title(String title)
Initializes the optional valuetitle
to title.ImmutablePullRequestUpdate.Builder
title(Optional<String> title)
Initializes the optional valuetitle
to title.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutablePullRequestUpdate.Builder from(PullRequestUpdate instance)
Fill a builder with attribute values from the providedPullRequestUpdate
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
-
title
@CanIgnoreReturnValue public final ImmutablePullRequestUpdate.Builder title(String title)
Initializes the optional valuetitle
to title.- Parameters:
title
- The value for title- Returns:
this
builder for chained invocation
-
title
@CanIgnoreReturnValue public final ImmutablePullRequestUpdate.Builder title(Optional<String> title)
Initializes the optional valuetitle
to title.- Parameters:
title
- The value for title- Returns:
this
builder for use in a chained invocation
-
body
@CanIgnoreReturnValue public final ImmutablePullRequestUpdate.Builder body(String body)
Initializes the optional valuebody
to body.- Parameters:
body
- The value for body- Returns:
this
builder for chained invocation
-
body
@CanIgnoreReturnValue public final ImmutablePullRequestUpdate.Builder body(Optional<String> body)
Initializes the optional valuebody
to body.- Parameters:
body
- The value for body- Returns:
this
builder for use in a chained invocation
-
state
@CanIgnoreReturnValue public final ImmutablePullRequestUpdate.Builder state(String state)
Initializes the optional valuestate
to state.- Parameters:
state
- The value for state- Returns:
this
builder for chained invocation
-
state
@CanIgnoreReturnValue public final ImmutablePullRequestUpdate.Builder state(Optional<String> state)
Initializes the optional valuestate
to state.- Parameters:
state
- The value for state- Returns:
this
builder 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
-
-