Package com.spotify.github.v3.git
Class ImmutableBlob.Builder
- java.lang.Object
-
- com.spotify.github.v3.git.ImmutableBlob.Builder
-
- Enclosing class:
- ImmutableBlob
@NotThreadSafe public static final class ImmutableBlob.Builder extends Object
Builds instances of typeImmutableBlob. 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 ImmutableBlobbuild()Builds a newImmutableBlob.ImmutableBlob.Buildercontent(String content)Initializes the value for thecontentattribute.ImmutableBlob.Builderencoding(String encoding)Initializes the value for theencodingattribute.ImmutableBlob.Builderfrom(Blob instance)Fill a builder with attribute values from the providedcom.spotify.github.v3.git.Blobinstance.ImmutableBlob.Builderfrom(ShaLink instance)Fill a builder with attribute values from the providedcom.spotify.github.v3.git.ShaLinkinstance.ImmutableBlob.Buildersha(String sha)Initializes the value for theshaattribute.ImmutableBlob.Buildersize(Integer size)Initializes the value for thesizeattribute.ImmutableBlob.Builderurl(URI url)Initializes the value for theurlattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableBlob.Builder from(ShaLink instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.git.ShaLinkinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutableBlob.Builder from(Blob instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.git.Blobinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
sha
@CanIgnoreReturnValue public final ImmutableBlob.Builder sha(@Nullable String sha)
Initializes the value for theshaattribute.- Parameters:
sha- The value for sha (can benull)- Returns:
thisbuilder for use in a chained invocation
-
url
@CanIgnoreReturnValue public final ImmutableBlob.Builder url(@Nullable URI url)
Initializes the value for theurlattribute.- Parameters:
url- The value for url (can benull)- Returns:
thisbuilder for use in a chained invocation
-
content
@CanIgnoreReturnValue public final ImmutableBlob.Builder content(@Nullable String content)
Initializes the value for thecontentattribute.- Parameters:
content- The value for content (can benull)- Returns:
thisbuilder for use in a chained invocation
-
encoding
@CanIgnoreReturnValue public final ImmutableBlob.Builder encoding(@Nullable String encoding)
Initializes the value for theencodingattribute.- Parameters:
encoding- The value for encoding (can benull)- Returns:
thisbuilder for use in a chained invocation
-
size
@CanIgnoreReturnValue public final ImmutableBlob.Builder size(@Nullable Integer size)
Initializes the value for thesizeattribute.- Parameters:
size- The value for size (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableBlob build()
Builds a newImmutableBlob.- Returns:
- An immutable instance of Blob
- Throws:
IllegalStateException- if any required attributes are missing
-
-