Package com.spotify.github.v3.git
Class ImmutableTreeItem.Builder
- java.lang.Object
-
- com.spotify.github.v3.git.ImmutableTreeItem.Builder
-
- Enclosing class:
- ImmutableTreeItem
@NotThreadSafe public static final class ImmutableTreeItem.Builder extends Object
Builds instances of typeImmutableTreeItem
. 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 ImmutableTreeItem
build()
Builds a newImmutableTreeItem
.ImmutableTreeItem.Builder
from(ShaLink instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.git.ShaLink
instance.ImmutableTreeItem.Builder
from(TreeItem instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.git.TreeItem
instance.ImmutableTreeItem.Builder
mode(String mode)
Initializes the value for themode
attribute.ImmutableTreeItem.Builder
path(String path)
Initializes the value for thepath
attribute.ImmutableTreeItem.Builder
sha(String sha)
Initializes the value for thesha
attribute.ImmutableTreeItem.Builder
size(Long size)
Initializes the value for thesize
attribute.ImmutableTreeItem.Builder
type(String type)
Initializes the value for thetype
attribute.ImmutableTreeItem.Builder
url(URI url)
Initializes the value for theurl
attribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableTreeItem.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
-
from
@CanIgnoreReturnValue public final ImmutableTreeItem.Builder from(TreeItem instance)
Fill a builder with attribute values from the providedcom.spotify.github.v3.git.TreeItem
instance.- Parameters:
instance
- The instance from which to copy values- Returns:
this
builder for use in a chained invocation
-
sha
@CanIgnoreReturnValue public final ImmutableTreeItem.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 ImmutableTreeItem.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
-
path
@CanIgnoreReturnValue public final ImmutableTreeItem.Builder path(@Nullable String path)
Initializes the value for thepath
attribute.- Parameters:
path
- The value for path (can benull
)- Returns:
this
builder for use in a chained invocation
-
mode
@CanIgnoreReturnValue public final ImmutableTreeItem.Builder mode(@Nullable String mode)
Initializes the value for themode
attribute.- Parameters:
mode
- The value for mode (can benull
)- Returns:
this
builder for use in a chained invocation
-
type
@CanIgnoreReturnValue public final ImmutableTreeItem.Builder type(@Nullable String type)
Initializes the value for thetype
attribute.- Parameters:
type
- The value for type (can benull
)- Returns:
this
builder for use in a chained invocation
-
size
@CanIgnoreReturnValue public final ImmutableTreeItem.Builder size(@Nullable Long size)
Initializes the value for thesize
attribute.- Parameters:
size
- The value for size (can benull
)- Returns:
this
builder for use in a chained invocation
-
build
public ImmutableTreeItem build()
Builds a newImmutableTreeItem
.- Returns:
- An immutable instance of TreeItem
- Throws:
IllegalStateException
- if any required attributes are missing
-
-