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

#include <API/Clients/CPP/Proto/EventReportMessage.h>
#include <API/Clients/CPP/MFAPIClient/APIPrivate.h>

namespace MFAPI {

EventReportMessage::EventReportMessage()
{
}

EventReportMessage::~EventReportMessage()
{
}

void EventReportMessage::read(void* v)
{
    FastCodec* in = static_cast<FastCodec*>(v);
    (void)in;

    sequenceID = in->read_int32();
    contents.read(v);

}

void EventReportMessage::write(void* v) const
{
    FastCodec* out = static_cast<FastCodec*>(v);
    (void)out;

    out->write_int32(sequenceID);
    contents.write(v);

}

bool EventReportMessage::operator!=(const EventReportMessage& o) const
{
    if(this == &o)
    {
        return false;
    }
    if(sequenceID != o.sequenceID) return true;
    if(contents != o.contents) return true;

    return false;
}

bool EventReportMessage::operator==(const EventReportMessage& o) const
{
    return !operator!=(o);
}

bool EventReportMessage::operator<(const EventReportMessage& o) const
{
    if(this == &o)
    {
        return false;
    }
    if(sequenceID < o.sequenceID) return true;
    else if(o.sequenceID < sequenceID) return false;
    if(contents < o.contents) return true;
    else if(o.contents < contents) return false;

    return false;
}

std::ostream& operator<<(std::ostream& os, const EventReportMessage& o)
{
    o.dump(os, false);
    return os;
}

void EventReportMessage::dump(std::ostream& os, bool pretty) const
{
    TextStream sos;
    TextCodec codec(sos);
    TextWriter wr(codec, true);
    sos << "<EventReportMessage ";
    dump(&wr);
    sos << ">";
    os.write(sos.ends(), sos.size());
}

void EventReportMessage::dump(void* v) const
{
    TextWriter* wr = static_cast<TextWriter*>(v);
    TextCodec* out = &wr->out();
    (void)wr;

    TextWriter::State __state = wr->push("(", false);
    wr->newfield();
    out->write_data("sequenceID=");
    out->write_int32(this->sequenceID);
    wr->newfield();
    out->write_data("contents=");
    this->contents.dump(v);

    wr->pop(")", __state);
}

} // MFAPI

/*
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 
*/
