Record Class SpaceSearchHitModel

java.lang.Object
java.lang.Record
io.meeds.mcp.server.tool.model.SpaceSearchHitModel
Record Components:
spaceId - the space technical identifier
name - the space display name
description - the space description, shortened when long
url - the link to the space
visibility - whether the space is listed in the spaces directory
registration - how a user joins the space
member - whether the current user is a member of the space
myRoles - the current user's roles in the space, empty when none
lastActivityDate - 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 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 a SpaceSearchHitModel record class.
      Parameters:
      spaceId - the value for the spaceId record component
      name - the value for the name record component
      description - the value for the description record component
      url - the value for the url record component
      visibility - the value for the visibility record component
      registration - the value for the registration record component
      member - the value for the member record component
      myRoles - the value for the myRoles record component
      lastActivityDate - the value for the lastActivityDate record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • spaceId

      public long spaceId()
      Returns the value of the spaceId record component.
      Returns:
      the value of the spaceId record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • description

      public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • url

      public String url()
      Returns the value of the url record component.
      Returns:
      the value of the url record component
    • visibility

      public Visibility visibility()
      Returns the value of the visibility record component.
      Returns:
      the value of the visibility record component
    • registration

      public Registration registration()
      Returns the value of the registration record component.
      Returns:
      the value of the registration record component
    • member

      public boolean member()
      Returns the value of the member record component.
      Returns:
      the value of the member record component
    • myRoles

      public List<SpaceRole> myRoles()
      Returns the value of the myRoles record component.
      Returns:
      the value of the myRoles record component
    • lastActivityDate

      public String lastActivityDate()
      Returns the value of the lastActivityDate record component.
      Returns:
      the value of the lastActivityDate record component