Package com.spotify.github.v3.orgs
Class ImmutableTeamInvitation.Builder
- java.lang.Object
-
- com.spotify.github.v3.orgs.ImmutableTeamInvitation.Builder
-
- Enclosing class:
- ImmutableTeamInvitation
@NotThreadSafe public static final class ImmutableTeamInvitation.Builder extends Object
Builds instances of typeImmutableTeamInvitation
. 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 ImmutableTeamInvitation
build()
Builds a newImmutableTeamInvitation
.ImmutableTeamInvitation.Builder
email(String email)
Initializes the value for theemail
attribute.ImmutableTeamInvitation.Builder
failedReason(String failedReason)
Initializes the value for thefailedReason
attribute.ImmutableTeamInvitation.Builder
from(TeamInvitation instance)
Fill a builder with attribute values from the providedTeamInvitation
instance.ImmutableTeamInvitation.Builder
id(Integer id)
Initializes the value for theid
attribute.ImmutableTeamInvitation.Builder
invitationSource(String invitationSource)
Initializes the value for theinvitationSource
attribute.ImmutableTeamInvitation.Builder
invitationTeamsUrl(URI invitationTeamsUrl)
Initializes the value for theinvitationTeamsUrl
attribute.ImmutableTeamInvitation.Builder
inviter(User inviter)
Initializes the value for theinviter
attribute.ImmutableTeamInvitation.Builder
login(String login)
Initializes the value for thelogin
attribute.ImmutableTeamInvitation.Builder
nodeId(String nodeId)
Initializes the value for thenodeId
attribute.ImmutableTeamInvitation.Builder
role(String role)
Initializes the value for therole
attribute.ImmutableTeamInvitation.Builder
teamCount(Integer teamCount)
Initializes the value for theteamCount
attribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableTeamInvitation.Builder from(TeamInvitation instance)
Fill a builder with attribute values from the providedTeamInvitation
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 ImmutableTeamInvitation.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
-
login
@CanIgnoreReturnValue public final ImmutableTeamInvitation.Builder login(@Nullable String login)
Initializes the value for thelogin
attribute.- Parameters:
login
- The value for login (can benull
)- Returns:
this
builder for use in a chained invocation
-
nodeId
@CanIgnoreReturnValue public final ImmutableTeamInvitation.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
-
email
@CanIgnoreReturnValue public final ImmutableTeamInvitation.Builder email(@Nullable String email)
Initializes the value for theemail
attribute.- Parameters:
email
- The value for email (can benull
)- Returns:
this
builder for use in a chained invocation
-
role
@CanIgnoreReturnValue public final ImmutableTeamInvitation.Builder role(@Nullable String role)
Initializes the value for therole
attribute.- Parameters:
role
- The value for role (can benull
)- Returns:
this
builder for use in a chained invocation
-
failedReason
@CanIgnoreReturnValue public final ImmutableTeamInvitation.Builder failedReason(@Nullable String failedReason)
Initializes the value for thefailedReason
attribute.- Parameters:
failedReason
- The value for failedReason (can benull
)- Returns:
this
builder for use in a chained invocation
-
inviter
@CanIgnoreReturnValue public final ImmutableTeamInvitation.Builder inviter(@Nullable User inviter)
Initializes the value for theinviter
attribute.- Parameters:
inviter
- The value for inviter (can benull
)- Returns:
this
builder for use in a chained invocation
-
teamCount
@CanIgnoreReturnValue public final ImmutableTeamInvitation.Builder teamCount(@Nullable Integer teamCount)
Initializes the value for theteamCount
attribute.- Parameters:
teamCount
- The value for teamCount (can benull
)- Returns:
this
builder for use in a chained invocation
-
invitationTeamsUrl
@CanIgnoreReturnValue public final ImmutableTeamInvitation.Builder invitationTeamsUrl(@Nullable URI invitationTeamsUrl)
Initializes the value for theinvitationTeamsUrl
attribute.- Parameters:
invitationTeamsUrl
- The value for invitationTeamsUrl (can benull
)- Returns:
this
builder for use in a chained invocation
-
invitationSource
@CanIgnoreReturnValue public final ImmutableTeamInvitation.Builder invitationSource(@Nullable String invitationSource)
Initializes the value for theinvitationSource
attribute.- Parameters:
invitationSource
- The value for invitationSource (can benull
)- Returns:
this
builder for use in a chained invocation
-
build
public ImmutableTeamInvitation build()
Builds a newImmutableTeamInvitation
.- Returns:
- An immutable instance of TeamInvitation
- Throws:
IllegalStateException
- if any required attributes are missing
-
-