Record Class RealmsError.ErrorWithJsonPayload
java.lang.Object
java.lang.Record
com.mojang.realmsclient.client.RealmsError.ErrorWithJsonPayload
- All Implemented Interfaces:
RealmsError
- Enclosing interface:
RealmsError
public static record RealmsError.ErrorWithJsonPayload(int httpCode, int code, @Nullable String reason, @Nullable String message)
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 thecoderecord component.private final intThe field for thehttpCoderecord component.private final @Nullable StringThe field for themessagerecord component.private final @Nullable StringThe field for thereasonrecord component.Fields inherited from interface RealmsError
LOGGER, NO_MESSAGE -
Constructor Summary
ConstructorsConstructorDescriptionErrorWithJsonPayload(int httpCode, int code, @Nullable String reason, @Nullable String message) Creates an instance of aErrorWithJsonPayloadrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcode()Returns the value of thecoderecord component.final 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.@Nullable Stringmessage()Returns the value of themessagerecord component.@Nullable Stringreason()Returns the value of thereasonrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
httpCode
private final int httpCodeThe field for thehttpCoderecord component. -
code
private final int codeThe field for thecoderecord component. -
reason
The field for thereasonrecord component. -
message
The field for themessagerecord component.
-
-
Constructor Details
-
ErrorWithJsonPayload
public ErrorWithJsonPayload(int httpCode, int code, @Nullable String reason, @Nullable String message) Creates an instance of aErrorWithJsonPayloadrecord class.- Parameters:
httpCode- the value for thehttpCoderecord componentcode- the value for thecoderecord componentreason- the value for thereasonrecord componentmessage- the value for themessagerecord 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
-
code
public int code()Returns the value of thecoderecord component.- Returns:
- the value of the
coderecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-