HttpStatuses.kt

package com.hexagonkt.http.model

import com.hexagonkt.http.model.HttpStatusType.*

val CONTINUE_100: HttpStatus = HttpStatus(100, INFORMATION)
val SWITCHING_PROTOCOLS_101: HttpStatus = HttpStatus(101, INFORMATION)
val PROCESSING_102: HttpStatus = HttpStatus(102, INFORMATION)
val EARLY_HINTS_103: HttpStatus = HttpStatus(103, INFORMATION)

val OK_200: HttpStatus = HttpStatus(200, SUCCESS)
val CREATED_201: HttpStatus = HttpStatus(201, SUCCESS)
val ACCEPTED_202: HttpStatus = HttpStatus(202, SUCCESS)
val NON_AUTHORITATIVE_INFORMATION_203: HttpStatus = HttpStatus(203, SUCCESS)
val NO_CONTENT_204: HttpStatus = HttpStatus(204, SUCCESS)
val RESET_CONTENT_205: HttpStatus = HttpStatus(205, SUCCESS)
val PARTIAL_CONTENT_206: HttpStatus = HttpStatus(206, SUCCESS)
val MULTI_STATUS_207: HttpStatus = HttpStatus(207, SUCCESS)
val ALREADY_REPORTED_208: HttpStatus = HttpStatus(208, SUCCESS)
val IM_USED_226: HttpStatus = HttpStatus(226, SUCCESS)

val MULTIPLE_CHOICES_300: HttpStatus = HttpStatus(300, REDIRECTION)
val MOVED_PERMANENTLY_301: HttpStatus = HttpStatus(301, REDIRECTION)
val FOUND_302: HttpStatus = HttpStatus(302, REDIRECTION)
val SEE_OTHER_303: HttpStatus = HttpStatus(303, REDIRECTION)
val NOT_MODIFIED_304: HttpStatus = HttpStatus(304, REDIRECTION)
val USE_PROXY_305: HttpStatus = HttpStatus(305, REDIRECTION)
val TEMPORARY_REDIRECT_307: HttpStatus = HttpStatus(307, REDIRECTION)
val PERMANENT_REDIRECT_308: HttpStatus = HttpStatus(308, REDIRECTION)

val BAD_REQUEST_400: HttpStatus = HttpStatus(400, CLIENT_ERROR)
val UNAUTHORIZED_401: HttpStatus = HttpStatus(401, CLIENT_ERROR)
val PAYMENT_REQUIRED_402: HttpStatus = HttpStatus(402, CLIENT_ERROR)
val FORBIDDEN_403: HttpStatus = HttpStatus(403, CLIENT_ERROR)
val NOT_FOUND_404: HttpStatus = HttpStatus(404, CLIENT_ERROR)
val METHOD_NOT_ALLOWED_405: HttpStatus = HttpStatus(405, CLIENT_ERROR)
val NOT_ACCEPTABLE_406: HttpStatus = HttpStatus(406, CLIENT_ERROR)
val PROXY_AUTHENTICATION_REQUIRED_407: HttpStatus = HttpStatus(407, CLIENT_ERROR)
val REQUEST_TIMEOUT_408: HttpStatus = HttpStatus(408, CLIENT_ERROR)
val CONFLICT_409: HttpStatus = HttpStatus(409, CLIENT_ERROR)
val GONE_410: HttpStatus = HttpStatus(410, CLIENT_ERROR)
val LENGTH_REQUIRED_411: HttpStatus = HttpStatus(411, CLIENT_ERROR)
val PRECONDITION_FAILED_412: HttpStatus = HttpStatus(412, CLIENT_ERROR)
val CONTENT_TOO_LARGE_413: HttpStatus = HttpStatus(413, CLIENT_ERROR)
val URI_TOO_LONG_414: HttpStatus = HttpStatus(414, CLIENT_ERROR)
val UNSUPPORTED_MEDIA_TYPE_415: HttpStatus = HttpStatus(415, CLIENT_ERROR)
val RANGE_NOT_SATISFIABLE_416: HttpStatus = HttpStatus(416, CLIENT_ERROR)
val EXPECTATION_FAILED_417: HttpStatus = HttpStatus(417, CLIENT_ERROR)
val I_AM_A_TEAPOT_418: HttpStatus = HttpStatus(418, CLIENT_ERROR)
val MISDIRECTED_REQUEST_421: HttpStatus = HttpStatus(421, CLIENT_ERROR)
val UNPROCESSABLE_CONTENT_422: HttpStatus = HttpStatus(422, CLIENT_ERROR)
val LOCKED_423: HttpStatus = HttpStatus(423, CLIENT_ERROR)
val FAILED_DEPENDENCY_424: HttpStatus = HttpStatus(424, CLIENT_ERROR)
val TOO_EARLY_425: HttpStatus = HttpStatus(425, CLIENT_ERROR)
val UPGRADE_REQUIRED_426: HttpStatus = HttpStatus(426, CLIENT_ERROR)
val PRECONDITION_REQUIRED_428: HttpStatus = HttpStatus(428, CLIENT_ERROR)
val TOO_MANY_REQUESTS_429: HttpStatus = HttpStatus(429, CLIENT_ERROR)
val REQUEST_HEADER_FIELDS_TOO_LARGE_431: HttpStatus = HttpStatus(431, CLIENT_ERROR)
val UNAVAILABLE_FOR_LEGAL_REASONS_451: HttpStatus = HttpStatus(451, CLIENT_ERROR)

