Package com.spotify.github.v3.git
Class ImmutableTag.Builder
- java.lang.Object
-
- com.spotify.github.v3.git.ImmutableTag.Builder
-
- Enclosing class:
- ImmutableTag
@NotThreadSafe public static final class ImmutableTag.Builder extends Object
Builds instances of typeImmutableTag
. 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 ImmutableTag
build()
Builds a newImmutableTag
.ImmutableTag.Builder
from(ShaLink instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.git.ShaLink
instance.ImmutableTag.Builder
from(Tag instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.git.Tag
instance.ImmutableTag.Builder
message(String message)
Initializes the value for themessage
attribute.ImmutableTag.Builder
object(ReferenceObject object)
Initializes the value for theobject
attribute.ImmutableTag.Builder
sha(String sha)
Initializes the value for thesha
attribute.ImmutableTag.Builder
tag(String tag)
Initializes the value for thetag
attribute.ImmutableTag.Builder
tagger(Author tagger)
Initializes the value for thetagger
attribute.ImmutableTag.Builder
url(URI url)
Initializes the value for theurl
attribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableTag.Builder from(Tag instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.git.Tag
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final ImmutableTag.Builder from(ShaLink instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.git.ShaLink
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
sha
@CanIgnoreReturnValue public final ImmutableTag.Builder sha(@Nullable String sha)
Initializes the value for thesha
attribute.- Parameters:
sha
- The value for sha (can benull
)- Returns:
this
builder for use in a chained invocation
-
url
@CanIgnoreReturnValue public final ImmutableTag.Builder url(@Nullable URI url)
Initializes the value for theurl
attribute.- Parameters:
url
- The value for url (can benull
)- Returns:
this
builder for use in a chained invocation
-
tag
@CanIgnoreReturnValue public final ImmutableTag.Builder tag(@Nullable String tag)
Initializes the value for thetag
attribute.- Parameters:
tag
- The value for tag (can benull
)- Returns:
this
builder for use in a chained invocation
-
message
@CanIgnoreReturnValue public final ImmutableTag.Builder message(@Nullable String message)
Initializes the value for themessage
attribute.- Parameters:
message
- The value for message (can benull
)- Returns:
this
builder for use in a chained invocation
-
tagger
@CanIgnoreReturnValue public final ImmutableTag.Builder tagger(@Nullable Author tagger)
Initializes the value for thetagger
attribute.- Parameters:
tagger
- The value for tagger (can benull
)- Returns:
this
builder for use in a chained invocation
-
object
@CanIgnoreReturnValue public final ImmutableTag.Builder object(@Nullable ReferenceObject object)
Initializes the value for theobject
attribute.- Parameters:
object
- The value for object (can benull
)- Returns:
this
builder for use in a chained invocation
-
build
public ImmutableTag build()
Builds a newImmutableTag
.- Returns:
- An immutable instance of Tag
- Throws:
IllegalStateException
- if any required attributes are missing
-
-