// Copyright 2019 ZTE corporation. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

#ifndef ADLIK_SERVING_SERVER_HTTP_INTERNAL_HTTP_STATUS_CODE_H
#define ADLIK_SERVING_SERVER_HTTP_INTERNAL_HTTP_STATUS_CODE_H

namespace adlik {
namespace serving {

enum struct HTTPStatusCode {
  UNDEFINED = 0,
  FIRST_CODE = 100,

  // Informational
  CONTINUE = 100,
  SWITCHING = 101,
  PROCESSING = 102,
  // Success
  OK = 200,
  CREATED = 201,
  ACCEPTED = 202,
  PROVISIONAL = 203,
  NO_CONTENT = 204,
  RESET_CONTENT = 205,
  PART_CONTENT = 206,
  MULTI_STATUS = 207,
  ALREADY_REPORTED = 208,
  IM_USED = 226,

  // Redirect
  MULTIPLE = 300,
  MOVED_PERM = 301,
  MOVED_TEMP = 302,
  SEE_OTHER = 303,
  NOT_MODIFIED = 304,
  USE_PROXY = 305,
  TEMP_REDIRECT = 307,  // Similar to 302, except that user
                        // agents MUST NOT change the request
                        // method (RFC 7231, sec 6.4.7)
  RESUME_INCOMPLETE = 308,

  // Client Error
  BAD_REQUEST = 400,
  UNAUTHORIZED = 401,
  PAYMENT = 402,
  FORBIDDEN = 403,
  NOT_FOUND = 404,
  METHOD_NA = 405,
  NONE_ACC = 406,
  PROXY = 407,
  REQUEST_TO = 408,
  CONFLICT = 409,
  GONE = 410,
  LEN_REQUIRED = 411,
  PRECOND_FAILED = 412,
  ENTITY_TOO_BIG = 413,
  URI_TOO_BIG = 414,
  UNKNOWN_MEDIA = 415,
  BAD_RANGE = 416,
  BAD_EXPECTATION = 417,
  IM_A_TEAPOT = 418,
  MISDIRECTED_REQUEST = 421,
  UNPROC_ENTITY = 422,
  LOCKED = 423,
  FAILED_DEP = 424,
  UPGRADE_REQUIRED = 426,
  PRECOND_REQUIRED = 428,
  TOO_MANY_REQUESTS = 429,
  HEADER_TOO_LARGE = 431,
  UNAVAILABLE_LEGAL = 451,
  CLIENT_CLOSED_REQUEST = 499,

  // Server Error
  ERROR = 500,
  NOT_IMP = 501,
  BAD_GATEWAY = 502,
  SERVICE_UNAV = 503,
  GATEWAY_TO = 504,
  BAD_VERSION = 505,
  VARIANT_NEGOTIATES = 506,
  INSUF_STORAGE = 507,
  LOOP_DETECTED = 508,
  NOT_EXTENDED = 510,
  NETAUTH_REQUIRED = 511,

  LAST_CODE = 599,
};
}
}  // namespace adlik

#endif
