Package io.meeds.social.space.rest.model
Record Class UserSpace
java.lang.Object
java.lang.Record
io.meeds.social.space.rest.model.UserSpace
- Record Components:
id- space technical identifierdisplayName- space name as displayedprettyName- space name as used in URLsurl- space home URLavatarUrl- space avatar URL, null when the space has nonevisibility- space visibilitymembersCount- number of members of the spacemember- whether the viewer is a member of the space
public record UserSpace(long id, String displayName, String prettyName, String url, String avatarUrl, String visibility, int membersCount, boolean member)
extends Record
A space of a profile owner, as it is displayed to a viewer.
Everything the listing renders is carried here on purpose. A viewer may see a
space they are not a member of — a PRIVATE space is listed, only HIDDEN ones
are filtered out — and resolving such a space through the per-space endpoints
would be refused, leaving the UI to render a placeholder for a space it was
told to display. member lets the UI present the two cases
differently instead.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theavatarUrlrecord component.Returns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longid()Returns the value of theidrecord component.booleanmember()Returns the value of thememberrecord component.intReturns the value of themembersCountrecord component.Returns the value of theprettyNamerecord component.final StringtoString()Returns a string representation of this record class.url()Returns the value of theurlrecord component.Returns the value of thevisibilityrecord component.
-
Constructor Details
-
UserSpace
public UserSpace(long id, String displayName, String prettyName, String url, String avatarUrl, String visibility, int membersCount, boolean member) Creates an instance of aUserSpacerecord class.- Parameters:
id- the value for theidrecord componentdisplayName- the value for thedisplayNamerecord componentprettyName- the value for theprettyNamerecord componenturl- the value for theurlrecord componentavatarUrl- the value for theavatarUrlrecord componentvisibility- the value for thevisibilityrecord componentmembersCount- the value for themembersCountrecord componentmember- the value for thememberrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
public long id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
prettyName
Returns the value of theprettyNamerecord component.- Returns:
- the value of the
prettyNamerecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
avatarUrl
Returns the value of theavatarUrlrecord component.- Returns:
- the value of the
avatarUrlrecord component
-
visibility
Returns the value of thevisibilityrecord component.- Returns:
- the value of the
visibilityrecord component
-
membersCount
public int membersCount()Returns the value of themembersCountrecord component.- Returns:
- the value of the
membersCountrecord component
-
member
public boolean member()Returns the value of thememberrecord component.- Returns:
- the value of the
memberrecord component
-