Class SearchHit

java.lang.Object
ai.shipeasy.admin.model.SearchHit

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class SearchHit extends Object
A single universal-search hit. Field names are camelCase; `title` is `null` when the resource has no human title/display name (members fall back to a role label).
  • Field Details

  • Constructor Details

    • SearchHit

      public SearchHit()
  • Method Details

    • type

      public SearchHit type(@Nonnull SearchHit.TypeEnum type)
    • getType

      @Nonnull public SearchHit.TypeEnum getType()
      Resource family — drives the result group + icon in the palette. (`member` hits are surfaced first.)
      Returns:
      type
    • setType

      public void setType(@Nonnull SearchHit.TypeEnum type)
    • id

      public SearchHit id(@Nonnull String id)
    • getId

      @Nonnull public String getId()
      Stable identifier used to deep-link into the row's detail pane. For `member` hits this is the teammate's email; for everything else it is the resource id.
      Returns:
      id
    • setId

      public void setId(@Nonnull String id)
    • name

      public SearchHit name(@Nonnull String name)
    • getName

      @Nonnull public String getName()
      The matched handle — the resource's immutable `name`, or the member's display name (falling back to email).
      Returns:
      name
    • setName

      public void setName(@Nonnull String name)
    • title

      public SearchHit title(@Nullable String title)
    • getTitle

      @Nullable public String getTitle()
      Human title/display name when present, else `null`. For `member` hits this carries the email (or the `Owner`/`Member` role when no profile name is set).
      Returns:
      title
    • setTitle

      public void setTitle(@Nullable String title)
    • href

      public SearchHit href(@Nonnull String href)
    • getHref

      @Nonnull public String getHref()
      Project-relative href that opens the row (e.g. `/gates?open=<id>`).
      Returns:
      href
    • setHref

      public void setHref(@Nonnull String href)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element and throws an exception if issues found
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is invalid with respect to SearchHit
    • fromJson

      public static SearchHit fromJson(String jsonString) throws IOException
      Create an instance of SearchHit given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of SearchHit
      Throws:
      IOException - if the JSON string is invalid with respect to SearchHit
    • toJson

      public String toJson()
      Convert an instance of SearchHit to an JSON string
      Returns:
      JSON string