Record Class AbuseReport

java.lang.Object
java.lang.Record
com.mojang.authlib.minecraft.report.AbuseReport

public record AbuseReport(String opinionComments, @Nullable String reason, @Nullable ReportEvidence evidence, @Nullable String skinUrl, ReportedEntity reportedEntity, Instant createdTime) extends Record
  • Field Details

    • opinionComments

      @SerializedName("opinionComments") private final String opinionComments
      The field for the opinionComments record component.
    • reason

      @SerializedName("reason") @Nullable private final String reason
      The field for the reason record component.
    • evidence

      @SerializedName("evidence") @Nullable private final ReportEvidence evidence
      The field for the evidence record component.
    • skinUrl

      @SerializedName("skinUrl") @Nullable private final String skinUrl
      The field for the skinUrl record component.
    • reportedEntity

      @SerializedName("reportedEntity") private final ReportedEntity reportedEntity
      The field for the reportedEntity record component.
    • createdTime

      @SerializedName("createdTime") private final Instant createdTime
      The field for the createdTime record component.
  • Constructor Details

    • AbuseReport

      public AbuseReport(String opinionComments, @Nullable String reason, @Nullable ReportEvidence evidence, @Nullable String skinUrl, ReportedEntity reportedEntity, Instant createdTime)
      Creates an instance of a AbuseReport record class.
      Parameters:
      opinionComments - the value for the opinionComments record component
      reason - the value for the reason record component
      evidence - the value for the evidence record component
      skinUrl - the value for the skinUrl record component
      reportedEntity - the value for the reportedEntity record component
      createdTime - the value for the createdTime record component
  • Method Details

    • name

      public static AbuseReport name(String opinionComments, ReportedEntity reportedEntity, Instant createdTime)
    • skin

      public static AbuseReport skin(String opinionComments, String reason, @Nullable String skinUrl, ReportedEntity reportedEntity, Instant createdTime)
    • chat

      public static AbuseReport chat(String opinionComments, String reason, ReportEvidence evidence, ReportedEntity reportedEntity, Instant createdTime)
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • opinionComments

      @SerializedName("opinionComments") public String opinionComments()
      Returns the value of the opinionComments record component.
      Returns:
      the value of the opinionComments record component
    • reason

      @SerializedName("reason") @Nullable public String reason()
      Returns the value of the reason record component.
      Returns:
      the value of the reason record component
    • evidence

      @SerializedName("evidence") @Nullable public ReportEvidence evidence()
      Returns the value of the evidence record component.
      Returns:
      the value of the evidence record component
    • skinUrl

      @SerializedName("skinUrl") @Nullable public String skinUrl()
      Returns the value of the skinUrl record component.
      Returns:
      the value of the skinUrl record component
    • reportedEntity

      @SerializedName("reportedEntity") public ReportedEntity reportedEntity()
      Returns the value of the reportedEntity record component.
      Returns:
      the value of the reportedEntity record component
    • createdTime

      @SerializedName("createdTime") public Instant createdTime()
      Returns the value of the createdTime record component.
      Returns:
      the value of the createdTime record component