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


#include "mozilla/net/PHttpChannelParent.h"
#include "mozilla/net/TimingStruct.h"
#include "nsHttpHeaderArray.h"

#include "mozilla/net/PNeckoParent.h"
#include "mozilla/dom/PBlobParent.h"

#include "nsIFile.h"
#include "GeckoProfiler.h"

namespace mozilla {
namespace net {


auto PHttpChannelParent::Recv__delete__() -> bool
{
    return true;
}


MOZ_IMPLICIT PHttpChannelParent::PHttpChannelParent() :
    mozilla::ipc::IProtocol(mozilla::ipc::ParentSide),
    mState(PHttpChannel::__Dead)
{
    MOZ_COUNT_CTOR(PHttpChannelParent);
}

PHttpChannelParent::~PHttpChannelParent()
{
    MOZ_COUNT_DTOR(PHttpChannelParent);
}

auto PHttpChannelParent::Manager() const -> PNeckoParent*
{
    return static_cast<PNeckoParent*>(IProtocol::Manager());
}

auto PHttpChannelParent::state() -> PHttpChannel::State
{
    return mState;
}

auto PHttpChannelParent::SendOnStartRequest(
        const nsresult& channelStatus,
        const nsHttpResponseHead& responseHead,
        const bool& useResponseHead,
        const nsHttpHeaderArray& requestHeaders,
        const bool& isFromCache,
        const bool& cacheEntryAvailable,
        const uint32_t& cacheExpirationTime,
        const nsCString& cachedCharset,
        const nsCString& securityInfoSerialization,
        const NetAddr& selfAddr,
        const NetAddr& peerAddr,
        const int16_t& redirectCount,
        const uint32_t& cacheKey,
        const nsCString& altDataType) -> bool
{
    IPC::Message* msg__ = PHttpChannel::Msg_OnStartRequest(Id());

    Write(channelStatus, msg__);
    // Sentinel = 'channelStatus'
    (msg__)->WriteSentinel(3148019746);
    Write(responseHead, msg__);
    // Sentinel = 'responseHead'
    (msg__)->WriteSentinel(3038698187);
    Write(useResponseHead, msg__);
    // Sentinel = 'useResponseHead'
    (msg__)->WriteSentinel(2994626489);
    Write(requestHeaders, msg__);
    // Sentinel = 'requestHeaders'
    (msg__)->WriteSentinel(2055989545);
    Write(isFromCache, msg__);
    // Sentinel = 'isFromCache'
    (msg__)->WriteSentinel(4089953117);
    Write(cacheEntryAvailable, msg__);
    // Sentinel = 'cacheEntryAvailable'
    (msg__)->WriteSentinel(2363064);
    Write(cacheExpirationTime, msg__);
    // Sentinel = 'cacheExpirationTime'
    (msg__)->WriteSentinel(439162213);
    Write(cachedCharset, msg__);
    // Sentinel = 'cachedCharset'
    (msg__)->WriteSentinel(1570160399);
    Write(securityInfoSerialization, msg__);
    // Sentinel = 'securityInfoSerialization'
    (msg__)->WriteSentinel(985832975);
    Write(selfAddr, msg__);
    // Sentinel = 'selfAddr'
    (msg__)->WriteSentinel(463888251);
    Write(peerAddr, msg__);
    // Sentinel = 'peerAddr'
    (msg__)->WriteSentinel(1373265573);
    Write(redirectCount, msg__);
    // Sentinel = 'redirectCount'
    (msg__)->WriteSentinel(1874411984);
    Write(cacheKey, msg__);
    // Sentinel = 'cacheKey'
    (msg__)->WriteSentinel(249191363);
    Write(altDataType, msg__);
    // Sentinel = 'altDataType'
    (msg__)->WriteSentinel(2339988114);




    if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
        mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHttpChannel", "Msg_OnStartRequest", js::ProfileEntry::Category::OTHER);
    if ((!(PHttpChannel::Transition(Trigger(Trigger::Send, PHttpChannel::Msg_OnStartRequest__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHttpChannelParent::SendOnTransportAndData(
        const nsresult& channelStatus,
        const nsresult& transportStatus,
        const uint64_t& progress,
        const uint64_t& progressMax,
        const uint64_t& offset,
        const uint32_t& count,
        const nsCString& data) -> bool
{
    IPC::Message* msg__ = PHttpChannel::Msg_OnTransportAndData(Id());

    Write(channelStatus, msg__);
    // Sentinel = 'channelStatus'
    (msg__)->WriteSentinel(3148019746);
    Write(transportStatus, msg__);
    // Sentinel = 'transportStatus'
    (msg__)->WriteSentinel(1295005818);
    Write(progress, msg__);
    // Sentinel = 'progress'
    (msg__)->WriteSentinel(858119353);
    Write(progressMax, msg__);
    // Sentinel = 'progressMax'
    (msg__)->WriteSentinel(2530734978);
    Write(offset, msg__);
    // Sentinel = 'offset'
    (msg__)->WriteSentinel(1369947863);
    Write(count, msg__);
    // Sentinel = 'count'
    (msg__)->WriteSentinel(2126421856);
    Write(data, msg__);
    // Sentinel = 'data'
    (msg__)->WriteSentinel(843352540);




    if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
        mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHttpChannel", "Msg_OnTransportAndData", js::ProfileEntry::Category::OTHER);
    if ((!(PHttpChannel::Transition(Trigger(Trigger::Send, PHttpChannel::Msg_OnTransportAndData__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHttpChannelParent::SendOnStopRequest(
        const nsresult& channelStatus,
        const ResourceTimingStruct& timing) -> bool
{
    IPC::Message* msg__ = PHttpChannel::Msg_OnStopRequest(Id());

    Write(channelStatus, msg__);
    // Sentinel = 'channelStatus'
    (msg__)->WriteSentinel(3148019746);
    Write(timing, msg__);
    // Sentinel = 'timing'
    (msg__)->WriteSentinel(3852786776);




    if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
        mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHttpChannel", "Msg_OnStopRequest", js::ProfileEntry::Category::OTHER);
    if ((!(PHttpChannel::Transition(Trigger(Trigger::Send, PHttpChannel::Msg_OnStopRequest__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHttpChannelParent::SendOnProgress(
        const int64_t& progress,
        const int64_t& progressMax) -> bool
{
    IPC::Message* msg__ = PHttpChannel::Msg_OnProgress(Id());

    Write(progress, msg__);
    // Sentinel = 'progress'
    (msg__)->WriteSentinel(858119353);
    Write(progressMax, msg__);
    // Sentinel = 'progressMax'
    (msg__)->WriteSentinel(2530734978);




    if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
        mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHttpChannel", "Msg_OnProgress", js::ProfileEntry::Category::OTHER);
    if ((!(PHttpChannel::Transition(Trigger(Trigger::Send, PHttpChannel::Msg_OnProgress__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHttpChannelParent::SendOnStatus(const nsresult& status) -> bool
{
    IPC::Message* msg__ = PHttpChannel::Msg_OnStatus(Id());

    Write(status, msg__);
    // Sentinel = 'status'
    (msg__)->WriteSentinel(3714608576);




    if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
        mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHttpChannel", "Msg_OnStatus", js::ProfileEntry::Category::OTHER);
    if ((!(PHttpChannel::Transition(Trigger(Trigger::Send, PHttpChannel::Msg_OnStatus__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHttpChannelParent::SendFailedAsyncOpen(const nsresult& status) -> bool
{
    IPC::Message* msg__ = PHttpChannel::Msg_FailedAsyncOpen(Id());

    Write(status, msg__);
    // Sentinel = 'status'
    (msg__)->WriteSentinel(3714608576);




    if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
        mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHttpChannel", "Msg_FailedAsyncOpen", js::ProfileEntry::Category::OTHER);
    if ((!(PHttpChannel::Transition(Trigger(Trigger::Send, PHttpChannel::Msg_FailedAsyncOpen__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHttpChannelParent::SendRedirect1Begin(
        const uint32_t& registrarId,
        const URIParams& newUri,
        const uint32_t& redirectFlags,
        const nsHttpResponseHead& responseHead,
        const nsCString& securityInfoSerialization,
        const nsCString& channelId) -> bool
{
    IPC::Message* msg__ = PHttpChannel::Msg_Redirect1Begin(Id());

    Write(registrarId, msg__);
    // Sentinel = 'registrarId'
    (msg__)->WriteSentinel(3202787989);
    Write(newUri, msg__);
    // Sentinel = 'newUri'
    (msg__)->WriteSentinel(1147970150);
    Write(redirectFlags, msg__);
    // Sentinel = 'redirectFlags'
    (msg__)->WriteSentinel(286770900);
    Write(responseHead, msg__);
    // Sentinel = 'responseHead'
    (msg__)->WriteSentinel(3038698187);
    Write(securityInfoSerialization, msg__);
    // Sentinel = 'securityInfoSerialization'
    (msg__)->WriteSentinel(985832975);
    Write(channelId, msg__);
    // Sentinel = 'channelId'
    (msg__)->WriteSentinel(6854027);




    if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
        mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHttpChannel", "Msg_Redirect1Begin", js::ProfileEntry::Category::OTHER);
    if ((!(PHttpChannel::Transition(Trigger(Trigger::Send, PHttpChannel::Msg_Redirect1Begin__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHttpChannelParent::SendRedirect3Complete() -> bool
{
    IPC::Message* msg__ = PHttpChannel::Msg_Redirect3Complete(Id());





    if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
        mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHttpChannel", "Msg_Redirect3Complete", js::ProfileEntry::Category::OTHER);
    if ((!(PHttpChannel::Transition(Trigger(Trigger::Send, PHttpChannel::Msg_Redirect3Complete__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHttpChannelParent::SendAssociateApplicationCache(
        const nsCString& groupID,
        const nsCString& clientID) -> bool
{
    IPC::Message* msg__ = PHttpChannel::Msg_AssociateApplicationCache(Id());

    Write(groupID, msg__);
    // Sentinel = 'groupID'
    (msg__)->WriteSentinel(2673822077);
    Write(clientID, msg__);
    // Sentinel = 'clientID'
    (msg__)->WriteSentinel(3831418318);




    if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
        mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHttpChannel", "Msg_AssociateApplicationCache", js::ProfileEntry::Category::OTHER);
    if ((!(PHttpChannel::Transition(Trigger(Trigger::Send, PHttpChannel::Msg_AssociateApplicationCache__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHttpChannelParent::SendNotifyTrackingProtectionDisabled() -> bool
{
    IPC::Message* msg__ = PHttpChannel::Msg_NotifyTrackingProtectionDisabled(Id());





    if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
        mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHttpChannel", "Msg_NotifyTrackingProtectionDisabled", js::ProfileEntry::Category::OTHER);
    if ((!(PHttpChannel::Transition(Trigger(Trigger::Send, PHttpChannel::Msg_NotifyTrackingProtectionDisabled__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHttpChannelParent::SendFlushedForDiversion() -> bool
{
    IPC::Message* msg__ = PHttpChannel::Msg_FlushedForDiversion(Id());





    if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
        mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHttpChannel", "Msg_FlushedForDiversion", js::ProfileEntry::Category::OTHER);
    if ((!(PHttpChannel::Transition(Trigger(Trigger::Send, PHttpChannel::Msg_FlushedForDiversion__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHttpChannelParent::SendDivertMessages() -> bool
{
    IPC::Message* msg__ = PHttpChannel::Msg_DivertMessages(Id());





    if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
        mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHttpChannel", "Msg_DivertMessages", js::ProfileEntry::Category::OTHER);
    if ((!(PHttpChannel::Transition(Trigger(Trigger::Send, PHttpChannel::Msg_DivertMessages__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHttpChannelParent::SendReportSecurityMessage(
        const nsString& messageTag,
        const nsString& messageCategory) -> bool
{
    IPC::Message* msg__ = PHttpChannel::Msg_ReportSecurityMessage(Id());

    Write(messageTag, msg__);
    // Sentinel = 'messageTag'
    (msg__)->WriteSentinel(1576364117);
    Write(messageCategory, msg__);
    // Sentinel = 'messageCategory'
    (msg__)->WriteSentinel(3375428022);




    if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
        mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHttpChannel", "Msg_ReportSecurityMessage", js::ProfileEntry::Category::OTHER);
    if ((!(PHttpChannel::Transition(Trigger(Trigger::Send, PHttpChannel::Msg_ReportSecurityMessage__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHttpChannelParent::SendDeleteSelf() -> bool
{
    IPC::Message* msg__ = PHttpChannel::Msg_DeleteSelf(Id());





    if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
        mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHttpChannel", "Msg_DeleteSelf", js::ProfileEntry::Category::OTHER);
    if ((!(PHttpChannel::Transition(Trigger(Trigger::Send, PHttpChannel::Msg_DeleteSelf__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHttpChannelParent::SendIssueDeprecationWarning(
        const uint32_t& warning,
        const bool& asError) -> bool
{
    IPC::Message* msg__ = PHttpChannel::Msg_IssueDeprecationWarning(Id());

    Write(warning, msg__);
    // Sentinel = 'warning'
    (msg__)->WriteSentinel(3208968083);
    Write(asError, msg__);
    // Sentinel = 'asError'
    (msg__)->WriteSentinel(4187201829);




    if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
        mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHttpChannel", "Msg_IssueDeprecationWarning", js::ProfileEntry::Category::OTHER);
    if ((!(PHttpChannel::Transition(Trigger(Trigger::Send, PHttpChannel::Msg_IssueDeprecationWarning__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHttpChannelParent::SendFinishInterceptedRedirect() -> bool
{
    IPC::Message* msg__ = PHttpChannel::Msg_FinishInterceptedRedirect(Id());





    if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
        mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Sending ", (msg__)->type(), mozilla::ipc::MessageDirection::eSending);
    }
    PROFILER_LABEL("PHttpChannel", "Msg_FinishInterceptedRedirect", js::ProfileEntry::Category::OTHER);
    if ((!(PHttpChannel::Transition(Trigger(Trigger::Send, PHttpChannel::Msg_FinishInterceptedRedirect__ID), (&(mState)))))) {
        NS_WARNING("bad state transition!");
    }

    bool sendok__ = (GetIPCChannel())->Send(msg__);
    return sendok__;
}

auto PHttpChannelParent::RemoveManagee(
        int32_t aProtocolId,
        ProtocolBase* aListener) -> void
{
    FatalError("unreached");
    return;
}

auto PHttpChannelParent::OnMessageReceived(const Message& msg__) -> PHttpChannelParent::Result
{
    switch ((msg__).type()) {
    case PHttpChannel::Msg_SetPriority__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
                mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
            }
            PROFILER_LABEL("PHttpChannel", "Msg_SetPriority", js::ProfileEntry::Category::OTHER);

            PickleIterator iter__ = PickleIterator(msg__);
            uint16_t priority;

            if ((!(Read((&(priority)), (&(msg__)), (&(iter__)))))) {
                FatalError("Error deserializing 'uint16_t'");
                return MsgValueError;
            }
            // Sentinel = 'priority'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 558136112)))) {
                FatalError("Error deserializing 'uint16_t'");
                return MsgValueError;
            }
            (msg__).EndRead(iter__);
            if ((!(PHttpChannel::Transition(Trigger(Trigger::Recv, PHttpChannel::Msg_SetPriority__ID), (&(mState)))))) {
                NS_WARNING("bad state transition!");
            }
            if ((!(RecvSetPriority(mozilla::Move(priority))))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHttpChannel::Msg_SetClassOfService__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
                mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
            }
            PROFILER_LABEL("PHttpChannel", "Msg_SetClassOfService", js::ProfileEntry::Category::OTHER);

            PickleIterator iter__ = PickleIterator(msg__);
            uint32_t cos;

            if ((!(Read((&(cos)), (&(msg__)), (&(iter__)))))) {
                FatalError("Error deserializing 'uint32_t'");
                return MsgValueError;
            }
            // Sentinel = 'cos'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 403875042)))) {
                FatalError("Error deserializing 'uint32_t'");
                return MsgValueError;
            }
            (msg__).EndRead(iter__);
            if ((!(PHttpChannel::Transition(Trigger(Trigger::Recv, PHttpChannel::Msg_SetClassOfService__ID), (&(mState)))))) {
                NS_WARNING("bad state transition!");
            }
            if ((!(RecvSetClassOfService(mozilla::Move(cos))))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHttpChannel::Msg_SetCacheTokenCachedCharset__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
                mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
            }
            PROFILER_LABEL("PHttpChannel", "Msg_SetCacheTokenCachedCharset", js::ProfileEntry::Category::OTHER);

            PickleIterator iter__ = PickleIterator(msg__);
            nsCString charset;

            if ((!(Read((&(charset)), (&(msg__)), (&(iter__)))))) {
                FatalError("Error deserializing 'nsCString'");
                return MsgValueError;
            }
            // Sentinel = 'charset'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1551550891)))) {
                FatalError("Error deserializing 'nsCString'");
                return MsgValueError;
            }
            (msg__).EndRead(iter__);
            if ((!(PHttpChannel::Transition(Trigger(Trigger::Recv, PHttpChannel::Msg_SetCacheTokenCachedCharset__ID), (&(mState)))))) {
                NS_WARNING("bad state transition!");
            }
            if ((!(RecvSetCacheTokenCachedCharset(mozilla::Move(charset))))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHttpChannel::Msg_UpdateAssociatedContentSecurity__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
                mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
            }
            PROFILER_LABEL("PHttpChannel", "Msg_UpdateAssociatedContentSecurity", js::ProfileEntry::Category::OTHER);

            PickleIterator iter__ = PickleIterator(msg__);
            int32_t broken;
            int32_t no;

            if ((!(Read((&(broken)), (&(msg__)), (&(iter__)))))) {
                FatalError("Error deserializing 'int32_t'");
                return MsgValueError;
            }
            // Sentinel = 'broken'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2083835601)))) {
                FatalError("Error deserializing 'int32_t'");
                return MsgValueError;
            }
            if ((!(Read((&(no)), (&(msg__)), (&(iter__)))))) {
                FatalError("Error deserializing 'int32_t'");
                return MsgValueError;
            }
            // Sentinel = 'no'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 677832615)))) {
                FatalError("Error deserializing 'int32_t'");
                return MsgValueError;
            }
            (msg__).EndRead(iter__);
            if ((!(PHttpChannel::Transition(Trigger(Trigger::Recv, PHttpChannel::Msg_UpdateAssociatedContentSecurity__ID), (&(mState)))))) {
                NS_WARNING("bad state transition!");
            }
            if ((!(RecvUpdateAssociatedContentSecurity(mozilla::Move(broken), mozilla::Move(no))))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHttpChannel::Msg_Suspend__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
                mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
            }
            PROFILER_LABEL("PHttpChannel", "Msg_Suspend", js::ProfileEntry::Category::OTHER);

            if ((!(PHttpChannel::Transition(Trigger(Trigger::Recv, PHttpChannel::Msg_Suspend__ID), (&(mState)))))) {
                NS_WARNING("bad state transition!");
            }
            if ((!(RecvSuspend()))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHttpChannel::Msg_Resume__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
                mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
            }
            PROFILER_LABEL("PHttpChannel", "Msg_Resume", js::ProfileEntry::Category::OTHER);

            if ((!(PHttpChannel::Transition(Trigger(Trigger::Recv, PHttpChannel::Msg_Resume__ID), (&(mState)))))) {
                NS_WARNING("bad state transition!");
            }
            if ((!(RecvResume()))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHttpChannel::Msg_Cancel__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
                mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
            }
            PROFILER_LABEL("PHttpChannel", "Msg_Cancel", js::ProfileEntry::Category::OTHER);

            PickleIterator iter__ = PickleIterator(msg__);
            nsresult status;

            if ((!(Read((&(status)), (&(msg__)), (&(iter__)))))) {
                FatalError("Error deserializing 'nsresult'");
                return MsgValueError;
            }
            // Sentinel = 'status'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3714608576)))) {
                FatalError("Error deserializing 'nsresult'");
                return MsgValueError;
            }
            (msg__).EndRead(iter__);
            if ((!(PHttpChannel::Transition(Trigger(Trigger::Recv, PHttpChannel::Msg_Cancel__ID), (&(mState)))))) {
                NS_WARNING("bad state transition!");
            }
            if ((!(RecvCancel(mozilla::Move(status))))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHttpChannel::Msg_Redirect2Verify__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
                mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
            }
            PROFILER_LABEL("PHttpChannel", "Msg_Redirect2Verify", js::ProfileEntry::Category::OTHER);

            PickleIterator iter__ = PickleIterator(msg__);
            nsresult result;
            RequestHeaderTuples changedHeaders;
            uint32_t loadFlags;
            OptionalURIParams apiRedirectTo;
            OptionalCorsPreflightArgs corsPreflightArgs;
            bool forceHSTSPriming;
            bool mixedContentWouldBlock;
            bool chooseAppcache;

            if ((!(Read((&(result)), (&(msg__)), (&(iter__)))))) {
                FatalError("Error deserializing 'nsresult'");
                return MsgValueError;
            }
            // Sentinel = 'result'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3991766165)))) {
                FatalError("Error deserializing 'nsresult'");
                return MsgValueError;
            }
            if ((!(Read((&(changedHeaders)), (&(msg__)), (&(iter__)))))) {
                FatalError("Error deserializing 'RequestHeaderTuples'");
                return MsgValueError;
            }
            // Sentinel = 'changedHeaders'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1574138284)))) {
                FatalError("Error deserializing 'RequestHeaderTuples'");
                return MsgValueError;
            }
            if ((!(Read((&(loadFlags)), (&(msg__)), (&(iter__)))))) {
                FatalError("Error deserializing 'uint32_t'");
                return MsgValueError;
            }
            // Sentinel = 'loadFlags'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2391120444)))) {
                FatalError("Error deserializing 'uint32_t'");
                return MsgValueError;
            }
            if ((!(Read((&(apiRedirectTo)), (&(msg__)), (&(iter__)))))) {
                FatalError("Error deserializing 'OptionalURIParams'");
                return MsgValueError;
            }
            // Sentinel = 'apiRedirectTo'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3162811030)))) {
                FatalError("Error deserializing 'OptionalURIParams'");
                return MsgValueError;
            }
            if ((!(Read((&(corsPreflightArgs)), (&(msg__)), (&(iter__)))))) {
                FatalError("Error deserializing 'OptionalCorsPreflightArgs'");
                return MsgValueError;
            }
            // Sentinel = 'corsPreflightArgs'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1890063766)))) {
                FatalError("Error deserializing 'OptionalCorsPreflightArgs'");
                return MsgValueError;
            }
            if ((!(Read((&(forceHSTSPriming)), (&(msg__)), (&(iter__)))))) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;
            }
            // Sentinel = 'forceHSTSPriming'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1123937751)))) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;
            }
            if ((!(Read((&(mixedContentWouldBlock)), (&(msg__)), (&(iter__)))))) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;
            }
            // Sentinel = 'mixedContentWouldBlock'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 3609505564)))) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;
            }
            if ((!(Read((&(chooseAppcache)), (&(msg__)), (&(iter__)))))) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;
            }
            // Sentinel = 'chooseAppcache'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 868254728)))) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;
            }
            (msg__).EndRead(iter__);
            if ((!(PHttpChannel::Transition(Trigger(Trigger::Recv, PHttpChannel::Msg_Redirect2Verify__ID), (&(mState)))))) {
                NS_WARNING("bad state transition!");
            }
            if ((!(RecvRedirect2Verify(mozilla::Move(result), mozilla::Move(changedHeaders), mozilla::Move(loadFlags), mozilla::Move(apiRedirectTo), mozilla::Move(corsPreflightArgs), mozilla::Move(forceHSTSPriming), mozilla::Move(mixedContentWouldBlock), mozilla::Move(chooseAppcache))))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHttpChannel::Msg_DocumentChannelCleanup__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
                mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
            }
            PROFILER_LABEL("PHttpChannel", "Msg_DocumentChannelCleanup", js::ProfileEntry::Category::OTHER);

            if ((!(PHttpChannel::Transition(Trigger(Trigger::Recv, PHttpChannel::Msg_DocumentChannelCleanup__ID), (&(mState)))))) {
                NS_WARNING("bad state transition!");
            }
            if ((!(RecvDocumentChannelCleanup()))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHttpChannel::Msg_MarkOfflineCacheEntryAsForeign__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
                mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
            }
            PROFILER_LABEL("PHttpChannel", "Msg_MarkOfflineCacheEntryAsForeign", js::ProfileEntry::Category::OTHER);

            if ((!(PHttpChannel::Transition(Trigger(Trigger::Recv, PHttpChannel::Msg_MarkOfflineCacheEntryAsForeign__ID), (&(mState)))))) {
                NS_WARNING("bad state transition!");
            }
            if ((!(RecvMarkOfflineCacheEntryAsForeign()))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHttpChannel::Msg_DivertOnDataAvailable__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
                mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
            }
            PROFILER_LABEL("PHttpChannel", "Msg_DivertOnDataAvailable", js::ProfileEntry::Category::OTHER);

            PickleIterator iter__ = PickleIterator(msg__);
            nsCString data;
            uint64_t offset;
            uint32_t count;

            if ((!(Read((&(data)), (&(msg__)), (&(iter__)))))) {
                FatalError("Error deserializing 'nsCString'");
                return MsgValueError;
            }
            // Sentinel = 'data'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 843352540)))) {
                FatalError("Error deserializing 'nsCString'");
                return MsgValueError;
            }
            if ((!(Read((&(offset)), (&(msg__)), (&(iter__)))))) {
                FatalError("Error deserializing 'uint64_t'");
                return MsgValueError;
            }
            // Sentinel = 'offset'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1369947863)))) {
                FatalError("Error deserializing 'uint64_t'");
                return MsgValueError;
            }
            if ((!(Read((&(count)), (&(msg__)), (&(iter__)))))) {
                FatalError("Error deserializing 'uint32_t'");
                return MsgValueError;
            }
            // Sentinel = 'count'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2126421856)))) {
                FatalError("Error deserializing 'uint32_t'");
                return MsgValueError;
            }
            (msg__).EndRead(iter__);
            if ((!(PHttpChannel::Transition(Trigger(Trigger::Recv, PHttpChannel::Msg_DivertOnDataAvailable__ID), (&(mState)))))) {
                NS_WARNING("bad state transition!");
            }
            if ((!(RecvDivertOnDataAvailable(mozilla::Move(data), mozilla::Move(offset), mozilla::Move(count))))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHttpChannel::Msg_DivertOnStopRequest__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
                mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
            }
            PROFILER_LABEL("PHttpChannel", "Msg_DivertOnStopRequest", js::ProfileEntry::Category::OTHER);

            PickleIterator iter__ = PickleIterator(msg__);
            nsresult statusCode;

            if ((!(Read((&(statusCode)), (&(msg__)), (&(iter__)))))) {
                FatalError("Error deserializing 'nsresult'");
                return MsgValueError;
            }
            // Sentinel = 'statusCode'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 2709278591)))) {
                FatalError("Error deserializing 'nsresult'");
                return MsgValueError;
            }
            (msg__).EndRead(iter__);
            if ((!(PHttpChannel::Transition(Trigger(Trigger::Recv, PHttpChannel::Msg_DivertOnStopRequest__ID), (&(mState)))))) {
                NS_WARNING("bad state transition!");
            }
            if ((!(RecvDivertOnStopRequest(mozilla::Move(statusCode))))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHttpChannel::Msg_DivertComplete__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
                mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
            }
            PROFILER_LABEL("PHttpChannel", "Msg_DivertComplete", js::ProfileEntry::Category::OTHER);

            if ((!(PHttpChannel::Transition(Trigger(Trigger::Recv, PHttpChannel::Msg_DivertComplete__ID), (&(mState)))))) {
                NS_WARNING("bad state transition!");
            }
            if ((!(RecvDivertComplete()))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHttpChannel::Msg_RemoveCorsPreflightCacheEntry__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
                mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
            }
            PROFILER_LABEL("PHttpChannel", "Msg_RemoveCorsPreflightCacheEntry", js::ProfileEntry::Category::OTHER);

            PickleIterator iter__ = PickleIterator(msg__);
            URIParams uri;
            PrincipalInfo requestingPrincipal;

            if ((!(Read((&(uri)), (&(msg__)), (&(iter__)))))) {
                FatalError("Error deserializing 'URIParams'");
                return MsgValueError;
            }
            // Sentinel = 'uri'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1453210605)))) {
                FatalError("Error deserializing 'URIParams'");
                return MsgValueError;
            }
            if ((!(Read((&(requestingPrincipal)), (&(msg__)), (&(iter__)))))) {
                FatalError("Error deserializing 'PrincipalInfo'");
                return MsgValueError;
            }
            // Sentinel = 'requestingPrincipal'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 1124847050)))) {
                FatalError("Error deserializing 'PrincipalInfo'");
                return MsgValueError;
            }
            (msg__).EndRead(iter__);
            if ((!(PHttpChannel::Transition(Trigger(Trigger::Recv, PHttpChannel::Msg_RemoveCorsPreflightCacheEntry__ID), (&(mState)))))) {
                NS_WARNING("bad state transition!");
            }
            if ((!(RecvRemoveCorsPreflightCacheEntry(mozilla::Move(uri), mozilla::Move(requestingPrincipal))))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHttpChannel::Msg_DeletingChannel__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
                mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
            }
            PROFILER_LABEL("PHttpChannel", "Msg_DeletingChannel", js::ProfileEntry::Category::OTHER);

            if ((!(PHttpChannel::Transition(Trigger(Trigger::Recv, PHttpChannel::Msg_DeletingChannel__ID), (&(mState)))))) {
                NS_WARNING("bad state transition!");
            }
            if ((!(RecvDeletingChannel()))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PHttpChannel::Msg___delete____ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
                mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
            }
            PROFILER_LABEL("PHttpChannel", "Msg___delete__", js::ProfileEntry::Category::OTHER);

            PickleIterator iter__ = PickleIterator(msg__);
            PHttpChannelParent* actor;

            if ((!(Read((&(actor)), (&(msg__)), (&(iter__)), false)))) {
                FatalError("Error deserializing 'PHttpChannelParent'");
                return MsgValueError;
            }
            // Sentinel = 'actor'
            if ((!(((&(msg__)))->ReadSentinel((&(iter__)), 875202478)))) {
                FatalError("Error deserializing 'PHttpChannelParent'");
                return MsgValueError;
            }
            (msg__).EndRead(iter__);
            if ((!(PHttpChannel::Transition(Trigger(Trigger::Recv, PHttpChannel::Msg___delete____ID), (&(mState)))))) {
                NS_WARNING("bad state transition!");
            }
            if ((!(Recv__delete__()))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                return MsgProcessingError;
            }


            (actor)->DestroySubtree(Deletion);
            (actor)->DeallocSubtree();
            ((actor)->Manager())->RemoveManagee(PHttpChannelMsgStart, actor);

            return MsgProcessed;
        }
    case PHttpChannel::Msg_FinishInterceptedRedirect__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PHttpChannelParent")) {
                mozilla::ipc::LogMessageForProtocol("PHttpChannelParent", OtherPid(), "Received ", ((&(msg__)))->type(), mozilla::ipc::MessageDirection::eReceiving);
            }
            PROFILER_LABEL("PHttpChannel", "Msg_FinishInterceptedRedirect", js::ProfileEntry::Category::OTHER);

            if ((!(PHttpChannel::Transition(Trigger(Trigger::Recv, PHttpChannel::Msg_FinishInterceptedRedirect__ID), (&(mState)))))) {
                NS_WARNING("bad state transition!");
            }
            if ((!(RecvFinishInterceptedRedirect()))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    default:
        {
            return MsgNotKnown;
        }
    }
}

auto PHttpChannelParent::OnMessageReceived(
        const Message& msg__,
        Message*& reply__) -> PHttpChannelParent::Result
{
    return MsgNotKnown;
}

auto PHttpChannelParent::OnCallReceived(
        const Message& msg__,
        Message*& reply__) -> PHttpChannelParent::Result
{
    MOZ_ASSERT_UNREACHABLE("message protocol not supported");
    return MsgNotKnown;
}

auto PHttpChannelParent::GetProtocolTypeId() -> int32_t
{
    return PHttpChannelMsgStart;
}

auto PHttpChannelParent::ProtocolName() const -> const char*
{
    return "PHttpChannelParent";
}

auto PHttpChannelParent::DestroySubtree(ActorDestroyReason why) -> void
{
    // Unregister from our manager.
    Unregister(Id());
    SetId(1);

    // Finally, destroy "us".
    ActorDestroy(why);
}

auto PHttpChannelParent::DeallocSubtree() -> void
{
}

auto PHttpChannelParent::Write(
        const SystemPrincipalInfo& v__,
        Message* msg__) -> void
{
}

auto PHttpChannelParent::Read(
        SystemPrincipalInfo* v__,
        const Message* msg__,
        PickleIterator* iter__) -> bool
{
    return true;
}

auto PHttpChannelParent::Write(
        const nsTArray<PrincipalInfo>& v__,
        Message* msg__) -> void
{
    uint32_t length = (v__).Length();
    Write(length, msg__);
    // Sentinel = ('length', 'PrincipalInfo[]')
    (msg__)->WriteSentinel(1032188126);

    for (auto& elem : v__) {
        Write(elem, msg__);
        // Sentinel = 'PrincipalInfo[]'
        (msg__)->WriteSentinel(413380193);
    }
}

auto PHttpChannelParent::Read(
        nsTArray<PrincipalInfo>* v__,
        const Message* msg__,
        PickleIterator* iter__) -> bool
{
    nsTArray<PrincipalInfo> fa;
    uint32_t length;
    if ((!(Read((&(length)), msg__, iter__)))) {
        mozilla::ipc::ArrayLengthReadError("PrincipalInfo[]");
        return false;
    }
    // Sentinel = ('length', 'PrincipalInfo[]')
    if ((!((msg__)->ReadSentinel(iter__, 1032188126)))) {
        mozilla::ipc::ArrayLengthReadError("PrincipalInfo[]");
        return false;
    }

    PrincipalInfo* elems = (fa).AppendElements(length);
    for (uint32_t i = 0; (i) < (length); (++(i))) {
        if ((!(Read((&(elems[i])), msg__, iter__)))) {
            FatalError("Error deserializing 'PrincipalInfo[i]'");
            return false;
        }
        // Sentinel = 'PrincipalInfo[]'
        if ((!((msg__)->ReadSentinel(iter__, 413380193)))) {
            FatalError("Error deserializing 'PrincipalInfo[i]'");
            return false;
        }
    }
    (v__)->SwapElements(fa);
    return true;
}

auto PHttpChannelParent::Write(
        const OptionalURIParams& v__,
        Message* msg__) -> void
{
    typedef OptionalURIParams type__;
    Write(int((v__).type()), msg__);
    // Sentinel = 'OptionalURIParams'
    (msg__)->WriteSentinel(1977079525);

    switch ((v__).type()) {
    case type__::Tvoid_t:
        {
            Write((v__).get_void_t(), msg__);
            // Sentinel = 'Tvoid_t'
            (msg__)->WriteSentinel(3041273328);
            return;
        }
    case type__::TURIParams:
        {
            Write((v__).get_URIParams(), msg__);
            // Sentinel = 'TURIParams'
            (msg__)->WriteSentinel(1132652062);
            return;
        }
    default:
        {
            FatalError("unknown union type");
            return;
        }
    }
}

auto PHttpChannelParent::Read(
        OptionalURIParams* v__,
        const Message* msg__,
        PickleIterator* iter__) -> bool
{
    typedef OptionalURIParams type__;
    int type;
    if ((!(Read((&(type)), msg__, iter__)))) {
        mozilla::ipc::UnionTypeReadError("OptionalURIParams");
        return false;
    }
    // Sentinel = 'OptionalURIParams'
    if ((!((msg__)->ReadSentinel(iter__, 1977079525)))) {
        mozilla::ipc::UnionTypeReadError("OptionalURIParams");
        return false;
    }

    switch (type) {
    case type__::Tvoid_t:
        {
            void_t tmp = void_t();
            (*(v__)) = tmp;
            if ((!(Read((&((v__)->get_void_t())), msg__, iter__)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            // Sentinel = 'Tvoid_t'
            if ((!((msg__)->ReadSentinel(iter__, 3041273328)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            return true;
        }
    case type__::TURIParams:
        {
            URIParams tmp = URIParams();
            (*(v__)) = tmp;
            if ((!(Read((&((v__)->get_URIParams())), msg__, iter__)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            // Sentinel = 'TURIParams'
            if ((!((msg__)->ReadSentinel(iter__, 1132652062)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            return true;
        }
    default:
        {
            FatalError("unknown union type");
            return false;
        }
    }
}

auto PHttpChannelParent::Write(
        const ContentPrincipalInfoOriginNoSuffix& v__,
        Message* msg__) -> void
{
    typedef ContentPrincipalInfoOriginNoSuffix type__;
    Write(int((v__).type()), msg__);
    // Sentinel = 'ContentPrincipalInfoOriginNoSuffix'
    (msg__)->WriteSentinel(2442066713);

    switch ((v__).type()) {
    case type__::TnsCString:
        {
            Write((v__).get_nsCString(), msg__);
            // Sentinel = 'TnsCString'
            (msg__)->WriteSentinel(2427411293);
            return;
        }
    case type__::Tvoid_t:
        {
            Write((v__).get_void_t(), msg__);
            // Sentinel = 'Tvoid_t'
            (msg__)->WriteSentinel(3041273328);
            return;
        }
    default:
        {
            FatalError("unknown union type");
            return;
        }
    }
}

auto PHttpChannelParent::Read(
        ContentPrincipalInfoOriginNoSuffix* v__,
        const Message* msg__,
        PickleIterator* iter__) -> bool
{
    typedef ContentPrincipalInfoOriginNoSuffix type__;
    int type;
    if ((!(Read((&(type)), msg__, iter__)))) {
        mozilla::ipc::UnionTypeReadError("ContentPrincipalInfoOriginNoSuffix");
        return false;
    }
    // Sentinel = 'ContentPrincipalInfoOriginNoSuffix'
    if ((!((msg__)->ReadSentinel(iter__, 2442066713)))) {
        mozilla::ipc::UnionTypeReadError("ContentPrincipalInfoOriginNoSuffix");
        return false;
    }

    switch (type) {
    case type__::TnsCString:
        {
            nsCString tmp = nsCString();
            (*(v__)) = tmp;
            if ((!(Read((&((v__)->get_nsCString())), msg__, iter__)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            // Sentinel = 'TnsCString'
            if ((!((msg__)->ReadSentinel(iter__, 2427411293)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            return true;
        }
    case type__::Tvoid_t:
        {
            void_t tmp = void_t();
            (*(v__)) = tmp;
            if ((!(Read((&((v__)->get_void_t())), msg__, iter__)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            // Sentinel = 'Tvoid_t'
            if ((!((msg__)->ReadSentinel(iter__, 3041273328)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            return true;
        }
    default:
        {
            FatalError("unknown union type");
            return false;
        }
    }
}

auto PHttpChannelParent::Write(
        const StandardURLParams& v__,
        Message* msg__) -> void
{
    Write((v__).urlType(), msg__);
    // Sentinel = 'urlType'
    (msg__)->WriteSentinel(4149428228);
    Write((v__).port(), msg__);
    // Sentinel = 'port'
    (msg__)->WriteSentinel(3633211549);
    Write((v__).defaultPort(), msg__);
    // Sentinel = 'defaultPort'
    (msg__)->WriteSentinel(599318897);
    Write((v__).spec(), msg__);
    // Sentinel = 'spec'
    (msg__)->WriteSentinel(1630740541);
    Write((v__).scheme(), msg__);
    // Sentinel = 'scheme'
    (msg__)->WriteSentinel(3619238715);
    Write((v__).authority(), msg__);
    // Sentinel = 'authority'
    (msg__)->WriteSentinel(1669684878);
    Write((v__).username(), msg__);
    // Sentinel = 'username'
    (msg__)->WriteSentinel(689225024);
    Write((v__).password(), msg__);
    // Sentinel = 'password'
    (msg__)->WriteSentinel(2527534683);
    Write((v__).host(), msg__);
    // Sentinel = 'host'
    (msg__)->WriteSentinel(4070301394);
    Write((v__).path(), msg__);
    // Sentinel = 'path'
    (msg__)->WriteSentinel(913629401);
    Write((v__).filePath(), msg__);
    // Sentinel = 'filePath'
    (msg__)->WriteSentinel(4122896455);
    Write((v__).directory(), msg__);
    // Sentinel = 'directory'
    (msg__)->WriteSentinel(1201172472);
    Write((v__).baseName(), msg__);
    // Sentinel = 'baseName'
    (msg__)->WriteSentinel(2448877418);
    Write((v__).extension(), msg__);
    // Sentinel = 'extension'
    (msg__)->WriteSentinel(3211853542);
    Write((v__).query(), msg__);
    // Sentinel = 'query'
    (msg__)->WriteSentinel(4249802777);
    Write((v__).ref(), msg__);
    // Sentinel = 'ref'
    (msg__)->WriteSentinel(2626476732);
    Write((v__).originCharset(), msg__);
    // Sentinel = 'originCharset'
    (msg__)->WriteSentinel(1320725495);
    Write((v__).isMutable(), msg__);
    // Sentinel = 'isMutable'
    (msg__)->WriteSentinel(3552466783);
    Write((v__).supportsFileURL(), msg__);
    // Sentinel = 'supportsFileURL'
    (msg__)->WriteSentinel(1871785710);
    Write((v__).hostEncoding(), msg__);
    // Sentinel = 'hostEncoding'
    (msg__)->WriteSentinel(1044841773);
}

auto PHttpChannelParent::Read(
        StandardURLParams* v__,
        const Message* msg__,
        PickleIterator* iter__) -> bool
{
    if ((!(Read((&((v__)->urlType())), msg__, iter__)))) {
        FatalError("Error deserializing 'urlType' (uint32_t) member of 'StandardURLParams'");
        return false;
    }
    // Sentinel = 'urlType'
    if ((!((msg__)->ReadSentinel(iter__, 4149428228)))) {
        FatalError("Error deserializing 'urlType' (uint32_t) member of 'StandardURLParams'");
        return false;
    }
    if ((!(Read((&((v__)->port())), msg__, iter__)))) {
        FatalError("Error deserializing 'port' (int32_t) member of 'StandardURLParams'");
        return false;
    }
    // Sentinel = 'port'
    if ((!((msg__)->ReadSentinel(iter__, 3633211549)))) {
        FatalError("Error deserializing 'port' (int32_t) member of 'StandardURLParams'");
        return false;
    }
    if ((!(Read((&((v__)->defaultPort())), msg__, iter__)))) {
        FatalError("Error deserializing 'defaultPort' (int32_t) member of 'StandardURLParams'");
        return false;
    }
    // Sentinel = 'defaultPort'
    if ((!((msg__)->ReadSentinel(iter__, 599318897)))) {
        FatalError("Error deserializing 'defaultPort' (int32_t) member of 'StandardURLParams'");
        return false;
    }
    if ((!(Read((&((v__)->spec())), msg__, iter__)))) {
        FatalError("Error deserializing 'spec' (nsCString) member of 'StandardURLParams'");
        return false;
    }
    // Sentinel = 'spec'
    if ((!((msg__)->ReadSentinel(iter__, 1630740541)))) {
        FatalError("Error deserializing 'spec' (nsCString) member of 'StandardURLParams'");
        return false;
    }
    if ((!(Read((&((v__)->scheme())), msg__, iter__)))) {
        FatalError("Error deserializing 'scheme' (StandardURLSegment) member of 'StandardURLParams'");
        return false;
    }
    // Sentinel = 'scheme'
    if ((!((msg__)->ReadSentinel(iter__, 3619238715)))) {
        FatalError("Error deserializing 'scheme' (StandardURLSegment) member of 'StandardURLParams'");
        return false;
    }
    if ((!(Read((&((v__)->authority())), msg__, iter__)))) {
        FatalError("Error deserializing 'authority' (StandardURLSegment) member of 'StandardURLParams'");
        return false;
    }
    // Sentinel = 'authority'
    if ((!((msg__)->ReadSentinel(iter__, 1669684878)))) {
        FatalError("Error deserializing 'authority' (StandardURLSegment) member of 'StandardURLParams'");
        return false;
    }
    if ((!(Read((&((v__)->username())), msg__, iter__)))) {
        FatalError("Error deserializing 'username' (StandardURLSegment) member of 'StandardURLParams'");
        return false;
    }
    // Sentinel = 'username'
    if ((!((msg__)->ReadSentinel(iter__, 689225024)))) {
        FatalError("Error deserializing 'username' (StandardURLSegment) member of 'StandardURLParams'");
        return false;
    }
    if ((!(Read((&((v__)->password())), msg__, iter__)))) {
        FatalError("Error deserializing 'password' (StandardURLSegment) member of 'StandardURLParams'");
        return false;
    }
    // Sentinel = 'password'
    if ((!((msg__)->ReadSentinel(iter__, 2527534683)))) {
        FatalError("Error deserializing 'password' (StandardURLSegment) member of 'StandardURLParams'");
        return false;
    }
    if ((!(Read((&((v__)->host())), msg__, iter__)))) {
        FatalError("Error deserializing 'host' (StandardURLSegment) member of 'StandardURLParams'");
        return false;
    }
    // Sentinel = 'host'
    if ((!((msg__)->ReadSentinel(iter__, 4070301394)))) {
        FatalError("Error deserializing 'host' (StandardURLSegment) member of 'StandardURLParams'");
        return false;
    }
    if ((!(Read((&((v__)->path())), msg__, iter__)))) {
        FatalError("Error deserializing 'path' (StandardURLSegment) member of 'StandardURLParams'");
        return false;
    }
    // Sentinel = 'path'
    if ((!((msg__)->ReadSentinel(iter__, 913629401)))) {
        FatalError("Error deserializing 'path' (StandardURLSegment) member of 'StandardURLParams'");
        return false;
    }
    if ((!(Read((&((v__)->filePath())), msg__, iter__)))) {
        FatalError("Error deserializing 'filePath' (StandardURLSegment) member of 'StandardURLParams'");
        return false;
    }
    // Sentinel = 'filePath'
    if ((!((msg__)->ReadSentinel(iter__, 4122896455)))) {
        FatalError("Error deserializing 'filePath' (StandardURLSegment) member of 'StandardURLParams'");
        return false;
    }
    if ((!(Read((&((v__)->directory())), msg__, iter__)))) {
        FatalError("Error deserializing 'directory' (StandardURLSegment) member of 'StandardURLParams'");
        return false;
    }
    // Sentinel = 'directory'
    if ((!((msg__)->ReadSentinel(iter__, 1201172472)))) {
        FatalError("Error deserializing 'directory' (StandardURLSegment) member of 'StandardURLParams'");
        return false;
    }
    if ((!(Read((&((v__)->baseName())), msg__, iter__)))) {
        FatalError("Error deserializing 'baseName' (StandardURLSegment) member of 'StandardURLParams'");
        return false;
    }
    // Sentinel = 'baseName'
    if ((!((msg__)->ReadSentinel(iter__, 2448877418)))) {
        FatalError("Error deserializing 'baseName' (StandardURLSegment) member of 'StandardURLParams'");
        return false;
    }
    if ((!(Read((&((v__)->extension())), msg__, iter__)))) {
        FatalError("Error deserializing 'extension' (StandardURLSegment) member of 'StandardURLParams'");
        return false;
    }
    // Sentinel = 'extension'
    if ((!((msg__)->ReadSentinel(iter__, 3211853542)))) {
        FatalError("Error deserializing 'extension' (StandardURLSegment) member of 'StandardURLParams'");
        return false;
    }
    if ((!(Read((&((v__)->query())), msg__, iter__)))) {
        FatalError("Error deserializing 'query' (StandardURLSegment) member of 'StandardURLParams'");
        return false;
    }
    // Sentinel = 'query'
    if ((!((msg__)->ReadSentinel(iter__, 4249802777)))) {
        FatalError("Error deserializing 'query' (StandardURLSegment) member of 'StandardURLParams'");
        return false;
    }
    if ((!(Read((&((v__)->ref())), msg__, iter__)))) {
        FatalError("Error deserializing 'ref' (StandardURLSegment) member of 'StandardURLParams'");
        return false;
    }
    // Sentinel = 'ref'
    if ((!((msg__)->ReadSentinel(iter__, 2626476732)))) {
        FatalError("Error deserializing 'ref' (StandardURLSegment) member of 'StandardURLParams'");
        return false;
    }
    if ((!(Read((&((v__)->originCharset())), msg__, iter__)))) {
        FatalError("Error deserializing 'originCharset' (nsCString) member of 'StandardURLParams'");
        return false;
    }
    // Sentinel = 'originCharset'
    if ((!((msg__)->ReadSentinel(iter__, 1320725495)))) {
        FatalError("Error deserializing 'originCharset' (nsCString) member of 'StandardURLParams'");
        return false;
    }
    if ((!(Read((&((v__)->isMutable())), msg__, iter__)))) {
        FatalError("Error deserializing 'isMutable' (bool) member of 'StandardURLParams'");
        return false;
    }
    // Sentinel = 'isMutable'
    if ((!((msg__)->ReadSentinel(iter__, 3552466783)))) {
        FatalError("Error deserializing 'isMutable' (bool) member of 'StandardURLParams'");
        return false;
    }
    if ((!(Read((&((v__)->supportsFileURL())), msg__, iter__)))) {
        FatalError("Error deserializing 'supportsFileURL' (bool) member of 'StandardURLParams'");
        return false;
    }
    // Sentinel = 'supportsFileURL'
    if ((!((msg__)->ReadSentinel(iter__, 1871785710)))) {
        FatalError("Error deserializing 'supportsFileURL' (bool) member of 'StandardURLParams'");
        return false;
    }
    if ((!(Read((&((v__)->hostEncoding())), msg__, iter__)))) {
        FatalError("Error deserializing 'hostEncoding' (uint32_t) member of 'StandardURLParams'");
        return false;
    }
    // Sentinel = 'hostEncoding'
    if ((!((msg__)->ReadSentinel(iter__, 1044841773)))) {
        FatalError("Error deserializing 'hostEncoding' (uint32_t) member of 'StandardURLParams'");
        return false;
    }
    return true;
}

auto PHttpChannelParent::Write(
        const URIParams& v__,
        Message* msg__) -> void
{
    typedef URIParams type__;
    Write(int((v__).type()), msg__);
    // Sentinel = 'URIParams'
    (msg__)->WriteSentinel(1039516337);

    switch ((v__).type()) {
    case type__::TSimpleURIParams:
        {
            Write((v__).get_SimpleURIParams(), msg__);
            // Sentinel = 'TSimpleURIParams'
            (msg__)->WriteSentinel(4028607586);
            return;
        }
    case type__::TStandardURLParams:
        {
            Write((v__).get_StandardURLParams(), msg__);
            // Sentinel = 'TStandardURLParams'
            (msg__)->WriteSentinel(248174578);
            return;
        }
    case type__::TJARURIParams:
        {
            Write((v__).get_JARURIParams(), msg__);
            // Sentinel = 'TJARURIParams'
            (msg__)->WriteSentinel(3404434792);
            return;
        }
    case type__::TIconURIParams:
        {
            Write((v__).get_IconURIParams(), msg__);
            // Sentinel = 'TIconURIParams'
            (msg__)->WriteSentinel(1824279023);
            return;
        }
    case type__::TNullPrincipalURIParams:
        {
            Write((v__).get_NullPrincipalURIParams(), msg__);
            // Sentinel = 'TNullPrincipalURIParams'
            (msg__)->WriteSentinel(216801182);
            return;
        }
    case type__::TJSURIParams:
        {
            Write((v__).get_JSURIParams(), msg__);
            // Sentinel = 'TJSURIParams'
            (msg__)->WriteSentinel(32222119);
            return;
        }
    case type__::TSimpleNestedURIParams:
        {
            Write((v__).get_SimpleNestedURIParams(), msg__);
            // Sentinel = 'TSimpleNestedURIParams'
            (msg__)->WriteSentinel(3192238307);
            return;
        }
    case type__::THostObjectURIParams:
        {
            Write((v__).get_HostObjectURIParams(), msg__);
            // Sentinel = 'THostObjectURIParams'
            (msg__)->WriteSentinel(1307971301);
            return;
        }
    default:
        {
            FatalError("unknown union type");
            return;
        }
    }
}

auto PHttpChannelParent::Read(
        URIParams* v__,
        const Message* msg__,
        PickleIterator* iter__) -> bool
{
    typedef URIParams type__;
    int type;
    if ((!(Read((&(type)), msg__, iter__)))) {
        mozilla::ipc::UnionTypeReadError("URIParams");
        return false;
    }
    // Sentinel = 'URIParams'
    if ((!((msg__)->ReadSentinel(iter__, 1039516337)))) {
        mozilla::ipc::UnionTypeReadError("URIParams");
        return false;
    }

    switch (type) {
    case type__::TSimpleURIParams:
        {
            SimpleURIParams tmp = SimpleURIParams();
            (*(v__)) = tmp;
            if ((!(Read((&((v__)->get_SimpleURIParams())), msg__, iter__)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            // Sentinel = 'TSimpleURIParams'
            if ((!((msg__)->ReadSentinel(iter__, 4028607586)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            return true;
        }
    case type__::TStandardURLParams:
        {
            StandardURLParams tmp = StandardURLParams();
            (*(v__)) = tmp;
            if ((!(Read((&((v__)->get_StandardURLParams())), msg__, iter__)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            // Sentinel = 'TStandardURLParams'
            if ((!((msg__)->ReadSentinel(iter__, 248174578)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            return true;
        }
    case type__::TJARURIParams:
        {
            JARURIParams tmp = JARURIParams();
            (*(v__)) = tmp;
            if ((!(Read((&((v__)->get_JARURIParams())), msg__, iter__)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            // Sentinel = 'TJARURIParams'
            if ((!((msg__)->ReadSentinel(iter__, 3404434792)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            return true;
        }
    case type__::TIconURIParams:
        {
            IconURIParams tmp = IconURIParams();
            (*(v__)) = tmp;
            if ((!(Read((&((v__)->get_IconURIParams())), msg__, iter__)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            // Sentinel = 'TIconURIParams'
            if ((!((msg__)->ReadSentinel(iter__, 1824279023)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            return true;
        }
    case type__::TNullPrincipalURIParams:
        {
            NullPrincipalURIParams tmp = NullPrincipalURIParams();
            (*(v__)) = tmp;
            if ((!(Read((&((v__)->get_NullPrincipalURIParams())), msg__, iter__)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            // Sentinel = 'TNullPrincipalURIParams'
            if ((!((msg__)->ReadSentinel(iter__, 216801182)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            return true;
        }
    case type__::TJSURIParams:
        {
            JSURIParams tmp = JSURIParams();
            (*(v__)) = tmp;
            if ((!(Read((&((v__)->get_JSURIParams())), msg__, iter__)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            // Sentinel = 'TJSURIParams'
            if ((!((msg__)->ReadSentinel(iter__, 32222119)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            return true;
        }
    case type__::TSimpleNestedURIParams:
        {
            SimpleNestedURIParams tmp = SimpleNestedURIParams();
            (*(v__)) = tmp;
            if ((!(Read((&((v__)->get_SimpleNestedURIParams())), msg__, iter__)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            // Sentinel = 'TSimpleNestedURIParams'
            if ((!((msg__)->ReadSentinel(iter__, 3192238307)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            return true;
        }
    case type__::THostObjectURIParams:
        {
            HostObjectURIParams tmp = HostObjectURIParams();
            (*(v__)) = tmp;
            if ((!(Read((&((v__)->get_HostObjectURIParams())), msg__, iter__)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            // Sentinel = 'THostObjectURIParams'
            if ((!((msg__)->ReadSentinel(iter__, 1307971301)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            return true;
        }
    default:
        {
            FatalError("unknown union type");
            return false;
        }
    }
}

auto PHttpChannelParent::Write(
        const CorsPreflightArgs& v__,
        Message* msg__) -> void
{
    Write((v__).unsafeHeaders(), msg__);
    // Sentinel = 'unsafeHeaders'
    (msg__)->WriteSentinel(259870561);
}

auto PHttpChannelParent::Read(
        CorsPreflightArgs* v__,
        const Message* msg__,
        PickleIterator* iter__) -> bool
{
    if ((!(Read((&((v__)->unsafeHeaders())), msg__, iter__)))) {
        FatalError("Error deserializing 'unsafeHeaders' (nsCString[]) member of 'CorsPreflightArgs'");
        return false;
    }
    // Sentinel = 'unsafeHeaders'
    if ((!((msg__)->ReadSentinel(iter__, 259870561)))) {
        FatalError("Error deserializing 'unsafeHeaders' (nsCString[]) member of 'CorsPreflightArgs'");
        return false;
    }
    return true;
}

auto PHttpChannelParent::Write(
        const SimpleNestedURIParams& v__,
        Message* msg__) -> void
{
    Write((v__).simpleParams(), msg__);
    // Sentinel = 'simpleParams'
    (msg__)->WriteSentinel(3404291700);
    Write((v__).innerURI(), msg__);
    // Sentinel = 'innerURI'
    (msg__)->WriteSentinel(2573245334);
}

auto PHttpChannelParent::Read(
        SimpleNestedURIParams* v__,
        const Message* msg__,
        PickleIterator* iter__) -> bool
{
    if ((!(Read((&((v__)->simpleParams())), msg__, iter__)))) {
        FatalError("Error deserializing 'simpleParams' (SimpleURIParams) member of 'SimpleNestedURIParams'");
        return false;
    }
    // Sentinel = 'simpleParams'
    if ((!((msg__)->ReadSentinel(iter__, 3404291700)))) {
        FatalError("Error deserializing 'simpleParams' (SimpleURIParams) member of 'SimpleNestedURIParams'");
        return false;
    }
    if ((!(Read((&((v__)->innerURI())), msg__, iter__)))) {
        FatalError("Error deserializing 'innerURI' (URIParams) member of 'SimpleNestedURIParams'");
        return false;
    }
    // Sentinel = 'innerURI'
    if ((!((msg__)->ReadSentinel(iter__, 2573245334)))) {
        FatalError("Error deserializing 'innerURI' (URIParams) member of 'SimpleNestedURIParams'");
        return false;
    }
    return true;
}

auto PHttpChannelParent::Write(
        const OptionalPrincipalInfo& v__,
        Message* msg__) -> void
{
    typedef OptionalPrincipalInfo type__;
    Write(int((v__).type()), msg__);
    // Sentinel = 'OptionalPrincipalInfo'
    (msg__)->WriteSentinel(3041452007);

    switch ((v__).type()) {
    case type__::Tvoid_t:
        {
            Write((v__).get_void_t(), msg__);
            // Sentinel = 'Tvoid_t'
            (msg__)->WriteSentinel(3041273328);
            return;
        }
    case type__::TPrincipalInfo:
        {
            Write((v__).get_PrincipalInfo(), msg__);
            // Sentinel = 'TPrincipalInfo'
            (msg__)->WriteSentinel(1396743580);
            return;
        }
    default:
        {
            FatalError("unknown union type");
            return;
        }
    }
}

auto PHttpChannelParent::Read(
        OptionalPrincipalInfo* v__,
        const Message* msg__,
        PickleIterator* iter__) -> bool
{
    typedef OptionalPrincipalInfo type__;
    int type;
    if ((!(Read((&(type)), msg__, iter__)))) {
        mozilla::ipc::UnionTypeReadError("OptionalPrincipalInfo");
        return false;
    }
    // Sentinel = 'OptionalPrincipalInfo'
    if ((!((msg__)->ReadSentinel(iter__, 3041452007)))) {
        mozilla::ipc::UnionTypeReadError("OptionalPrincipalInfo");
        return false;
    }

    switch (type) {
    case type__::Tvoid_t:
        {
            void_t tmp = void_t();
            (*(v__)) = tmp;
            if ((!(Read((&((v__)->get_void_t())), msg__, iter__)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            // Sentinel = 'Tvoid_t'
            if ((!((msg__)->ReadSentinel(iter__, 3041273328)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            return true;
        }
    case type__::TPrincipalInfo:
        {
            PrincipalInfo tmp = PrincipalInfo();
            (*(v__)) = tmp;
            if ((!(Read((&((v__)->get_PrincipalInfo())), msg__, iter__)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            // Sentinel = 'TPrincipalInfo'
            if ((!((msg__)->ReadSentinel(iter__, 1396743580)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            return true;
        }
    default:
        {
            FatalError("unknown union type");
            return false;
        }
    }
}

auto PHttpChannelParent::Write(
        const ExpandedPrincipalInfo& v__,
        Message* msg__) -> void
{
    Write((v__).attrs(), msg__);
    // Sentinel = 'attrs'
    (msg__)->WriteSentinel(3014987797);
    Write((v__).whitelist(), msg__);
    // Sentinel = 'whitelist'
    (msg__)->WriteSentinel(3731637258);
}

auto PHttpChannelParent::Read(
        ExpandedPrincipalInfo* v__,
        const Message* msg__,
        PickleIterator* iter__) -> bool
{
    if ((!(Read((&((v__)->attrs())), msg__, iter__)))) {
        FatalError("Error deserializing 'attrs' (PrincipalOriginAttributes) member of 'ExpandedPrincipalInfo'");
        return false;
    }
    // Sentinel = 'attrs'
    if ((!((msg__)->ReadSentinel(iter__, 3014987797)))) {
        FatalError("Error deserializing 'attrs' (PrincipalOriginAttributes) member of 'ExpandedPrincipalInfo'");
        return false;
    }
    if ((!(Read((&((v__)->whitelist())), msg__, iter__)))) {
        FatalError("Error deserializing 'whitelist' (PrincipalInfo[]) member of 'ExpandedPrincipalInfo'");
        return false;
    }
    // Sentinel = 'whitelist'
    if ((!((msg__)->ReadSentinel(iter__, 3731637258)))) {
        FatalError("Error deserializing 'whitelist' (PrincipalInfo[]) member of 'ExpandedPrincipalInfo'");
        return false;
    }
    return true;
}

auto PHttpChannelParent::Write(
        const HostObjectURIParams& v__,
        Message* msg__) -> void
{
    Write((v__).simpleParams(), msg__);
    // Sentinel = 'simpleParams'
    (msg__)->WriteSentinel(3404291700);
    Write((v__).principal(), msg__);
    // Sentinel = 'principal'
    (msg__)->WriteSentinel(732240927);
}

auto PHttpChannelParent::Read(
        HostObjectURIParams* v__,
        const Message* msg__,
        PickleIterator* iter__) -> bool
{
    if ((!(Read((&((v__)->simpleParams())), msg__, iter__)))) {
        FatalError("Error deserializing 'simpleParams' (SimpleURIParams) member of 'HostObjectURIParams'");
        return false;
    }
    // Sentinel = 'simpleParams'
    if ((!((msg__)->ReadSentinel(iter__, 3404291700)))) {
        FatalError("Error deserializing 'simpleParams' (SimpleURIParams) member of 'HostObjectURIParams'");
        return false;
    }
    if ((!(Read((&((v__)->principal())), msg__, iter__)))) {
        FatalError("Error deserializing 'principal' (OptionalPrincipalInfo) member of 'HostObjectURIParams'");
        return false;
    }
    // Sentinel = 'principal'
    if ((!((msg__)->ReadSentinel(iter__, 732240927)))) {
        FatalError("Error deserializing 'principal' (OptionalPrincipalInfo) member of 'HostObjectURIParams'");
        return false;
    }
    return true;
}

auto PHttpChannelParent::Write(
        const PHttpChannelParent* v__,
        Message* msg__,
        bool nullable__) -> void
{
    int32_t id;
    if ((!(v__))) {
        if ((!(nullable__))) {
            FatalError("NULL actor value passed to non-nullable param");
        }
        id = 0;
    }
    else {
        id = (v__)->Id();
        if ((1) == (id)) {
            FatalError("actor has been |delete|d");
        }
    }

    Write(id, msg__);
}

auto PHttpChannelParent::Read(
        PHttpChannelParent** v__,
        const Message* msg__,
        PickleIterator* iter__,
        bool nullable__) -> bool
{
    Maybe<mozilla::ipc::IProtocol*> actor = ReadActor(msg__, iter__, nullable__, "PHttpChannel", PHttpChannelMsgStart);
    if ((actor).isNothing()) {
        return false;
    }

    (*(v__)) = static_cast<PHttpChannelParent*>((actor).value());
    return true;
}

auto PHttpChannelParent::Write(
        const PrincipalInfo& v__,
        Message* msg__) -> void
{
    typedef PrincipalInfo type__;
    Write(int((v__).type()), msg__);
    // Sentinel = 'PrincipalInfo'
    (msg__)->WriteSentinel(4194518819);

    switch ((v__).type()) {
    case type__::TContentPrincipalInfo:
        {
            Write((v__).get_ContentPrincipalInfo(), msg__);
            // Sentinel = 'TContentPrincipalInfo'
            (msg__)->WriteSentinel(3677342258);
            return;
        }
    case type__::TSystemPrincipalInfo:
        {
            Write((v__).get_SystemPrincipalInfo(), msg__);
            // Sentinel = 'TSystemPrincipalInfo'
            (msg__)->WriteSentinel(3590603679);
            return;
        }
    case type__::TNullPrincipalInfo:
        {
            Write((v__).get_NullPrincipalInfo(), msg__);
            // Sentinel = 'TNullPrincipalInfo'
            (msg__)->WriteSentinel(3477774965);
            return;
        }
    case type__::TExpandedPrincipalInfo:
        {
            Write((v__).get_ExpandedPrincipalInfo(), msg__);
            // Sentinel = 'TExpandedPrincipalInfo'
            (msg__)->WriteSentinel(589324917);
            return;
        }
    default:
        {
            FatalError("unknown union type");
            return;
        }
    }
}

auto PHttpChannelParent::Read(
        PrincipalInfo* v__,
        const Message* msg__,
        PickleIterator* iter__) -> bool
{
    typedef PrincipalInfo type__;
    int type;
    if ((!(Read((&(type)), msg__, iter__)))) {
        mozilla::ipc::UnionTypeReadError("PrincipalInfo");
        return false;
    }
    // Sentinel = 'PrincipalInfo'
    if ((!((msg__)->ReadSentinel(iter__, 4194518819)))) {
        mozilla::ipc::UnionTypeReadError("PrincipalInfo");
        return false;
    }

    switch (type) {
    case type__::TContentPrincipalInfo:
        {
            ContentPrincipalInfo tmp = ContentPrincipalInfo();
            (*(v__)) = tmp;
            if ((!(Read((&((v__)->get_ContentPrincipalInfo())), msg__, iter__)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            // Sentinel = 'TContentPrincipalInfo'
            if ((!((msg__)->ReadSentinel(iter__, 3677342258)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            return true;
        }
    case type__::TSystemPrincipalInfo:
        {
            SystemPrincipalInfo tmp = SystemPrincipalInfo();
            (*(v__)) = tmp;
            if ((!(Read((&((v__)->get_SystemPrincipalInfo())), msg__, iter__)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            // Sentinel = 'TSystemPrincipalInfo'
            if ((!((msg__)->ReadSentinel(iter__, 3590603679)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            return true;
        }
    case type__::TNullPrincipalInfo:
        {
            NullPrincipalInfo tmp = NullPrincipalInfo();
            (*(v__)) = tmp;
            if ((!(Read((&((v__)->get_NullPrincipalInfo())), msg__, iter__)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            // Sentinel = 'TNullPrincipalInfo'
            if ((!((msg__)->ReadSentinel(iter__, 3477774965)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            return true;
        }
    case type__::TExpandedPrincipalInfo:
        {
            ExpandedPrincipalInfo tmp = ExpandedPrincipalInfo();
            (*(v__)) = tmp;
            if ((!(Read((&((v__)->get_ExpandedPrincipalInfo())), msg__, iter__)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            // Sentinel = 'TExpandedPrincipalInfo'
            if ((!((msg__)->ReadSentinel(iter__, 589324917)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            return true;
        }
    default:
        {
            FatalError("unknown union type");
            return false;
        }
    }
}

auto PHttpChannelParent::Write(
        const JARURIParams& v__,
        Message* msg__) -> void
{
    Write((v__).jarFile(), msg__);
    // Sentinel = 'jarFile'
    (msg__)->WriteSentinel(1572070078);
    Write((v__).jarEntry(), msg__);
    // Sentinel = 'jarEntry'
    (msg__)->WriteSentinel(941016033);
    Write((v__).charset(), msg__);
    // Sentinel = 'charset'
    (msg__)->WriteSentinel(1551550891);
}

auto PHttpChannelParent::Read(
        JARURIParams* v__,
        const Message* msg__,
        PickleIterator* iter__) -> bool
{
    if ((!(Read((&((v__)->jarFile())), msg__, iter__)))) {
        FatalError("Error deserializing 'jarFile' (URIParams) member of 'JARURIParams'");
        return false;
    }
    // Sentinel = 'jarFile'
    if ((!((msg__)->ReadSentinel(iter__, 1572070078)))) {
        FatalError("Error deserializing 'jarFile' (URIParams) member of 'JARURIParams'");
        return false;
    }
    if ((!(Read((&((v__)->jarEntry())), msg__, iter__)))) {
        FatalError("Error deserializing 'jarEntry' (URIParams) member of 'JARURIParams'");
        return false;
    }
    // Sentinel = 'jarEntry'
    if ((!((msg__)->ReadSentinel(iter__, 941016033)))) {
        FatalError("Error deserializing 'jarEntry' (URIParams) member of 'JARURIParams'");
        return false;
    }
    if ((!(Read((&((v__)->charset())), msg__, iter__)))) {
        FatalError("Error deserializing 'charset' (nsCString) member of 'JARURIParams'");
        return false;
    }
    // Sentinel = 'charset'
    if ((!((msg__)->ReadSentinel(iter__, 1551550891)))) {
        FatalError("Error deserializing 'charset' (nsCString) member of 'JARURIParams'");
        return false;
    }
    return true;
}

auto PHttpChannelParent::Write(
        const ContentPrincipalInfo& v__,
        Message* msg__) -> void
{
    Write((v__).attrs(), msg__);
    // Sentinel = 'attrs'
    (msg__)->WriteSentinel(3014987797);
    Write((v__).originNoSuffix(), msg__);
    // Sentinel = 'originNoSuffix'
    (msg__)->WriteSentinel(2833071422);
    Write((v__).spec(), msg__);
    // Sentinel = 'spec'
    (msg__)->WriteSentinel(1630740541);
}

auto PHttpChannelParent::Read(
        ContentPrincipalInfo* v__,
        const Message* msg__,
        PickleIterator* iter__) -> bool
{
    if ((!(Read((&((v__)->attrs())), msg__, iter__)))) {
        FatalError("Error deserializing 'attrs' (PrincipalOriginAttributes) member of 'ContentPrincipalInfo'");
        return false;
    }
    // Sentinel = 'attrs'
    if ((!((msg__)->ReadSentinel(iter__, 3014987797)))) {
        FatalError("Error deserializing 'attrs' (PrincipalOriginAttributes) member of 'ContentPrincipalInfo'");
        return false;
    }
    if ((!(Read((&((v__)->originNoSuffix())), msg__, iter__)))) {
        FatalError("Error deserializing 'originNoSuffix' (ContentPrincipalInfoOriginNoSuffix) member of 'ContentPrincipalInfo'");
        return false;
    }
    // Sentinel = 'originNoSuffix'
    if ((!((msg__)->ReadSentinel(iter__, 2833071422)))) {
        FatalError("Error deserializing 'originNoSuffix' (ContentPrincipalInfoOriginNoSuffix) member of 'ContentPrincipalInfo'");
        return false;
    }
    if ((!(Read((&((v__)->spec())), msg__, iter__)))) {
        FatalError("Error deserializing 'spec' (nsCString) member of 'ContentPrincipalInfo'");
        return false;
    }
    // Sentinel = 'spec'
    if ((!((msg__)->ReadSentinel(iter__, 1630740541)))) {
        FatalError("Error deserializing 'spec' (nsCString) member of 'ContentPrincipalInfo'");
        return false;
    }
    return true;
}

auto PHttpChannelParent::Write(
        const SimpleURIParams& v__,
        Message* msg__) -> void
{
    Write((v__).scheme(), msg__);
    // Sentinel = 'scheme'
    (msg__)->WriteSentinel(3619238715);
    Write((v__).path(), msg__);
    // Sentinel = 'path'
    (msg__)->WriteSentinel(913629401);
    Write((v__).ref(), msg__);
    // Sentinel = 'ref'
    (msg__)->WriteSentinel(2626476732);
    Write((v__).query(), msg__);
    // Sentinel = 'query'
    (msg__)->WriteSentinel(4249802777);
    Write((v__).isMutable(), msg__);
    // Sentinel = 'isMutable'
    (msg__)->WriteSentinel(3552466783);
}

auto PHttpChannelParent::Read(
        SimpleURIParams* v__,
        const Message* msg__,
        PickleIterator* iter__) -> bool
{
    if ((!(Read((&((v__)->scheme())), msg__, iter__)))) {
        FatalError("Error deserializing 'scheme' (nsCString) member of 'SimpleURIParams'");
        return false;
    }
    // Sentinel = 'scheme'
    if ((!((msg__)->ReadSentinel(iter__, 3619238715)))) {
        FatalError("Error deserializing 'scheme' (nsCString) member of 'SimpleURIParams'");
        return false;
    }
    if ((!(Read((&((v__)->path())), msg__, iter__)))) {
        FatalError("Error deserializing 'path' (nsCString) member of 'SimpleURIParams'");
        return false;
    }
    // Sentinel = 'path'
    if ((!((msg__)->ReadSentinel(iter__, 913629401)))) {
        FatalError("Error deserializing 'path' (nsCString) member of 'SimpleURIParams'");
        return false;
    }
    if ((!(Read((&((v__)->ref())), msg__, iter__)))) {
        FatalError("Error deserializing 'ref' (nsCString) member of 'SimpleURIParams'");
        return false;
    }
    // Sentinel = 'ref'
    if ((!((msg__)->ReadSentinel(iter__, 2626476732)))) {
        FatalError("Error deserializing 'ref' (nsCString) member of 'SimpleURIParams'");
        return false;
    }
    if ((!(Read((&((v__)->query())), msg__, iter__)))) {
        FatalError("Error deserializing 'query' (nsCString) member of 'SimpleURIParams'");
        return false;
    }
    // Sentinel = 'query'
    if ((!((msg__)->ReadSentinel(iter__, 4249802777)))) {
        FatalError("Error deserializing 'query' (nsCString) member of 'SimpleURIParams'");
        return false;
    }
    if ((!(Read((&((v__)->isMutable())), msg__, iter__)))) {
        FatalError("Error deserializing 'isMutable' (bool) member of 'SimpleURIParams'");
        return false;
    }
    // Sentinel = 'isMutable'
    if ((!((msg__)->ReadSentinel(iter__, 3552466783)))) {
        FatalError("Error deserializing 'isMutable' (bool) member of 'SimpleURIParams'");
        return false;
    }
    return true;
}

auto PHttpChannelParent::Write(
        const NullPrincipalURIParams& v__,
        Message* msg__) -> void
{
}

auto PHttpChannelParent::Read(
        NullPrincipalURIParams* v__,
        const Message* msg__,
        PickleIterator* iter__) -> bool
{
    return true;
}

auto PHttpChannelParent::Write(
        const IconURIParams& v__,
        Message* msg__) -> void
{
    Write((v__).uri(), msg__);
    // Sentinel = 'uri'
    (msg__)->WriteSentinel(1453210605);
    Write((v__).size(), msg__);
    // Sentinel = 'size'
    (msg__)->WriteSentinel(931048223);
    Write((v__).contentType(), msg__);
    // Sentinel = 'contentType'
    (msg__)->WriteSentinel(2092571716);
    Write((v__).fileName(), msg__);
    // Sentinel = 'fileName'
    (msg__)->WriteSentinel(3833449039);
    Write((v__).stockIcon(), msg__);
    // Sentinel = 'stockIcon'
    (msg__)->WriteSentinel(3601770784);
    Write((v__).iconSize(), msg__);
    // Sentinel = 'iconSize'
    (msg__)->WriteSentinel(2585310920);
    Write((v__).iconState(), msg__);
    // Sentinel = 'iconState'
    (msg__)->WriteSentinel(3444306207);
}

auto PHttpChannelParent::Read(
        IconURIParams* v__,
        const Message* msg__,
        PickleIterator* iter__) -> bool
{
    if ((!(Read((&((v__)->uri())), msg__, iter__)))) {
        FatalError("Error deserializing 'uri' (OptionalURIParams) member of 'IconURIParams'");
        return false;
    }
    // Sentinel = 'uri'
    if ((!((msg__)->ReadSentinel(iter__, 1453210605)))) {
        FatalError("Error deserializing 'uri' (OptionalURIParams) member of 'IconURIParams'");
        return false;
    }
    if ((!(Read((&((v__)->size())), msg__, iter__)))) {
        FatalError("Error deserializing 'size' (uint32_t) member of 'IconURIParams'");
        return false;
    }
    // Sentinel = 'size'
    if ((!((msg__)->ReadSentinel(iter__, 931048223)))) {
        FatalError("Error deserializing 'size' (uint32_t) member of 'IconURIParams'");
        return false;
    }
    if ((!(Read((&((v__)->contentType())), msg__, iter__)))) {
        FatalError("Error deserializing 'contentType' (nsCString) member of 'IconURIParams'");
        return false;
    }
    // Sentinel = 'contentType'
    if ((!((msg__)->ReadSentinel(iter__, 2092571716)))) {
        FatalError("Error deserializing 'contentType' (nsCString) member of 'IconURIParams'");
        return false;
    }
    if ((!(Read((&((v__)->fileName())), msg__, iter__)))) {
        FatalError("Error deserializing 'fileName' (nsCString) member of 'IconURIParams'");
        return false;
    }
    // Sentinel = 'fileName'
    if ((!((msg__)->ReadSentinel(iter__, 3833449039)))) {
        FatalError("Error deserializing 'fileName' (nsCString) member of 'IconURIParams'");
        return false;
    }
    if ((!(Read((&((v__)->stockIcon())), msg__, iter__)))) {
        FatalError("Error deserializing 'stockIcon' (nsCString) member of 'IconURIParams'");
        return false;
    }
    // Sentinel = 'stockIcon'
    if ((!((msg__)->ReadSentinel(iter__, 3601770784)))) {
        FatalError("Error deserializing 'stockIcon' (nsCString) member of 'IconURIParams'");
        return false;
    }
    if ((!(Read((&((v__)->iconSize())), msg__, iter__)))) {
        FatalError("Error deserializing 'iconSize' (int32_t) member of 'IconURIParams'");
        return false;
    }
    // Sentinel = 'iconSize'
    if ((!((msg__)->ReadSentinel(iter__, 2585310920)))) {
        FatalError("Error deserializing 'iconSize' (int32_t) member of 'IconURIParams'");
        return false;
    }
    if ((!(Read((&((v__)->iconState())), msg__, iter__)))) {
        FatalError("Error deserializing 'iconState' (int32_t) member of 'IconURIParams'");
        return false;
    }
    // Sentinel = 'iconState'
    if ((!((msg__)->ReadSentinel(iter__, 3444306207)))) {
        FatalError("Error deserializing 'iconState' (int32_t) member of 'IconURIParams'");
        return false;
    }
    return true;
}

auto PHttpChannelParent::Write(
        const StandardURLSegment& v__,
        Message* msg__) -> void
{
    Write((v__).position(), msg__);
    // Sentinel = 'position'
    (msg__)->WriteSentinel(50847225);
    Write((v__).length(), msg__);
    // Sentinel = 'length'
    (msg__)->WriteSentinel(1726618354);
}

auto PHttpChannelParent::Read(
        StandardURLSegment* v__,
        const Message* msg__,
        PickleIterator* iter__) -> bool
{
    if ((!(Read((&((v__)->position())), msg__, iter__)))) {
        FatalError("Error deserializing 'position' (uint32_t) member of 'StandardURLSegment'");
        return false;
    }
    // Sentinel = 'position'
    if ((!((msg__)->ReadSentinel(iter__, 50847225)))) {
        FatalError("Error deserializing 'position' (uint32_t) member of 'StandardURLSegment'");
        return false;
    }
    if ((!(Read((&((v__)->length())), msg__, iter__)))) {
        FatalError("Error deserializing 'length' (int32_t) member of 'StandardURLSegment'");
        return false;
    }
    // Sentinel = 'length'
    if ((!((msg__)->ReadSentinel(iter__, 1726618354)))) {
        FatalError("Error deserializing 'length' (int32_t) member of 'StandardURLSegment'");
        return false;
    }
    return true;
}

auto PHttpChannelParent::Write(
        const JSURIParams& v__,
        Message* msg__) -> void
{
    Write((v__).simpleParams(), msg__);
    // Sentinel = 'simpleParams'
    (msg__)->WriteSentinel(3404291700);
    Write((v__).baseURI(), msg__);
    // Sentinel = 'baseURI'
    (msg__)->WriteSentinel(1836705256);
}

auto PHttpChannelParent::Read(
        JSURIParams* v__,
        const Message* msg__,
        PickleIterator* iter__) -> bool
{
    if ((!(Read((&((v__)->simpleParams())), msg__, iter__)))) {
        FatalError("Error deserializing 'simpleParams' (SimpleURIParams) member of 'JSURIParams'");
        return false;
    }
    // Sentinel = 'simpleParams'
    if ((!((msg__)->ReadSentinel(iter__, 3404291700)))) {
        FatalError("Error deserializing 'simpleParams' (SimpleURIParams) member of 'JSURIParams'");
        return false;
    }
    if ((!(Read((&((v__)->baseURI())), msg__, iter__)))) {
        FatalError("Error deserializing 'baseURI' (OptionalURIParams) member of 'JSURIParams'");
        return false;
    }
    // Sentinel = 'baseURI'
    if ((!((msg__)->ReadSentinel(iter__, 1836705256)))) {
        FatalError("Error deserializing 'baseURI' (OptionalURIParams) member of 'JSURIParams'");
        return false;
    }
    return true;
}

auto PHttpChannelParent::Write(
        const NullPrincipalInfo& v__,
        Message* msg__) -> void
{
    Write((v__).attrs(), msg__);
    // Sentinel = 'attrs'
    (msg__)->WriteSentinel(3014987797);
}

auto PHttpChannelParent::Read(
        NullPrincipalInfo* v__,
        const Message* msg__,
        PickleIterator* iter__) -> bool
{
    if ((!(Read((&((v__)->attrs())), msg__, iter__)))) {
        FatalError("Error deserializing 'attrs' (PrincipalOriginAttributes) member of 'NullPrincipalInfo'");
        return false;
    }
    // Sentinel = 'attrs'
    if ((!((msg__)->ReadSentinel(iter__, 3014987797)))) {
        FatalError("Error deserializing 'attrs' (PrincipalOriginAttributes) member of 'NullPrincipalInfo'");
        return false;
    }
    return true;
}

auto PHttpChannelParent::Write(
        const OptionalCorsPreflightArgs& v__,
        Message* msg__) -> void
{
    typedef OptionalCorsPreflightArgs type__;
    Write(int((v__).type()), msg__);
    // Sentinel = 'OptionalCorsPreflightArgs'
    (msg__)->WriteSentinel(3238697490);

    switch ((v__).type()) {
    case type__::Tvoid_t:
        {
            Write((v__).get_void_t(), msg__);
            // Sentinel = 'Tvoid_t'
            (msg__)->WriteSentinel(3041273328);
            return;
        }
    case type__::TCorsPreflightArgs:
        {
            Write((v__).get_CorsPreflightArgs(), msg__);
            // Sentinel = 'TCorsPreflightArgs'
            (msg__)->WriteSentinel(2263898105);
            return;
        }
    default:
        {
            FatalError("unknown union type");
            return;
        }
    }
}

auto PHttpChannelParent::Read(
        OptionalCorsPreflightArgs* v__,
        const Message* msg__,
        PickleIterator* iter__) -> bool
{
    typedef OptionalCorsPreflightArgs type__;
    int type;
    if ((!(Read((&(type)), msg__, iter__)))) {
        mozilla::ipc::UnionTypeReadError("OptionalCorsPreflightArgs");
        return false;
    }
    // Sentinel = 'OptionalCorsPreflightArgs'
    if ((!((msg__)->ReadSentinel(iter__, 3238697490)))) {
        mozilla::ipc::UnionTypeReadError("OptionalCorsPreflightArgs");
        return false;
    }

    switch (type) {
    case type__::Tvoid_t:
        {
            void_t tmp = void_t();
            (*(v__)) = tmp;
            if ((!(Read((&((v__)->get_void_t())), msg__, iter__)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            // Sentinel = 'Tvoid_t'
            if ((!((msg__)->ReadSentinel(iter__, 3041273328)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            return true;
        }
    case type__::TCorsPreflightArgs:
        {
            CorsPreflightArgs tmp = CorsPreflightArgs();
            (*(v__)) = tmp;
            if ((!(Read((&((v__)->get_CorsPreflightArgs())), msg__, iter__)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            // Sentinel = 'TCorsPreflightArgs'
            if ((!((msg__)->ReadSentinel(iter__, 2263898105)))) {
                FatalError("Error deserializing Union type");
                return false;
            }
            return true;
        }
    default:
        {
            FatalError("unknown union type");
            return false;
        }
    }
}



} // namespace net
} // namespace mozilla
