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


#include "mozilla/dom/BindingIPCUtils.h"
#include "mozilla/dom/ClientIPCUtils.h"
#include "ipc/ErrorIPCUtils.h"
#include "mozilla/dom/PClientSourceParent.h"
#include "mozilla/dom/PClientSourceChild.h"
#include "mozilla/dom/DomSecurityIPCUtils.h"
#include "mozilla/GfxMessageUtils.h"
#include "mozilla/dom/CSPMessageUtils.h"
#include "mozilla/dom/PolicyContainerMessageUtils.h"
#include "mozilla/dom/DocShellMessageUtils.h"
#include "mozilla/dom/NavigationAPIIPCUtils.h"
#include "mozilla/dom/PermissionMessageUtils.h"
#include "mozilla/dom/PropertyBagUtils.h"
#include "mozilla/dom/ReferrerInfoUtils.h"
#include "mozilla/dom/TabMessageUtils.h"
#include "mozilla/dom/notification/IPCUtils.h"
#include "mozilla/ipc/URIUtils.h"
#include "mozilla/layers/LayersMessageUtils.h"
#include "mozilla/net/NeckoMessageUtils.h"
#include "mozilla/URLClassifierIPCUtils.h"
#include "mozilla/dom/DomSecurityIPCUtils.h"
#include "mozilla/dom/ServiceWorkerIPCUtils.h"
#include "mozilla/dom/WorkerIPCUtils.h"
#include "mozilla/dom/ClientIPCTypes.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 ClientSourceConstructorArgs|
//
namespace mozilla {
namespace dom {
} // namespace dom
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::dom::ClientSourceConstructorArgs>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).id());
    // Sentinel = 'id'
    (aWriter)->WriteSentinel(20447438);
    IPC::WriteParam(aWriter, (aVar).agentClusterId());
    // Sentinel = 'agentClusterId'
    (aWriter)->WriteSentinel(710477215);
    IPC::WriteParam(aWriter, (aVar).type());
    // Sentinel = 'type'
    (aWriter)->WriteSentinel(75760067);
    IPC::WriteParam(aWriter, (aVar).principalInfo());
    // Sentinel = 'principalInfo'
    (aWriter)->WriteSentinel(633472335);
    IPC::WriteParam(aWriter, (aVar).creationTime());
    // Sentinel = 'creationTime'
    (aWriter)->WriteSentinel(536478949);
    IPC::WriteParam(aWriter, (aVar).url());
    // Sentinel = 'url'
    (aWriter)->WriteSentinel(45220180);
    IPC::WriteParam(aWriter, (aVar).frameType());
    // Sentinel = 'frameType'
    (aWriter)->WriteSentinel(308085678);
}

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

    }
    auto& _id = *maybe___id;
    // Sentinel = 'id'
    if ((!((aReader)->ReadSentinel(20447438)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'id' (nsID) member of 'ClientSourceConstructorArgs'");
        return {};
    }
    auto maybe___agentClusterId = IPC::ReadParam<mozilla::Maybe<::nsID>>(aReader);
    if (!maybe___agentClusterId) {
        aReader->FatalError("Error deserializing 'agentClusterId' (nsID?) member of 'ClientSourceConstructorArgs'");
        return {};

    }
    auto& _agentClusterId = *maybe___agentClusterId;
    // Sentinel = 'agentClusterId'
    if ((!((aReader)->ReadSentinel(710477215)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'agentClusterId' (nsID?) member of 'ClientSourceConstructorArgs'");
        return {};
    }
    auto maybe___type = IPC::ReadParam<::mozilla::dom::ClientType>(aReader);
    if (!maybe___type) {
        aReader->FatalError("Error deserializing 'type' (ClientType) member of 'ClientSourceConstructorArgs'");
        return {};

    }
    auto& _type = *maybe___type;
    // Sentinel = 'type'
    if ((!((aReader)->ReadSentinel(75760067)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'type' (ClientType) member of 'ClientSourceConstructorArgs'");
        return {};
    }
    auto maybe___principalInfo = IPC::ReadParam<::mozilla::ipc::PrincipalInfo>(aReader);
    if (!maybe___principalInfo) {
        aReader->FatalError("Error deserializing 'principalInfo' (PrincipalInfo) member of 'ClientSourceConstructorArgs'");
        return {};

    }
    auto& _principalInfo = *maybe___principalInfo;
    // Sentinel = 'principalInfo'
    if ((!((aReader)->ReadSentinel(633472335)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'principalInfo' (PrincipalInfo) member of 'ClientSourceConstructorArgs'");
        return {};
    }
    auto maybe___creationTime = IPC::ReadParam<::mozilla::TimeStamp>(aReader);
    if (!maybe___creationTime) {
        aReader->FatalError("Error deserializing 'creationTime' (TimeStamp) member of 'ClientSourceConstructorArgs'");
        return {};

    }
    auto& _creationTime = *maybe___creationTime;
    // Sentinel = 'creationTime'
    if ((!((aReader)->ReadSentinel(536478949)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'creationTime' (TimeStamp) member of 'ClientSourceConstructorArgs'");
        return {};
    }
    auto maybe___url = IPC::ReadParam<::nsCString>(aReader);
    if (!maybe___url) {
        aReader->FatalError("Error deserializing 'url' (nsCString) member of 'ClientSourceConstructorArgs'");
        return {};

    }
    auto& _url = *maybe___url;
    // Sentinel = 'url'
    if ((!((aReader)->ReadSentinel(45220180)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'url' (nsCString) member of 'ClientSourceConstructorArgs'");
        return {};
    }
    auto maybe___frameType = IPC::ReadParam<::mozilla::dom::FrameType>(aReader);
    if (!maybe___frameType) {
        aReader->FatalError("Error deserializing 'frameType' (FrameType) member of 'ClientSourceConstructorArgs'");
        return {};

    }
    auto& _frameType = *maybe___frameType;
    // Sentinel = 'frameType'
    if ((!((aReader)->ReadSentinel(308085678)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'frameType' (FrameType) member of 'ClientSourceConstructorArgs'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_id),
            std::move(_agentClusterId),
            std::move(_type),
            std::move(_principalInfo),
            std::move(_creationTime),
            std::move(_url),
            std::move(_frameType)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct IPCClientInfo|
//
namespace mozilla {
namespace dom {
auto IPCClientInfo::operator==(const IPCClientInfo& _o) const -> bool
{
    if ((!((id()) == ((_o).id())))) {
        return false;
    }
    if ((!((agentClusterId()) == ((_o).agentClusterId())))) {
        return false;
    }
    if ((!((type()) == ((_o).type())))) {
        return false;
    }
    if ((!((principalInfo()) == ((_o).principalInfo())))) {
        return false;
    }
    if ((!((creationTime()) == ((_o).creationTime())))) {
        return false;
    }
    if ((!((url()) == ((_o).url())))) {
        return false;
    }
    if ((!((frameType()) == ((_o).frameType())))) {
        return false;
    }
    if ((!((preloadCspInfo()) == ((_o).preloadCspInfo())))) {
        return false;
    }
    if ((!((policyContainerArgs()) == ((_o).policyContainerArgs())))) {
        return false;
    }
    return true;
}

auto IPCClientInfo::operator!=(const IPCClientInfo& _o) const -> bool
{
    return (!(operator==(_o)));
}

} // namespace dom
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::dom::IPCClientInfo>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).id());
    // Sentinel = 'id'
    (aWriter)->WriteSentinel(20447438);
    IPC::WriteParam(aWriter, (aVar).agentClusterId());
    // Sentinel = 'agentClusterId'
    (aWriter)->WriteSentinel(710477215);
    IPC::WriteParam(aWriter, (aVar).type());
    // Sentinel = 'type'
    (aWriter)->WriteSentinel(75760067);
    IPC::WriteParam(aWriter, (aVar).principalInfo());
    // Sentinel = 'principalInfo'
    (aWriter)->WriteSentinel(633472335);
    IPC::WriteParam(aWriter, (aVar).creationTime());
    // Sentinel = 'creationTime'
    (aWriter)->WriteSentinel(536478949);
    IPC::WriteParam(aWriter, (aVar).url());
    // Sentinel = 'url'
    (aWriter)->WriteSentinel(45220180);
    IPC::WriteParam(aWriter, (aVar).frameType());
    // Sentinel = 'frameType'
    (aWriter)->WriteSentinel(308085678);
    IPC::WriteParam(aWriter, (aVar).preloadCspInfo());
    // Sentinel = 'preloadCspInfo'
    (aWriter)->WriteSentinel(714540442);
    IPC::WriteParam(aWriter, (aVar).policyContainerArgs());
    // Sentinel = 'policyContainerArgs'
    (aWriter)->WriteSentinel(1310394305);
}

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

    }
    auto& _id = *maybe___id;
    // Sentinel = 'id'
    if ((!((aReader)->ReadSentinel(20447438)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'id' (nsID) member of 'IPCClientInfo'");
        return {};
    }
    auto maybe___agentClusterId = IPC::ReadParam<mozilla::Maybe<::nsID>>(aReader);
    if (!maybe___agentClusterId) {
        aReader->FatalError("Error deserializing 'agentClusterId' (nsID?) member of 'IPCClientInfo'");
        return {};

    }
    auto& _agentClusterId = *maybe___agentClusterId;
    // Sentinel = 'agentClusterId'
    if ((!((aReader)->ReadSentinel(710477215)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'agentClusterId' (nsID?) member of 'IPCClientInfo'");
        return {};
    }
    auto maybe___type = IPC::ReadParam<::mozilla::dom::ClientType>(aReader);
    if (!maybe___type) {
        aReader->FatalError("Error deserializing 'type' (ClientType) member of 'IPCClientInfo'");
        return {};

    }
    auto& _type = *maybe___type;
    // Sentinel = 'type'
    if ((!((aReader)->ReadSentinel(75760067)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'type' (ClientType) member of 'IPCClientInfo'");
        return {};
    }
    auto maybe___principalInfo = IPC::ReadParam<::mozilla::ipc::PrincipalInfo>(aReader);
    if (!maybe___principalInfo) {
        aReader->FatalError("Error deserializing 'principalInfo' (PrincipalInfo) member of 'IPCClientInfo'");
        return {};

    }
    auto& _principalInfo = *maybe___principalInfo;
    // Sentinel = 'principalInfo'
    if ((!((aReader)->ReadSentinel(633472335)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'principalInfo' (PrincipalInfo) member of 'IPCClientInfo'");
        return {};
    }
    auto maybe___creationTime = IPC::ReadParam<::mozilla::TimeStamp>(aReader);
    if (!maybe___creationTime) {
        aReader->FatalError("Error deserializing 'creationTime' (TimeStamp) member of 'IPCClientInfo'");
        return {};

    }
    auto& _creationTime = *maybe___creationTime;
    // Sentinel = 'creationTime'
    if ((!((aReader)->ReadSentinel(536478949)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'creationTime' (TimeStamp) member of 'IPCClientInfo'");
        return {};
    }
    auto maybe___url = IPC::ReadParam<::nsCString>(aReader);
    if (!maybe___url) {
        aReader->FatalError("Error deserializing 'url' (nsCString) member of 'IPCClientInfo'");
        return {};

    }
    auto& _url = *maybe___url;
    // Sentinel = 'url'
    if ((!((aReader)->ReadSentinel(45220180)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'url' (nsCString) member of 'IPCClientInfo'");
        return {};
    }
    auto maybe___frameType = IPC::ReadParam<::mozilla::dom::FrameType>(aReader);
    if (!maybe___frameType) {
        aReader->FatalError("Error deserializing 'frameType' (FrameType) member of 'IPCClientInfo'");
        return {};

    }
    auto& _frameType = *maybe___frameType;
    // Sentinel = 'frameType'
    if ((!((aReader)->ReadSentinel(308085678)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'frameType' (FrameType) member of 'IPCClientInfo'");
        return {};
    }
    auto maybe___preloadCspInfo = IPC::ReadParam<mozilla::Maybe<::mozilla::ipc::CSPInfo>>(aReader);
    if (!maybe___preloadCspInfo) {
        aReader->FatalError("Error deserializing 'preloadCspInfo' (CSPInfo?) member of 'IPCClientInfo'");
        return {};

    }
    auto& _preloadCspInfo = *maybe___preloadCspInfo;
    // Sentinel = 'preloadCspInfo'
    if ((!((aReader)->ReadSentinel(714540442)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'preloadCspInfo' (CSPInfo?) member of 'IPCClientInfo'");
        return {};
    }
    auto maybe___policyContainerArgs = IPC::ReadParam<mozilla::Maybe<::mozilla::ipc::PolicyContainerArgs>>(aReader);
    if (!maybe___policyContainerArgs) {
        aReader->FatalError("Error deserializing 'policyContainerArgs' (PolicyContainerArgs?) member of 'IPCClientInfo'");
        return {};

    }
    auto& _policyContainerArgs = *maybe___policyContainerArgs;
    // Sentinel = 'policyContainerArgs'
    if ((!((aReader)->ReadSentinel(1310394305)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'policyContainerArgs' (PolicyContainerArgs?) member of 'IPCClientInfo'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_id),
            std::move(_agentClusterId),
            std::move(_type),
            std::move(_principalInfo),
            std::move(_creationTime),
            std::move(_url),
            std::move(_frameType),
            std::move(_preloadCspInfo),
            std::move(_policyContainerArgs)};
    return result__;
}

} // namespace IPC

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

namespace IPC {
auto ParamTraits<::mozilla::dom::IPCClientWindowState>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).visibilityState());
    // Sentinel = 'visibilityState'
    (aWriter)->WriteSentinel(851379786);
    IPC::WriteParam(aWriter, (aVar).lastFocusTime());
    // Sentinel = 'lastFocusTime'
    (aWriter)->WriteSentinel(620234052);
    IPC::WriteParam(aWriter, (aVar).storageAccess());
    // Sentinel = 'storageAccess'
    (aWriter)->WriteSentinel(628753736);
    IPC::WriteParam(aWriter, (aVar).focused());
    // Sentinel = 'focused'
    (aWriter)->WriteSentinel(196412138);
}

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

    }
    auto& _visibilityState = *maybe___visibilityState;
    // Sentinel = 'visibilityState'
    if ((!((aReader)->ReadSentinel(851379786)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'visibilityState' (VisibilityState) member of 'IPCClientWindowState'");
        return {};
    }
    auto maybe___lastFocusTime = IPC::ReadParam<::mozilla::TimeStamp>(aReader);
    if (!maybe___lastFocusTime) {
        aReader->FatalError("Error deserializing 'lastFocusTime' (TimeStamp) member of 'IPCClientWindowState'");
        return {};

    }
    auto& _lastFocusTime = *maybe___lastFocusTime;
    // Sentinel = 'lastFocusTime'
    if ((!((aReader)->ReadSentinel(620234052)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'lastFocusTime' (TimeStamp) member of 'IPCClientWindowState'");
        return {};
    }
    auto maybe___storageAccess = IPC::ReadParam<::mozilla::StorageAccess>(aReader);
    if (!maybe___storageAccess) {
        aReader->FatalError("Error deserializing 'storageAccess' (StorageAccess) member of 'IPCClientWindowState'");
        return {};

    }
    auto& _storageAccess = *maybe___storageAccess;
    // Sentinel = 'storageAccess'
    if ((!((aReader)->ReadSentinel(628753736)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'storageAccess' (StorageAccess) member of 'IPCClientWindowState'");
        return {};
    }
    auto maybe___focused = IPC::ReadParam<bool>(aReader);
    if (!maybe___focused) {
        aReader->FatalError("Error deserializing 'focused' (bool) member of 'IPCClientWindowState'");
        return {};

    }
    auto& _focused = *maybe___focused;
    // Sentinel = 'focused'
    if ((!((aReader)->ReadSentinel(196412138)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'focused' (bool) member of 'IPCClientWindowState'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_visibilityState),
            std::move(_lastFocusTime),
            std::move(_storageAccess),
            std::move(_focused)};
    return result__;
}

} // namespace IPC

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

namespace IPC {
auto ParamTraits<::mozilla::dom::IPCClientWorkerState>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).storageAccess());
    // Sentinel = 'storageAccess'
    (aWriter)->WriteSentinel(628753736);
}

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

    }
    auto& _storageAccess = *maybe___storageAccess;
    // Sentinel = 'storageAccess'
    if ((!((aReader)->ReadSentinel(628753736)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'storageAccess' (StorageAccess) member of 'IPCClientWorkerState'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_storageAccess)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union IPCClientState|
//
namespace mozilla {
namespace dom {
auto IPCClientState::MaybeDestroy() -> void
{
    if ((mType) == (T__None)) {
        return;
    }
    switch (mType) {
    case TIPCClientWindowState:
        {
            (ptr_IPCClientWindowState())->~IPCClientWindowState__tdef();
            break;
        }
    case TIPCClientWorkerState:
        {
            (ptr_IPCClientWorkerState())->~IPCClientWorkerState__tdef();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("not reached");
            break;
        }
    }
}

MOZ_IMPLICIT IPCClientState::IPCClientState(const IPCClientWindowState& aOther)
{
    new (mozilla::KnownNotNull, ptr_IPCClientWindowState()) IPCClientWindowState(aOther);
    mType = TIPCClientWindowState;
}

MOZ_IMPLICIT IPCClientState::IPCClientState(IPCClientWindowState&& aOther)
{
    new (mozilla::KnownNotNull, ptr_IPCClientWindowState()) IPCClientWindowState(std::move(aOther));
    mType = TIPCClientWindowState;
}

MOZ_IMPLICIT IPCClientState::IPCClientState(const IPCClientWorkerState& aOther)
{
    new (mozilla::KnownNotNull, ptr_IPCClientWorkerState()) IPCClientWorkerState(aOther);
    mType = TIPCClientWorkerState;
}

MOZ_IMPLICIT IPCClientState::IPCClientState(IPCClientWorkerState&& aOther)
{
    new (mozilla::KnownNotNull, ptr_IPCClientWorkerState()) IPCClientWorkerState(std::move(aOther));
    mType = TIPCClientWorkerState;
}

MOZ_IMPLICIT IPCClientState::IPCClientState(const IPCClientState& aOther)
{
    (aOther).AssertSanity();
    switch ((aOther).type()) {
    case TIPCClientWindowState:
        {
            new (mozilla::KnownNotNull, ptr_IPCClientWindowState()) IPCClientWindowState((aOther).get_IPCClientWindowState());
            break;
        }
    case TIPCClientWorkerState:
        {
            new (mozilla::KnownNotNull, ptr_IPCClientWorkerState()) IPCClientWorkerState((aOther).get_IPCClientWorkerState());
            break;
        }
    case T__None:
        {
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return;
        }
    }
    mType = (aOther).type();
}

MOZ_IMPLICIT IPCClientState::IPCClientState(IPCClientState&& aOther)
{
    (aOther).AssertSanity();
    Type t = (aOther).type();
    switch (t) {
    case TIPCClientWindowState:
        {
            new (mozilla::KnownNotNull, ptr_IPCClientWindowState()) IPCClientWindowState(std::move((aOther).get_IPCClientWindowState()));
            (aOther).MaybeDestroy();
            break;
        }
    case TIPCClientWorkerState:
        {
            new (mozilla::KnownNotNull, ptr_IPCClientWorkerState()) IPCClientWorkerState(std::move((aOther).get_IPCClientWorkerState()));
            (aOther).MaybeDestroy();
            break;
        }
    case T__None:
        {
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return;
        }
    }
    (aOther).mType = T__None;
    mType = t;
}

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

auto IPCClientState::operator=(const IPCClientWindowState& aRhs) -> IPCClientState&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_IPCClientWindowState()) IPCClientWindowState(aRhs);
    mType = TIPCClientWindowState;
    return (*(this));
}

auto IPCClientState::operator=(IPCClientWindowState&& aRhs) -> IPCClientState&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_IPCClientWindowState()) IPCClientWindowState(std::move(aRhs));
    mType = TIPCClientWindowState;
    return (*(this));
}

auto IPCClientState::operator=(const IPCClientWorkerState& aRhs) -> IPCClientState&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_IPCClientWorkerState()) IPCClientWorkerState(aRhs);
    mType = TIPCClientWorkerState;
    return (*(this));
}

auto IPCClientState::operator=(IPCClientWorkerState&& aRhs) -> IPCClientState&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_IPCClientWorkerState()) IPCClientWorkerState(std::move(aRhs));
    mType = TIPCClientWorkerState;
    return (*(this));
}

auto IPCClientState::operator=(const IPCClientState& aRhs) -> IPCClientState&
{
    (aRhs).AssertSanity();
    Type t = (aRhs).type();
    switch (t) {
    case TIPCClientWindowState:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_IPCClientWindowState()) IPCClientWindowState((aRhs).get_IPCClientWindowState());
            break;
        }
    case TIPCClientWorkerState:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_IPCClientWorkerState()) IPCClientWorkerState((aRhs).get_IPCClientWorkerState());
            break;
        }
    case T__None:
        {
            MaybeDestroy();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            break;
        }
    }
    mType = t;
    return (*(this));
}

auto IPCClientState::operator=(IPCClientState&& aRhs) -> IPCClientState&
{
    (aRhs).AssertSanity();
    Type t = (aRhs).type();
    switch (t) {
    case TIPCClientWindowState:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_IPCClientWindowState()) IPCClientWindowState(std::move((aRhs).get_IPCClientWindowState()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TIPCClientWorkerState:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_IPCClientWorkerState()) IPCClientWorkerState(std::move((aRhs).get_IPCClientWorkerState()));
            (aRhs).MaybeDestroy();
            break;
        }
    case T__None:
        {
            MaybeDestroy();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            break;
        }
    }
    (aRhs).mType = T__None;
    mType = t;
    return (*(this));
}

} // namespace dom
} // namespace mozilla

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

    switch (type) {
    case union__::TIPCClientWindowState:
        {
            IPC::WriteParam(aWriter, (aVar).get_IPCClientWindowState());
            // Sentinel = 'TIPCClientWindowState'
            (aWriter)->WriteSentinel(1405093897);
            return;
        }
    case union__::TIPCClientWorkerState:
        {
            IPC::WriteParam(aWriter, (aVar).get_IPCClientWorkerState());
            // Sentinel = 'TIPCClientWorkerState'
            (aWriter)->WriteSentinel(1408501771);
            return;
        }
    default:
        {
            aWriter->FatalError("unknown variant of union IPCClientState");
            return;
        }
    }
}

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

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

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

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TIPCClientWindowState'
            if ((!((aReader)->ReadSentinel(1405093897)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TIPCClientWindowState of union IPCClientState");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TIPCClientWorkerState:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::dom::IPCClientWorkerState>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TIPCClientWorkerState of union IPCClientState");
                return {};

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

} // namespace IPC

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

namespace IPC {
auto ParamTraits<::mozilla::dom::ClientInfoAndState>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).info());
    // Sentinel = 'info'
    (aWriter)->WriteSentinel(70058413);
    IPC::WriteParam(aWriter, (aVar).state());
    // Sentinel = 'state'
    (aWriter)->WriteSentinel(109314594);
}

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

    }
    auto& _info = *maybe___info;
    // Sentinel = 'info'
    if ((!((aReader)->ReadSentinel(70058413)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'info' (IPCClientInfo) member of 'ClientInfoAndState'");
        return {};
    }
    auto maybe___state = IPC::ReadParam<::mozilla::dom::IPCClientState>(aReader);
    if (!maybe___state) {
        aReader->FatalError("Error deserializing 'state' (IPCClientState) member of 'ClientInfoAndState'");
        return {};

    }
    auto& _state = *maybe___state;
    // Sentinel = 'state'
    if ((!((aReader)->ReadSentinel(109314594)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'state' (IPCClientState) member of 'ClientInfoAndState'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_info),
            std::move(_state)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union PostMessageSource|
//
namespace mozilla {
namespace dom {
auto PostMessageSource::MaybeDestroy() -> void
{
    if ((mType) == (T__None)) {
        return;
    }
    switch (mType) {
    case TClientInfoAndState:
        {
            (ptr_ClientInfoAndState())->~ClientInfoAndState__tdef();
            break;
        }
    case TIPCServiceWorkerDescriptor:
        {
            (ptr_IPCServiceWorkerDescriptor())->~IPCServiceWorkerDescriptor__tdef();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("not reached");
            break;
        }
    }
}

MOZ_IMPLICIT PostMessageSource::PostMessageSource(const ClientInfoAndState& aOther)
{
    new (mozilla::KnownNotNull, ptr_ClientInfoAndState()) ClientInfoAndState(aOther);
    mType = TClientInfoAndState;
}

MOZ_IMPLICIT PostMessageSource::PostMessageSource(ClientInfoAndState&& aOther)
{
    new (mozilla::KnownNotNull, ptr_ClientInfoAndState()) ClientInfoAndState(std::move(aOther));
    mType = TClientInfoAndState;
}

MOZ_IMPLICIT PostMessageSource::PostMessageSource(const IPCServiceWorkerDescriptor& aOther)
{
    new (mozilla::KnownNotNull, ptr_IPCServiceWorkerDescriptor()) IPCServiceWorkerDescriptor(aOther);
    mType = TIPCServiceWorkerDescriptor;
}

MOZ_IMPLICIT PostMessageSource::PostMessageSource(IPCServiceWorkerDescriptor&& aOther)
{
    new (mozilla::KnownNotNull, ptr_IPCServiceWorkerDescriptor()) IPCServiceWorkerDescriptor(std::move(aOther));
    mType = TIPCServiceWorkerDescriptor;
}

MOZ_IMPLICIT PostMessageSource::PostMessageSource(const PostMessageSource& aOther)
{
    (aOther).AssertSanity();
    switch ((aOther).type()) {
    case TClientInfoAndState:
        {
            new (mozilla::KnownNotNull, ptr_ClientInfoAndState()) ClientInfoAndState((aOther).get_ClientInfoAndState());
            break;
        }
    case TIPCServiceWorkerDescriptor:
        {
            new (mozilla::KnownNotNull, ptr_IPCServiceWorkerDescriptor()) IPCServiceWorkerDescriptor((aOther).get_IPCServiceWorkerDescriptor());
            break;
        }
    case T__None:
        {
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return;
        }
    }
    mType = (aOther).type();
}

MOZ_IMPLICIT PostMessageSource::PostMessageSource(PostMessageSource&& aOther)
{
    (aOther).AssertSanity();
    Type t = (aOther).type();
    switch (t) {
    case TClientInfoAndState:
        {
            new (mozilla::KnownNotNull, ptr_ClientInfoAndState()) ClientInfoAndState(std::move((aOther).get_ClientInfoAndState()));
            (aOther).MaybeDestroy();
            break;
        }
    case TIPCServiceWorkerDescriptor:
        {
            new (mozilla::KnownNotNull, ptr_IPCServiceWorkerDescriptor()) IPCServiceWorkerDescriptor(std::move((aOther).get_IPCServiceWorkerDescriptor()));
            (aOther).MaybeDestroy();
            break;
        }
    case T__None:
        {
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return;
        }
    }
    (aOther).mType = T__None;
    mType = t;
}

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

auto PostMessageSource::operator=(const ClientInfoAndState& aRhs) -> PostMessageSource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ClientInfoAndState()) ClientInfoAndState(aRhs);
    mType = TClientInfoAndState;
    return (*(this));
}

auto PostMessageSource::operator=(ClientInfoAndState&& aRhs) -> PostMessageSource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ClientInfoAndState()) ClientInfoAndState(std::move(aRhs));
    mType = TClientInfoAndState;
    return (*(this));
}

auto PostMessageSource::operator=(const IPCServiceWorkerDescriptor& aRhs) -> PostMessageSource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_IPCServiceWorkerDescriptor()) IPCServiceWorkerDescriptor(aRhs);
    mType = TIPCServiceWorkerDescriptor;
    return (*(this));
}

auto PostMessageSource::operator=(IPCServiceWorkerDescriptor&& aRhs) -> PostMessageSource&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_IPCServiceWorkerDescriptor()) IPCServiceWorkerDescriptor(std::move(aRhs));
    mType = TIPCServiceWorkerDescriptor;
    return (*(this));
}

auto PostMessageSource::operator=(const PostMessageSource& aRhs) -> PostMessageSource&
{
    (aRhs).AssertSanity();
    Type t = (aRhs).type();
    switch (t) {
    case TClientInfoAndState:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_ClientInfoAndState()) ClientInfoAndState((aRhs).get_ClientInfoAndState());
            break;
        }
    case TIPCServiceWorkerDescriptor:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_IPCServiceWorkerDescriptor()) IPCServiceWorkerDescriptor((aRhs).get_IPCServiceWorkerDescriptor());
            break;
        }
    case T__None:
        {
            MaybeDestroy();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            break;
        }
    }
    mType = t;
    return (*(this));
}

auto PostMessageSource::operator=(PostMessageSource&& aRhs) -> PostMessageSource&
{
    (aRhs).AssertSanity();
    Type t = (aRhs).type();
    switch (t) {
    case TClientInfoAndState:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_ClientInfoAndState()) ClientInfoAndState(std::move((aRhs).get_ClientInfoAndState()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TIPCServiceWorkerDescriptor:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_IPCServiceWorkerDescriptor()) IPCServiceWorkerDescriptor(std::move((aRhs).get_IPCServiceWorkerDescriptor()));
            (aRhs).MaybeDestroy();
            break;
        }
    case T__None:
        {
            MaybeDestroy();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            break;
        }
    }
    (aRhs).mType = T__None;
    mType = t;
    return (*(this));
}

} // namespace dom
} // namespace mozilla

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

    switch (type) {
    case union__::TClientInfoAndState:
        {
            IPC::WriteParam(aWriter, (aVar).get_ClientInfoAndState());
            // Sentinel = 'TClientInfoAndState'
            (aWriter)->WriteSentinel(1205733204);
            return;
        }
    case union__::TIPCServiceWorkerDescriptor:
        {
            IPC::WriteParam(aWriter, (aVar).get_IPCServiceWorkerDescriptor());
            // Sentinel = 'TIPCServiceWorkerDescriptor'
            (aWriter)->WriteSentinel(2374568603);
            return;
        }
    default:
        {
            aWriter->FatalError("unknown variant of union PostMessageSource");
            return;
        }
    }
}

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

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

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

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TClientInfoAndState'
            if ((!((aReader)->ReadSentinel(1205733204)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TClientInfoAndState of union PostMessageSource");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TIPCServiceWorkerDescriptor:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::dom::IPCServiceWorkerDescriptor>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TIPCServiceWorkerDescriptor of union PostMessageSource");
                return {};

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

} // namespace IPC

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

namespace IPC {
auto ParamTraits<::mozilla::dom::ClientSourceExecutionReadyArgs>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).url());
    // Sentinel = 'url'
    (aWriter)->WriteSentinel(45220180);
    IPC::WriteParam(aWriter, (aVar).frameType());
    // Sentinel = 'frameType'
    (aWriter)->WriteSentinel(308085678);
}

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

    }
    auto& _url = *maybe___url;
    // Sentinel = 'url'
    if ((!((aReader)->ReadSentinel(45220180)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'url' (nsCString) member of 'ClientSourceExecutionReadyArgs'");
        return {};
    }
    auto maybe___frameType = IPC::ReadParam<::mozilla::dom::FrameType>(aReader);
    if (!maybe___frameType) {
        aReader->FatalError("Error deserializing 'frameType' (FrameType) member of 'ClientSourceExecutionReadyArgs'");
        return {};

    }
    auto& _frameType = *maybe___frameType;
    // Sentinel = 'frameType'
    if ((!((aReader)->ReadSentinel(308085678)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'frameType' (FrameType) member of 'ClientSourceExecutionReadyArgs'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_url),
            std::move(_frameType)};
    return result__;
}

} // namespace IPC

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

namespace IPC {
auto ParamTraits<::mozilla::dom::ClientControlledArgs>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).serviceWorker());
    // Sentinel = 'serviceWorker'
    (aWriter)->WriteSentinel(640157036);
}

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

    }
    auto& _serviceWorker = *maybe___serviceWorker;
    // Sentinel = 'serviceWorker'
    if ((!((aReader)->ReadSentinel(640157036)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'serviceWorker' (IPCServiceWorkerDescriptor) member of 'ClientControlledArgs'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_serviceWorker)};
    return result__;
}

} // namespace IPC

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

