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


#include "mozilla/dom/MediaIPCUtils.h"
#include "mozilla/PRemoteMediaManagerParent.h"
#include "mozilla/PRemoteMediaManagerChild.h"
#include "mozilla/PRemoteCDM.h"
#include "mozilla/PRemoteCDMParent.h"
#include "mozilla/PRemoteCDMChild.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"

namespace mozilla {
namespace PRemoteCDM {

nsresult
CreateEndpoints(
        mozilla::ipc::EndpointProcInfo aParentDestInfo,
        mozilla::ipc::EndpointProcInfo aChildDestInfo,
        mozilla::ipc::Endpoint<::mozilla::PRemoteCDMParent>* aParent,
        mozilla::ipc::Endpoint<::mozilla::PRemoteCDMChild>* aChild)
{
    return mozilla::ipc::CreateEndpoints(
        mozilla::ipc::PrivateIPDLInterface(),
        aParentDestInfo, aChildDestInfo, aParent, aChild);
}
mozilla::UniquePtr<IPC::Message>
Msg_Init(IPC::Message::routeid_t routingId)
{
    return IPC::Message::IPDLMessage(routingId, Msg_Init__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Reply_Init(IPC::Message::routeid_t routingId)
{
    return IPC::Message::IPDLMessage(routingId, Reply_Init__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_CreateSession(IPC::Message::routeid_t routingId)
{
    return IPC::Message::IPDLMessage(routingId, Msg_CreateSession__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Reply_CreateSession(IPC::Message::routeid_t routingId)
{
    return IPC::Message::IPDLMessage(routingId, Reply_CreateSession__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_LoadSession(IPC::Message::routeid_t routingId)
{
    return IPC::Message::IPDLMessage(routingId, Msg_LoadSession__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Reply_LoadSession(IPC::Message::routeid_t routingId)
{
    return IPC::Message::IPDLMessage(routingId, Reply_LoadSession__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_UpdateSession(IPC::Message::routeid_t routingId)
{
    return IPC::Message::IPDLMessage(routingId, Msg_UpdateSession__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Reply_UpdateSession(IPC::Message::routeid_t routingId)
{
    return IPC::Message::IPDLMessage(routingId, Reply_UpdateSession__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_RemoveSession(IPC::Message::routeid_t routingId)
{
    return IPC::Message::IPDLMessage(routingId, Msg_RemoveSession__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Reply_RemoveSession(IPC::Message::routeid_t routingId)
{
    return IPC::Message::IPDLMessage(routingId, Reply_RemoveSession__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_CloseSession(IPC::Message::routeid_t routingId)
{
    return IPC::Message::IPDLMessage(routingId, Msg_CloseSession__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Reply_CloseSession(IPC::Message::routeid_t routingId)
{
    return IPC::Message::IPDLMessage(routingId, Reply_CloseSession__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_SetServerCertificate(IPC::Message::routeid_t routingId)
{
    return IPC::Message::IPDLMessage(routingId, Msg_SetServerCertificate__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Reply_SetServerCertificate(IPC::Message::routeid_t routingId)
{
    return IPC::Message::IPDLMessage(routingId, Reply_SetServerCertificate__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg___delete__(IPC::Message::routeid_t routingId)
{
    return IPC::Message::IPDLMessage(routingId, Msg___delete____ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Reply___delete__(IPC::Message::routeid_t routingId)
{
    return IPC::Message::IPDLMessage(routingId, Reply___delete____ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_Provision(IPC::Message::routeid_t routingId)
{
    return IPC::Message::IPDLMessage(routingId, Msg_Provision__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Reply_Provision(IPC::Message::routeid_t routingId)
{
    return IPC::Message::IPDLMessage(routingId, Reply_Provision__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_OnSessionKeyStatus(IPC::Message::routeid_t routingId)
{
    return IPC::Message::IPDLMessage(routingId, Msg_OnSessionKeyStatus__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_OnSessionKeyExpiration(IPC::Message::routeid_t routingId)
{
    return IPC::Message::IPDLMessage(routingId, Msg_OnSessionKeyExpiration__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Msg_OnSessionKeyMessage(IPC::Message::routeid_t routingId)
{
    return IPC::Message::IPDLMessage(routingId, Msg_OnSessionKeyMessage__ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}

} // namespace PRemoteCDM
} // namespace mozilla

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

namespace IPC {
auto ParamTraits<::mozilla::RemoteCDMKeyMessageIPDL>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).sessionId());
    // Sentinel = 'sessionId'
    (aWriter)->WriteSentinel(320603058);
    IPC::WriteParam(aWriter, (aVar).type());
    // Sentinel = 'type'
    (aWriter)->WriteSentinel(75760067);
    IPC::WriteParam(aWriter, (aVar).message());
    // Sentinel = 'message'
    (aWriter)->WriteSentinel(197198566);
}

auto ParamTraits<::mozilla::RemoteCDMKeyMessageIPDL>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___sessionId = IPC::ReadParam<::nsString>(aReader);
    if (!maybe___sessionId) {
        aReader->FatalError("Error deserializing 'sessionId' (nsString) member of 'RemoteCDMKeyMessageIPDL'");
        return {};

    }
    auto& _sessionId = *maybe___sessionId;
    // Sentinel = 'sessionId'
    if ((!((aReader)->ReadSentinel(320603058)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'sessionId' (nsString) member of 'RemoteCDMKeyMessageIPDL'");
        return {};
    }
    auto maybe___type = IPC::ReadParam<::mozilla::dom::MediaKeyMessageType>(aReader);
    if (!maybe___type) {
        aReader->FatalError("Error deserializing 'type' (MediaKeyMessageType) member of 'RemoteCDMKeyMessageIPDL'");
        return {};

    }
    auto& _type = *maybe___type;
    // Sentinel = 'type'
    if ((!((aReader)->ReadSentinel(75760067)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'type' (MediaKeyMessageType) member of 'RemoteCDMKeyMessageIPDL'");
        return {};
    }
    auto maybe___message = IPC::ReadParam<nsTArray<::uint8_t>>(aReader);
    if (!maybe___message) {
        aReader->FatalError("Error deserializing 'message' (uint8_t[]) member of 'RemoteCDMKeyMessageIPDL'");
        return {};

    }
    auto& _message = *maybe___message;
    // Sentinel = 'message'
    if ((!((aReader)->ReadSentinel(197198566)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'message' (uint8_t[]) member of 'RemoteCDMKeyMessageIPDL'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_sessionId),
            std::move(_type),
            std::move(_message)};
    return result__;
}

} // namespace IPC

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

namespace IPC {
auto ParamTraits<::mozilla::RemoteCDMKeyStatusIPDL>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).sessionId());
    // Sentinel = 'sessionId'
    (aWriter)->WriteSentinel(320603058);
    IPC::WriteParam(aWriter, (aVar).keyInfo());
    // Sentinel = 'keyInfo'
    (aWriter)->WriteSentinel(190317270);
}

auto ParamTraits<::mozilla::RemoteCDMKeyStatusIPDL>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___sessionId = IPC::ReadParam<::nsString>(aReader);
    if (!maybe___sessionId) {
        aReader->FatalError("Error deserializing 'sessionId' (nsString) member of 'RemoteCDMKeyStatusIPDL'");
        return {};

    }
    auto& _sessionId = *maybe___sessionId;
    // Sentinel = 'sessionId'
    if ((!((aReader)->ReadSentinel(320603058)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'sessionId' (nsString) member of 'RemoteCDMKeyStatusIPDL'");
        return {};
    }
    auto maybe___keyInfo = IPC::ReadParam<nsTArray<::mozilla::CDMKeyInfo>>(aReader);
    if (!maybe___keyInfo) {
        aReader->FatalError("Error deserializing 'keyInfo' (CDMKeyInfo[]) member of 'RemoteCDMKeyStatusIPDL'");
        return {};

    }
    auto& _keyInfo = *maybe___keyInfo;
    // Sentinel = 'keyInfo'
    if ((!((aReader)->ReadSentinel(190317270)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'keyInfo' (CDMKeyInfo[]) member of 'RemoteCDMKeyStatusIPDL'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_sessionId),
            std::move(_keyInfo)};
    return result__;
}

} // namespace IPC

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

namespace IPC {
auto ParamTraits<::mozilla::RemoteCDMKeyExpirationIPDL>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).sessionId());
    // Sentinel = 'sessionId'
    (aWriter)->WriteSentinel(320603058);
    (aWriter)->WriteBytes((&((aVar).expiredTimeMilliSecondsSinceEpoch())), 8);
    // Sentinel = 'expiredTimeMilliSecondsSinceEpoch'
    (aWriter)->WriteSentinel(3784969512);
}

auto ParamTraits<::mozilla::RemoteCDMKeyExpirationIPDL>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___sessionId = IPC::ReadParam<::nsString>(aReader);
    if (!maybe___sessionId) {
        aReader->FatalError("Error deserializing 'sessionId' (nsString) member of 'RemoteCDMKeyExpirationIPDL'");
        return {};

    }
    auto& _sessionId = *maybe___sessionId;
    // Sentinel = 'sessionId'
    if ((!((aReader)->ReadSentinel(320603058)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'sessionId' (nsString) member of 'RemoteCDMKeyExpirationIPDL'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_sessionId),
            double{0}};
    if ((!((aReader)->ReadBytesInto((&((result__)->expiredTimeMilliSecondsSinceEpoch())), 8)))) {
        aReader->FatalError("Error bulk reading fields from double");
        return {};
    }
    // Sentinel = 'expiredTimeMilliSecondsSinceEpoch'
    if ((!((aReader)->ReadSentinel(3784969512)))) {
        mozilla::ipc::SentinelReadError("Error bulk reading fields from double");
        return {};
    }
    return result__;
}

} // namespace IPC

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

namespace IPC {
auto ParamTraits<::mozilla::RemoteCDMInitRequestIPDL>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).allowDistinctiveIdentifier());
    // Sentinel = 'allowDistinctiveIdentifier'
    (aWriter)->WriteSentinel(2413431465);
    IPC::WriteParam(aWriter, (aVar).allowPersistentState());
    // Sentinel = 'allowPersistentState'
    (aWriter)->WriteSentinel(1464666194);
    IPC::WriteParam(aWriter, (aVar).originID());
    // Sentinel = 'originID'
    (aWriter)->WriteSentinel(249234198);
}

auto ParamTraits<::mozilla::RemoteCDMInitRequestIPDL>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___allowDistinctiveIdentifier = IPC::ReadParam<bool>(aReader);
    if (!maybe___allowDistinctiveIdentifier) {
        aReader->FatalError("Error deserializing 'allowDistinctiveIdentifier' (bool) member of 'RemoteCDMInitRequestIPDL'");
        return {};

    }
    auto& _allowDistinctiveIdentifier = *maybe___allowDistinctiveIdentifier;
    // Sentinel = 'allowDistinctiveIdentifier'
    if ((!((aReader)->ReadSentinel(2413431465)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'allowDistinctiveIdentifier' (bool) member of 'RemoteCDMInitRequestIPDL'");
        return {};
    }
    auto maybe___allowPersistentState = IPC::ReadParam<bool>(aReader);
    if (!maybe___allowPersistentState) {
        aReader->FatalError("Error deserializing 'allowPersistentState' (bool) member of 'RemoteCDMInitRequestIPDL'");
        return {};

    }
    auto& _allowPersistentState = *maybe___allowPersistentState;
    // Sentinel = 'allowPersistentState'
    if ((!((aReader)->ReadSentinel(1464666194)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'allowPersistentState' (bool) member of 'RemoteCDMInitRequestIPDL'");
        return {};
    }
    auto maybe___originID = IPC::ReadParam<::nsCString>(aReader);
    if (!maybe___originID) {
        aReader->FatalError("Error deserializing 'originID' (nsCString) member of 'RemoteCDMInitRequestIPDL'");
        return {};

    }
    auto& _originID = *maybe___originID;
    // Sentinel = 'originID'
    if ((!((aReader)->ReadSentinel(249234198)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'originID' (nsCString) member of 'RemoteCDMInitRequestIPDL'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_allowDistinctiveIdentifier),
            std::move(_allowPersistentState),
            std::move(_originID)};
    return result__;
}

} // namespace IPC

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

namespace IPC {
auto ParamTraits<::mozilla::RemoteCDMCreateSessionRequestIPDL>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).sessionType());
    // Sentinel = 'sessionType'
    (aWriter)->WriteSentinel(472908967);
    IPC::WriteParam(aWriter, (aVar).initDataType());
    // Sentinel = 'initDataType'
    (aWriter)->WriteSentinel(524551377);
    IPC::WriteParam(aWriter, (aVar).initData());
    // Sentinel = 'initData'
    (aWriter)->WriteSentinel(243794735);
}

auto ParamTraits<::mozilla::RemoteCDMCreateSessionRequestIPDL>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___sessionType = IPC::ReadParam<::mozilla::dom::MediaKeySessionType>(aReader);
    if (!maybe___sessionType) {
        aReader->FatalError("Error deserializing 'sessionType' (MediaKeySessionType) member of 'RemoteCDMCreateSessionRequestIPDL'");
        return {};

    }
    auto& _sessionType = *maybe___sessionType;
    // Sentinel = 'sessionType'
    if ((!((aReader)->ReadSentinel(472908967)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'sessionType' (MediaKeySessionType) member of 'RemoteCDMCreateSessionRequestIPDL'");
        return {};
    }
    auto maybe___initDataType = IPC::ReadParam<::nsString>(aReader);
    if (!maybe___initDataType) {
        aReader->FatalError("Error deserializing 'initDataType' (nsString) member of 'RemoteCDMCreateSessionRequestIPDL'");
        return {};

    }
    auto& _initDataType = *maybe___initDataType;
    // Sentinel = 'initDataType'
    if ((!((aReader)->ReadSentinel(524551377)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'initDataType' (nsString) member of 'RemoteCDMCreateSessionRequestIPDL'");
        return {};
    }
    auto maybe___initData = IPC::ReadParam<nsTArray<::uint8_t>>(aReader);
    if (!maybe___initData) {
        aReader->FatalError("Error deserializing 'initData' (uint8_t[]) member of 'RemoteCDMCreateSessionRequestIPDL'");
        return {};

    }
    auto& _initData = *maybe___initData;
    // Sentinel = 'initData'
    if ((!((aReader)->ReadSentinel(243794735)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'initData' (uint8_t[]) member of 'RemoteCDMCreateSessionRequestIPDL'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_sessionType),
            std::move(_initDataType),
            std::move(_initData)};
    return result__;
}

} // namespace IPC

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

namespace IPC {
auto ParamTraits<::mozilla::RemoteCDMLoadSessionRequestIPDL>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).sessionType());
    // Sentinel = 'sessionType'
    (aWriter)->WriteSentinel(472908967);
    IPC::WriteParam(aWriter, (aVar).sessionId());
    // Sentinel = 'sessionId'
    (aWriter)->WriteSentinel(320603058);
}

auto ParamTraits<::mozilla::RemoteCDMLoadSessionRequestIPDL>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___sessionType = IPC::ReadParam<::mozilla::dom::MediaKeySessionType>(aReader);
    if (!maybe___sessionType) {
        aReader->FatalError("Error deserializing 'sessionType' (MediaKeySessionType) member of 'RemoteCDMLoadSessionRequestIPDL'");
        return {};

    }
    auto& _sessionType = *maybe___sessionType;
    // Sentinel = 'sessionType'
    if ((!((aReader)->ReadSentinel(472908967)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'sessionType' (MediaKeySessionType) member of 'RemoteCDMLoadSessionRequestIPDL'");
        return {};
    }
    auto maybe___sessionId = IPC::ReadParam<::nsString>(aReader);
    if (!maybe___sessionId) {
        aReader->FatalError("Error deserializing 'sessionId' (nsString) member of 'RemoteCDMLoadSessionRequestIPDL'");
        return {};

    }
    auto& _sessionId = *maybe___sessionId;
    // Sentinel = 'sessionId'
    if ((!((aReader)->ReadSentinel(320603058)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'sessionId' (nsString) member of 'RemoteCDMLoadSessionRequestIPDL'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_sessionType),
            std::move(_sessionId)};
    return result__;
}

} // namespace IPC

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

namespace IPC {
auto ParamTraits<::mozilla::RemoteCDMUpdateSessionRequestIPDL>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).sessionId());
    // Sentinel = 'sessionId'
    (aWriter)->WriteSentinel(320603058);
    IPC::WriteParam(aWriter, (aVar).response());
    // Sentinel = 'response'
    (aWriter)->WriteSentinel(260965232);
}

auto ParamTraits<::mozilla::RemoteCDMUpdateSessionRequestIPDL>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___sessionId = IPC::ReadParam<::nsString>(aReader);
    if (!maybe___sessionId) {
        aReader->FatalError("Error deserializing 'sessionId' (nsString) member of 'RemoteCDMUpdateSessionRequestIPDL'");
        return {};

    }
    auto& _sessionId = *maybe___sessionId;
    // Sentinel = 'sessionId'
    if ((!((aReader)->ReadSentinel(320603058)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'sessionId' (nsString) member of 'RemoteCDMUpdateSessionRequestIPDL'");
        return {};
    }
    auto maybe___response = IPC::ReadParam<nsTArray<::uint8_t>>(aReader);
    if (!maybe___response) {
        aReader->FatalError("Error deserializing 'response' (uint8_t[]) member of 'RemoteCDMUpdateSessionRequestIPDL'");
        return {};

    }
    auto& _response = *maybe___response;
    // Sentinel = 'response'
    if ((!((aReader)->ReadSentinel(260965232)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'response' (uint8_t[]) member of 'RemoteCDMUpdateSessionRequestIPDL'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_sessionId),
            std::move(_response)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union RemoteCDMSessionResponseIPDL|
//
namespace mozilla {
auto RemoteCDMSessionResponseIPDL::MaybeDestroy() -> void
{
    if ((mType) == (T__None)) {
        return;
    }
    switch (mType) {
    case TMediaResult:
        {
            (ptr_MediaResult())->~MediaResult__tdef();
            break;
        }
    case TRemoteCDMKeyMessageIPDL:
        {
            (ptr_RemoteCDMKeyMessageIPDL())->~RemoteCDMKeyMessageIPDL__tdef();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("not reached");
            break;
        }
    }
}

MOZ_IMPLICIT RemoteCDMSessionResponseIPDL::RemoteCDMSessionResponseIPDL(const MediaResult& aOther)
{
    new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult(aOther);
    mType = TMediaResult;
}

MOZ_IMPLICIT RemoteCDMSessionResponseIPDL::RemoteCDMSessionResponseIPDL(MediaResult&& aOther)
{
    new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult(std::move(aOther));
    mType = TMediaResult;
}

MOZ_IMPLICIT RemoteCDMSessionResponseIPDL::RemoteCDMSessionResponseIPDL(const RemoteCDMKeyMessageIPDL& aOther)
{
    new (mozilla::KnownNotNull, ptr_RemoteCDMKeyMessageIPDL()) RemoteCDMKeyMessageIPDL(aOther);
    mType = TRemoteCDMKeyMessageIPDL;
}

MOZ_IMPLICIT RemoteCDMSessionResponseIPDL::RemoteCDMSessionResponseIPDL(RemoteCDMKeyMessageIPDL&& aOther)
{
    new (mozilla::KnownNotNull, ptr_RemoteCDMKeyMessageIPDL()) RemoteCDMKeyMessageIPDL(std::move(aOther));
    mType = TRemoteCDMKeyMessageIPDL;
}

MOZ_IMPLICIT RemoteCDMSessionResponseIPDL::RemoteCDMSessionResponseIPDL(const RemoteCDMSessionResponseIPDL& aOther)
{
    (aOther).AssertSanity();
    switch ((aOther).type()) {
    case TMediaResult:
        {
            new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult((aOther).get_MediaResult());
            break;
        }
    case TRemoteCDMKeyMessageIPDL:
        {
            new (mozilla::KnownNotNull, ptr_RemoteCDMKeyMessageIPDL()) RemoteCDMKeyMessageIPDL((aOther).get_RemoteCDMKeyMessageIPDL());
            break;
        }
    case T__None:
        {
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return;
        }
    }
    mType = (aOther).type();
}

MOZ_IMPLICIT RemoteCDMSessionResponseIPDL::RemoteCDMSessionResponseIPDL(RemoteCDMSessionResponseIPDL&& aOther)
{
    (aOther).AssertSanity();
    Type t = (aOther).type();
    switch (t) {
    case TMediaResult:
        {
            new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult(std::move((aOther).get_MediaResult()));
            (aOther).MaybeDestroy();
            break;
        }
    case TRemoteCDMKeyMessageIPDL:
        {
            new (mozilla::KnownNotNull, ptr_RemoteCDMKeyMessageIPDL()) RemoteCDMKeyMessageIPDL(std::move((aOther).get_RemoteCDMKeyMessageIPDL()));
            (aOther).MaybeDestroy();
            break;
        }
    case T__None:
        {
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return;
        }
    }
    (aOther).mType = T__None;
    mType = t;
}

RemoteCDMSessionResponseIPDL::~RemoteCDMSessionResponseIPDL()
{
    MaybeDestroy();
}

auto RemoteCDMSessionResponseIPDL::operator=(const MediaResult& aRhs) -> RemoteCDMSessionResponseIPDL&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult(aRhs);
    mType = TMediaResult;
    return (*(this));
}

auto RemoteCDMSessionResponseIPDL::operator=(MediaResult&& aRhs) -> RemoteCDMSessionResponseIPDL&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult(std::move(aRhs));
    mType = TMediaResult;
    return (*(this));
}

auto RemoteCDMSessionResponseIPDL::operator=(const RemoteCDMKeyMessageIPDL& aRhs) -> RemoteCDMSessionResponseIPDL&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_RemoteCDMKeyMessageIPDL()) RemoteCDMKeyMessageIPDL(aRhs);
    mType = TRemoteCDMKeyMessageIPDL;
    return (*(this));
}

auto RemoteCDMSessionResponseIPDL::operator=(RemoteCDMKeyMessageIPDL&& aRhs) -> RemoteCDMSessionResponseIPDL&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_RemoteCDMKeyMessageIPDL()) RemoteCDMKeyMessageIPDL(std::move(aRhs));
    mType = TRemoteCDMKeyMessageIPDL;
    return (*(this));
}

auto RemoteCDMSessionResponseIPDL::operator=(const RemoteCDMSessionResponseIPDL& aRhs) -> RemoteCDMSessionResponseIPDL&
{
    (aRhs).AssertSanity();
    Type t = (aRhs).type();
    switch (t) {
    case TMediaResult:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult((aRhs).get_MediaResult());
            break;
        }
    case TRemoteCDMKeyMessageIPDL:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_RemoteCDMKeyMessageIPDL()) RemoteCDMKeyMessageIPDL((aRhs).get_RemoteCDMKeyMessageIPDL());
            break;
        }
    case T__None:
        {
            MaybeDestroy();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            break;
        }
    }
    mType = t;
    return (*(this));
}

auto RemoteCDMSessionResponseIPDL::operator=(RemoteCDMSessionResponseIPDL&& aRhs) -> RemoteCDMSessionResponseIPDL&
{
    (aRhs).AssertSanity();
    Type t = (aRhs).type();
    switch (t) {
    case TMediaResult:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult(std::move((aRhs).get_MediaResult()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TRemoteCDMKeyMessageIPDL:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_RemoteCDMKeyMessageIPDL()) RemoteCDMKeyMessageIPDL(std::move((aRhs).get_RemoteCDMKeyMessageIPDL()));
            (aRhs).MaybeDestroy();
            break;
        }
    case T__None:
        {
            MaybeDestroy();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            break;
        }
    }
    (aRhs).mType = T__None;
    mType = t;
    return (*(this));
}

} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::RemoteCDMSessionResponseIPDL>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    typedef ::mozilla::RemoteCDMSessionResponseIPDL union__;
    int type = (aVar).type();
    IPC::WriteParam(aWriter, type);
    // Sentinel = 'RemoteCDMSessionResponseIPDL'
    (aWriter)->WriteSentinel(2608859805);

    switch (type) {
    case union__::TMediaResult:
        {
            IPC::WriteParam(aWriter, (aVar).get_MediaResult());
            // Sentinel = 'TMediaResult'
            (aWriter)->WriteSentinel(487326900);
            return;
        }
    case union__::TRemoteCDMKeyMessageIPDL:
        {
            IPC::WriteParam(aWriter, (aVar).get_RemoteCDMKeyMessageIPDL());
            // Sentinel = 'TRemoteCDMKeyMessageIPDL'
            (aWriter)->WriteSentinel(1850345644);
            return;
        }
    default:
        {
            aWriter->FatalError("unknown variant of union RemoteCDMSessionResponseIPDL");
            return;
        }
    }
}

auto ParamTraits<::mozilla::RemoteCDMSessionResponseIPDL>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    typedef ::mozilla::RemoteCDMSessionResponseIPDL union__;
    auto maybe__type = IPC::ReadParam<int>(aReader);
    if (!maybe__type) {
        aReader->FatalError("Error deserializing type of union RemoteCDMSessionResponseIPDL");
        return {};

    }
    auto& type = *maybe__type;
    // Sentinel = 'RemoteCDMSessionResponseIPDL'
    if ((!((aReader)->ReadSentinel(2608859805)))) {
        mozilla::ipc::SentinelReadError("Error deserializing type of union RemoteCDMSessionResponseIPDL");
        return {};
    }

    switch (type) {
    case union__::TMediaResult:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::MediaResult>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TMediaResult of union RemoteCDMSessionResponseIPDL");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TMediaResult'
            if ((!((aReader)->ReadSentinel(487326900)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TMediaResult of union RemoteCDMSessionResponseIPDL");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TRemoteCDMKeyMessageIPDL:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::RemoteCDMKeyMessageIPDL>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TRemoteCDMKeyMessageIPDL of union RemoteCDMSessionResponseIPDL");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TRemoteCDMKeyMessageIPDL'
            if ((!((aReader)->ReadSentinel(1850345644)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TRemoteCDMKeyMessageIPDL of union RemoteCDMSessionResponseIPDL");
                return {};
            }
            return std::move(tmp);
        }
    default:
        {
            aReader->FatalError("unknown variant of union RemoteCDMSessionResponseIPDL");
            return {};
        }
    }
}

} // namespace IPC

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

namespace IPC {
auto ParamTraits<::mozilla::RemoteCDMProvisionRequestIPDL>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).serverUrl());
    // Sentinel = 'serverUrl'
    (aWriter)->WriteSentinel(321782731);
    IPC::WriteParam(aWriter, (aVar).request());
    // Sentinel = 'request'
    (aWriter)->WriteSentinel(202703626);
}

auto ParamTraits<::mozilla::RemoteCDMProvisionRequestIPDL>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___serverUrl = IPC::ReadParam<::nsString>(aReader);
    if (!maybe___serverUrl) {
        aReader->FatalError("Error deserializing 'serverUrl' (nsString) member of 'RemoteCDMProvisionRequestIPDL'");
        return {};

    }
    auto& _serverUrl = *maybe___serverUrl;
    // Sentinel = 'serverUrl'
    if ((!((aReader)->ReadSentinel(321782731)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'serverUrl' (nsString) member of 'RemoteCDMProvisionRequestIPDL'");
        return {};
    }
    auto maybe___request = IPC::ReadParam<nsTArray<::uint8_t>>(aReader);
    if (!maybe___request) {
        aReader->FatalError("Error deserializing 'request' (uint8_t[]) member of 'RemoteCDMProvisionRequestIPDL'");
        return {};

    }
    auto& _request = *maybe___request;
    // Sentinel = 'request'
    if ((!((aReader)->ReadSentinel(202703626)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'request' (uint8_t[]) member of 'RemoteCDMProvisionRequestIPDL'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_serverUrl),
            std::move(_request)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union RemoteCDMProvisionResponseIPDL|
//
namespace mozilla {
auto RemoteCDMProvisionResponseIPDL::MaybeDestroy() -> void
{
    if ((mType) == (T__None)) {
        return;
    }
    switch (mType) {
    case TMediaResult:
        {
            (ptr_MediaResult())->~MediaResult__tdef();
            break;
        }
    case TArrayOfuint8_t:
        {
            (ptr_ArrayOfuint8_t())->~ArrayOfuint8_t__tdef();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("not reached");
            break;
        }
    }
}

MOZ_IMPLICIT RemoteCDMProvisionResponseIPDL::RemoteCDMProvisionResponseIPDL(const MediaResult& aOther)
{
    new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult(aOther);
    mType = TMediaResult;
}

MOZ_IMPLICIT RemoteCDMProvisionResponseIPDL::RemoteCDMProvisionResponseIPDL(MediaResult&& aOther)
{
    new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult(std::move(aOther));
    mType = TMediaResult;
}

MOZ_IMPLICIT RemoteCDMProvisionResponseIPDL::RemoteCDMProvisionResponseIPDL(const nsTArray<uint8_t>& aOther)
{
    new (mozilla::KnownNotNull, ptr_ArrayOfuint8_t()) nsTArray<uint8_t>((aOther).Clone());
    mType = TArrayOfuint8_t;
}

MOZ_IMPLICIT RemoteCDMProvisionResponseIPDL::RemoteCDMProvisionResponseIPDL(nsTArray<uint8_t>&& aOther)
{
    new (mozilla::KnownNotNull, ptr_ArrayOfuint8_t()) nsTArray<uint8_t>(std::move(aOther));
    mType = TArrayOfuint8_t;
}

MOZ_IMPLICIT RemoteCDMProvisionResponseIPDL::RemoteCDMProvisionResponseIPDL(const RemoteCDMProvisionResponseIPDL& aOther)
{
    (aOther).AssertSanity();
    switch ((aOther).type()) {
    case TMediaResult:
        {
            new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult((aOther).get_MediaResult());
            break;
        }
    case TArrayOfuint8_t:
        {
            new (mozilla::KnownNotNull, ptr_ArrayOfuint8_t()) nsTArray<uint8_t>(((aOther).get_ArrayOfuint8_t()).Clone());
            break;
        }
    case T__None:
        {
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return;
        }
    }
    mType = (aOther).type();
}

MOZ_IMPLICIT RemoteCDMProvisionResponseIPDL::RemoteCDMProvisionResponseIPDL(RemoteCDMProvisionResponseIPDL&& aOther)
{
    (aOther).AssertSanity();
    Type t = (aOther).type();
    switch (t) {
    case TMediaResult:
        {
            new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult(std::move((aOther).get_MediaResult()));
            (aOther).MaybeDestroy();
            break;
        }
    case TArrayOfuint8_t:
        {
            new (mozilla::KnownNotNull, ptr_ArrayOfuint8_t()) nsTArray<uint8_t>(std::move((aOther).get_ArrayOfuint8_t()));
            (aOther).MaybeDestroy();
            break;
        }
    case T__None:
        {
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return;
        }
    }
    (aOther).mType = T__None;
    mType = t;
}

RemoteCDMProvisionResponseIPDL::~RemoteCDMProvisionResponseIPDL()
{
    MaybeDestroy();
}

auto RemoteCDMProvisionResponseIPDL::operator=(const MediaResult& aRhs) -> RemoteCDMProvisionResponseIPDL&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult(aRhs);
    mType = TMediaResult;
    return (*(this));
}

auto RemoteCDMProvisionResponseIPDL::operator=(MediaResult&& aRhs) -> RemoteCDMProvisionResponseIPDL&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult(std::move(aRhs));
    mType = TMediaResult;
    return (*(this));
}

auto RemoteCDMProvisionResponseIPDL::operator=(const nsTArray<uint8_t>& aRhs) -> RemoteCDMProvisionResponseIPDL&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ArrayOfuint8_t()) nsTArray<uint8_t>((aRhs).Clone());
    mType = TArrayOfuint8_t;
    return (*(this));
}

auto RemoteCDMProvisionResponseIPDL::operator=(nsTArray<uint8_t>&& aRhs) -> RemoteCDMProvisionResponseIPDL&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ArrayOfuint8_t()) nsTArray<uint8_t>(std::move(aRhs));
    mType = TArrayOfuint8_t;
    return (*(this));
}

auto RemoteCDMProvisionResponseIPDL::operator=(const RemoteCDMProvisionResponseIPDL& aRhs) -> RemoteCDMProvisionResponseIPDL&
{
    (aRhs).AssertSanity();
    Type t = (aRhs).type();
    switch (t) {
    case TMediaResult:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult((aRhs).get_MediaResult());
            break;
        }
    case TArrayOfuint8_t:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_ArrayOfuint8_t()) nsTArray<uint8_t>(((aRhs).get_ArrayOfuint8_t()).Clone());
            break;
        }
    case T__None:
        {
            MaybeDestroy();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            break;
        }
    }
    mType = t;
    return (*(this));
}

auto RemoteCDMProvisionResponseIPDL::operator=(RemoteCDMProvisionResponseIPDL&& aRhs) -> RemoteCDMProvisionResponseIPDL&
{
    (aRhs).AssertSanity();
    Type t = (aRhs).type();
    switch (t) {
    case TMediaResult:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_MediaResult()) MediaResult(std::move((aRhs).get_MediaResult()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TArrayOfuint8_t:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_ArrayOfuint8_t()) nsTArray<uint8_t>(std::move((aRhs).get_ArrayOfuint8_t()));
            (aRhs).MaybeDestroy();
            break;
        }
    case T__None:
        {
            MaybeDestroy();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            break;
        }
    }
    (aRhs).mType = T__None;
    mType = t;
    return (*(this));
}

} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::RemoteCDMProvisionResponseIPDL>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    typedef ::mozilla::RemoteCDMProvisionResponseIPDL union__;
    int type = (aVar).type();
    IPC::WriteParam(aWriter, type);
    // Sentinel = 'RemoteCDMProvisionResponseIPDL'
    (aWriter)->WriteSentinel(3021343618);

    switch (type) {
    case union__::TMediaResult:
        {
            IPC::WriteParam(aWriter, (aVar).get_MediaResult());
            // Sentinel = 'TMediaResult'
            (aWriter)->WriteSentinel(487326900);
            return;
        }
    case union__::TArrayOfuint8_t:
        {
            IPC::WriteParam(aWriter, (aVar).get_ArrayOfuint8_t());
            // Sentinel = 'TArrayOfuint8_t'
            (aWriter)->WriteSentinel(771753428);
            return;
        }
    default:
        {
            aWriter->FatalError("unknown variant of union RemoteCDMProvisionResponseIPDL");
            return;
        }
    }
}

auto ParamTraits<::mozilla::RemoteCDMProvisionResponseIPDL>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    typedef ::mozilla::RemoteCDMProvisionResponseIPDL union__;
    auto maybe__type = IPC::ReadParam<int>(aReader);
    if (!maybe__type) {
        aReader->FatalError("Error deserializing type of union RemoteCDMProvisionResponseIPDL");
        return {};

    }
    auto& type = *maybe__type;
    // Sentinel = 'RemoteCDMProvisionResponseIPDL'
    if ((!((aReader)->ReadSentinel(3021343618)))) {
        mozilla::ipc::SentinelReadError("Error deserializing type of union RemoteCDMProvisionResponseIPDL");
        return {};
    }

    switch (type) {
    case union__::TMediaResult:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::MediaResult>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TMediaResult of union RemoteCDMProvisionResponseIPDL");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TMediaResult'
            if ((!((aReader)->ReadSentinel(487326900)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TMediaResult of union RemoteCDMProvisionResponseIPDL");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TArrayOfuint8_t:
        {
            auto maybe__tmp = IPC::ReadParam<nsTArray<::uint8_t>>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TArrayOfuint8_t of union RemoteCDMProvisionResponseIPDL");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TArrayOfuint8_t'
            if ((!((aReader)->ReadSentinel(771753428)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TArrayOfuint8_t of union RemoteCDMProvisionResponseIPDL");
                return {};
            }
            return std::move(tmp);
        }
    default:
        {
            aReader->FatalError("unknown variant of union RemoteCDMProvisionResponseIPDL");
            return {};
        }
    }
}

} // namespace IPC
