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

#ifndef PBackgroundSharedTypes_h
#define PBackgroundSharedTypes_h

#include "mozilla/Attributes.h"
#include "IPCMessageStart.h"
#include "mozilla/RefPtr.h"
#include "nsString.h"
#include "nsTArray.h"
#include "nsTHashtable.h"
#include "mozilla/MozPromise.h"
#include "mozilla/OperatorNewExtensions.h"
#include "mozilla/UniquePtr.h"
#include "mozilla/ipc/ByteBuf.h"
#include "mozilla/ipc/FileDescriptor.h"
#include "mozilla/ipc/IPCForwards.h"
#include "mozilla/ipc/Shmem.h"

// Headers for typedefs
#include "mozilla/dom/IntegrityPolicy.h"
#include "mozilla/ipc/BackgroundUtils.h"
#include "mozilla/ipc/IPDLStructMember.h"
#include "nsIContentSecurityPolicy.h"


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct ContentSecurityPolicy|
//
namespace mozilla {
namespace ipc {
class ContentSecurityPolicy final
{
private:
    typedef ::nsString nsString;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    ContentSecurityPolicy() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT ContentSecurityPolicy(
            const nsString& _policy,
            const bool& _reportOnlyFlag,
            const bool& _deliveredViaMetaTagFlag,
            const bool& _hasRequireTrustedTypesForDirective) :
        policy_(_policy),
        reportOnlyFlag_(_reportOnlyFlag),
        deliveredViaMetaTagFlag_(_deliveredViaMetaTagFlag),
        hasRequireTrustedTypesForDirective_(_hasRequireTrustedTypesForDirective)
    {
    }

    MOZ_IMPLICIT ContentSecurityPolicy(
            nsString&& _policy,
            bool&& _reportOnlyFlag,
            bool&& _deliveredViaMetaTagFlag,
            bool&& _hasRequireTrustedTypesForDirective) :
        policy_(std::move(_policy)),
        reportOnlyFlag_(std::move(_reportOnlyFlag)),
        deliveredViaMetaTagFlag_(std::move(_deliveredViaMetaTagFlag)),
        hasRequireTrustedTypesForDirective_(std::move(_hasRequireTrustedTypesForDirective))
    {
    }

    bool
    operator==(const ContentSecurityPolicy& _o) const;

    bool
    operator!=(const ContentSecurityPolicy& _o) const;

    nsString&
    policy()
    {
        return policy_;
    }
    const nsString&
    policy() const
    {
        return policy_;
    }

    bool&
    reportOnlyFlag()
    {
        return reportOnlyFlag_;
    }
    const bool&
    reportOnlyFlag() const
    {
        return reportOnlyFlag_;
    }

    bool&
    deliveredViaMetaTagFlag()
    {
        return deliveredViaMetaTagFlag_;
    }
    const bool&
    deliveredViaMetaTagFlag() const
    {
        return deliveredViaMetaTagFlag_;
    }

