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 classImmutableRepositoryInvitation.BuilderBuilds instances of typeImmutableRepositoryInvitation.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableRepositoryInvitation.Builderbuilder()Creates a builder forImmutableRepositoryInvitation.static ImmutableRepositoryInvitationcopyOf(RepositoryInvitation instance)Creates an immutable copy of aRepositoryInvitationvalue.ZonedDateTimecreatedAt()Date when invite was createdbooleanequals(Object another)This instance is equal to all instances ofImmutableRepositoryInvitationthat have equal attribute values.Optional<Boolean>expired()Whether or not the invitation has expiredinthashCode()Computes a hash code from attributes:id,nodeId,repository,invitee,inviter,permissions,createdAt,expired,url,htmlUrl.URIhtmlUrl()HTML URLIntegerid()Unique identifier of the repository invitationUserinvitee()The user that is receiving the inviteUserinviter()The user that sent the inviteStringnodeId()Node IDStringpermissions()The permission associated with the invitationRepositoryrepository()The repository that the invitee is being invited toStringtoString()Prints the immutable valueRepositoryInvitationwith attribute values.URIurl()API URLImmutableRepositoryInvitationwithCreatedAt(ZonedDateTime value)Copy the current immutable object by setting a value for thecreatedAtattribute.ImmutableRepositoryInvitationwithExpired(boolean value)Copy the current immutable object by setting a present value for the optionalexpiredattribute.ImmutableRepositoryInvitationwithExpired(Optional<Boolean> optional)Copy the current immutable object by setting an optional value for theexpiredattribute.ImmutableRepositoryInvitationwithHtmlUrl(URI value)Copy the current immutable object by setting a value for thehtmlUrlattribute.ImmutableRepositoryInvitationwithId(Integer value)Copy the current immutable object by setting a value for theidattribute.ImmutableRepositoryInvitationwithInvitee(User value)Copy the current immutable object by setting a value for theinviteeattribute.ImmutableRepositoryInvitationwithInviter(User value)Copy the current immutable object by setting a value for theinviterattribute.ImmutableRepositoryInvitationwithNodeId(String value)Copy the current immutable object by setting a value for thenodeIdattribute.ImmutableRepositoryInvitationwithPermissions(String value)Copy the current immutable object by setting a value for thepermissionsattribute.ImmutableRepositoryInvitationwithRepository(Repository value)Copy the current immutable object by setting a value for therepositoryattribute.ImmutableRepositoryInvitationwithUrl(URI value)Copy the current immutable object by setting a value for theurlattribute.
-
-
-
Method Detail
-
id
public Integer id()
Unique identifier of the repository invitation- Specified by:
idin interfaceRepositoryInvitation
-
nodeId
public String nodeId()
Node ID- Specified by:
nodeIdin interfaceRepositoryInvitation
-
repository
public Repository repository()
The repository that the invitee is being invited to- Specified by:
repositoryin interfaceRepositoryInvitation
-
invitee
@Nullable public User invitee()
The user that is receiving the invite- Specified by:
inviteein interfaceRepositoryInvitation
-
inviter
@Nullable public User inviter()
The user that sent the invite- Specified by:
inviterin interfaceRepositoryInvitation
-
permissions
public String permissions()
The permission associated with the invitation- Specified by:
permissionsin interfaceRepositoryInvitation
-
createdAt
public ZonedDateTime createdAt()
Date when invite was created- Specified by:
createdAtin interfaceRepositoryInvitation
-
expired
public Optional<Boolean> expired()
Whether or not the invitation has expired- Specified by:
expiredin interfaceRepositoryInvitation
-
url
public URI url()
API URL- Specified by:
urlin interfaceRepositoryInvitation
-
htmlUrl
public URI htmlUrl()
HTML URL- Specified by:
htmlUrlin interfaceRepositoryInvitation
-
withId
public final ImmutableRepositoryInvitation withId(Integer value)
Copy the current immutable object by setting a value for theidattribute. 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
thisobject
-
withNodeId
public final ImmutableRepositoryInvitation withNodeId(String value)
Copy the current immutable object by setting a value for thenodeIdattribute. 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
thisobject
-
withRepository
public final ImmutableRepositoryInvitation withRepository(Repository value)
Copy the current immutable object by setting a value for therepositoryattribute. 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
thisobject
-
withInvitee
public final ImmutableRepositoryInvitation withInvitee(@Nullable User value)
Copy the current immutable object by setting a value for theinviteeattribute. 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
thisobject
-
withInviter
public final ImmutableRepositoryInvitation withInviter(@Nullable User value)
Copy the current immutable object by setting a value for theinviterattribute. 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
thisobject
-
withPermissions
public final ImmutableRepositoryInvitation withPermissions(String value)
Copy the current immutable object by setting a value for thepermissionsattribute. 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
thisobject
-
withCreatedAt
public final ImmutableRepositoryInvitation withCreatedAt(ZonedDateTime value)
Copy the current immutable object by setting a value for thecreatedAtattribute. 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
thisobject
-
withExpired
public final ImmutableRepositoryInvitation withExpired(boolean value)
Copy the current immutable object by setting a present value for the optionalexpiredattribute.- Parameters:
value- The value for expired- Returns:
- A modified copy of
thisobject
-
withExpired
public final ImmutableRepositoryInvitation withExpired(Optional<Boolean> optional)
Copy the current immutable object by setting an optional value for theexpiredattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for expired- Returns:
- A modified copy of
thisobject
-
withUrl
public final ImmutableRepositoryInvitation withUrl(URI value)
Copy the current immutable object by setting a value for theurlattribute. 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
thisobject
-
withHtmlUrl
public final ImmutableRepositoryInvitation withHtmlUrl(URI value)
Copy the current immutable object by setting a value for thehtmlUrlattribute. 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
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableRepositoryInvitationthat 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 valueRepositoryInvitationwith attribute values.
-
copyOf
public static ImmutableRepositoryInvitation copyOf(RepositoryInvitation instance)
Creates an immutable copy of aRepositoryInvitationvalue. 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) // requiredid.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(Boolean) // optionalexpired.url(java.net.URI) // requiredurl.htmlUrl(java.net.URI) // requiredhtmlUrl.build();- Returns:
- A new ImmutableRepositoryInvitation builder
-
-