namespace IPC {
auto ParamTraits<::mozilla::dom::ClientFocusArgs>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).callerType());
    // Sentinel = 'callerType'
    (aWriter)->WriteSentinel(373097494);
}

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

    }
    auto& _callerType = *maybe___callerType;
    // Sentinel = 'callerType'
    if ((!((aReader)->ReadSentinel(373097494)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'callerType' (CallerType) member of 'ClientFocusArgs'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_callerType)};
    return result__;
}

} // namespace IPC

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

namespace IPC {
auto ParamTraits<::mozilla::dom::ClientNavigateArgs>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).target());
    // Sentinel = 'target'
    (aWriter)->WriteSentinel(148767368);
    IPC::WriteParam(aWriter, (aVar).url());
    // Sentinel = 'url'
    (aWriter)->WriteSentinel(45220180);
    IPC::WriteParam(aWriter, (aVar).baseURL());
    // Sentinel = 'baseURL'
    (aWriter)->WriteSentinel(180159119);
    IPC::WriteParam(aWriter, (aVar).serviceWorker());
    // Sentinel = 'serviceWorker'
    (aWriter)->WriteSentinel(640157036);
}

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

    }
    auto& _target = *maybe___target;
    // Sentinel = 'target'
    if ((!((aReader)->ReadSentinel(148767368)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'target' (IPCClientInfo) member of 'ClientNavigateArgs'");
        return {};
    }
    auto maybe___url = IPC::ReadParam<::nsCString>(aReader);
    if (!maybe___url) {
        aReader->FatalError("Error deserializing 'url' (nsCString) member of 'ClientNavigateArgs'");
        return {};

    }
    auto& _url = *maybe___url;
    // Sentinel = 'url'
    if ((!((aReader)->ReadSentinel(45220180)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'url' (nsCString) member of 'ClientNavigateArgs'");
        return {};
    }
    auto maybe___baseURL = IPC::ReadParam<::nsCString>(aReader);
    if (!maybe___baseURL) {
        aReader->FatalError("Error deserializing 'baseURL' (nsCString) member of 'ClientNavigateArgs'");
        return {};

    }
    auto& _baseURL = *maybe___baseURL;
    // Sentinel = 'baseURL'
    if ((!((aReader)->ReadSentinel(180159119)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'baseURL' (nsCString) member of 'ClientNavigateArgs'");
        return {};
    }
    auto maybe___serviceWorker = IPC::ReadParam<::mozilla::dom::IPCServiceWorkerDescriptor>(aReader);
    if (!maybe___serviceWorker) {
        aReader->FatalError("Error deserializing 'serviceWorker' (IPCServiceWorkerDescriptor) member of 'ClientNavigateArgs'");
        return {};

    }
    auto& _serviceWorker = *maybe___serviceWorker;
    // Sentinel = 'serviceWorker'
    if ((!((aReader)->ReadSentinel(640157036)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'serviceWorker' (IPCServiceWorkerDescriptor) member of 'ClientNavigateArgs'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_target),
            std::move(_url),
            std::move(_baseURL),
            std::move(_serviceWorker)};
    return result__;
}

} // namespace IPC

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

namespace IPC {
auto ParamTraits<::mozilla::dom::ClientPostMessageArgs>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).clonedData());
    // Sentinel = 'clonedData'
    (aWriter)->WriteSentinel(368837616);
    IPC::WriteParam(aWriter, (aVar).serviceWorker());
    // Sentinel = 'serviceWorker'
    (aWriter)->WriteSentinel(640157036);
}

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

    }
    auto& _clonedData = *maybe___clonedData;
    // Sentinel = 'clonedData'
    if ((!((aReader)->ReadSentinel(368837616)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'clonedData' (ClonedMessageData) member of 'ClientPostMessageArgs'");
        return {};
    }
    auto maybe___serviceWorker = IPC::ReadParam<::mozilla::dom::IPCServiceWorkerDescriptor>(aReader);
    if (!maybe___serviceWorker) {
        aReader->FatalError("Error deserializing 'serviceWorker' (IPCServiceWorkerDescriptor) member of 'ClientPostMessageArgs'");
        return {};

    }
    auto& _serviceWorker = *maybe___serviceWorker;
    // Sentinel = 'serviceWorker'
    if ((!((aReader)->ReadSentinel(640157036)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'serviceWorker' (IPCServiceWorkerDescriptor) member of 'ClientPostMessageArgs'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_clonedData),
            std::move(_serviceWorker)};
    return result__;
}

} // namespace IPC

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

namespace IPC {
auto ParamTraits<::mozilla::dom::ClientMatchAllArgs>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).serviceWorker());
    // Sentinel = 'serviceWorker'
    (aWriter)->WriteSentinel(640157036);
    IPC::WriteParam(aWriter, (aVar).type());
    // Sentinel = 'type'
    (aWriter)->WriteSentinel(75760067);
    IPC::WriteParam(aWriter, (aVar).includeUncontrolled());
    // Sentinel = 'includeUncontrolled'
    (aWriter)->WriteSentinel(1316030430);
}

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

    }
    auto& _serviceWorker = *maybe___serviceWorker;
    // Sentinel = 'serviceWorker'
    if ((!((aReader)->ReadSentinel(640157036)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'serviceWorker' (IPCServiceWorkerDescriptor) member of 'ClientMatchAllArgs'");
        return {};
    }
    auto maybe___type = IPC::ReadParam<::mozilla::dom::ClientType>(aReader);
    if (!maybe___type) {
        aReader->FatalError("Error deserializing 'type' (ClientType) member of 'ClientMatchAllArgs'");
        return {};

    }
    auto& _type = *maybe___type;
    // Sentinel = 'type'
    if ((!((aReader)->ReadSentinel(75760067)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'type' (ClientType) member of 'ClientMatchAllArgs'");
        return {};
    }
    auto maybe___includeUncontrolled = IPC::ReadParam<bool>(aReader);
    if (!maybe___includeUncontrolled) {
        aReader->FatalError("Error deserializing 'includeUncontrolled' (bool) member of 'ClientMatchAllArgs'");
        return {};

    }
    auto& _includeUncontrolled = *maybe___includeUncontrolled;
    // Sentinel = 'includeUncontrolled'
    if ((!((aReader)->ReadSentinel(1316030430)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'includeUncontrolled' (bool) member of 'ClientMatchAllArgs'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_serviceWorker),
            std::move(_type),
            std::move(_includeUncontrolled)};
    return result__;
}

} // namespace IPC

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

namespace IPC {
auto ParamTraits<::mozilla::dom::ClientClaimArgs>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).serviceWorker());
    // Sentinel = 'serviceWorker'
    (aWriter)->WriteSentinel(640157036);
}

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

    }
    auto& _serviceWorker = *maybe___serviceWorker;
    // Sentinel = 'serviceWorker'
    if ((!((aReader)->ReadSentinel(640157036)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'serviceWorker' (IPCServiceWorkerDescriptor) member of 'ClientClaimArgs'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_serviceWorker)};
    return result__;
}

} // namespace IPC

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

