Package com.mojang.realmsclient.client
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 SummaryNested classes/interfaces inherited from interface com.mojang.realmsclient.client.RealmsErrorRealmsError.AuthenticationError, RealmsError.CustomError, RealmsError.ErrorWithJsonPayload, RealmsError.ErrorWithRawPayload
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final intThe field for thecoderecord component.private final intThe field for thehttpCoderecord component.private final StringThe field for themessagerecord component.private final StringThe field for thereasonrecord component.Fields inherited from interface com.mojang.realmsclient.client.RealmsErrorLOGGER, NO_MESSAGE
- 
Constructor SummaryConstructorsConstructorDescriptionErrorWithJsonPayload(int httpCode, int code, String reason, String message) Creates an instance of aErrorWithJsonPayloadrecord class.
- 
Method SummaryModifier 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.message()Returns the value of themessagerecord component.reason()Returns the value of thereasonrecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
httpCodeprivate final int httpCodeThe field for thehttpCoderecord component.
- 
codeprivate final int codeThe field for thecoderecord component.
- 
reasonThe field for thereasonrecord component.
- 
messageThe field for themessagerecord component.
 
- 
- 
Constructor Details- 
ErrorWithJsonPayloadpublic ErrorWithJsonPayload(int httpCode, int code, @Nullable String reason, @Nullable String message) Creates an instance of aErrorWithJsonPayloadrecord class.- Parameters:
- httpCode- the value for the- httpCoderecord component
- code- the value for the- coderecord component
- reason- the value for the- reasonrecord component
- message- the value for the- messagerecord component
 
 
- 
- 
Method Details- 
errorCodepublic int errorCode()- Specified by:
- errorCodein interface- RealmsError
 
- 
errorMessage- Specified by:
- errorMessagein interface- RealmsError
 
- 
logMessage- Specified by:
- logMessagein interface- RealmsError
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 '=='.
- 
httpCodepublic int httpCode()Returns the value of thehttpCoderecord component.- Returns:
- the value of the httpCoderecord component
 
- 
codepublic int code()Returns the value of thecoderecord component.- Returns:
- the value of the coderecord component
 
- 
reasonReturns the value of thereasonrecord component.- Returns:
- the value of the reasonrecord component
 
- 
messageReturns the value of themessagerecord component.- Returns:
- the value of the messagerecord component
 
 
-