namespace Sockeye.Biz
{


    public enum ApiErrorCode : int
    {
        /*
            DON'T FORGET TO UPDATE THE API-ERROR-CODES.MD DOCUMENTATION 
            AND UPDATE THE ApiErrorCodeStockMessage.cs        
         */

        API_CLOSED = 2000,
        API_OPS_ONLY = 2001,
        API_SERVER_ERROR = 2002,
        AUTHENTICATION_FAILED = 2003,
        NOT_AUTHORIZED = 2004,
        CONCURRENCY_CONFLICT = 2005,
        NOT_FOUND = 2010,
        PUT_ID_MISMATCH = 2020,
        INVALID_OPERATION = 2030,
        INSUFFICIENT_INVENTORY = 2040,
        VALIDATION_FAILED = 2200,
        VALIDATION_REQUIRED = 2201,
        VALIDATION_LENGTH_EXCEEDED = 2202,
        VALIDATION_INVALID_VALUE = 2203,
        VALIDATION_CUSTOM_REQUIRED_EMPTY = 2204,
        VALIDATION_MISSING_PROPERTY = 2205,
        VALIDATION_NOT_UNIQUE = 2206,
        VALIDATION_STARTDATE_AFTER_ENDDATE = 2207,
        VALIDATION_REFERENTIAL_INTEGRITY = 2208,
        VALIDATION_NOT_CHANGEABLE = 2209,
        CHILD_OBJECT_ERROR = 2210,
        VALIDATION_REQUIRED_CUSTOM = 2211,
        VALIDATION_WO_MULTIPLE_CONTRACTED_UNITS = 2212,
        /*

        | 2000 | API closed - Server is running but access to the API has been closed to all users |
        | 2001 | API closed all non OPS routes - Server is running but access to the API has been restricted to only server maintenance operations related functionality |
        | 2002 | Internal error from the API server, details in [server log](ops-log.md) file |
        | 2003 | Authentication failed, bad login or password, user not found |
        | 2004 | Not authorized - current user is not authorized for operation attempted on the resource (insufficient rights) |
        | 2005 | Object was changed by another user since retrieval (concurrency token mismatch).  A record was attempted to be saved but another user has just modified it so it's invalid. (first save "wins") |
        | 2010 | Object not found - API could not find the object requested |
        | 2020 | PUT Id mismatch - object Id does not match route Id |
        | 2030 | Invalid operation - operation could not be completed, not valid, details in message property |
        | 2200 | Validation error - general issue with object overall not valid, specifics in "details" property |
        | 2201 | Validation error - Field is required but is empty or null |
        | 2202 | Validation error - Field length exceeded. The limit will be returned in the `message` property of the validation error |
        | 2203 | Validation error - invalid value.  Usually an type mismatch or a logical or business rule mismatch (i.e. only certain values are valid for current state of object) |
        | 2204 | Validation error - Customized form property is set to required but has an empty value |
        | 2205 | Validation error - Required property is missing entirely. Usually a development or communications error |
        | 2206 | Validation error - A text property is required to be unique but an existing record with an identical value was found in the database |
        | 2207 | Validation error - When an object requires a start and end date the start date must be earlier than the end date |
        | 2208 | Validation error - Modifying the object (usually a delete) would break the link to other records in the database and operation was disallowed to preserve data integrity |
        | 2209 | Validation error - Indicates the attempted property change is invalid because the value is fixed and cannot be changed  | */

    }


}//eons