package com.ifpdos.sdk.httpd.binder;

import androidx.constraintlayout.core.motion.utils.TypedValues;
import java.util.HashMap;
import java.util.Map;

/* JADX INFO: loaded from: classes.dex */
public enum HttpStatus {
    OK(200, "OK"),
    BAD_REQUEST(400, "Bad Request"),
    UNAUTHORIZED(401, "Unauthorized"),
    INVALID_TOKEN(401, "Invalid Token"),
    FORBIDDEN(403, "Forbidden"),
    NOT_FOUND(404, "Not Found"),
    METHOD_NOT_ALLOWED(405, "Method Not Allowed"),
    NOT_ACCEPTABLE(406, "Not Acceptable"),
    REQUIRED_AUTHENTICATION(407, "Proxy Authentication Required"),
    TIME_OUT(408, "Request Timeout"),
    CONFLICT_REQUEST(409, "Conflict Request"),
    GONE_REQUEST(410, "Gone"),
    LENGTH_REQUIRED(411, "Length Required"),
    PRECONDITION_FAILED(412, "Precondition Failed"),
    TOO_LARGE(413, "Request Entity Too Large"),
    URI_TOO_LONG(414, "Request-URI Too Long"),
    UNSUPPORTED_MEDIA_TYPE(415, "Unsupported Media Type"),
    REQUEST_RANGE_ERROR(TypedValues.Cycle.TYPE_PATH_ROTATE, "Requested Range Not Satisfiable"),
    EXPECTATION_FAILED(417, "Expectation Failed"),
    CONNECT_ERROR(421, "There are too many connections from your internet address"),
    UNPROCESSABLE_ENTITY(422, "Unprocessable Entity "),
    LOCKED(TypedValues.Cycle.TYPE_WAVE_PERIOD, "Locked"),
    FAILED_DEPENDENCY(TypedValues.Cycle.TYPE_WAVE_OFFSET, "Failed Dependency"),
    UNORDERED_COLLECTION(TypedValues.Cycle.TYPE_WAVE_PHASE, "Unordered Collection"),
    UPGRADE_REQUIRED(426, "Upgrade Required"),
    RETRY_WITH(449, "Retry With"),
    SERVER_ERROR(500, "Internal Server Error"),
    NOT_IMPLEMENTED(501, "Not Implemented Error"),
    BAD_GATEWAY(502, "Bad Gateway"),
    SERVICE_UNAVAILABLE(503, "Service Unavailable"),
    GATEWAY_TIMEOUT(504, "Gateway Timeout"),
    HTTP_VERSION_EOOR(505, "HTTP Version Not Supported"),
    VARIANT_ALSO_NEGOTIATES(506, "Variant Also Negotiates"),
    INSUFFICIENT_STORAGE(507, "Insufficient Storage"),
    BANDWIDTH_LIMIT_EXCEEDED(509, "Bandwidth Limit Exceeded"),
    NOT_EXTENDED(510, "Not Extended");

    private static final Map<Integer, HttpStatus> sMap = new HashMap();
    public final int code;
    public final String message;

    static {
        for (HttpStatus httpStatus : values()) {
            sMap.put(Integer.valueOf(httpStatus.code), httpStatus);
        }
    }

    public static HttpStatus getByCode(int code) {
        Map<Integer, HttpStatus> map = sMap;
        if (map.containsKey(Integer.valueOf(code))) {
            return map.get(Integer.valueOf(code));
        }
        return SERVER_ERROR;
    }

    HttpStatus(int code, String message) {
        this.code = code;
        this.message = message;
    }
}
