// Copyright (C) 2010-2016  MarketFactory, Inc. All Rights Reserved.
//================================================================================
//   This file is auto-generated; DO NOT EDIT!
//================================================================================

#ifndef __MFAPIGEN_RISKSTATUS__
#define __MFAPIGEN_RISKSTATUS__

#include <iostream>

namespace MFAPI {

struct RiskStatus
{
    enum Type {
    SUCCESS = 1,
    INVALID_PERMISSIONS = 2,
    INVALID_GROUP = 3,
    INVALID_USER = 4,
    INVALID_ADMIN = 5,
    INVALID_FEED = 6,
    INVALID_MARKET = 7,
    INVALID_SETTLDATE = 8,
    INVALID_AMOUNT = 9,
    INVALID_DROPCOPY_SEQID = 10,
    INVALID_DROPCOPY_FEED = 11,
    MISSING_RISK_DATA = 20
    };

    static const char* Name;

    static void initializeEnum();
    static void finalizeEnum();

    static bool isValid( unsigned char iv );

    // Convert from an emum to various other things.
    static unsigned char toValue( Type iv );
    static const char* toString( unsigned char iv );
    static unsigned char toIndex( Type );

    // Convert from various other things to an enum.
    static Type fromValue( unsigned char iv );
    static Type fromIndex( unsigned char index );
    static Type fromString( const char* );

private:
    static bool _initialized;
    static const unsigned int _maxValue;
    static const unsigned int _nbValues;

    static const char* _names[21];
    static unsigned char _toIndex[21];
    static Type _fromIndex[12];

};

std::ostream& operator<<( std::ostream& os, RiskStatus::Type en );

} // MFAPI

#endif
// InclKwds: RiskStatus
