Object ErrorCode.Companion
-
- All Implemented Interfaces:
-
com.inmobi.media.core.utils.EnumSerializer
public class ErrorCode.Companion implements EnumSerializer<ErrorCode, Int>
Companion object for ErrorCode providing serialization and deserialization capabilities.
-
-
Field Summary
Fields Modifier and Type Field Description public final static ErrorCode.CompanionINSTANCE
-
Method Summary
-
-
Method Detail
-
to
Integer to(ErrorCode item)
Converts an ErrorCode enum to its integer representation.
- Parameters:
item- The ErrorCode to convert.- Returns:
The integer code of the error.
-
from
ErrorCode from(Integer value)
Converts an integer value to its corresponding ErrorCode enum. Handles mapping for standard HTTP status codes to specific error codes like BAD_REQUEST or GENERIC_HTTP_2XX.
- Parameters:
value- The integer code to convert.- Returns:
The corresponding ErrorCode, or UNKNOWN_ERROR if the code is not recognized.
-
-
-
-