namespace IPC {
auto ParamTraits<::mozilla::dom::ClientGetInfoAndStateArgs>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).id());
    // Sentinel = 'id'
    (aWriter)->WriteSentinel(20447438);
    IPC::WriteParam(aWriter, (aVar).principalInfo());
    // Sentinel = 'principalInfo'
    (aWriter)->WriteSentinel(633472335);
}

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

    }
    auto& _id = *maybe___id;
    // Sentinel = 'id'
    if ((!((aReader)->ReadSentinel(20447438)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'id' (nsID) member of 'ClientGetInfoAndStateArgs'");
        return {};
    }
    auto maybe___principalInfo = IPC::ReadParam<::mozilla::ipc::PrincipalInfo>(aReader);
    if (!maybe___principalInfo) {
        aReader->FatalError("Error deserializing 'principalInfo' (PrincipalInfo) member of 'ClientGetInfoAndStateArgs'");
        return {};

    }
    auto& _principalInfo = *maybe___principalInfo;
    // Sentinel = 'principalInfo'
    if ((!((aReader)->ReadSentinel(633472335)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'principalInfo' (PrincipalInfo) member of 'ClientGetInfoAndStateArgs'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_id),
            std::move(_principalInfo)};
    return result__;
}

} // namespace IPC

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

namespace IPC {
auto ParamTraits<::mozilla::dom::ClientOpenWindowArgs>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).principalInfo());
    // Sentinel = 'principalInfo'
    (aWriter)->WriteSentinel(633472335);
    IPC::WriteParam(aWriter, (aVar).cspInfo());
    // Sentinel = 'cspInfo'
    (aWriter)->WriteSentinel(189203155);
    IPC::WriteParam(aWriter, (aVar).url());
    // Sentinel = 'url'
    (aWriter)->WriteSentinel(45220180);
    IPC::WriteParam(aWriter, (aVar).baseURL());
    // Sentinel = 'baseURL'
    (aWriter)->WriteSentinel(180159119);
}

