//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a RdGen v1.13.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#include "RequestResultBase_Unknown.Pregenerated.h"



#ifdef _MSC_VER
#pragma warning( push )
#pragma warning( disable:4250 )
#pragma warning( disable:4307 )
#pragma warning( disable:4267 )
#pragma warning( disable:4244 )
#pragma warning( disable:4100 )
#endif

namespace JetBrains {
namespace EditorPlugin {
// companion
// constants
// initializer
void RequestResultBase_Unknown::initialize()
{
}
// primary ctor
RequestResultBase_Unknown::RequestResultBase_Unknown(int32_t requestID_, rd::RdId unknownId_, rd::Buffer::ByteArray unknownBytes_) :
RequestResultBase(std::move(requestID_)), rd::IUnknownInstance(std::move(unknownId_))

{
    initialize();
}
// secondary constructor
// default ctors and dtors
// reader
RequestResultBase_Unknown RequestResultBase_Unknown::read(rd::SerializationCtx& ctx, rd::Buffer & buffer)
{
    throw std::logic_error("Unknown instances should not be read via serializer");
}
// writer
void RequestResultBase_Unknown::write(rd::SerializationCtx& ctx, rd::Buffer& buffer) const
{
    buffer.write_integral(requestID_);
    buffer.write_byte_array_raw(unknownBytes_);
}
// virtual init
// identify
// getters
// intern
// equals trait
bool RequestResultBase_Unknown::equals(rd::ISerializable const& object) const
{
    auto const &other = dynamic_cast<RequestResultBase_Unknown const&>(object);
    if (this == &other) return true;
    if (this->requestID_ != other.requestID_) return false;
    
    return true;
}
// equality operators
bool operator==(const RequestResultBase_Unknown &lhs, const RequestResultBase_Unknown &rhs) {
    if (lhs.type_name() != rhs.type_name()) return false;
    return lhs.equals(rhs);
}
bool operator!=(const RequestResultBase_Unknown &lhs, const RequestResultBase_Unknown &rhs){
    return !(lhs == rhs);
}
// hash code trait
size_t RequestResultBase_Unknown::hashCode() const noexcept
{
    size_t __r = 0;
    __r = __r * 31 + (rd::hash<int32_t>()(get_requestID()));
    return __r;
}
// type name trait
std::string RequestResultBase_Unknown::type_name() const
{
    return "RequestResultBase_Unknown";
}
// static type name trait
std::string RequestResultBase_Unknown::static_type_name()
{
    return "RequestResultBase_Unknown";
}
// polymorphic to string
std::string RequestResultBase_Unknown::toString() const
{
    std::string res = "RequestResultBase_Unknown\n";
    res += "\trequestID = ";
    res += rd::to_string(requestID_);
    res += '\n';
    return res;
}
// external to string
std::string to_string(const RequestResultBase_Unknown & value)
{
    return value.toString();
}
}
}

#ifdef _MSC_VER
#pragma warning( pop )
#endif

