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.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 ImmutableTeam
build()
Builds a newImmutableTeam
.ImmutableTeam.Builder
description(String description)
Initializes the value for thedescription
attribute.ImmutableTeam.Builder
from(Team instance)
Fill a builder with attribute values from the providedTeam
instance.ImmutableTeam.Builder
htmlUrl(URI htmlUrl)
Initializes the value for thehtmlUrl
attribute.ImmutableTeam.Builder
id(Integer id)
Initializes the value for theid
attribute.ImmutableTeam.Builder
name(String name)
Initializes the value for thename
attribute.ImmutableTeam.Builder
nodeId(String nodeId)
Initializes the value for thenodeId
attribute.ImmutableTeam.Builder
permission(String permission)
Initializes the value for thepermission
attribute.ImmutableTeam.Builder
privacy(String privacy)
Initializes the value for theprivacy
attribute.ImmutableTeam.Builder
repositoriesUrl(URI repositoriesUrl)
Initializes the value for therepositoriesUrl
attribute.ImmutableTeam.Builder
slug(String slug)
Initializes the value for theslug
attribute.ImmutableTeam.Builder
url(URI url)
Initializes the value for theurl
attribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableTeam.Builder from(Team instance)
Fill a builder with attribute values from the providedTeam
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
-
id
@CanIgnoreReturnValue public final ImmutableTeam.Builder id(@Nullable Integer id)
Initializes the value for theid
attribute.- Parameters:
id
- The value for id (can benull
)- Returns:
this
builder for use in a chained invocation
-
name
@CanIgnoreReturnValue public final ImmutableTeam.Builder name(@Nullable String name)
Initializes the value for thename
attribute.- Parameters:
name
- The value for name (can benull
)- Returns:
this
builder for use in a chained invocation
-
slug
@CanIgnoreReturnValue public final ImmutableTeam.Builder slug(@Nullable String slug)
Initializes the value for theslug
attribute.- Parameters:
slug
- The value for slug (can benull
)- Returns:
this
builder for use in a chained invocation
-
description
@CanIgnoreReturnValue public final ImmutableTeam.Builder description(@Nullable String description)
Initializes the value for thedescription
attribute.- Parameters:
description
- The value for description (can benull
)- Returns:
this
builder for use in a chained invocation
-
privacy
@CanIgnoreReturnValue public final ImmutableTeam.Builder privacy(@Nullable String privacy)
Initializes the value for theprivacy
attribute.- Parameters:
privacy
- The value for privacy (can benull
)- Returns:
this
builder for use in a chained invocation
-
permission
@CanIgnoreReturnValue public final ImmutableTeam.Builder permission(@Nullable String permission)
Initializes the value for thepermission
attribute.- Parameters:
permission
- The value for permission (can benull
)- Returns:
this
builder for use in a chained invocation
-
nodeId
@CanIgnoreReturnValue public final ImmutableTeam.Builder nodeId(@Nullable String nodeId)
Initializes the value for thenodeId
attribute.- Parameters:
nodeId
- The value for nodeId (can benull
)- Returns:
this
builder for use in a chained invocation
-
url
@CanIgnoreReturnValue public final ImmutableTeam.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
-
htmlUrl
@CanIgnoreReturnValue public final ImmutableTeam.Builder htmlUrl(@Nullable URI htmlUrl)
Initializes the value for thehtmlUrl
attribute.- Parameters:
htmlUrl
- The value for htmlUrl (can benull
)- Returns:
this
builder for use in a chained invocation
-
repositoriesUrl
@CanIgnoreReturnValue public final ImmutableTeam.Builder repositoriesUrl(@Nullable URI repositoriesUrl)
Initializes the value for therepositoriesUrl
attribute.- Parameters:
repositoriesUrl
- The value for repositoriesUrl (can benull
)- Returns:
this
builder 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
-
-