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 class
ImmutableUser.Builder
Builds instances of typeImmutableUser
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description URI
avatarUrl()
Avatar URL.static ImmutableUser.Builder
builder()
Creates a builder forImmutableUser
.static ImmutableUser
copyOf(User instance)
Creates an immutable copy of aUser
value.boolean
equals(Object another)
This instance is equal to all instances ofImmutableUser
that have equal attribute values.String
eventsUrl()
Events URL template.URI
followersUrl()
Followers URL.String
followingUrl()
Following URL template.String
gistsUrl()
Gists URL template.Optional<String>
gravatarId()
Gravatar ID.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
.URI
htmlUrl()
User resource URL returning HTML.Integer
id()
ID.String
login()
Login name.URI
organizationsUrl()
Organizations URL.URI
receivedEventsUrl()
Received event URL.URI
reposUrl()
Repositories URL.Optional<Boolean>
siteAdmin()
Is user a site admin.String
starredUrl()
Starred URL template.URI
subscriptionsUrl()
Subscriptions URL.String
toString()
Prints the immutable valueUser
with attribute values.String
type()
User type.URI
url()
User resource API URL.ImmutableUser
withAvatarUrl(URI value)
Copy the current immutable object by setting a value for theavatarUrl
attribute.ImmutableUser
withEventsUrl(String value)
Copy the current immutable object by setting a value for theeventsUrl
attribute.ImmutableUser
withFollowersUrl(URI value)
Copy the current immutable object by setting a value for thefollowersUrl
attribute.ImmutableUser
withFollowingUrl(String value)
Copy the current immutable object by setting a value for thefollowingUrl
attribute.ImmutableUser
withGistsUrl(String value)
Copy the current immutable object by setting a value for thegistsUrl
attribute.ImmutableUser
withGravatarId(String value)
Copy the current immutable object by setting a present value for the optionalgravatarId
attribute.ImmutableUser
withGravatarId(Optional<String> optional)
Copy the current immutable object by setting an optional value for thegravatarId
attribute.ImmutableUser
withHtmlUrl(URI value)
Copy the current immutable object by setting a value for thehtmlUrl
attribute.ImmutableUser
withId(Integer value)
Copy the current immutable object by setting a value for theid
attribute.ImmutableUser
withLogin(String value)
Copy the current immutable object by setting a value for thelogin
attribute.ImmutableUser
withOrganizationsUrl(URI value)
Copy the current immutable object by setting a value for theorganizationsUrl
attribute.ImmutableUser
withReceivedEventsUrl(URI value)
Copy the current immutable object by setting a value for thereceivedEventsUrl
attribute.ImmutableUser
withReposUrl(URI value)
Copy the current immutable object by setting a value for thereposUrl
attribute.ImmutableUser
withSiteAdmin(boolean value)
Copy the current immutable object by setting a present value for the optionalsiteAdmin
attribute.ImmutableUser
withSiteAdmin(Optional<Boolean> optional)
Copy the current immutable object by setting an optional value for thesiteAdmin
attribute.ImmutableUser
withStarredUrl(String value)
Copy the current immutable object by setting a value for thestarredUrl
attribute.ImmutableUser
withSubscriptionsUrl(URI value)
Copy the current immutable object by setting a value for thesubscriptionsUrl
attribute.ImmutableUser
withType(String value)
Copy the current immutable object by setting a value for thetype
attribute.ImmutableUser
withUrl(URI value)
Copy the current immutable object by setting a value for theurl
attribute.
-
-
-
Method Detail
-
gravatarId
public Optional<String> gravatarId()
Gravatar ID.- Specified by:
gravatarId
in interfaceUser
-
htmlUrl
@Nullable public URI htmlUrl()
User resource URL returning HTML.
-
followersUrl
@Nullable public URI followersUrl()
Followers URL.- Specified by:
followersUrl
in interfaceUser
-
followingUrl
@Nullable public String followingUrl()
Following URL template.- Specified by:
followingUrl
in interfaceUser
-
gistsUrl
@Nullable public String gistsUrl()
Gists URL template.
-
starredUrl
@Nullable public String starredUrl()
Starred URL template.- Specified by:
starredUrl
in interfaceUser
-
subscriptionsUrl
@Nullable public URI subscriptionsUrl()
Subscriptions URL.- Specified by:
subscriptionsUrl
in interfaceUser
-
organizationsUrl
@Nullable public URI organizationsUrl()
Organizations URL.- Specified by:
organizationsUrl
in interfaceUser
-
eventsUrl
@Nullable public String eventsUrl()
Events URL template.
-
receivedEventsUrl
@Nullable public URI receivedEventsUrl()
Received event URL.- Specified by:
receivedEventsUrl
in interfaceUser
-
withLogin
public final ImmutableUser withLogin(@Nullable String value)
Copy the current immutable object by setting a value for thelogin
attribute. 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
this
object
-
withId
public final ImmutableUser withId(@Nullable 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 (can benull
)- Returns:
- A modified copy of the
this
object
-
withAvatarUrl
public final ImmutableUser withAvatarUrl(@Nullable URI value)
Copy the current immutable object by setting a value for theavatarUrl
attribute. 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
this
object
-
withGravatarId
public final ImmutableUser withGravatarId(String value)
Copy the current immutable object by setting a present value for the optionalgravatarId
attribute.- Parameters:
value
- The value for gravatarId- Returns:
- A modified copy of
this
object
-
withGravatarId
public final ImmutableUser withGravatarId(Optional<String> optional)
Copy the current immutable object by setting an optional value for thegravatarId
attribute. 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
this
object
-
withUrl
public final ImmutableUser withUrl(@Nullable 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 (can benull
)- Returns:
- A modified copy of the
this
object
-
withHtmlUrl
public final ImmutableUser withHtmlUrl(@Nullable 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 (can benull
)- Returns:
- A modified copy of the
this
object
-
withFollowersUrl
public final ImmutableUser withFollowersUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thefollowersUrl
attribute. 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
this
object
-
withFollowingUrl
public final ImmutableUser withFollowingUrl(@Nullable String value)
Copy the current immutable object by setting a value for thefollowingUrl
attribute. 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
this
object
-
withGistsUrl
public final ImmutableUser withGistsUrl(@Nullable String value)
Copy the current immutable object by setting a value for thegistsUrl
attribute. 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
this
object
-
withStarredUrl
public final ImmutableUser withStarredUrl(@Nullable String value)
Copy the current immutable object by setting a value for thestarredUrl
attribute. 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
this
object
-
withSubscriptionsUrl
public final ImmutableUser withSubscriptionsUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thesubscriptionsUrl
attribute. 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
this
object
-
withOrganizationsUrl
public final ImmutableUser withOrganizationsUrl(@Nullable URI value)
Copy the current immutable object by setting a value for theorganizationsUrl
attribute. 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
this
object
-
withReposUrl
public final ImmutableUser withReposUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thereposUrl
attribute. 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
this
object
-
withEventsUrl
public final ImmutableUser withEventsUrl(@Nullable String value)
Copy the current immutable object by setting a value for theeventsUrl
attribute. 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
this
object
-
withReceivedEventsUrl
public final ImmutableUser withReceivedEventsUrl(@Nullable URI value)
Copy the current immutable object by setting a value for thereceivedEventsUrl
attribute. 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
this
object
-
withType
public final ImmutableUser withType(@Nullable String value)
Copy the current immutable object by setting a value for thetype
attribute. 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
this
object
-
withSiteAdmin
public final ImmutableUser withSiteAdmin(boolean value)
Copy the current immutable object by setting a present value for the optionalsiteAdmin
attribute.- Parameters:
value
- The value for siteAdmin- Returns:
- A modified copy of
this
object
-
withSiteAdmin
public final ImmutableUser withSiteAdmin(Optional<Boolean> optional)
Copy the current immutable object by setting an optional value for thesiteAdmin
attribute. 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
this
object
-
equals
public boolean equals(@Nullable Object another)
This instance is equal to all instances ofImmutableUser
that 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 valueUser
with attribute values.
-
copyOf
public static ImmutableUser copyOf(User instance)
Creates an immutable copy of aUser
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 User instance
-
builder
public static ImmutableUser.Builder builder()
Creates a builder forImmutableUser
.ImmutableUser.builder() .login(String | null) // nullable
login
.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
-
-