Package com.spotify.github.v3.repos
Class ImmutableRepositoryInvitation.Builder
- java.lang.Object
-
- com.spotify.github.v3.repos.ImmutableRepositoryInvitation.Builder
-
- Enclosing class:
- ImmutableRepositoryInvitation
@NotThreadSafe public static final class ImmutableRepositoryInvitation.Builder extends Object
Builds instances of typeImmutableRepositoryInvitation. 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 ImmutableRepositoryInvitationbuild()Builds a newImmutableRepositoryInvitation.ImmutableRepositoryInvitation.BuildercreatedAt(ZonedDateTime createdAt)Initializes the value for thecreatedAtattribute.ImmutableRepositoryInvitation.Builderexpired(boolean expired)Initializes the optional valueexpiredto expired.ImmutableRepositoryInvitation.Builderexpired(Optional<Boolean> expired)Initializes the optional valueexpiredto expired.ImmutableRepositoryInvitation.Builderfrom(RepositoryInvitation instance)Fill a builder with attribute values from the providedRepositoryInvitationinstance.ImmutableRepositoryInvitation.BuilderhtmlUrl(URI htmlUrl)Initializes the value for thehtmlUrlattribute.ImmutableRepositoryInvitation.Builderid(Integer id)Initializes the value for theidattribute.ImmutableRepositoryInvitation.Builderinvitee(User invitee)Initializes the value for theinviteeattribute.ImmutableRepositoryInvitation.Builderinviter(User inviter)Initializes the value for theinviterattribute.ImmutableRepositoryInvitation.BuildernodeId(String nodeId)Initializes the value for thenodeIdattribute.ImmutableRepositoryInvitation.Builderpermissions(String permissions)Initializes the value for thepermissionsattribute.ImmutableRepositoryInvitation.Builderrepository(Repository repository)Initializes the value for therepositoryattribute.ImmutableRepositoryInvitation.Builderurl(URI url)Initializes the value for theurlattribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableRepositoryInvitation.Builder from(RepositoryInvitation instance)
Fill a builder with attribute values from the providedRepositoryInvitationinstance. 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 ImmutableRepositoryInvitation.Builder id(Integer id)
Initializes the value for theidattribute.- Parameters:
id- The value for id- Returns:
thisbuilder for use in a chained invocation
-
nodeId
@CanIgnoreReturnValue public final ImmutableRepositoryInvitation.Builder nodeId(String nodeId)
Initializes the value for thenodeIdattribute.- Parameters:
nodeId- The value for nodeId- Returns:
thisbuilder for use in a chained invocation
-
repository
@CanIgnoreReturnValue public final ImmutableRepositoryInvitation.Builder repository(Repository repository)
Initializes the value for therepositoryattribute.- Parameters:
repository- The value for repository- Returns:
thisbuilder for use in a chained invocation
-
invitee
@CanIgnoreReturnValue public final ImmutableRepositoryInvitation.Builder invitee(@Nullable User invitee)
Initializes the value for theinviteeattribute.- Parameters:
invitee- The value for invitee (can benull)- Returns:
thisbuilder for use in a chained invocation
-
inviter
@CanIgnoreReturnValue public final ImmutableRepositoryInvitation.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
-
permissions
@CanIgnoreReturnValue public final ImmutableRepositoryInvitation.Builder permissions(String permissions)
Initializes the value for thepermissionsattribute.- Parameters:
permissions- The value for permissions- Returns:
thisbuilder for use in a chained invocation
-
createdAt
@CanIgnoreReturnValue public final ImmutableRepositoryInvitation.Builder createdAt(ZonedDateTime createdAt)
Initializes the value for thecreatedAtattribute.- Parameters:
createdAt- The value for createdAt- Returns:
thisbuilder for use in a chained invocation
-
expired
@CanIgnoreReturnValue public final ImmutableRepositoryInvitation.Builder expired(boolean expired)
Initializes the optional valueexpiredto expired.- Parameters:
expired- The value for expired- Returns:
thisbuilder for chained invocation
-
expired
@CanIgnoreReturnValue public final ImmutableRepositoryInvitation.Builder expired(Optional<Boolean> expired)
Initializes the optional valueexpiredto expired.- Parameters:
expired- The value for expired- Returns:
thisbuilder for use in a chained invocation
-
url
@CanIgnoreReturnValue public final ImmutableRepositoryInvitation.Builder url(URI url)
Initializes the value for theurlattribute.- Parameters:
url- The value for url- Returns:
thisbuilder for use in a chained invocation
-
htmlUrl
@CanIgnoreReturnValue public final ImmutableRepositoryInvitation.Builder htmlUrl(URI htmlUrl)
Initializes the value for thehtmlUrlattribute.- Parameters:
htmlUrl- The value for htmlUrl- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableRepositoryInvitation build()
Builds a newImmutableRepositoryInvitation.- Returns:
- An immutable instance of RepositoryInvitation
- Throws:
IllegalStateException- if any required attributes are missing
-
-