auto ParamTraits<::mozilla::dom::ClientOpenWindowArgs>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___principalInfo = IPC::ReadParam<::mozilla::ipc::PrincipalInfo>(aReader);
    if (!maybe___principalInfo) {
        aReader->FatalError("Error deserializing 'principalInfo' (PrincipalInfo) member of 'ClientOpenWindowArgs'");
        return {};

    }
    auto& _principalInfo = *maybe___principalInfo;
    // Sentinel = 'principalInfo'
    if ((!((aReader)->ReadSentinel(633472335)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'principalInfo' (PrincipalInfo) member of 'ClientOpenWindowArgs'");
        return {};
    }
    auto maybe___cspInfo = IPC::ReadParam<mozilla::Maybe<::mozilla::ipc::CSPInfo>>(aReader);
    if (!maybe___cspInfo) {
        aReader->FatalError("Error deserializing 'cspInfo' (CSPInfo?) member of 'ClientOpenWindowArgs'");
        return {};

    }
    auto& _cspInfo = *maybe___cspInfo;
    // Sentinel = 'cspInfo'
    if ((!((aReader)->ReadSentinel(189203155)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'cspInfo' (CSPInfo?) member of 'ClientOpenWindowArgs'");
        return {};
    }
    auto maybe___url = IPC::ReadParam<::nsCString>(aReader);
    if (!maybe___url) {
        aReader->FatalError("Error deserializing 'url' (nsCString) member of 'ClientOpenWindowArgs'");
        return {};

    }
    auto& _url = *maybe___url;
    // Sentinel = 'url'
    if ((!((aReader)->ReadSentinel(45220180)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'url' (nsCString) member of 'ClientOpenWindowArgs'");
        return {};
    }
    auto maybe___baseURL = IPC::ReadParam<::nsCString>(aReader);
    if (!maybe___baseURL) {
        aReader->FatalError("Error deserializing 'baseURL' (nsCString) member of 'ClientOpenWindowArgs'");
        return {};

    }
    auto& _baseURL = *maybe___baseURL;
    // Sentinel = 'baseURL'
    if ((!((aReader)->ReadSentinel(180159119)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'baseURL' (nsCString) member of 'ClientOpenWindowArgs'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_principalInfo),
            std::move(_cspInfo),
            std::move(_url),
            std::move(_baseURL)};
    return result__;
}

} // namespace IPC

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

namespace IPC {
auto ParamTraits<::mozilla::dom::ClientEvictBFCacheArgs>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
}

auto ParamTraits<::mozilla::dom::ClientEvictBFCacheArgs>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    IPC::ReadResult<paramType> result__{std::in_place};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union ClientOpConstructorArgs|
//
namespace mozilla {
namespace dom {
auto ClientOpConstructorArgs::MaybeDestroy() -> void
{
    if ((mType) == (T__None)) {
        return;
    }
    switch (mType) {
    case TClientControlledArgs:
        {
            (ptr_ClientControlledArgs())->~ClientControlledArgs__tdef();
            break;
        }
    case TClientFocusArgs:
        {
            (ptr_ClientFocusArgs())->~ClientFocusArgs__tdef();
            break;
        }
    case TClientNavigateArgs:
        {
            (ptr_ClientNavigateArgs())->~ClientNavigateArgs__tdef();
            break;
        }
    case TClientPostMessageArgs:
        {
            (ptr_ClientPostMessageArgs())->~ClientPostMessageArgs__tdef();
            break;
        }
    case TClientMatchAllArgs:
        {
            (ptr_ClientMatchAllArgs())->~ClientMatchAllArgs__tdef();
            break;
        }
    case TClientClaimArgs:
        {
            (ptr_ClientClaimArgs())->~ClientClaimArgs__tdef();
            break;
        }
    case TClientGetInfoAndStateArgs:
        {
            (ptr_ClientGetInfoAndStateArgs())->~ClientGetInfoAndStateArgs__tdef();
            break;
        }
    case TClientOpenWindowArgs:
        {
            (ptr_ClientOpenWindowArgs())->~ClientOpenWindowArgs__tdef();
            break;
        }
    case TClientEvictBFCacheArgs:
        {
            (ptr_ClientEvictBFCacheArgs())->~ClientEvictBFCacheArgs__tdef();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("not reached");
            break;
        }
    }
}

MOZ_IMPLICIT ClientOpConstructorArgs::ClientOpConstructorArgs(const ClientControlledArgs& aOther)
{
    new (mozilla::KnownNotNull, ptr_ClientControlledArgs()) ClientControlledArgs(aOther);
    mType = TClientControlledArgs;
}

MOZ_IMPLICIT ClientOpConstructorArgs::ClientOpConstructorArgs(ClientControlledArgs&& aOther)
{
    new (mozilla::KnownNotNull, ptr_ClientControlledArgs()) ClientControlledArgs(std::move(aOther));
    mType = TClientControlledArgs;
}

MOZ_IMPLICIT ClientOpConstructorArgs::ClientOpConstructorArgs(const ClientFocusArgs& aOther)
{
    new (mozilla::KnownNotNull, ptr_ClientFocusArgs()) ClientFocusArgs(aOther);
    mType = TClientFocusArgs;
}

MOZ_IMPLICIT ClientOpConstructorArgs::ClientOpConstructorArgs(ClientFocusArgs&& aOther)
{
    new (mozilla::KnownNotNull, ptr_ClientFocusArgs()) ClientFocusArgs(std::move(aOther));
    mType = TClientFocusArgs;
}

MOZ_IMPLICIT ClientOpConstructorArgs::ClientOpConstructorArgs(const ClientNavigateArgs& aOther)
{
    new (mozilla::KnownNotNull, ptr_ClientNavigateArgs()) ClientNavigateArgs(aOther);
    mType = TClientNavigateArgs;
}

MOZ_IMPLICIT ClientOpConstructorArgs::ClientOpConstructorArgs(ClientNavigateArgs&& aOther)
{
    new (mozilla::KnownNotNull, ptr_ClientNavigateArgs()) ClientNavigateArgs(std::move(aOther));
    mType = TClientNavigateArgs;
}

MOZ_IMPLICIT ClientOpConstructorArgs::ClientOpConstructorArgs(ClientPostMessageArgs&& aOther)
{
    new (mozilla::KnownNotNull, ptr_ClientPostMessageArgs()) ClientPostMessageArgs(std::move(aOther));
    mType = TClientPostMessageArgs;
}

MOZ_IMPLICIT ClientOpConstructorArgs::ClientOpConstructorArgs(const ClientMatchAllArgs& aOther)
{
    new (mozilla::KnownNotNull, ptr_ClientMatchAllArgs()) ClientMatchAllArgs(aOther);
    mType = TClientMatchAllArgs;
}

MOZ_IMPLICIT ClientOpConstructorArgs::ClientOpConstructorArgs(ClientMatchAllArgs&& aOther)
{
    new (mozilla::KnownNotNull, ptr_ClientMatchAllArgs()) ClientMatchAllArgs(std::move(aOther));
    mType = TClientMatchAllArgs;
}

MOZ_IMPLICIT ClientOpConstructorArgs::ClientOpConstructorArgs(const ClientClaimArgs& aOther)
{
    new (mozilla::KnownNotNull, ptr_ClientClaimArgs()) ClientClaimArgs(aOther);
    mType = TClientClaimArgs;
}

MOZ_IMPLICIT ClientOpConstructorArgs::ClientOpConstructorArgs(ClientClaimArgs&& aOther)
{
    new (mozilla::KnownNotNull, ptr_ClientClaimArgs()) ClientClaimArgs(std::move(aOther));
    mType = TClientClaimArgs;
}

MOZ_IMPLICIT ClientOpConstructorArgs::ClientOpConstructorArgs(const ClientGetInfoAndStateArgs& aOther)
{
    new (mozilla::KnownNotNull, ptr_ClientGetInfoAndStateArgs()) ClientGetInfoAndStateArgs(aOther);
    mType = TClientGetInfoAndStateArgs;
}

MOZ_IMPLICIT ClientOpConstructorArgs::ClientOpConstructorArgs(ClientGetInfoAndStateArgs&& aOther)
{
    new (mozilla::KnownNotNull, ptr_ClientGetInfoAndStateArgs()) ClientGetInfoAndStateArgs(std::move(aOther));
    mType = TClientGetInfoAndStateArgs;
}

MOZ_IMPLICIT ClientOpConstructorArgs::ClientOpConstructorArgs(const ClientOpenWindowArgs& aOther)
{
    new (mozilla::KnownNotNull, ptr_ClientOpenWindowArgs()) ClientOpenWindowArgs(aOther);
    mType = TClientOpenWindowArgs;
}

MOZ_IMPLICIT ClientOpConstructorArgs::ClientOpConstructorArgs(ClientOpenWindowArgs&& aOther)
{
    new (mozilla::KnownNotNull, ptr_ClientOpenWindowArgs()) ClientOpenWindowArgs(std::move(aOther));
    mType = TClientOpenWindowArgs;
}

MOZ_IMPLICIT ClientOpConstructorArgs::ClientOpConstructorArgs(const ClientEvictBFCacheArgs& aOther)
{
    new (mozilla::KnownNotNull, ptr_ClientEvictBFCacheArgs()) ClientEvictBFCacheArgs(aOther);
    mType = TClientEvictBFCacheArgs;
}

MOZ_IMPLICIT ClientOpConstructorArgs::ClientOpConstructorArgs(ClientEvictBFCacheArgs&& aOther)
{
    new (mozilla::KnownNotNull, ptr_ClientEvictBFCacheArgs()) ClientEvictBFCacheArgs(std::move(aOther));
    mType = TClientEvictBFCacheArgs;
}

MOZ_IMPLICIT ClientOpConstructorArgs::ClientOpConstructorArgs(ClientOpConstructorArgs&& aOther)
{
    (aOther).AssertSanity();
    Type t = (aOther).type();
    switch (t) {
    case TClientControlledArgs:
        {
            new (mozilla::KnownNotNull, ptr_ClientControlledArgs()) ClientControlledArgs(std::move((aOther).get_ClientControlledArgs()));
            (aOther).MaybeDestroy();
            break;
        }
    case TClientFocusArgs:
        {
            new (mozilla::KnownNotNull, ptr_ClientFocusArgs()) ClientFocusArgs(std::move((aOther).get_ClientFocusArgs()));
            (aOther).MaybeDestroy();
            break;
        }
    case TClientNavigateArgs:
        {
            new (mozilla::KnownNotNull, ptr_ClientNavigateArgs()) ClientNavigateArgs(std::move((aOther).get_ClientNavigateArgs()));
            (aOther).MaybeDestroy();
            break;
        }
    case TClientPostMessageArgs:
        {
            new (mozilla::KnownNotNull, ptr_ClientPostMessageArgs()) ClientPostMessageArgs(std::move((aOther).get_ClientPostMessageArgs()));
            (aOther).MaybeDestroy();
            break;
        }
    case TClientMatchAllArgs:
        {
            new (mozilla::KnownNotNull, ptr_ClientMatchAllArgs()) ClientMatchAllArgs(std::move((aOther).get_ClientMatchAllArgs()));
            (aOther).MaybeDestroy();
            break;
        }
    case TClientClaimArgs:
        {
            new (mozilla::KnownNotNull, ptr_ClientClaimArgs()) ClientClaimArgs(std::move((aOther).get_ClientClaimArgs()));
            (aOther).MaybeDestroy();
            break;
        }
    case TClientGetInfoAndStateArgs:
        {
            new (mozilla::KnownNotNull, ptr_ClientGetInfoAndStateArgs()) ClientGetInfoAndStateArgs(std::move((aOther).get_ClientGetInfoAndStateArgs()));
            (aOther).MaybeDestroy();
            break;
        }
    case TClientOpenWindowArgs:
        {
            new (mozilla::KnownNotNull, ptr_ClientOpenWindowArgs()) ClientOpenWindowArgs(std::move((aOther).get_ClientOpenWindowArgs()));
            (aOther).MaybeDestroy();
            break;
        }
    case TClientEvictBFCacheArgs:
        {
            new (mozilla::KnownNotNull, ptr_ClientEvictBFCacheArgs()) ClientEvictBFCacheArgs(std::move((aOther).get_ClientEvictBFCacheArgs()));
            (aOther).MaybeDestroy();
            break;
        }
    case T__None:
        {
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return;
        }
    }
    (aOther).mType = T__None;
    mType = t;
}

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

auto ClientOpConstructorArgs::operator=(const ClientControlledArgs& aRhs) -> ClientOpConstructorArgs&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ClientControlledArgs()) ClientControlledArgs(aRhs);
    mType = TClientControlledArgs;
    return (*(this));
}

auto ClientOpConstructorArgs::operator=(ClientControlledArgs&& aRhs) -> ClientOpConstructorArgs&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ClientControlledArgs()) ClientControlledArgs(std::move(aRhs));
    mType = TClientControlledArgs;
    return (*(this));
}

auto ClientOpConstructorArgs::operator=(const ClientFocusArgs& aRhs) -> ClientOpConstructorArgs&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ClientFocusArgs()) ClientFocusArgs(aRhs);
    mType = TClientFocusArgs;
    return (*(this));
}

auto ClientOpConstructorArgs::operator=(ClientFocusArgs&& aRhs) -> ClientOpConstructorArgs&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ClientFocusArgs()) ClientFocusArgs(std::move(aRhs));
    mType = TClientFocusArgs;
    return (*(this));
}