    bool&
    hasRequireTrustedTypesForDirective()
    {
        return hasRequireTrustedTypesForDirective_;
    }
    const bool&
    hasRequireTrustedTypesForDirective() const
    {
        return hasRequireTrustedTypesForDirective_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<nsString> policy_;
    ::mozilla::ipc::IPDLStructMember<bool> reportOnlyFlag_;
    ::mozilla::ipc::IPDLStructMember<bool> deliveredViaMetaTagFlag_;
    ::mozilla::ipc::IPDLStructMember<bool> hasRequireTrustedTypesForDirective_;
};
} // namespace ipc
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::ipc::ContentSecurityPolicy>
{
    typedef ::mozilla::ipc::ContentSecurityPolicy paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct ContentPrincipalInfo|
//
namespace mozilla {
namespace ipc {
class ContentPrincipalInfo final
{
private:
    typedef ::mozilla::OriginAttributes OriginAttributes;
    typedef ::nsCString nsCString;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    ContentPrincipalInfo() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT ContentPrincipalInfo(
            const OriginAttributes& _attrs,
            const nsCString& _originNoSuffix,
            const nsCString& _spec,
            const mozilla::Maybe<nsCString>& _domain,
            const nsCString& _baseDomain) :
        attrs_(_attrs),
        originNoSuffix_(_originNoSuffix),
        spec_(_spec),
        domain_(_domain),
        baseDomain_(_baseDomain)
    {
    }

    MOZ_IMPLICIT ContentPrincipalInfo(
            OriginAttributes&& _attrs,
            nsCString&& _originNoSuffix,
            nsCString&& _spec,
            mozilla::Maybe<nsCString>&& _domain,
            nsCString&& _baseDomain) :
        attrs_(std::move(_attrs)),
        originNoSuffix_(std::move(_originNoSuffix)),
        spec_(std::move(_spec)),
        domain_(std::move(_domain)),
        baseDomain_(std::move(_baseDomain))
    {
    }

    bool
    operator==(const ContentPrincipalInfo& _o) const;

    bool
    operator!=(const ContentPrincipalInfo& _o) const;

    OriginAttributes&
    attrs()
    {
        return attrs_;
    }
    const OriginAttributes&
    attrs() const
    {
        return attrs_;
    }

    nsCString&
    originNoSuffix()
    {
        return originNoSuffix_;
    }
    const nsCString&
    originNoSuffix() const
    {
        return originNoSuffix_;
    }

    nsCString&
    spec()
    {
        return spec_;
    }
    const nsCString&
    spec() const
    {
        return spec_;
    }

    mozilla::Maybe<nsCString>&
    domain()
    {
        return domain_;
    }
    const mozilla::Maybe<nsCString>&
    domain() const
    {
        return domain_;
    }

    nsCString&
    baseDomain()
    {
        return baseDomain_;
    }
    const nsCString&
    baseDomain() const
    {
        return baseDomain_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<OriginAttributes> attrs_;
    ::mozilla::ipc::IPDLStructMember<nsCString> originNoSuffix_;
    ::mozilla::ipc::IPDLStructMember<nsCString> spec_;
    ::mozilla::ipc::IPDLStructMember<mozilla::Maybe<nsCString>> domain_;
    ::mozilla::ipc::IPDLStructMember<nsCString> baseDomain_;
};
} // namespace ipc
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::ipc::ContentPrincipalInfo>
{
    typedef ::mozilla::ipc::ContentPrincipalInfo paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct SystemPrincipalInfo|
//
namespace mozilla {
namespace ipc {
class SystemPrincipalInfo final
{
private:

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    SystemPrincipalInfo() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    bool
    operator==(const SystemPrincipalInfo& _o) const;

    bool
    operator!=(const SystemPrincipalInfo& _o) const;

private:
};
} // namespace ipc
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::ipc::SystemPrincipalInfo>
{
    typedef ::mozilla::ipc::SystemPrincipalInfo paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct NullPrincipalInfo|
//
namespace mozilla {
namespace ipc {
class NullPrincipalInfo final
{
private:
    typedef ::mozilla::OriginAttributes OriginAttributes;
    typedef ::nsCString nsCString;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    NullPrincipalInfo() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT NullPrincipalInfo(
            const OriginAttributes& _attrs,
            const nsCString& _spec) :
        attrs_(_attrs),
        spec_(_spec)
    {
    }

    MOZ_IMPLICIT NullPrincipalInfo(
            OriginAttributes&& _attrs,
            nsCString&& _spec) :
        attrs_(std::move(_attrs)),
        spec_(std::move(_spec))
    {
    }

    bool
    operator==(const NullPrincipalInfo& _o) const;

    bool
    operator!=(const NullPrincipalInfo& _o) const;

    OriginAttributes&
    attrs()
    {
        return attrs_;
    }
    const OriginAttributes&
    attrs() const
    {
        return attrs_;
    }

    nsCString&
    spec()
    {
        return spec_;
    }
    const nsCString&
    spec() const
    {
        return spec_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<OriginAttributes> attrs_;
    ::mozilla::ipc::IPDLStructMember<nsCString> spec_;
};
} // namespace ipc
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::ipc::NullPrincipalInfo>
{
    typedef ::mozilla::ipc::NullPrincipalInfo paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC

namespace mozilla {
namespace ipc {
class ExpandedPrincipalInfo;
} // namespace ipc
} // namespace mozilla

//-----------------------------------------------------------------------------
// Declaration of the IPDL type |union PrincipalInfo|
//
namespace mozilla {
namespace ipc {
class PrincipalInfo final
{
public:
    enum Type {
        T__None,
        TContentPrincipalInfo = 1,
        TSystemPrincipalInfo,
        TNullPrincipalInfo,
        TExpandedPrincipalInfo,
        T__Last = TExpandedPrincipalInfo
    };

private:
    typedef ::mozilla::ipc::ContentPrincipalInfo ContentPrincipalInfo;
    typedef ::mozilla::ipc::SystemPrincipalInfo SystemPrincipalInfo;
    typedef ::mozilla::ipc::NullPrincipalInfo NullPrincipalInfo;
    typedef ::mozilla::ipc::ExpandedPrincipalInfo ExpandedPrincipalInfo;
    typedef ContentPrincipalInfo ContentPrincipalInfo__tdef;
    typedef SystemPrincipalInfo SystemPrincipalInfo__tdef;
    typedef NullPrincipalInfo NullPrincipalInfo__tdef;
    typedef ExpandedPrincipalInfo* ExpandedPrincipalInfo__tdef;

    ContentPrincipalInfo*
    ptr_ContentPrincipalInfo()
    {
        return (&(mVContentPrincipalInfo));
    }
    const ContentPrincipalInfo*
    constptr_ContentPrincipalInfo() const
    {
        return (&(mVContentPrincipalInfo));
    }
    SystemPrincipalInfo*
    ptr_SystemPrincipalInfo()
    {
        return (&(mVSystemPrincipalInfo));
    }
    const SystemPrincipalInfo*
    constptr_SystemPrincipalInfo() const
    {
        return (&(mVSystemPrincipalInfo));
    }
    NullPrincipalInfo*
    ptr_NullPrincipalInfo()
    {
        return (&(mVNullPrincipalInfo));
    }
    const NullPrincipalInfo*
    constptr_NullPrincipalInfo() const
    {
        return (&(mVNullPrincipalInfo));
    }
    ExpandedPrincipalInfo*&
    ptr_ExpandedPrincipalInfo()
    {
        return mVExpandedPrincipalInfo;
    }
    const ExpandedPrincipalInfo*
    constptr_ExpandedPrincipalInfo() const
    {
        return mVExpandedPrincipalInfo;
    }

    void
    MaybeDestroy();

    void
    AssertSanity() const
    {
        MOZ_RELEASE_ASSERT((T__None) <= (mType), "invalid type tag");
        MOZ_RELEASE_ASSERT((mType) <= (T__Last), "invalid type tag");
    }
    void
    AssertSanity(Type aType) const
    {
        AssertSanity();
        MOZ_RELEASE_ASSERT((mType) == (aType), "unexpected type tag");
    }

public:
    MOZ_IMPLICIT PrincipalInfo() :
        mType(T__None)
    {
    }

    MOZ_IMPLICIT PrincipalInfo(const ContentPrincipalInfo& aOther);

    MOZ_IMPLICIT PrincipalInfo(ContentPrincipalInfo&& aOther);

    MOZ_IMPLICIT PrincipalInfo(const SystemPrincipalInfo& aOther);

    MOZ_IMPLICIT PrincipalInfo(SystemPrincipalInfo&& aOther);

    MOZ_IMPLICIT PrincipalInfo(const NullPrincipalInfo& aOther);

    MOZ_IMPLICIT PrincipalInfo(NullPrincipalInfo&& aOther);

    MOZ_IMPLICIT PrincipalInfo(const ExpandedPrincipalInfo& aOther);

    MOZ_IMPLICIT PrincipalInfo(ExpandedPrincipalInfo&& aOther);

    MOZ_IMPLICIT PrincipalInfo(const PrincipalInfo& aOther);

    MOZ_IMPLICIT PrincipalInfo(PrincipalInfo&& aOther);

    ~PrincipalInfo();

    Type
    type() const
    {
        return mType;
    }

    PrincipalInfo&
    operator=(const ContentPrincipalInfo& aRhs);

    PrincipalInfo&
    operator=(ContentPrincipalInfo&& aRhs);

    PrincipalInfo&
    operator=(const SystemPrincipalInfo& aRhs);

    PrincipalInfo&
    operator=(SystemPrincipalInfo&& aRhs);

    PrincipalInfo&
    operator=(const NullPrincipalInfo& aRhs);

    PrincipalInfo&
    operator=(NullPrincipalInfo&& aRhs);

    PrincipalInfo&
    operator=(const ExpandedPrincipalInfo& aRhs);

    PrincipalInfo&
    operator=(ExpandedPrincipalInfo&& aRhs);

    PrincipalInfo&
    operator=(const PrincipalInfo& aRhs);

    PrincipalInfo&
    operator=(PrincipalInfo&& aRhs);

    bool
    operator==(const ContentPrincipalInfo& aRhs) const;

    bool
    operator==(const SystemPrincipalInfo& aRhs) const;

    bool
    operator==(const NullPrincipalInfo& aRhs) const;

    bool
    operator==(const ExpandedPrincipalInfo& aRhs) const;

    bool
    operator==(const PrincipalInfo& aRhs) const;

    ContentPrincipalInfo&
    get_ContentPrincipalInfo()
    {
        AssertSanity(TContentPrincipalInfo);
        return (*(ptr_ContentPrincipalInfo()));
    }
    const ContentPrincipalInfo&
    get_ContentPrincipalInfo() const
    {
        AssertSanity(TContentPrincipalInfo);
        return (*(constptr_ContentPrincipalInfo()));
    }
    operator ContentPrincipalInfo&()
    {
        return get_ContentPrincipalInfo();
    }
    operator const ContentPrincipalInfo&() const
    {
        return get_ContentPrincipalInfo();
    }

    SystemPrincipalInfo&
    get_SystemPrincipalInfo()
    {
        AssertSanity(TSystemPrincipalInfo);
        return (*(ptr_SystemPrincipalInfo()));
    }
    const SystemPrincipalInfo&
    get_SystemPrincipalInfo() const
    {
        AssertSanity(TSystemPrincipalInfo);
        return (*(constptr_SystemPrincipalInfo()));
    }
    operator SystemPrincipalInfo&()
    {
        return get_SystemPrincipalInfo();
    }
    operator const SystemPrincipalInfo&() const
    {
        return get_SystemPrincipalInfo();
    }

    NullPrincipalInfo&
    get_NullPrincipalInfo()
    {
        AssertSanity(TNullPrincipalInfo);
        return (*(ptr_NullPrincipalInfo()));
    }
    const NullPrincipalInfo&
    get_NullPrincipalInfo() const
    {
        AssertSanity(TNullPrincipalInfo);
        return (*(constptr_NullPrincipalInfo()));
    }
    operator NullPrincipalInfo&()
    {
        return get_NullPrincipalInfo();
    }
    operator const NullPrincipalInfo&() const
    {
        return get_NullPrincipalInfo();
    }

    ExpandedPrincipalInfo&
    get_ExpandedPrincipalInfo()
    {
        AssertSanity(TExpandedPrincipalInfo);
        return (*(ptr_ExpandedPrincipalInfo()));
    }
    const ExpandedPrincipalInfo&
    get_ExpandedPrincipalInfo() const
    {
        AssertSanity(TExpandedPrincipalInfo);
        return (*(constptr_ExpandedPrincipalInfo()));
    }
    operator ExpandedPrincipalInfo&()
    {
        return get_ExpandedPrincipalInfo();
    }
    operator const ExpandedPrincipalInfo&() const
    {
        return get_ExpandedPrincipalInfo();
    }

private:
    union {
        ContentPrincipalInfo mVContentPrincipalInfo;
        SystemPrincipalInfo mVSystemPrincipalInfo;
        NullPrincipalInfo mVNullPrincipalInfo;
        ExpandedPrincipalInfo* mVExpandedPrincipalInfo;
    };
    Type mType;
};
} // namespace ipc
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::ipc::PrincipalInfo>
{
    typedef ::mozilla::ipc::PrincipalInfo paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct ExpandedPrincipalInfo|
//
namespace mozilla {
namespace ipc {
class ExpandedPrincipalInfo final
{
private:
    typedef ::mozilla::OriginAttributes OriginAttributes;
    typedef ::mozilla::ipc::PrincipalInfo PrincipalInfo;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    ExpandedPrincipalInfo() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT ExpandedPrincipalInfo(
            const OriginAttributes& _attrs,
            const nsTArray<PrincipalInfo>& _allowlist) :
        attrs_(_attrs),
        allowlist_(_allowlist)
    {
    }

    MOZ_IMPLICIT ExpandedPrincipalInfo(
            OriginAttributes&& _attrs,
            nsTArray<PrincipalInfo>&& _allowlist) :
        attrs_(std::move(_attrs)),
        allowlist_(std::move(_allowlist))
    {
    }

    bool
    operator==(const ExpandedPrincipalInfo& _o) const;

    bool
    operator!=(const ExpandedPrincipalInfo& _o) const;

    OriginAttributes&
    attrs()
    {
        return attrs_;
    }
    const OriginAttributes&
    attrs() const
    {
        return attrs_;
    }

    nsTArray<PrincipalInfo>&
    allowlist()
    {
        return allowlist_;
    }
    const nsTArray<PrincipalInfo>&
    allowlist() const
    {
        return allowlist_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<OriginAttributes> attrs_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<PrincipalInfo>> allowlist_;
};
} // namespace ipc
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::ipc::ExpandedPrincipalInfo>
{
    typedef ::mozilla::ipc::ExpandedPrincipalInfo paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct CSPInfo|
//
namespace mozilla {
namespace ipc {
class CSPInfo final
{
private:
    typedef ::mozilla::ipc::ContentSecurityPolicy ContentSecurityPolicy;
    typedef ::mozilla::ipc::PrincipalInfo PrincipalInfo;
    typedef ::nsCString nsCString;
    typedef ::uint64_t uint64_t;
    typedef ::nsIContentSecurityPolicy::RequireTrustedTypesForDirectiveState RequireTrustedTypesForDirectiveState;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    CSPInfo() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT CSPInfo(
            const nsTArray<ContentSecurityPolicy>& _policyInfos,
            const PrincipalInfo& _requestPrincipalInfo,
            const nsCString& _selfURISpec,
            const nsCString& _referrer,
            const uint64_t& _innerWindowID,
            const RequireTrustedTypesForDirectiveState& _requireTrustedTypesForDirectiveState,
            const bool& _skipAllowInlineStyleCheck) :
        policyInfos_(_policyInfos),
        requestPrincipalInfo_(_requestPrincipalInfo),
        selfURISpec_(_selfURISpec),
        referrer_(_referrer),
        requireTrustedTypesForDirectiveState_(_requireTrustedTypesForDirectiveState),
        skipAllowInlineStyleCheck_(_skipAllowInlineStyleCheck),
        innerWindowID_(_innerWindowID)
    {
    }

    MOZ_IMPLICIT CSPInfo(
            nsTArray<ContentSecurityPolicy>&& _policyInfos,
            PrincipalInfo&& _requestPrincipalInfo,
            nsCString&& _selfURISpec,
            nsCString&& _referrer,
            uint64_t&& _innerWindowID,
            RequireTrustedTypesForDirectiveState&& _requireTrustedTypesForDirectiveState,
            bool&& _skipAllowInlineStyleCheck) :
        policyInfos_(std::move(_policyInfos)),
        requestPrincipalInfo_(std::move(_requestPrincipalInfo)),
        selfURISpec_(std::move(_selfURISpec)),
        referrer_(std::move(_referrer)),
        requireTrustedTypesForDirectiveState_(std::move(_requireTrustedTypesForDirectiveState)),
        skipAllowInlineStyleCheck_(std::move(_skipAllowInlineStyleCheck)),
        innerWindowID_(std::move(_innerWindowID))
    {
    }

    bool
    operator==(const CSPInfo& _o) const;

    bool
    operator!=(const CSPInfo& _o) const;

    nsTArray<ContentSecurityPolicy>&
    policyInfos()
    {
        return policyInfos_;
    }
    const nsTArray<ContentSecurityPolicy>&
    policyInfos() const
    {
        return policyInfos_;
    }

    PrincipalInfo&
    requestPrincipalInfo()
    {
        return requestPrincipalInfo_;
    }
    const PrincipalInfo&
    requestPrincipalInfo() const
    {
        return requestPrincipalInfo_;
    }

    nsCString&
    selfURISpec()
    {
        return selfURISpec_;
    }
    const nsCString&
    selfURISpec() const
    {
        return selfURISpec_;
    }

    nsCString&
    referrer()
    {
        return referrer_;
    }
    const nsCString&
    referrer() const
    {
        return referrer_;
    }

    uint64_t&
    innerWindowID()
    {
        return innerWindowID_;
    }
    const uint64_t&
    innerWindowID() const
    {
        return innerWindowID_;
    }

    RequireTrustedTypesForDirectiveState&
    requireTrustedTypesForDirectiveState()
    {
        return requireTrustedTypesForDirectiveState_;
    }
    const RequireTrustedTypesForDirectiveState&
    requireTrustedTypesForDirectiveState() const
    {
        return requireTrustedTypesForDirectiveState_;
    }

    bool&
    skipAllowInlineStyleCheck()
    {
        return skipAllowInlineStyleCheck_;
    }
    const bool&
    skipAllowInlineStyleCheck() const
    {
        return skipAllowInlineStyleCheck_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<ContentSecurityPolicy>> policyInfos_;
    ::mozilla::ipc::IPDLStructMember<PrincipalInfo> requestPrincipalInfo_;
    ::mozilla::ipc::IPDLStructMember<nsCString> selfURISpec_;
    ::mozilla::ipc::IPDLStructMember<nsCString> referrer_;
    ::mozilla::ipc::IPDLStructMember<RequireTrustedTypesForDirectiveState> requireTrustedTypesForDirectiveState_;
    ::mozilla::ipc::IPDLStructMember<bool> skipAllowInlineStyleCheck_;
    ::mozilla::ipc::IPDLStructMember<uint64_t> innerWindowID_;
};
} // namespace ipc
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::ipc::CSPInfo>
{
    typedef ::mozilla::ipc::CSPInfo paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct IntegrityPolicyEntry|
//
namespace mozilla {
namespace ipc {
class IntegrityPolicyEntry final
{
private:
    typedef ::mozilla::dom::IntegrityPolicy::Sources Sources;
    typedef ::mozilla::dom::IntegrityPolicy::Destinations Destinations;
    typedef ::nsCString nsCString;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    IntegrityPolicyEntry() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT IntegrityPolicyEntry(
            const Sources& _sources,
            const Destinations& _destinations,
            const nsTArray<nsCString>& _endpoints) :
        sources_(_sources),
        destinations_(_destinations),
        endpoints_(_endpoints)
    {
    }

    MOZ_IMPLICIT IntegrityPolicyEntry(
            Sources&& _sources,
            Destinations&& _destinations,
            nsTArray<nsCString>&& _endpoints) :
        sources_(std::move(_sources)),
        destinations_(std::move(_destinations)),
        endpoints_(std::move(_endpoints))
    {
    }

    bool
    operator==(const IntegrityPolicyEntry& _o) const;

    bool
    operator!=(const IntegrityPolicyEntry& _o) const;

    Sources&
    sources()
    {
        return sources_;
    }
    const Sources&
    sources() const
    {
        return sources_;
    }

    Destinations&
    destinations()
    {
        return destinations_;
    }
    const Destinations&
    destinations() const
    {
        return destinations_;
    }

    nsTArray<nsCString>&
    endpoints()
    {
        return endpoints_;
    }
    const nsTArray<nsCString>&
    endpoints() const
    {
        return endpoints_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<Sources> sources_;
    ::mozilla::ipc::IPDLStructMember<Destinations> destinations_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<nsCString>> endpoints_;
};
} // namespace ipc
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::ipc::IntegrityPolicyEntry>
{
    typedef ::mozilla::ipc::IntegrityPolicyEntry paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct IntegrityPolicyArgs|
//
namespace mozilla {
namespace ipc {
class IntegrityPolicyArgs final
{
private:
    typedef ::mozilla::ipc::IntegrityPolicyEntry IntegrityPolicyEntry;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    IntegrityPolicyArgs() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT IntegrityPolicyArgs(
            const mozilla::Maybe<IntegrityPolicyEntry>& _enforcement,
            const mozilla::Maybe<IntegrityPolicyEntry>& _reportOnly) :
        enforcement_(_enforcement),
        reportOnly_(_reportOnly)
    {
    }

    MOZ_IMPLICIT IntegrityPolicyArgs(
            mozilla::Maybe<IntegrityPolicyEntry>&& _enforcement,
            mozilla::Maybe<IntegrityPolicyEntry>&& _reportOnly) :
        enforcement_(std::move(_enforcement)),
        reportOnly_(std::move(_reportOnly))
    {
    }

    bool
    operator==(const IntegrityPolicyArgs& _o) const;

    bool
    operator!=(const IntegrityPolicyArgs& _o) const;

    mozilla::Maybe<IntegrityPolicyEntry>&
    enforcement()
    {
        return enforcement_;
    }
    const mozilla::Maybe<IntegrityPolicyEntry>&
    enforcement() const
    {
        return enforcement_;
    }

    mozilla::Maybe<IntegrityPolicyEntry>&
    reportOnly()
    {
        return reportOnly_;
    }
    const mozilla::Maybe<IntegrityPolicyEntry>&
    reportOnly() const
    {
        return reportOnly_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<mozilla::Maybe<IntegrityPolicyEntry>> enforcement_;
    ::mozilla::ipc::IPDLStructMember<mozilla::Maybe<IntegrityPolicyEntry>> reportOnly_;
};
} // namespace ipc
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::ipc::IntegrityPolicyArgs>
{
    typedef ::mozilla::ipc::IntegrityPolicyArgs paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct PolicyContainerArgs|
//
namespace mozilla {
namespace ipc {
class PolicyContainerArgs final
{
private:
    typedef ::mozilla::ipc::CSPInfo CSPInfo;
    typedef ::mozilla::ipc::IntegrityPolicyArgs IntegrityPolicyArgs;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    PolicyContainerArgs() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT PolicyContainerArgs(
            const mozilla::Maybe<CSPInfo>& _csp,
            const mozilla::Maybe<IntegrityPolicyArgs>& _integrityPolicy) :
        csp_(_csp),
        integrityPolicy_(_integrityPolicy)
    {
    }

    MOZ_IMPLICIT PolicyContainerArgs(
            mozilla::Maybe<CSPInfo>&& _csp,
            mozilla::Maybe<IntegrityPolicyArgs>&& _integrityPolicy) :
        csp_(std::move(_csp)),
        integrityPolicy_(std::move(_integrityPolicy))
    {
    }

    bool
    operator==(const PolicyContainerArgs& _o) const;

    bool
    operator!=(const PolicyContainerArgs& _o) const;

    mozilla::Maybe<CSPInfo>&
    csp()
    {
        return csp_;
    }
    const mozilla::Maybe<CSPInfo>&
    csp() const
    {
        return csp_;
    }

    mozilla::Maybe<IntegrityPolicyArgs>&
    integrityPolicy()
    {
        return integrityPolicy_;
    }
    const mozilla::Maybe<IntegrityPolicyArgs>&
    integrityPolicy() const
    {
        return integrityPolicy_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<mozilla::Maybe<CSPInfo>> csp_;
    ::mozilla::ipc::IPDLStructMember<mozilla::Maybe<IntegrityPolicyArgs>> integrityPolicy_;
};
} // namespace ipc
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::ipc::PolicyContainerArgs>
{
    typedef ::mozilla::ipc::PolicyContainerArgs paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct WebTransportHash|
//
namespace mozilla {
namespace ipc {
class WebTransportHash final
{
private:
    typedef ::nsCString nsCString;
    typedef ::uint8_t uint8_t;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    WebTransportHash() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT WebTransportHash(
            const nsCString& _algorithm,
            const nsTArray<uint8_t>& _value) :
        algorithm_(_algorithm),
        value_(_value)
    {
    }

    MOZ_IMPLICIT WebTransportHash(
            nsCString&& _algorithm,
            nsTArray<uint8_t>&& _value) :
        algorithm_(std::move(_algorithm)),
        value_(std::move(_value))
    {
    }

    bool
    operator==(const WebTransportHash& _o) const;

    bool
    operator!=(const WebTransportHash& _o) const;

    nsCString&
    algorithm()
    {
        return algorithm_;
    }
    const nsCString&
    algorithm() const
    {
        return algorithm_;
    }

    nsTArray<uint8_t>&
    value()
    {
        return value_;
    }
    const nsTArray<uint8_t>&
    value() const
    {
        return value_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<nsCString> algorithm_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<uint8_t>> value_;
};
} // namespace ipc
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::ipc::WebTransportHash>
{
    typedef ::mozilla::ipc::WebTransportHash paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC

#endif // ifndef PBackgroundSharedTypes_h
