Class ImmutableFileUpdate.Builder
- java.lang.Object
-
- com.spotify.github.v3.repos.requests.ImmutableFileUpdate.Builder
-
- Enclosing class:
- ImmutableFileUpdate
@NotThreadSafe public static final class ImmutableFileUpdate.Builder extends Object
Builds instances of typeImmutableFileUpdate
. 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 ImmutableFileUpdate.Builder
branch(String branch)
Initializes the value for thebranch
attribute.ImmutableFileUpdate
build()
Builds a newImmutableFileUpdate
.ImmutableFileUpdate.Builder
content(String content)
Initializes the value for thecontent
attribute.ImmutableFileUpdate.Builder
from(FileUpdate instance)
Fill a builder with attribute values from the providedFileUpdate
instance.ImmutableFileUpdate.Builder
message(String message)
Initializes the value for themessage
attribute.ImmutableFileUpdate.Builder
sha(String sha)
Initializes the value for thesha
attribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableFileUpdate.Builder from(FileUpdate instance)
Fill a builder with attribute values from the providedFileUpdate
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
-
message
@CanIgnoreReturnValue public final ImmutableFileUpdate.Builder message(String message)
Initializes the value for themessage
attribute.- Parameters:
message
- The value for message- Returns:
this
builder for use in a chained invocation
-
content
@CanIgnoreReturnValue public final ImmutableFileUpdate.Builder content(String content)
Initializes the value for thecontent
attribute.- Parameters:
content
- The value for content- Returns:
this
builder for use in a chained invocation
-
sha
@CanIgnoreReturnValue public final ImmutableFileUpdate.Builder sha(String sha)
Initializes the value for thesha
attribute.- Parameters:
sha
- The value for sha- Returns:
this
builder for use in a chained invocation
-
branch
@CanIgnoreReturnValue public final ImmutableFileUpdate.Builder branch(@Nullable String branch)
Initializes the value for thebranch
attribute.- Parameters:
branch
- The value for branch (can benull
)- Returns:
this
builder for use in a chained invocation
-
build
public ImmutableFileUpdate build()
Builds a newImmutableFileUpdate
.- Returns:
- An immutable instance of FileUpdate
- Throws:
IllegalStateException
- if any required attributes are missing
-
-