auto ClientOpConstructorArgs::operator=(const ClientNavigateArgs& aRhs) -> ClientOpConstructorArgs&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ClientNavigateArgs()) ClientNavigateArgs(aRhs);
    mType = TClientNavigateArgs;
    return (*(this));
}

auto ClientOpConstructorArgs::operator=(ClientNavigateArgs&& aRhs) -> ClientOpConstructorArgs&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ClientNavigateArgs()) ClientNavigateArgs(std::move(aRhs));
    mType = TClientNavigateArgs;
    return (*(this));
}

auto ClientOpConstructorArgs::operator=(ClientPostMessageArgs&& aRhs) -> ClientOpConstructorArgs&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ClientPostMessageArgs()) ClientPostMessageArgs(std::move(aRhs));
    mType = TClientPostMessageArgs;
    return (*(this));
}

auto ClientOpConstructorArgs::operator=(const ClientMatchAllArgs& aRhs) -> ClientOpConstructorArgs&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ClientMatchAllArgs()) ClientMatchAllArgs(aRhs);
    mType = TClientMatchAllArgs;
    return (*(this));
}

auto ClientOpConstructorArgs::operator=(ClientMatchAllArgs&& aRhs) -> ClientOpConstructorArgs&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ClientMatchAllArgs()) ClientMatchAllArgs(std::move(aRhs));
    mType = TClientMatchAllArgs;
    return (*(this));
}

