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.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 ImmutableTeamInvitationbuild()Builds a newImmutableTeamInvitation.ImmutableTeamInvitation.Builderemail(String email)Initializes the value for theemailattribute.ImmutableTeamInvitation.BuilderfailedReason(String failedReason)Initializes the value for thefailedReasonattribute.ImmutableTeamInvitation.Builderfrom(TeamInvitation instance)Fill a builder with attribute values from the providedTeamInvitationinstance.ImmutableTeamInvitation.Builderid(Integer id)Initializes the value for theidattribute.ImmutableTeamInvitation.BuilderinvitationSource(String invitationSource)Initializes the value for theinvitationSourceattribute.ImmutableTeamInvitation.BuilderinvitationTeamsUrl(URI invitationTeamsUrl)Initializes the value for theinvitationTeamsUrlattribute.ImmutableTeamInvitation.Builderinviter(User inviter)Initializes the value for theinviterattribute.ImmutableTeamInvitation.Builderlogin(String login)Initializes the value for theloginattribute.ImmutableTeamInvitation.BuildernodeId(String nodeId)Initializes the value for thenodeIdattribute.ImmutableTeamInvitation.Builderrole(String role)Initializes the value for theroleattribute.ImmutableTeamInvitation.BuilderteamCount(Integer teamCount)Initializes the value for theteamCountattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableTeamInvitation.Builder from(TeamInvitation instance)
Fill a builder with attribute values from the providedTeamInvitationinstance. 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 ImmutableTeamInvitation.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
-
login
@CanIgnoreReturnValue public final ImmutableTeamInvitation.Builder login(@Nullable String login)
Initializes the value for theloginattribute.- Parameters:
login- The value for login (can benull)- Returns:
thisbuilder for use in a chained invocation
-
nodeId
@CanIgnoreReturnValue public final ImmutableTeamInvitation.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
-
email
@CanIgnoreReturnValue public final ImmutableTeamInvitation.Builder email(@Nullable String email)
Initializes the value for theemailattribute.- Parameters:
email- The value for email (can benull)- Returns:
thisbuilder for use in a chained invocation
-
role
@CanIgnoreReturnValue public final ImmutableTeamInvitation.Builder role(@Nullable String role)
Initializes the value for theroleattribute.- Parameters:
role- The value for role (can benull)- Returns:
thisbuilder for use in a chained invocation
-
failedReason
@CanIgnoreReturnValue public final ImmutableTeamInvitation.Builder failedReason(@Nullable String failedReason)
Initializes the value for thefailedReasonattribute.- Parameters:
failedReason- The value for failedReason (can benull)- Returns:
thisbuilder for use in a chained invocation
-
inviter
@CanIgnoreReturnValue public final ImmutableTeamInvitation.Builder inviter(@Nullable User inviter)
Initializes the value for theinviterattribute.- Parameters:
inviter- The value for inviter (can benull)- Returns:
thisbuilder for use in a chained invocation
-
teamCount
@CanIgnoreReturnValue public final ImmutableTeamInvitation.Builder teamCount(@Nullable Integer teamCount)
Initializes the value for theteamCountattribute.- Parameters:
teamCount- The value for teamCount (can benull)- Returns:
thisbuilder for use in a chained invocation
-
invitationTeamsUrl
@CanIgnoreReturnValue public final ImmutableTeamInvitation.Builder invitationTeamsUrl(@Nullable URI invitationTeamsUrl)
Initializes the value for theinvitationTeamsUrlattribute.- Parameters:
invitationTeamsUrl- The value for invitationTeamsUrl (can benull)- Returns:
thisbuilder for use in a chained invocation
-
invitationSource
@CanIgnoreReturnValue public final ImmutableTeamInvitation.Builder invitationSource(@Nullable String invitationSource)
Initializes the value for theinvitationSourceattribute.- Parameters:
invitationSource- The value for invitationSource (can benull)- Returns:
thisbuilder 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
-
-