Record Class SpaceSearchHitModel
java.lang.Object
java.lang.Record
io.meeds.mcp.server.tool.model.SpaceSearchHitModel
- Record Components:
spaceId- the space technical identifiername- the space display namedescription- the space description, shortened when longurl- the link to the spacevisibility- whether the space is listed in the spaces directoryregistration- how a user joins the spacemember- whether the current user is a member of the spacemyRoles- the current user's roles in the space, empty when nonelastActivityDate- the date of the latest post or comment in the space stream, only for a space whose stream the current user can read
public record SpaceSearchHitModel(long spaceId, String name, String description, String url, Visibility visibility, Registration registration, boolean member, List<SpaceRole> myRoles, String lastActivityDate)
extends Record
One hit of
search_spaces: just enough for an assistant to tell the
space it was asked about from its neighbours and to act on it, without the
full SpaceModel.-
Constructor Summary
ConstructorsConstructorDescriptionSpaceSearchHitModel(long spaceId, String name, String description, String url, Visibility visibility, Registration registration, boolean member, List<SpaceRole> myRoles, String lastActivityDate) Creates an instance of aSpaceSearchHitModelrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thelastActivityDaterecord component.booleanmember()Returns the value of thememberrecord component.myRoles()Returns the value of themyRolesrecord component.name()Returns the value of thenamerecord component.Returns the value of theregistrationrecord component.longspaceId()Returns the value of thespaceIdrecord 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
-
SpaceSearchHitModel
public SpaceSearchHitModel(long spaceId, String name, String description, String url, Visibility visibility, Registration registration, boolean member, List<SpaceRole> myRoles, String lastActivityDate) Creates an instance of aSpaceSearchHitModelrecord class.- Parameters:
spaceId- the value for thespaceIdrecord componentname- the value for thenamerecord componentdescription- the value for thedescriptionrecord componenturl- the value for theurlrecord componentvisibility- the value for thevisibilityrecord componentregistration- the value for theregistrationrecord componentmember- the value for thememberrecord componentmyRoles- the value for themyRolesrecord componentlastActivityDate- the value for thelastActivityDaterecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
spaceId
-
name
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
url
-
visibility
Returns the value of thevisibilityrecord component.- Returns:
- the value of the
visibilityrecord component
-
registration
Returns the value of theregistrationrecord component.- Returns:
- the value of the
registrationrecord component
-
member
-
myRoles
-
lastActivityDate
Returns the value of thelastActivityDaterecord component.- Returns:
- the value of the
lastActivityDaterecord component
-