Class ImmutableFileCreate.Builder
- java.lang.Object
-
- com.spotify.github.v3.repos.requests.ImmutableFileCreate.Builder
-
- Enclosing class:
- ImmutableFileCreate
@NotThreadSafe public static final class ImmutableFileCreate.Builder extends Object
Builds instances of typeImmutableFileCreate. 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 ImmutableFileCreate.Builderbranch(String branch)Initializes the value for thebranchattribute.ImmutableFileCreatebuild()Builds a newImmutableFileCreate.ImmutableFileCreate.Buildercontent(String content)Initializes the value for thecontentattribute.ImmutableFileCreate.Builderfrom(FileCreate instance)Fill a builder with attribute values from the providedFileCreateinstance.ImmutableFileCreate.Buildermessage(String message)Initializes the value for themessageattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableFileCreate.Builder from(FileCreate instance)
Fill a builder with attribute values from the providedFileCreateinstance. 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 ImmutableFileCreate.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 ImmutableFileCreate.Builder content(String content)
Initializes the value for thecontentattribute.- Parameters:
content- The value for content- Returns:
thisbuilder for use in a chained invocation
-
branch
@CanIgnoreReturnValue public final ImmutableFileCreate.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 ImmutableFileCreate build()
Builds a newImmutableFileCreate.- Returns:
- An immutable instance of FileCreate
- Throws:
IllegalStateException- if any required attributes are missing
-
-