Package com.spotify.github.v3.repos
Class ImmutableRepositoryInvitation
- java.lang.Object
-
- com.spotify.github.v3.repos.ImmutableRepositoryInvitation
-
- All Implemented Interfaces:
RepositoryInvitation
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableRepositoryInvitation extends Object implements RepositoryInvitation
Immutable implementation ofRepositoryInvitation
.Use the builder to create immutable instances:
ImmutableRepositoryInvitation.builder()
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImmutableRepositoryInvitation.Builder
Builds instances of typeImmutableRepositoryInvitation
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableRepositoryInvitation.Builder
builder()
Creates a builder forImmutableRepositoryInvitation
.static ImmutableRepositoryInvitation
copyOf(RepositoryInvitation instance)
Creates an immutable copy of aRepositoryInvitation
value.ZonedDateTime
createdAt()
Date when invite was createdboolean
equals(Object another)
This instance is equal to all instances ofImmutableRepositoryInvitation
that have equal attribute values.Optional<Boolean>
expired()
Whether or not the invitation has expiredint
hashCode()
Computes a hash code from attributes:id
,nodeId
,repository
,invitee
,inviter
,permissions
,createdAt
,expired
,url
,htmlUrl
.URI
htmlUrl()
HTML URLInteger
id()
Unique identifier of the repository invitationUser
invitee()
The user that is receiving the inviteUser
inviter()
The user that sent the inviteString
nodeId()
Node IDString
permissions()
The permission associated with the invitationRepository
repository()
The repository that the invitee is being invited toString
toString()
Prints the immutable valueRepositoryInvitation
with attribute values.URI
url()
API URLImmutableRepositoryInvitation
withCreatedAt(ZonedDateTime value)
Copy the current immutable object by setting a value for thecreatedAt
attribute.ImmutableRepositoryInvitation
withExpired(Optional<Boolean> value)
Copy the current immutable object by setting a value for theexpired
attribute.ImmutableRepositoryInvitation
withHtmlUrl(URI value)
Copy the current immutable object by setting a value for thehtmlUrl
attribute.ImmutableRepositoryInvitation
withId(Integer value)
Copy the current immutable object by setting a value for theid
attribute.ImmutableRepositoryInvitation
withInvitee(User value)
Copy the current immutable object by setting a value for theinvitee
attribute.ImmutableRepositoryInvitation
withInviter(User value)
Copy the current immutable object by setting a value for theinviter
attribute.ImmutableRepositoryInvitation
withNodeId(String value)
Copy the current immutable object by setting a value for thenodeId
attribute.ImmutableRepositoryInvitation
withPermissions(String value)
Copy the current immutable object by setting a value for thepermissions
attribute.ImmutableRepositoryInvitation
withRepository(Repository value)
Copy the current immutable object by setting a value for therepository
attribute.ImmutableRepositoryInvitation
withUrl(URI value)
Copy the current immutable object by setting a value for theurl
attribute.
-
-
-
Method Detail
-
id
public Integer id()
Unique identifier of the repository invitation- Specified by:
id
in interfaceRepositoryInvitation
-
nodeId
public String nodeId()
Node ID- Specified by:
nodeId
in interfaceRepositoryInvitation
-
repository
public Repository repository()
The repository that the invitee is being invited to- Specified by:
repository
in interfaceRepositoryInvitation
-
invitee
@Nullable public User invitee()
The user that is receiving the invite- Specified by:
invitee
in interfaceRepositoryInvitation
-
inviter
@Nullable public User inviter()
The user that sent the invite- Specified by:
inviter
in interfaceRepositoryInvitation
-
permissions
public String permissions()
The permission associated with the invitation- Specified by:
permissions
in interfaceRepositoryInvitation
-
createdAt
public ZonedDateTime createdAt()
Date when invite was created- Specified by:
createdAt
in interfaceRepositoryInvitation
-
expired
@Nullable public Optional<Boolean> expired()
Whether or not the invitation has expired- Specified by:
expired
in interfaceRepositoryInvitation
-
url
public URI url()
API URL- Specified by:
url
in interfaceRepositoryInvitation
-
htmlUrl
public URI htmlUrl()
HTML URL- Specified by:
htmlUrl
in interfaceRepositoryInvitation
-
withId
public final ImmutableRepositoryInvitation withId(Integer value)
Copy the current immutable object by setting a value for theid
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for id- Returns:
- A modified copy of the
this
object
-
withNodeId
public final ImmutableRepositoryInvitation withNodeId(String value)
Copy the current immutable object by setting a value for thenodeId
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for nodeId- Returns:
- A modified copy of the
this
object
-
withRepository
public final ImmutableRepositoryInvitation withRepository(Repository value)
Copy the current immutable object by setting a value for therepository
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for repository- Returns:
- A modified copy of the
this
object
-
withInvitee
public final ImmutableRepositoryInvitation withInvitee(@Nullable User value)
Copy the current immutable object by setting a value for theinvitee
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for invitee (can benull
)- Returns:
- A modified copy of the
this
object
-
withInviter
public final ImmutableRepositoryInvitation withInviter(@Nullable User value)
Copy the current immutable object by setting a value for theinviter
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for inviter (can benull
)- Returns:
- A modified copy of the
this
object
-
withPermissions
public final ImmutableRepositoryInvitation withPermissions(String value)
Copy the current immutable object by setting a value for thepermissions
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for permissions- Returns:
- A modified copy of the
this
object
-
withCreatedAt
public final ImmutableRepositoryInvitation withCreatedAt(ZonedDateTime value)
Copy the current immutable object by setting a value for thecreatedAt
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for createdAt- Returns:
- A modified copy of the
this
object
-
withExpired
public final ImmutableRepositoryInvitation withExpired(@Nullable Optional<Boolean> value)
Copy the current immutable object by setting a value for theexpired
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for expired (can benull
)- Returns:
- A modified copy of the
this
object
-
withUrl
public final ImmutableRepositoryInvitation withUrl(URI value)
Copy the current immutable object by setting a value for theurl
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for url- Returns:
- A modified copy of the
this
object
-
withHtmlUrl
public final ImmutableRepositoryInvitation withHtmlUrl(URI value)
Copy the current immutable object by setting a value for thehtmlUrl
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for htmlUrl- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableRepositoryInvitation
that have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:id
,nodeId
,repository
,invitee
,inviter
,permissions
,createdAt
,expired
,url
,htmlUrl
.
-
toString
public String toString()
Prints the immutable valueRepositoryInvitation
with attribute values.
-
copyOf
public static ImmutableRepositoryInvitation copyOf(RepositoryInvitation instance)
Creates an immutable copy of aRepositoryInvitation
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable RepositoryInvitation instance
-
builder
public static ImmutableRepositoryInvitation.Builder builder()
Creates a builder forImmutableRepositoryInvitation
.ImmutableRepositoryInvitation.builder() .id(Integer) // required
id
.nodeId(String) // requirednodeId
.repository(com.spotify.github.v3.repos.Repository) // requiredrepository
.invitee(com.spotify.github.v3.User | null) // nullableinvitee
.inviter(com.spotify.github.v3.User | null) // nullableinviter
.permissions(String) // requiredpermissions
.createdAt(java.time.ZonedDateTime) // requiredcreatedAt
.expired(Optional<Boolean> | null) // nullableexpired
.url(java.net.URI) // requiredurl
.htmlUrl(java.net.URI) // requiredhtmlUrl
.build();- Returns:
- A new ImmutableRepositoryInvitation builder
-
-