val INTERNAL_SERVER_ERROR_500: HttpStatus = HttpStatus(500, SERVER_ERROR)
val NOT_IMPLEMENTED_501: HttpStatus = HttpStatus(501, SERVER_ERROR)
val BAD_GATEWAY_502: HttpStatus = HttpStatus(502, SERVER_ERROR)
val SERVICE_UNAVAILABLE_503: HttpStatus = HttpStatus(503, SERVER_ERROR)
val GATEWAY_TIMEOUT_504: HttpStatus = HttpStatus(504, SERVER_ERROR)
val HTTP_VERSION_NOT_SUPPORTED_505: HttpStatus = HttpStatus(505, SERVER_ERROR)
val VARIANT_ALSO_NEGOTIATES_506: HttpStatus = HttpStatus(506, SERVER_ERROR)
val INSUFFICIENT_STORAGE_507: HttpStatus = HttpStatus(507, SERVER_ERROR)
val LOOP_DETECTED_508: HttpStatus = HttpStatus(508, SERVER_ERROR)
val NOT_EXTENDED_510: HttpStatus = HttpStatus(510, SERVER_ERROR)
val NETWORK_AUTHENTICATION_REQUIRED_511: HttpStatus = HttpStatus(511, SERVER_ERROR)

val HTTP_STATUSES: List<HttpStatus> = listOf(
    CONTINUE_100, SWITCHING_PROTOCOLS_101, PROCESSING_102, EARLY_HINTS_103,

    OK_200, CREATED_201, ACCEPTED_202, NON_AUTHORITATIVE_INFORMATION_203, NO_CONTENT_204,
    RESET_CONTENT_205, PARTIAL_CONTENT_206, MULTI_STATUS_207, ALREADY_REPORTED_208, IM_USED_226,

    MULTIPLE_CHOICES_300, MOVED_PERMANENTLY_301, FOUND_302, SEE_OTHER_303, NOT_MODIFIED_304,
    USE_PROXY_305, TEMPORARY_REDIRECT_307, PERMANENT_REDIRECT_308,

    BAD_REQUEST_400, UNAUTHORIZED_401, PAYMENT_REQUIRED_402, FORBIDDEN_403, NOT_FOUND_404,
    METHOD_NOT_ALLOWED_405, NOT_ACCEPTABLE_406, PROXY_AUTHENTICATION_REQUIRED_407,
    REQUEST_TIMEOUT_408, CONFLICT_409, GONE_410, LENGTH_REQUIRED_411, PRECONDITION_FAILED_412,
    CONTENT_TOO_LARGE_413, URI_TOO_LONG_414, UNSUPPORTED_MEDIA_TYPE_415, RANGE_NOT_SATISFIABLE_416,
    EXPECTATION_FAILED_417, I_AM_A_TEAPOT_418, MISDIRECTED_REQUEST_421, UNPROCESSABLE_CONTENT_422,
    LOCKED_423, FAILED_DEPENDENCY_424, TOO_EARLY_425, UPGRADE_REQUIRED_426,
    PRECONDITION_REQUIRED_428, TOO_MANY_REQUESTS_429, REQUEST_HEADER_FIELDS_TOO_LARGE_431,
    UNAVAILABLE_FOR_LEGAL_REASONS_451,

    INTERNAL_SERVER_ERROR_500, NOT_IMPLEMENTED_501, BAD_GATEWAY_502, SERVICE_UNAVAILABLE_503,
    GATEWAY_TIMEOUT_504, HTTP_VERSION_NOT_SUPPORTED_505, VARIANT_ALSO_NEGOTIATES_506,
    INSUFFICIENT_STORAGE_507, LOOP_DETECTED_508, NOT_EXTENDED_510,
    NETWORK_AUTHENTICATION_REQUIRED_511,
)