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.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 ImmutableFileUpdate.Builderbranch(String branch)Initializes the value for thebranchattribute.ImmutableFileUpdatebuild()Builds a newImmutableFileUpdate.ImmutableFileUpdate.Buildercontent(String content)Initializes the value for thecontentattribute.ImmutableFileUpdate.Builderfrom(FileUpdate instance)Fill a builder with attribute values from the providedFileUpdateinstance.ImmutableFileUpdate.Buildermessage(String message)Initializes the value for themessageattribute.ImmutableFileUpdate.Buildersha(String sha)Initializes the value for theshaattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableFileUpdate.Builder from(FileUpdate instance)
Fill a builder with attribute values from the providedFileUpdateinstance. 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
-
message
@CanIgnoreReturnValue public final ImmutableFileUpdate.Builder message(String message)
Initializes the value for themessageattribute.- Parameters:
message- The value for message- Returns:
thisbuilder for use in a chained invocation
-
content
@CanIgnoreReturnValue public final ImmutableFileUpdate.Builder content(String content)
Initializes the value for thecontentattribute.- Parameters:
content- The value for content- Returns:
thisbuilder for use in a chained invocation
-
sha
@CanIgnoreReturnValue public final ImmutableFileUpdate.Builder sha(String sha)
Initializes the value for theshaattribute.- Parameters:
sha- The value for sha- Returns:
thisbuilder for use in a chained invocation
-
branch
@CanIgnoreReturnValue public final ImmutableFileUpdate.Builder branch(@Nullable String branch)
Initializes the value for thebranchattribute.- Parameters:
branch- The value for branch (can benull)- Returns:
thisbuilder 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
-
-