//
// Automatically generated by ipdlc.
// Edit at your own risk
//


#include "mozilla/a11y/DocAccessibleTypes.h"

#include "ipc/IPCMessageUtils.h"
#include "ipc/IPCMessageUtilsSpecializations.h"
#include "nsIFile.h"
#include "mozilla/ipc/Endpoint.h"
#include "mozilla/ipc/ProtocolMessageUtils.h"
#include "mozilla/ipc/ProtocolUtils.h"
#include "mozilla/ipc/ShmemMessageUtils.h"
#include "mozilla/ipc/TaintingIPCUtils.h"


//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct CacheData|
//
namespace mozilla {
namespace a11y {
} // namespace a11y
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::a11y::CacheData>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).Fields());
    // Sentinel = 'Fields'
    (aWriter)->WriteSentinel(130679384);
    (aWriter)->WriteBytes((&((aVar).ID())), 8);
    // Sentinel = 'ID'
    (aWriter)->WriteSentinel(14155918);
}

auto ParamTraits<::mozilla::a11y::CacheData>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___Fields = IPC::ReadParam<RefPtr<::mozilla::a11y::AccAttributes>>(aReader);
    if (!maybe___Fields) {
        aReader->FatalError("Error deserializing 'Fields' (AccAttributes) member of 'CacheData'");
        return {};

    }
    auto& _Fields = *maybe___Fields;
    // Sentinel = 'Fields'
    if ((!((aReader)->ReadSentinel(130679384)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'Fields' (AccAttributes) member of 'CacheData'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            ::uint64_t{0},
            std::move(_Fields)};
    if ((!((aReader)->ReadBytesInto((&((result__)->ID())), 8)))) {
        aReader->FatalError("Error bulk reading fields from uint64_t");
        return {};
    }
    // Sentinel = 'ID'
    if ((!((aReader)->ReadSentinel(14155918)))) {
        mozilla::ipc::SentinelReadError("Error bulk reading fields from uint64_t");
        return {};
    }
    return result__;
}

} // namespace IPC
