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.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 ImmutableFileCreate.Builder
branch(String branch)
Initializes the value for thebranch
attribute.ImmutableFileCreate
build()
Builds a newImmutableFileCreate
.ImmutableFileCreate.Builder
content(String content)
Initializes the value for thecontent
attribute.ImmutableFileCreate.Builder
from(FileCreate instance)
Fill a builder with attribute values from the providedFileCreate
instance.ImmutableFileCreate.Builder
message(String message)
Initializes the value for themessage
attribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableFileCreate.Builder from(FileCreate instance)
Fill a builder with attribute values from the providedFileCreate
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 ImmutableFileCreate.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 ImmutableFileCreate.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
-
branch
@CanIgnoreReturnValue public final ImmutableFileCreate.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 ImmutableFileCreate build()
Builds a newImmutableFileCreate
.- Returns:
- An immutable instance of FileCreate
- Throws:
IllegalStateException
- if any required attributes are missing
-
-