Record Class RealmsError.ErrorWithRawPayload
java.lang.Object
java.lang.Record
com.mojang.realmsclient.client.RealmsError.ErrorWithRawPayload
- All Implemented Interfaces:
RealmsError
- Enclosing interface:
RealmsError
public static record RealmsError.ErrorWithRawPayload(int httpCode, String payload)
extends Record
implements RealmsError
-
Nested Class Summary
Nested classes/interfaces inherited from interface RealmsError
RealmsError.AuthenticationError, RealmsError.CustomError, RealmsError.ErrorWithJsonPayload, RealmsError.ErrorWithRawPayload -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for thehttpCoderecord component.private final StringThe field for thepayloadrecord component.Fields inherited from interface RealmsError
LOGGER, NO_MESSAGE -
Constructor Summary
ConstructorsConstructorDescriptionErrorWithRawPayload(int httpCode, String payload) Creates an instance of aErrorWithRawPayloadrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intfinal inthashCode()Returns a hash code value for this object.inthttpCode()Returns the value of thehttpCoderecord component.payload()Returns the value of thepayloadrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
httpCode
private final int httpCodeThe field for thehttpCoderecord component. -
payload
The field for thepayloadrecord component.
-
-
Constructor Details
-
ErrorWithRawPayload
Creates an instance of aErrorWithRawPayloadrecord class.- Parameters:
httpCode- the value for thehttpCoderecord componentpayload- the value for thepayloadrecord component
-
-
Method Details
-
errorCode
public int errorCode()- Specified by:
errorCodein interfaceRealmsError
-
errorMessage
- Specified by:
errorMessagein interfaceRealmsError
-
logMessage
- Specified by:
logMessagein interfaceRealmsError
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
httpCode
public int httpCode()Returns the value of thehttpCoderecord component.- Returns:
- the value of the
httpCoderecord component
-
payload
Returns the value of thepayloadrecord component.- Returns:
- the value of the
payloadrecord component
-