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.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 ImmutableRepositoryInvitation
build()
Builds a newImmutableRepositoryInvitation
.ImmutableRepositoryInvitation.Builder
createdAt(ZonedDateTime createdAt)
Initializes the value for thecreatedAt
attribute.ImmutableRepositoryInvitation.Builder
expired(boolean expired)
Initializes the optional valueexpired
to expired.ImmutableRepositoryInvitation.Builder
expired(Optional<Boolean> expired)
Initializes the optional valueexpired
to expired.ImmutableRepositoryInvitation.Builder
from(RepositoryInvitation instance)
Fill a builder with attribute values from the providedRepositoryInvitation
instance.ImmutableRepositoryInvitation.Builder
htmlUrl(URI htmlUrl)
Initializes the value for thehtmlUrl
attribute.ImmutableRepositoryInvitation.Builder
id(Integer id)
Initializes the value for theid
attribute.ImmutableRepositoryInvitation.Builder
invitee(User invitee)
Initializes the value for theinvitee
attribute.ImmutableRepositoryInvitation.Builder
inviter(User inviter)
Initializes the value for theinviter
attribute.ImmutableRepositoryInvitation.Builder
nodeId(String nodeId)
Initializes the value for thenodeId
attribute.ImmutableRepositoryInvitation.Builder
permissions(String permissions)
Initializes the value for thepermissions
attribute.ImmutableRepositoryInvitation.Builder
repository(Repository repository)
Initializes the value for therepository
attribute.ImmutableRepositoryInvitation.Builder
url(URI url)
Initializes the value for theurl
attribute.
-
-
-
Method Detail
-
from
@CanIgnoreReturnValue public final ImmutableRepositoryInvitation.Builder from(RepositoryInvitation instance)
Fill a builder with attribute values from the providedRepositoryInvitation
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 ImmutableRepositoryInvitation.Builder id(Integer id)
Initializes the value for theid
attribute.- Parameters:
id
- The value for id- Returns:
this
builder for use in a chained invocation
-
nodeId
@CanIgnoreReturnValue public final ImmutableRepositoryInvitation.Builder nodeId(String nodeId)
Initializes the value for thenodeId
attribute.- Parameters:
nodeId
- The value for nodeId- Returns:
this
builder for use in a chained invocation
-
repository
@CanIgnoreReturnValue public final ImmutableRepositoryInvitation.Builder repository(Repository repository)
Initializes the value for therepository
attribute.- Parameters:
repository
- The value for repository- Returns:
this
builder for use in a chained invocation
-
invitee
@CanIgnoreReturnValue public final ImmutableRepositoryInvitation.Builder invitee(@Nullable User invitee)
Initializes the value for theinvitee
attribute.- Parameters:
invitee
- The value for invitee (can benull
)- Returns:
this
builder for use in a chained invocation
-
inviter
@CanIgnoreReturnValue public final ImmutableRepositoryInvitation.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
-
permissions
@CanIgnoreReturnValue public final ImmutableRepositoryInvitation.Builder permissions(String permissions)
Initializes the value for thepermissions
attribute.- Parameters:
permissions
- The value for permissions- Returns:
this
builder for use in a chained invocation
-
createdAt
@CanIgnoreReturnValue public final ImmutableRepositoryInvitation.Builder createdAt(ZonedDateTime createdAt)
Initializes the value for thecreatedAt
attribute.- Parameters:
createdAt
- The value for createdAt- Returns:
this
builder for use in a chained invocation
-
expired
@CanIgnoreReturnValue public final ImmutableRepositoryInvitation.Builder expired(boolean expired)
Initializes the optional valueexpired
to expired.- Parameters:
expired
- The value for expired- Returns:
this
builder for chained invocation
-
expired
@CanIgnoreReturnValue public final ImmutableRepositoryInvitation.Builder expired(Optional<Boolean> expired)
Initializes the optional valueexpired
to expired.- Parameters:
expired
- The value for expired- Returns:
this
builder for use in a chained invocation
-
url
@CanIgnoreReturnValue public final ImmutableRepositoryInvitation.Builder url(URI url)
Initializes the value for theurl
attribute.- Parameters:
url
- The value for url- Returns:
this
builder for use in a chained invocation
-
htmlUrl
@CanIgnoreReturnValue public final ImmutableRepositoryInvitation.Builder htmlUrl(URI htmlUrl)
Initializes the value for thehtmlUrl
attribute.- Parameters:
htmlUrl
- The value for htmlUrl- Returns:
this
builder 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
-
-