Package com.spotify.github.v3
Class ImmutableUser
- java.lang.Object
-
- com.spotify.github.v3.ImmutableUser
-
- All Implemented Interfaces:
User
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableUser extends Object implements User
Immutable implementation ofUser.Use the builder to create immutable instances:
ImmutableUser.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableUser.BuilderBuilds instances of typeImmutableUser.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description URIavatarUrl()Avatar URL.static ImmutableUser.Builderbuilder()Creates a builder forImmutableUser.static ImmutableUsercopyOf(User instance)Creates an immutable copy of aUservalue.booleanequals(Object another)This instance is equal to all instances ofImmutableUserthat have equal attribute values.StringeventsUrl()Events URL template.URIfollowersUrl()Followers URL.StringfollowingUrl()Following URL template.StringgistsUrl()Gists URL template.Optional<String>gravatarId()Gravatar ID.inthashCode()Computes a hash code from attributes:login,id,avatarUrl,gravatarId,url,htmlUrl,followersUrl,followingUrl,gistsUrl,starredUrl,subscriptionsUrl,organizationsUrl,reposUrl,eventsUrl,receivedEventsUrl,type,siteAdmin.URIhtmlUrl()User resource URL returning HTML.Integerid()ID.Stringlogin()Login name.URIorganizationsUrl()Organizations URL.URIreceivedEventsUrl()Received event URL.URIreposUrl()Repositories URL.Optional<Boolean>siteAdmin()Is user a site admin.StringstarredUrl()Starred URL template.URIsubscriptionsUrl()Subscriptions URL.StringtoString()Prints the immutable valueUserwith attribute values.Stringtype()User type.URIurl()User resource API URL.ImmutableUserwithAvatarUrl(URI value)Copy the current immutable object by setting a value for theavatarUrlattribute.ImmutableUserwithEventsUrl(String value)Copy the current immutable object by setting a value for theeventsUrlattribute.ImmutableUserwithFollowersUrl(URI value)Copy the current immutable object by setting a value for thefollowersUrlattribute.ImmutableUserwithFollowingUrl(String value)Copy the current immutable object by setting a value for thefollowingUrlattribute.ImmutableUserwithGistsUrl(String value)Copy the current immutable object by setting a value for thegistsUrlattribute.ImmutableUserwithGravatarId(String value)Copy the current immutable object by setting a present value for the optionalgravatarIdattribute.ImmutableUserwithGravatarId(Optional<String> optional)Copy the current immutable object by setting an optional value for thegravatarIdattribute.ImmutableUserwithHtmlUrl(URI value)Copy the current immutable object by setting a value for thehtmlUrlattribute.ImmutableUserwithId(Integer value)Copy the current immutable object by setting a value for theidattribute.ImmutableUserwithLogin(String value)Copy the current immutable object by setting a value for theloginattribute.ImmutableUserwithOrganizationsUrl(URI value)Copy the current immutable object by setting a value for theorganizationsUrlattribute.ImmutableUserwithReceivedEventsUrl(URI value)Copy the current immutable object by setting a value for thereceivedEventsUrlattribute.ImmutableUserwithReposUrl(URI value)Copy the current immutable object by setting a value for thereposUrlattribute.ImmutableUserwithSiteAdmin(boolean value)Copy the current immutable object by setting a present value for the optionalsiteAdminattribute.ImmutableUserwithSiteAdmin(Optional<Boolean> optional)Copy the current immutable object by setting an optional value for thesiteAdminattribute.ImmutableUserwithStarredUrl(String value)Copy the current immutable object by setting a value for thestarredUrlattribute.ImmutableUserwithSubscriptionsUrl(URI value)Copy the current immutable object by setting a value for thesubscriptionsUrlattribute.ImmutableUserwithType(String value)Copy the current immutable object by setting a value for thetypeattribute.ImmutableUserwithUrl(URI value)Copy the current immutable object by setting a value for theurlattribute.
-
-
-
Method Detail
-
gravatarId
public Optional<String> gravatarId()
Gravatar ID.- Specified by:
gravatarIdin interfaceUser
-
htmlUrl
@Nullable public URI htmlUrl()
User resource URL returning HTML.
-
followersUrl
@Nullable public URI followersUrl()
Followers URL.- Specified by:
followersUrlin interfaceUser
-
followingUrl
@Nullable public String followingUrl()
Following URL template.- Specified by:
followingUrlin interfaceUser
-
gistsUrl
@Nullable public String gistsUrl()
Gists URL template.
-
starredUrl
@Nullable public String starredUrl()
Starred URL template.- Specified by:
starredUrlin interfaceUser
-
subscriptionsUrl
@Nullable public URI subscriptionsUrl()
Subscriptions URL.- Specified by:
subscriptionsUrlin interfaceUser
-
organizationsUrl
@Nullable public URI organizationsUrl()
Organizations URL.- Specified by:
organizationsUrlin interfaceUser
-
eventsUrl
@Nullable public String eventsUrl()
Events URL template.
-
receivedEventsUrl
@Nullable public URI receivedEventsUrl()
Received event URL.- Specified by:
receivedEventsUrlin interfaceUser
-
withLogin
public final ImmutableUser withLogin(@Nullable String value)
Copy the current immutable object by setting a value for theloginattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for login (can benull)- Returns:
- A modified copy of the
thisobject
-
withId
public final ImmutableUser withId(@Nullable 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 (can benull)- Returns:
- A modified copy of the
thisobject
-
withAvatarUrl
public final ImmutableUser withAvatarUrl(@Nullable URI value)
Copy the current immutable object by setting a value for theavatarUrlattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for avatarUrl (can benull)- Returns:
- A modified copy of the
thisobject
-
withGravatarId
public final ImmutableUser withGravatarId(String value)
Copy the current immutable object by setting a present value for the optionalgravatarIdattribute.- Parameters:
value- The value for gravatarId- Returns:
- A modified copy of
thisobject
-
withGravatarId
public final ImmutableUser withGravatarId(Optional<String> optional)
Copy the current immutable object by setting an optional value for thegravatarIdattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for gravatarId- Returns:
- A modified copy of
thisobject
-
withUrl
public final ImmutableUser withUrl(@Nullable 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 (can benull)- Returns:
- A modified copy of the
thisobject
-
withHtmlUrl
public final ImmutableUser withHtmlUrl(@Nullable 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 (can benull)- Returns:
- A modified copy of the
thisobject
-
withFollowersUrl
public final ImmutableUser withFollowersUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thefollowersUrlattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for followersUrl (can benull)- Returns:
- A modified copy of the
thisobject
-
withFollowingUrl
public final ImmutableUser withFollowingUrl(@Nullable String value)
Copy the current immutable object by setting a value for thefollowingUrlattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for followingUrl (can benull)- Returns:
- A modified copy of the
thisobject
-
withGistsUrl
public final ImmutableUser withGistsUrl(@Nullable String value)
Copy the current immutable object by setting a value for thegistsUrlattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for gistsUrl (can benull)- Returns:
- A modified copy of the
thisobject
-
withStarredUrl
public final ImmutableUser withStarredUrl(@Nullable String value)
Copy the current immutable object by setting a value for thestarredUrlattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for starredUrl (can benull)- Returns:
- A modified copy of the
thisobject
-
withSubscriptionsUrl
public final ImmutableUser withSubscriptionsUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thesubscriptionsUrlattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for subscriptionsUrl (can benull)- Returns:
- A modified copy of the
thisobject
-
withOrganizationsUrl
public final ImmutableUser withOrganizationsUrl(@Nullable URI value)
Copy the current immutable object by setting a value for theorganizationsUrlattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for organizationsUrl (can benull)- Returns:
- A modified copy of the
thisobject
-
withReposUrl
public final ImmutableUser withReposUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thereposUrlattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for reposUrl (can benull)- Returns:
- A modified copy of the
thisobject
-
withEventsUrl
public final ImmutableUser withEventsUrl(@Nullable String value)
Copy the current immutable object by setting a value for theeventsUrlattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for eventsUrl (can benull)- Returns:
- A modified copy of the
thisobject
-
withReceivedEventsUrl
public final ImmutableUser withReceivedEventsUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thereceivedEventsUrlattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for receivedEventsUrl (can benull)- Returns:
- A modified copy of the
thisobject
-
withType
public final ImmutableUser withType(@Nullable String value)
Copy the current immutable object by setting a value for thetypeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type (can benull)- Returns:
- A modified copy of the
thisobject
-
withSiteAdmin
public final ImmutableUser withSiteAdmin(boolean value)
Copy the current immutable object by setting a present value for the optionalsiteAdminattribute.- Parameters:
value- The value for siteAdmin- Returns:
- A modified copy of
thisobject
-
withSiteAdmin
public final ImmutableUser withSiteAdmin(Optional<Boolean> optional)
Copy the current immutable object by setting an optional value for thesiteAdminattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for siteAdmin- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableUserthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:login,id,avatarUrl,gravatarId,url,htmlUrl,followersUrl,followingUrl,gistsUrl,starredUrl,subscriptionsUrl,organizationsUrl,reposUrl,eventsUrl,receivedEventsUrl,type,siteAdmin.
-
toString
public String toString()
Prints the immutable valueUserwith attribute values.
-
copyOf
public static ImmutableUser copyOf(User instance)
Creates an immutable copy of aUservalue. 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 User instance
-
builder
public static ImmutableUser.Builder builder()
Creates a builder forImmutableUser.ImmutableUser.builder() .login(String | null) // nullablelogin.id(Integer | null) // nullableid.avatarUrl(java.net.URI | null) // nullableavatarUrl.gravatarId(String) // optionalgravatarId.url(java.net.URI | null) // nullableurl.htmlUrl(java.net.URI | null) // nullablehtmlUrl.followersUrl(java.net.URI | null) // nullablefollowersUrl.followingUrl(String | null) // nullablefollowingUrl.gistsUrl(String | null) // nullablegistsUrl.starredUrl(String | null) // nullablestarredUrl.subscriptionsUrl(java.net.URI | null) // nullablesubscriptionsUrl.organizationsUrl(java.net.URI | null) // nullableorganizationsUrl.reposUrl(java.net.URI | null) // nullablereposUrl.eventsUrl(String | null) // nullableeventsUrl.receivedEventsUrl(java.net.URI | null) // nullablereceivedEventsUrl.type(String | null) // nullabletype.siteAdmin(Boolean) // optionalsiteAdmin.build();- Returns:
- A new ImmutableUser builder
-
-