auto ClientOpConstructorArgs::operator=(const ClientClaimArgs& aRhs) -> ClientOpConstructorArgs&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ClientClaimArgs()) ClientClaimArgs(aRhs);
    mType = TClientClaimArgs;
    return (*(this));
}

auto ClientOpConstructorArgs::operator=(ClientClaimArgs&& aRhs) -> ClientOpConstructorArgs&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ClientClaimArgs()) ClientClaimArgs(std::move(aRhs));
    mType = TClientClaimArgs;
    return (*(this));
}

auto ClientOpConstructorArgs::operator=(const ClientGetInfoAndStateArgs& aRhs) -> ClientOpConstructorArgs&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ClientGetInfoAndStateArgs()) ClientGetInfoAndStateArgs(aRhs);
    mType = TClientGetInfoAndStateArgs;
    return (*(this));
}

auto ClientOpConstructorArgs::operator=(ClientGetInfoAndStateArgs&& aRhs) -> ClientOpConstructorArgs&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ClientGetInfoAndStateArgs()) ClientGetInfoAndStateArgs(std::move(aRhs));
    mType = TClientGetInfoAndStateArgs;
    return (*(this));
}

auto ClientOpConstructorArgs::operator=(const ClientOpenWindowArgs& aRhs) -> ClientOpConstructorArgs&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ClientOpenWindowArgs()) ClientOpenWindowArgs(aRhs);
    mType = TClientOpenWindowArgs;
    return (*(this));
}

auto ClientOpConstructorArgs::operator=(ClientOpenWindowArgs&& aRhs) -> ClientOpConstructorArgs&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ClientOpenWindowArgs()) ClientOpenWindowArgs(std::move(aRhs));
    mType = TClientOpenWindowArgs;
    return (*(this));
}

auto ClientOpConstructorArgs::operator=(const ClientEvictBFCacheArgs& aRhs) -> ClientOpConstructorArgs&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ClientEvictBFCacheArgs()) ClientEvictBFCacheArgs(aRhs);
    mType = TClientEvictBFCacheArgs;
    return (*(this));
}

auto ClientOpConstructorArgs::operator=(ClientEvictBFCacheArgs&& aRhs) -> ClientOpConstructorArgs&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ClientEvictBFCacheArgs()) ClientEvictBFCacheArgs(std::move(aRhs));
    mType = TClientEvictBFCacheArgs;
    return (*(this));
}

