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

#ifndef __MFAPIGEN_MDENTRY__
#define __MFAPIGEN_MDENTRY__

#include <API/Clients/CPP/Proto/APITypes.h>
#include <API/Clients/CPP/Proto/MDElement.h>
#include <API/Clients/CPP/Proto/MDUpdateAction.h>
#include <API/Clients/CPP/MFAPIClient/MFFloat.h>
#include <API/Clients/CPP/Proto/Side.h>

#include <iosfwd>
#include <string>
#include <vector>

namespace MFAPI {

/** A market data entry, which indicates how to update a book.
 */

class MDEntry 
{
public:

    typedef std::vector<MDEntry> Seq;

    //--------------------------------------------------------------------------
    // Public attributes.

    /** Price of this entry. If this is a structured entry, the price
     * may be invalid.
     */
    MFFloat price;

    /** Amount of this entry. If this is a structured entry, the
     * amount may be invalid.
     */
    MFFloat amount;

    /** Amount that represents the small amount than can be executed
     * against for this MDEntry.
     */
    MFFloat minAmount;

    /** The action to apply for incremental updates. The action value
     * is irrelevant for snapshot entries.
     */
    MDUpdateAction::Type updateAction;

    /** Kind of element this entry is.
     */
    MDElement::Type element;

    /** Which side the entry is for.
     */
    Side::Type side;

    /** A bitmask that provides hints regarding what data was used to
     * produce this entry (vanilla market entry, or enhanced). @see
     * MDSource enum for possible bit values.
     */
    SourceMask_t source;

    /** For aggregated books, when we get notified of a price level,
     * this is the number of orders.
     */
    NumOrders_t numberOfOrders;

    /** For aggregated feeds, a string representation of the
     * components of liquidity.
     */
    std::string components;

    //--------------------------------------------------------------------------

    MDEntry();
    ~MDEntry();

    bool operator==(const MDEntry&) const;
    bool operator!=(const MDEntry&) const;
    bool operator<(const MDEntry&) const;

    void dump(std::ostream& os, bool pretty) const;
    void read(void*);
    void write(void*) const;
    void dump(void*) const;

};

std::ostream& operator<<(std::ostream& os, const MDEntry& o);

} // MFAPI

#endif
// InclKwds: MDEntry
/*
Brought to you by
/opt/atlassian/bamboo-agent/xml-data/build-dir/GAT-GWY-B3/Messaging/main.py --root /opt/atlassian/bamboo-agent/xml-data/build-dir/GAT-GWY-B3 --commit-date 2016-12-06T18:11:31.205-05:00 --revision 19c07f7ab2ea0612a19fbcabdd4a54e242830e7d --branch master --generated_directory /opt/atlassian/bamboo-agent/xml-data/build-dir/GAT-GWY-B3/build/rh7_3.13.0/release/intel64/generated/Python -o /opt/atlassian/bamboo-agent/xml-data/build-dir/GAT-GWY-B3/build/rh7_3.13.0/release/intel64/generated/API/Clients/CPP/Proto -i /opt/atlassian/bamboo-agent/xml-data/build-dir/GAT-GWY-B3/Messaging/MFProtocol --namespace=MFAPI cppapi /opt/atlassian/bamboo-agent/xml-data/build-dir/GAT-GWY-B3/Messaging/MFProtocol.proto.3130 /opt/atlassian/bamboo-agent/xml-data/build-dir/GAT-GWY-B3/Messaging/MFObsolete.proto.3130 
*/
