Record Class RealmsError.CustomError

java.lang.Object
java.lang.Record
com.mojang.realmsclient.client.RealmsError.CustomError
All Implemented Interfaces:
RealmsError
Enclosing interface:
RealmsError

public static record RealmsError.CustomError(int httpCode, @Nullable Component payload) extends Record implements RealmsError
  • Field Details

    • httpCode

      private final int httpCode
      The field for the httpCode record component.
    • payload

      @Nullable private final Component payload
      The field for the payload record component.
    • SERVICE_BUSY

      public static final RealmsError.CustomError SERVICE_BUSY
    • RETRY_MESSAGE

      public static final Component RETRY_MESSAGE
  • Constructor Details

    • CustomError

      public CustomError(int httpCode, @Nullable Component payload)
      Creates an instance of a CustomError record class.
      Parameters:
      httpCode - the value for the httpCode record component
      payload - the value for the payload record component
  • Method Details

    • unknownCompatibilityResponse

      public static RealmsError.CustomError unknownCompatibilityResponse(String p_300024_)
    • connectivityError

      public static RealmsError.CustomError connectivityError(RealmsHttpException p_298467_)
    • retry

      public static RealmsError.CustomError retry(int p_297862_)
    • noPayload

      public static RealmsError.CustomError noPayload(int p_298598_)
    • errorCode

      public int errorCode()
      Specified by:
      errorCode in interface RealmsError
    • errorMessage

      public Component errorMessage()
      Specified by:
      errorMessage in interface RealmsError
    • logMessage

      public String logMessage()
      Specified by:
      logMessage in interface RealmsError
    • 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 '=='.
      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.
    • httpCode

      public int httpCode()
      Returns the value of the httpCode record component.
      Returns:
      the value of the httpCode record component
    • payload

      @Nullable public Component payload()
      Returns the value of the payload record component.
      Returns:
      the value of the payload record component