Package com.spotify.github.v3
Class ImmutableTeam.Builder
- java.lang.Object
-
- com.spotify.github.v3.ImmutableTeam.Builder
-
- Enclosing class:
- ImmutableTeam
@NotThreadSafe public static final class ImmutableTeam.Builder extends Object
Builds instances of typeImmutableTeam. 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 ImmutableTeambuild()Builds a newImmutableTeam.ImmutableTeam.Builderdescription(String description)Initializes the value for thedescriptionattribute.ImmutableTeam.Builderfrom(Team instance)Fill a builder with attribute values from the providedTeaminstance.ImmutableTeam.BuilderhtmlUrl(URI htmlUrl)Initializes the value for thehtmlUrlattribute.ImmutableTeam.Builderid(Integer id)Initializes the value for theidattribute.ImmutableTeam.Buildername(String name)Initializes the value for thenameattribute.ImmutableTeam.BuildernodeId(String nodeId)Initializes the value for thenodeIdattribute.ImmutableTeam.Builderpermission(String permission)Initializes the value for thepermissionattribute.ImmutableTeam.Builderprivacy(String privacy)Initializes the value for theprivacyattribute.ImmutableTeam.BuilderrepositoriesUrl(URI repositoriesUrl)Initializes the value for therepositoriesUrlattribute.ImmutableTeam.Builderslug(String slug)Initializes the value for theslugattribute.ImmutableTeam.Builderurl(URI url)Initializes the value for theurlattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableTeam.Builder from(Team instance)
Fill a builder with attribute values from the providedTeaminstance. 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
-
id
@CanIgnoreReturnValue public final ImmutableTeam.Builder id(@Nullable Integer id)
Initializes the value for theidattribute.- Parameters:
id- The value for id (can benull)- Returns:
thisbuilder for use in a chained invocation
-
name
@CanIgnoreReturnValue public final ImmutableTeam.Builder name(@Nullable String name)
Initializes the value for thenameattribute.- Parameters:
name- The value for name (can benull)- Returns:
thisbuilder for use in a chained invocation
-
slug
@CanIgnoreReturnValue public final ImmutableTeam.Builder slug(@Nullable String slug)
Initializes the value for theslugattribute.- Parameters:
slug- The value for slug (can benull)- Returns:
thisbuilder for use in a chained invocation
-
description
@CanIgnoreReturnValue public final ImmutableTeam.Builder description(@Nullable String description)
Initializes the value for thedescriptionattribute.- Parameters:
description- The value for description (can benull)- Returns:
thisbuilder for use in a chained invocation
-
privacy
@CanIgnoreReturnValue public final ImmutableTeam.Builder privacy(@Nullable String privacy)
Initializes the value for theprivacyattribute.- Parameters:
privacy- The value for privacy (can benull)- Returns:
thisbuilder for use in a chained invocation
-
permission
@CanIgnoreReturnValue public final ImmutableTeam.Builder permission(@Nullable String permission)
Initializes the value for thepermissionattribute.- Parameters:
permission- The value for permission (can benull)- Returns:
thisbuilder for use in a chained invocation
-
nodeId
@CanIgnoreReturnValue public final ImmutableTeam.Builder nodeId(@Nullable String nodeId)
Initializes the value for thenodeIdattribute.- Parameters:
nodeId- The value for nodeId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
url
@CanIgnoreReturnValue public final ImmutableTeam.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
-
htmlUrl
@CanIgnoreReturnValue public final ImmutableTeam.Builder htmlUrl(@Nullable URI htmlUrl)
Initializes the value for thehtmlUrlattribute.- Parameters:
htmlUrl- The value for htmlUrl (can benull)- Returns:
thisbuilder for use in a chained invocation
-
repositoriesUrl
@CanIgnoreReturnValue public final ImmutableTeam.Builder repositoriesUrl(@Nullable URI repositoriesUrl)
Initializes the value for therepositoriesUrlattribute.- Parameters:
repositoriesUrl- The value for repositoriesUrl (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableTeam build()
Builds a newImmutableTeam.- Returns:
- An immutable instance of Team
- Throws:
IllegalStateException- if any required attributes are missing
-
-