auto ClientOpConstructorArgs::operator=(ClientOpConstructorArgs&& aRhs) -> ClientOpConstructorArgs&
{
    (aRhs).AssertSanity();
    Type t = (aRhs).type();
    switch (t) {
    case TClientControlledArgs:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_ClientControlledArgs()) ClientControlledArgs(std::move((aRhs).get_ClientControlledArgs()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TClientFocusArgs:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_ClientFocusArgs()) ClientFocusArgs(std::move((aRhs).get_ClientFocusArgs()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TClientNavigateArgs:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_ClientNavigateArgs()) ClientNavigateArgs(std::move((aRhs).get_ClientNavigateArgs()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TClientPostMessageArgs:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_ClientPostMessageArgs()) ClientPostMessageArgs(std::move((aRhs).get_ClientPostMessageArgs()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TClientMatchAllArgs:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_ClientMatchAllArgs()) ClientMatchAllArgs(std::move((aRhs).get_ClientMatchAllArgs()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TClientClaimArgs:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_ClientClaimArgs()) ClientClaimArgs(std::move((aRhs).get_ClientClaimArgs()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TClientGetInfoAndStateArgs:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_ClientGetInfoAndStateArgs()) ClientGetInfoAndStateArgs(std::move((aRhs).get_ClientGetInfoAndStateArgs()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TClientOpenWindowArgs:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_ClientOpenWindowArgs()) ClientOpenWindowArgs(std::move((aRhs).get_ClientOpenWindowArgs()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TClientEvictBFCacheArgs:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_ClientEvictBFCacheArgs()) ClientEvictBFCacheArgs(std::move((aRhs).get_ClientEvictBFCacheArgs()));
            (aRhs).MaybeDestroy();
            break;
        }
    case T__None:
        {
            MaybeDestroy();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            break;
        }
    }
    (aRhs).mType = T__None;
    mType = t;
    return (*(this));
}

} // namespace dom
} // namespace mozilla

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

    switch (type) {
    case union__::TClientControlledArgs:
        {
            IPC::WriteParam(aWriter, (aVar).get_ClientControlledArgs());
            // Sentinel = 'TClientControlledArgs'
            (aWriter)->WriteSentinel(1510541399);
            return;
        }
    case union__::TClientFocusArgs:
        {
            IPC::WriteParam(aWriter, (aVar).get_ClientFocusArgs());
            // Sentinel = 'TClientFocusArgs'
            (aWriter)->WriteSentinel(867370561);
            return;
        }
    case union__::TClientNavigateArgs:
        {
            IPC::WriteParam(aWriter, (aVar).get_ClientNavigateArgs());
            // Sentinel = 'TClientNavigateArgs'
            (aWriter)->WriteSentinel(1222575984);
            return;
        }
    case union__::TClientPostMessageArgs:
        {
            IPC::WriteParam(aWriter, (aVar).get_ClientPostMessageArgs());
            // Sentinel = 'TClientPostMessageArgs'
            (aWriter)->WriteSentinel(1648494764);
            return;
        }
    case union__::TClientMatchAllArgs:
        {
            IPC::WriteParam(aWriter, (aVar).get_ClientMatchAllArgs());
            // Sentinel = 'TClientMatchAllArgs'
            (aWriter)->WriteSentinel(1201932103);
            return;
        }
    case union__::TClientClaimArgs:
        {
            IPC::WriteParam(aWriter, (aVar).get_ClientClaimArgs());
            // Sentinel = 'TClientClaimArgs'
            (aWriter)->WriteSentinel(856426023);
            return;
        }
    case union__::TClientGetInfoAndStateArgs:
        {
            IPC::WriteParam(aWriter, (aVar).get_ClientGetInfoAndStateArgs());
            // Sentinel = 'TClientGetInfoAndStateArgs'
            (aWriter)->WriteSentinel(2230848001);
            return;
        }
    case union__::TClientOpenWindowArgs:
        {
            IPC::WriteParam(aWriter, (aVar).get_ClientOpenWindowArgs());
            // Sentinel = 'TClientOpenWindowArgs'
            (aWriter)->WriteSentinel(1497303115);
            return;
        }
    case union__::TClientEvictBFCacheArgs:
        {
            IPC::WriteParam(aWriter, (aVar).get_ClientEvictBFCacheArgs());
            // Sentinel = 'TClientEvictBFCacheArgs'
            (aWriter)->WriteSentinel(1719732376);
            return;
        }
    default:
        {
            aWriter->FatalError("unknown variant of union ClientOpConstructorArgs");
            return;
        }
    }
}

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

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

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

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TClientControlledArgs'
            if ((!((aReader)->ReadSentinel(1510541399)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TClientControlledArgs of union ClientOpConstructorArgs");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TClientFocusArgs:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::dom::ClientFocusArgs>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TClientFocusArgs of union ClientOpConstructorArgs");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TClientFocusArgs'
            if ((!((aReader)->ReadSentinel(867370561)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TClientFocusArgs of union ClientOpConstructorArgs");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TClientNavigateArgs:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::dom::ClientNavigateArgs>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TClientNavigateArgs of union ClientOpConstructorArgs");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TClientNavigateArgs'
            if ((!((aReader)->ReadSentinel(1222575984)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TClientNavigateArgs of union ClientOpConstructorArgs");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TClientPostMessageArgs:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::dom::ClientPostMessageArgs>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TClientPostMessageArgs of union ClientOpConstructorArgs");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TClientPostMessageArgs'
            if ((!((aReader)->ReadSentinel(1648494764)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TClientPostMessageArgs of union ClientOpConstructorArgs");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TClientMatchAllArgs:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::dom::ClientMatchAllArgs>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TClientMatchAllArgs of union ClientOpConstructorArgs");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TClientMatchAllArgs'
            if ((!((aReader)->ReadSentinel(1201932103)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TClientMatchAllArgs of union ClientOpConstructorArgs");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TClientClaimArgs:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::dom::ClientClaimArgs>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TClientClaimArgs of union ClientOpConstructorArgs");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TClientClaimArgs'
            if ((!((aReader)->ReadSentinel(856426023)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TClientClaimArgs of union ClientOpConstructorArgs");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TClientGetInfoAndStateArgs:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::dom::ClientGetInfoAndStateArgs>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TClientGetInfoAndStateArgs of union ClientOpConstructorArgs");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TClientGetInfoAndStateArgs'
            if ((!((aReader)->ReadSentinel(2230848001)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TClientGetInfoAndStateArgs of union ClientOpConstructorArgs");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TClientOpenWindowArgs:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::dom::ClientOpenWindowArgs>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TClientOpenWindowArgs of union ClientOpConstructorArgs");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TClientOpenWindowArgs'
            if ((!((aReader)->ReadSentinel(1497303115)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TClientOpenWindowArgs of union ClientOpConstructorArgs");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TClientEvictBFCacheArgs:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::dom::ClientEvictBFCacheArgs>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TClientEvictBFCacheArgs of union ClientOpConstructorArgs");
                return {};

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

} // namespace IPC

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

namespace IPC {
auto ParamTraits<::mozilla::dom::ClientList>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).values());
    // Sentinel = 'values'
    (aWriter)->WriteSentinel(150667921);
}

auto ParamTraits<::mozilla::dom::ClientList>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___values = IPC::ReadParam<nsTArray<::mozilla::dom::ClientInfoAndState>>(aReader);
    if (!maybe___values) {
        aReader->FatalError("Error deserializing 'values' (ClientInfoAndState[]) member of 'ClientList'");
        return {};

    }
    auto& _values = *maybe___values;
    // Sentinel = 'values'
    if ((!((aReader)->ReadSentinel(150667921)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'values' (ClientInfoAndState[]) member of 'ClientList'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_values)};
    return result__;
}

} // namespace IPC

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

namespace IPC {
auto ParamTraits<::mozilla::dom::ClientNavigateOpConstructorArgs>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).target());
    // Sentinel = 'target'
    (aWriter)->WriteSentinel(148767368);
    IPC::WriteParam(aWriter, (aVar).url());
    // Sentinel = 'url'
    (aWriter)->WriteSentinel(45220180);
    IPC::WriteParam(aWriter, (aVar).baseURL());
    // Sentinel = 'baseURL'
    (aWriter)->WriteSentinel(180159119);
}

auto ParamTraits<::mozilla::dom::ClientNavigateOpConstructorArgs>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___target = IPC::ReadParam<mozilla::NotNull<::mozilla::ipc::SideVariant<::mozilla::dom::PClientSourceParent*, ::mozilla::dom::PClientSourceChild*>>>(aReader);
    if (!maybe___target) {
        aReader->FatalError("Error deserializing 'target' (NotNull<PClientSource>) member of 'ClientNavigateOpConstructorArgs'");
        return {};

    }
    auto& _target = *maybe___target;
    // Sentinel = 'target'
    if ((!((aReader)->ReadSentinel(148767368)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'target' (NotNull<PClientSource>) member of 'ClientNavigateOpConstructorArgs'");
        return {};
    }
    auto maybe___url = IPC::ReadParam<::nsCString>(aReader);
    if (!maybe___url) {
        aReader->FatalError("Error deserializing 'url' (nsCString) member of 'ClientNavigateOpConstructorArgs'");
        return {};

    }
    auto& _url = *maybe___url;
    // Sentinel = 'url'
    if ((!((aReader)->ReadSentinel(45220180)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'url' (nsCString) member of 'ClientNavigateOpConstructorArgs'");
        return {};
    }
    auto maybe___baseURL = IPC::ReadParam<::nsCString>(aReader);
    if (!maybe___baseURL) {
        aReader->FatalError("Error deserializing 'baseURL' (nsCString) member of 'ClientNavigateOpConstructorArgs'");
        return {};

    }
    auto& _baseURL = *maybe___baseURL;
    // Sentinel = 'baseURL'
    if ((!((aReader)->ReadSentinel(180159119)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'baseURL' (nsCString) member of 'ClientNavigateOpConstructorArgs'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_target),
            std::move(_url),
            std::move(_baseURL)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union ClientOpResult|
//
namespace mozilla {
namespace dom {
auto ClientOpResult::MaybeDestroy() -> void
{
    if ((mType) == (T__None)) {
        return;
    }
    switch (mType) {
    case TCopyableErrorResult:
        {
            (ptr_CopyableErrorResult())->~CopyableErrorResult__tdef();
            break;
        }
    case TIPCClientState:
        {
            (ptr_IPCClientState())->~IPCClientState__tdef();
            break;
        }
    case TClientInfoAndState:
        {
            (ptr_ClientInfoAndState())->~ClientInfoAndState__tdef();
            break;
        }
    case TClientList:
        {
            (ptr_ClientList())->~ClientList__tdef();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("not reached");
            break;
        }
    }
}

MOZ_IMPLICIT ClientOpResult::ClientOpResult(const CopyableErrorResult& aOther)
{
    new (mozilla::KnownNotNull, ptr_CopyableErrorResult()) CopyableErrorResult(aOther);
    mType = TCopyableErrorResult;
}

MOZ_IMPLICIT ClientOpResult::ClientOpResult(CopyableErrorResult&& aOther)
{
    new (mozilla::KnownNotNull, ptr_CopyableErrorResult()) CopyableErrorResult(std::move(aOther));
    mType = TCopyableErrorResult;
}

MOZ_IMPLICIT ClientOpResult::ClientOpResult(const IPCClientState& aOther)
{
    new (mozilla::KnownNotNull, ptr_IPCClientState()) IPCClientState(aOther);
    mType = TIPCClientState;
}

MOZ_IMPLICIT ClientOpResult::ClientOpResult(IPCClientState&& aOther)
{
    new (mozilla::KnownNotNull, ptr_IPCClientState()) IPCClientState(std::move(aOther));
    mType = TIPCClientState;
}

MOZ_IMPLICIT ClientOpResult::ClientOpResult(const ClientInfoAndState& aOther)
{
    new (mozilla::KnownNotNull, ptr_ClientInfoAndState()) ClientInfoAndState(aOther);
    mType = TClientInfoAndState;
}

MOZ_IMPLICIT ClientOpResult::ClientOpResult(ClientInfoAndState&& aOther)
{
    new (mozilla::KnownNotNull, ptr_ClientInfoAndState()) ClientInfoAndState(std::move(aOther));
    mType = TClientInfoAndState;
}

MOZ_IMPLICIT ClientOpResult::ClientOpResult(const ClientList& aOther)
{
    new (mozilla::KnownNotNull, ptr_ClientList()) ClientList(aOther);
    mType = TClientList;
}

MOZ_IMPLICIT ClientOpResult::ClientOpResult(ClientList&& aOther)
{
    new (mozilla::KnownNotNull, ptr_ClientList()) ClientList(std::move(aOther));
    mType = TClientList;
}

MOZ_IMPLICIT ClientOpResult::ClientOpResult(const ClientOpResult& aOther)
{
    (aOther).AssertSanity();
    switch ((aOther).type()) {
    case TCopyableErrorResult:
        {
            new (mozilla::KnownNotNull, ptr_CopyableErrorResult()) CopyableErrorResult((aOther).get_CopyableErrorResult());
            break;
        }
    case TIPCClientState:
        {
            new (mozilla::KnownNotNull, ptr_IPCClientState()) IPCClientState((aOther).get_IPCClientState());
            break;
        }
    case TClientInfoAndState:
        {
            new (mozilla::KnownNotNull, ptr_ClientInfoAndState()) ClientInfoAndState((aOther).get_ClientInfoAndState());
            break;
        }
    case TClientList:
        {
            new (mozilla::KnownNotNull, ptr_ClientList()) ClientList((aOther).get_ClientList());
            break;
        }
    case T__None:
        {
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return;
        }
    }
    mType = (aOther).type();
}

MOZ_IMPLICIT ClientOpResult::ClientOpResult(ClientOpResult&& aOther)
{
    (aOther).AssertSanity();
    Type t = (aOther).type();
    switch (t) {
    case TCopyableErrorResult:
        {
            new (mozilla::KnownNotNull, ptr_CopyableErrorResult()) CopyableErrorResult(std::move((aOther).get_CopyableErrorResult()));
            (aOther).MaybeDestroy();
            break;
        }
    case TIPCClientState:
        {
            new (mozilla::KnownNotNull, ptr_IPCClientState()) IPCClientState(std::move((aOther).get_IPCClientState()));
            (aOther).MaybeDestroy();
            break;
        }
    case TClientInfoAndState:
        {
            new (mozilla::KnownNotNull, ptr_ClientInfoAndState()) ClientInfoAndState(std::move((aOther).get_ClientInfoAndState()));
            (aOther).MaybeDestroy();
            break;
        }
    case TClientList:
        {
            new (mozilla::KnownNotNull, ptr_ClientList()) ClientList(std::move((aOther).get_ClientList()));
            (aOther).MaybeDestroy();
            break;
        }
    case T__None:
        {
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return;
        }
    }
    (aOther).mType = T__None;
    mType = t;
}

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

auto ClientOpResult::operator=(const CopyableErrorResult& aRhs) -> ClientOpResult&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_CopyableErrorResult()) CopyableErrorResult(aRhs);
    mType = TCopyableErrorResult;
    return (*(this));
}

auto ClientOpResult::operator=(CopyableErrorResult&& aRhs) -> ClientOpResult&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_CopyableErrorResult()) CopyableErrorResult(std::move(aRhs));
    mType = TCopyableErrorResult;
    return (*(this));
}

auto ClientOpResult::operator=(const IPCClientState& aRhs) -> ClientOpResult&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_IPCClientState()) IPCClientState(aRhs);
    mType = TIPCClientState;
    return (*(this));
}

auto ClientOpResult::operator=(IPCClientState&& aRhs) -> ClientOpResult&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_IPCClientState()) IPCClientState(std::move(aRhs));
    mType = TIPCClientState;
    return (*(this));
}

auto ClientOpResult::operator=(const ClientInfoAndState& aRhs) -> ClientOpResult&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ClientInfoAndState()) ClientInfoAndState(aRhs);
    mType = TClientInfoAndState;
    return (*(this));
}

auto ClientOpResult::operator=(ClientInfoAndState&& aRhs) -> ClientOpResult&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ClientInfoAndState()) ClientInfoAndState(std::move(aRhs));
    mType = TClientInfoAndState;
    return (*(this));
}

auto ClientOpResult::operator=(const ClientList& aRhs) -> ClientOpResult&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ClientList()) ClientList(aRhs);
    mType = TClientList;
    return (*(this));
}

auto ClientOpResult::operator=(ClientList&& aRhs) -> ClientOpResult&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ClientList()) ClientList(std::move(aRhs));
    mType = TClientList;
    return (*(this));
}

auto ClientOpResult::operator=(const ClientOpResult& aRhs) -> ClientOpResult&
{
    (aRhs).AssertSanity();
    Type t = (aRhs).type();
    switch (t) {
    case TCopyableErrorResult:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_CopyableErrorResult()) CopyableErrorResult((aRhs).get_CopyableErrorResult());
            break;
        }
    case TIPCClientState:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_IPCClientState()) IPCClientState((aRhs).get_IPCClientState());
            break;
        }
    case TClientInfoAndState:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_ClientInfoAndState()) ClientInfoAndState((aRhs).get_ClientInfoAndState());
            break;
        }
    case TClientList:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_ClientList()) ClientList((aRhs).get_ClientList());
            break;
        }
    case T__None:
        {
            MaybeDestroy();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            break;
        }
    }
    mType = t;
    return (*(this));
}

