Package io.sentry

Class UserFeedback

java.lang.Object
io.sentry.UserFeedback
All Implemented Interfaces:
JsonSerializable, JsonUnknown

public final class UserFeedback extends Object implements JsonUnknown, JsonSerializable
Adds additional information about what happened to an event.
  • Constructor Details

    • UserFeedback

      public UserFeedback(SentryId eventId)
      Initializes SentryUserFeedback and sets the required eventId.
      Parameters:
      eventId - The eventId of the event to which the user feedback is associated.
    • UserFeedback

      public UserFeedback(SentryId eventId, @Nullable @Nullable String name, @Nullable @Nullable String email, @Nullable @Nullable String comments)
      Initializes SentryUserFeedback and sets the required eventId.
      Parameters:
      eventId - The eventId of the event to which the user feedback is associated.
      name - the name of the user.
      email - the email of the user.
      comments - comments of the user about what happened.
  • Method Details

    • getEventId

      public SentryId getEventId()
      Gets the eventId of the event to which the user feedback is associated.
      Returns:
      the eventId
    • getName

      @Nullable public @Nullable String getName()
      Gets the name of the user.
      Returns:
      the name.
    • setName

      public void setName(String name)
      Sets the name of the user.
      Parameters:
      name - the name of the user.
    • getEmail

      @Nullable public @Nullable String getEmail()
      Gets the email of the user.
      Returns:
      the email.
    • setEmail

      public void setEmail(@Nullable @Nullable String email)
      Sets the email of the user.
      Parameters:
      email - the email of the user.
    • getComments

      @Nullable public @Nullable String getComments()
      Gets comments of the user about what happened.
      Returns:
      the comments
    • setComments

      public void setComments(@Nullable @Nullable String comments)
      Sets comments of the user about what happened.
      Parameters:
      comments - the comments
    • toString

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

      @Nullable public @Nullable Map<String,Object> getUnknown()
      Specified by:
      getUnknown in interface JsonUnknown
    • setUnknown

      public void setUnknown(@Nullable @Nullable Map<String,Object> unknown)
      Specified by:
      setUnknown in interface JsonUnknown
    • serialize

      public void serialize(@NotNull @NotNull ObjectWriter writer, @NotNull @NotNull ILogger logger) throws IOException
      Specified by:
      serialize in interface JsonSerializable
      Throws:
      IOException