auto ClientOpResult::operator=(ClientOpResult&& aRhs) -> ClientOpResult&
{
    (aRhs).AssertSanity();
    Type t = (aRhs).type();
    switch (t) {
    case TCopyableErrorResult:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_CopyableErrorResult()) CopyableErrorResult(std::move((aRhs).get_CopyableErrorResult()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TIPCClientState:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_IPCClientState()) IPCClientState(std::move((aRhs).get_IPCClientState()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TClientInfoAndState:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_ClientInfoAndState()) ClientInfoAndState(std::move((aRhs).get_ClientInfoAndState()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TClientList:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_ClientList()) ClientList(std::move((aRhs).get_ClientList()));
            (aRhs).MaybeDestroy();
            break;
        }
    case T__None:
        {
            MaybeDestroy();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            break;
        }
    }
    (aRhs).mType = T__None;
    mType = t;
    return (*(this));
}

} // namespace dom
} // namespace mozilla

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

    switch (type) {
    case union__::TCopyableErrorResult:
        {
            IPC::WriteParam(aWriter, (aVar).get_CopyableErrorResult());
            // Sentinel = 'TCopyableErrorResult'
            (aWriter)->WriteSentinel(1376585741);
            return;
        }
    case union__::TIPCClientState:
        {
            IPC::WriteParam(aWriter, (aVar).get_IPCClientState());
            // Sentinel = 'TIPCClientState'
            (aWriter)->WriteSentinel(699925905);
            return;
        }
    case union__::TClientInfoAndState:
        {
            IPC::WriteParam(aWriter, (aVar).get_ClientInfoAndState());
            // Sentinel = 'TClientInfoAndState'
            (aWriter)->WriteSentinel(1205733204);
            return;
        }
    case union__::TClientList:
        {
            IPC::WriteParam(aWriter, (aVar).get_ClientList());
            // Sentinel = 'TClientList'
            (aWriter)->WriteSentinel(414778448);
            return;
        }
    default:
        {
            aWriter->FatalError("unknown variant of union ClientOpResult");
            return;
        }
    }
}

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

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

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

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TCopyableErrorResult'
            if ((!((aReader)->ReadSentinel(1376585741)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TCopyableErrorResult of union ClientOpResult");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TIPCClientState:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::dom::IPCClientState>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TIPCClientState of union ClientOpResult");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TIPCClientState'
            if ((!((aReader)->ReadSentinel(699925905)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TIPCClientState of union ClientOpResult");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TClientInfoAndState:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::dom::ClientInfoAndState>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TClientInfoAndState of union ClientOpResult");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TClientInfoAndState'
            if ((!((aReader)->ReadSentinel(1205733204)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TClientInfoAndState of union ClientOpResult");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TClientList:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::dom::ClientList>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TClientList of union ClientOpResult");
                return {};

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

} // namespace IPC
