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

#ifndef HangTypes_h
#define HangTypes_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/TimeStamp.h"
#include "mozilla/ipc/IPDLStructMember.h"


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct HangEntryBufOffset|
//
namespace mozilla {
class HangEntryBufOffset final
{
private:
    typedef ::uint32_t uint32_t;

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

    MOZ_IMPLICIT HangEntryBufOffset(const uint32_t& _index) :
        index_(_index)
    {
    }

    MOZ_IMPLICIT HangEntryBufOffset(uint32_t&& _index) :
        index_(std::move(_index))
    {
    }

    uint32_t&
    index()
    {
        return index_;
    }
    const uint32_t&
    index() const
    {
        return index_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<uint32_t> index_;
};
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::HangEntryBufOffset>
{
    typedef ::mozilla::HangEntryBufOffset 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 HangEntryModOffset|
//
namespace mozilla {
class HangEntryModOffset final
{
private:
    typedef ::uint32_t uint32_t;

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

    MOZ_IMPLICIT HangEntryModOffset(
            const uint32_t& _module,
            const uint32_t& _offset) :
        module_(_module),
        offset_(_offset)
    {
    }

    MOZ_IMPLICIT HangEntryModOffset(
            uint32_t&& _module,
            uint32_t&& _offset) :
        module_(std::move(_module)),
        offset_(std::move(_offset))
    {
    }

    uint32_t&
    module()
    {
        return module_;
    }
    const uint32_t&
    module() const
    {
        return module_;
    }

    uint32_t&
    offset()
    {
        return offset_;
    }
    const uint32_t&
    offset() const
    {
        return offset_;
    }

private:
    void
    StaticAssertions() const;
    ::mozilla::ipc::IPDLStructMember<uint32_t> module_;
    ::mozilla::ipc::IPDLStructMember<uint32_t> offset_;
};
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::HangEntryModOffset>
{
    typedef ::mozilla::HangEntryModOffset 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 HangEntryProgCounter|
//
namespace mozilla {
class HangEntryProgCounter final
{
private:
    typedef ::uintptr_t uintptr_t;

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

    MOZ_IMPLICIT HangEntryProgCounter(const uintptr_t& _pc) :
        pc_(_pc)
    {
    }

    MOZ_IMPLICIT HangEntryProgCounter(uintptr_t&& _pc) :
        pc_(std::move(_pc))
    {
    }

    uintptr_t&
    pc()
    {
        return pc_;
    }
    const uintptr_t&
    pc() const
    {
        return pc_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<uintptr_t> pc_;
};
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::HangEntryProgCounter>
{
    typedef ::mozilla::HangEntryProgCounter 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 HangEntryContent|
//
namespace mozilla {
class HangEntryContent final
{
private:

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

private:
};
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::HangEntryContent>
{
    typedef ::mozilla::HangEntryContent 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 HangEntryJit|
//
namespace mozilla {
class HangEntryJit final
{
private:

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

private:
};
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::HangEntryJit>
{
    typedef ::mozilla::HangEntryJit 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 HangEntryWasm|
//
namespace mozilla {
class HangEntryWasm final
{
private:

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

private:
};
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::HangEntryWasm>
{
    typedef ::mozilla::HangEntryWasm 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 HangEntryChromeScript|
//
namespace mozilla {
class HangEntryChromeScript final
{
private:

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

private:
};
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::HangEntryChromeScript>
{
    typedef ::mozilla::HangEntryChromeScript 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 HangEntrySuppressed|
//
namespace mozilla {
class HangEntrySuppressed final
{
private:

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

private:
};
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::HangEntrySuppressed>
{
    typedef ::mozilla::HangEntrySuppressed 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 |union HangEntry|
//
namespace mozilla {
class HangEntry final
{
public:
    enum Type {
        T__None,
        TnsCString = 1,
        THangEntryBufOffset,
        THangEntryModOffset,
        THangEntryProgCounter,
        THangEntryContent,
        THangEntryJit,
        THangEntryWasm,
        THangEntryChromeScript,
        THangEntrySuppressed,
        T__Last = THangEntrySuppressed
    };

private:
    typedef ::nsCString nsCString;
    typedef ::mozilla::HangEntryBufOffset HangEntryBufOffset;
    typedef ::mozilla::HangEntryModOffset HangEntryModOffset;
    typedef ::mozilla::HangEntryProgCounter HangEntryProgCounter;
    typedef ::mozilla::HangEntryContent HangEntryContent;
    typedef ::mozilla::HangEntryJit HangEntryJit;
    typedef ::mozilla::HangEntryWasm HangEntryWasm;
    typedef ::mozilla::HangEntryChromeScript HangEntryChromeScript;
    typedef ::mozilla::HangEntrySuppressed HangEntrySuppressed;
    typedef nsCString nsCString__tdef;
    typedef HangEntryBufOffset HangEntryBufOffset__tdef;
    typedef HangEntryModOffset HangEntryModOffset__tdef;
    typedef HangEntryProgCounter HangEntryProgCounter__tdef;
    typedef HangEntryContent HangEntryContent__tdef;
    typedef HangEntryJit HangEntryJit__tdef;
    typedef HangEntryWasm HangEntryWasm__tdef;
    typedef HangEntryChromeScript HangEntryChromeScript__tdef;
    typedef HangEntrySuppressed HangEntrySuppressed__tdef;

    nsCString*
    ptr_nsCString()
    {
        return (&(mVnsCString));
    }
    const nsCString*
    constptr_nsCString() const
    {
        return (&(mVnsCString));
    }
    HangEntryBufOffset*
    ptr_HangEntryBufOffset()
    {
        return (&(mVHangEntryBufOffset));
    }
    const HangEntryBufOffset*
    constptr_HangEntryBufOffset() const
    {
        return (&(mVHangEntryBufOffset));
    }
    HangEntryModOffset*
    ptr_HangEntryModOffset()
    {
        return (&(mVHangEntryModOffset));
    }
    const HangEntryModOffset*
    constptr_HangEntryModOffset() const
    {
        return (&(mVHangEntryModOffset));
    }
    HangEntryProgCounter*
    ptr_HangEntryProgCounter()
    {
        return (&(mVHangEntryProgCounter));
    }
    const HangEntryProgCounter*
    constptr_HangEntryProgCounter() const
    {
        return (&(mVHangEntryProgCounter));
    }
    HangEntryContent*
    ptr_HangEntryContent()
    {
        return (&(mVHangEntryContent));
    }
    const HangEntryContent*
    constptr_HangEntryContent() const
    {
        return (&(mVHangEntryContent));
    }
    HangEntryJit*
    ptr_HangEntryJit()
    {
        return (&(mVHangEntryJit));
    }
    const HangEntryJit*
    constptr_HangEntryJit() const
    {
        return (&(mVHangEntryJit));
    }
    HangEntryWasm*
    ptr_HangEntryWasm()
    {
        return (&(mVHangEntryWasm));
    }
    const HangEntryWasm*
    constptr_HangEntryWasm() const
    {
        return (&(mVHangEntryWasm));
    }
    HangEntryChromeScript*
    ptr_HangEntryChromeScript()
    {
        return (&(mVHangEntryChromeScript));
    }
    const HangEntryChromeScript*
    constptr_HangEntryChromeScript() const
    {
        return (&(mVHangEntryChromeScript));
    }
    HangEntrySuppressed*
    ptr_HangEntrySuppressed()
    {
        return (&(mVHangEntrySuppressed));
    }
    const HangEntrySuppressed*
    constptr_HangEntrySuppressed() const
    {
        return (&(mVHangEntrySuppressed));
    }

    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 HangEntry() :
        mType(T__None)
    {
    }

    MOZ_IMPLICIT HangEntry(const nsCString& aOther);

    MOZ_IMPLICIT HangEntry(nsCString&& aOther);

    MOZ_IMPLICIT HangEntry(const HangEntryBufOffset& aOther);

    MOZ_IMPLICIT HangEntry(HangEntryBufOffset&& aOther);

    MOZ_IMPLICIT HangEntry(const HangEntryModOffset& aOther);

    MOZ_IMPLICIT HangEntry(HangEntryModOffset&& aOther);

    MOZ_IMPLICIT HangEntry(const HangEntryProgCounter& aOther);

    MOZ_IMPLICIT HangEntry(HangEntryProgCounter&& aOther);

    MOZ_IMPLICIT HangEntry(const HangEntryContent& aOther);

    MOZ_IMPLICIT HangEntry(HangEntryContent&& aOther);

    MOZ_IMPLICIT HangEntry(const HangEntryJit& aOther);

    MOZ_IMPLICIT HangEntry(HangEntryJit&& aOther);

    MOZ_IMPLICIT HangEntry(const HangEntryWasm& aOther);

    MOZ_IMPLICIT HangEntry(HangEntryWasm&& aOther);

    MOZ_IMPLICIT HangEntry(const HangEntryChromeScript& aOther);

    MOZ_IMPLICIT HangEntry(HangEntryChromeScript&& aOther);

    MOZ_IMPLICIT HangEntry(const HangEntrySuppressed& aOther);

    MOZ_IMPLICIT HangEntry(HangEntrySuppressed&& aOther);

    MOZ_IMPLICIT HangEntry(const HangEntry& aOther);

    MOZ_IMPLICIT HangEntry(HangEntry&& aOther);

    ~HangEntry();

    Type
    type() const
    {
        return mType;
    }

    HangEntry&
    operator=(const nsCString& aRhs);

    HangEntry&
    operator=(nsCString&& aRhs);

    HangEntry&
    operator=(const HangEntryBufOffset& aRhs);

    HangEntry&
    operator=(HangEntryBufOffset&& aRhs);

    HangEntry&
    operator=(const HangEntryModOffset& aRhs);

    HangEntry&
    operator=(HangEntryModOffset&& aRhs);

    HangEntry&
    operator=(const HangEntryProgCounter& aRhs);

    HangEntry&
    operator=(HangEntryProgCounter&& aRhs);

    HangEntry&
    operator=(const HangEntryContent& aRhs);

    HangEntry&
    operator=(HangEntryContent&& aRhs);

    HangEntry&
    operator=(const HangEntryJit& aRhs);

    HangEntry&
    operator=(HangEntryJit&& aRhs);

    HangEntry&
    operator=(const HangEntryWasm& aRhs);

    HangEntry&
    operator=(HangEntryWasm&& aRhs);

    HangEntry&
    operator=(const HangEntryChromeScript& aRhs);

    HangEntry&
    operator=(HangEntryChromeScript&& aRhs);

    HangEntry&
    operator=(const HangEntrySuppressed& aRhs);

    HangEntry&
    operator=(HangEntrySuppressed&& aRhs);

    HangEntry&
    operator=(const HangEntry& aRhs);

    HangEntry&
    operator=(HangEntry&& aRhs);

    nsCString&
    get_nsCString()
    {
        AssertSanity(TnsCString);
        return (*(ptr_nsCString()));
    }
    const nsCString&
    get_nsCString() const
    {
        AssertSanity(TnsCString);
        return (*(constptr_nsCString()));
    }
    operator nsCString&()
    {
        return get_nsCString();
    }
    operator const nsCString&() const
    {
        return get_nsCString();
    }

    HangEntryBufOffset&
    get_HangEntryBufOffset()
    {
        AssertSanity(THangEntryBufOffset);
        return (*(ptr_HangEntryBufOffset()));
    }
    const HangEntryBufOffset&
    get_HangEntryBufOffset() const
    {
        AssertSanity(THangEntryBufOffset);
        return (*(constptr_HangEntryBufOffset()));
    }
    operator HangEntryBufOffset&()
    {
        return get_HangEntryBufOffset();
    }
    operator const HangEntryBufOffset&() const
    {
        return get_HangEntryBufOffset();
    }

    HangEntryModOffset&
    get_HangEntryModOffset()
    {
        AssertSanity(THangEntryModOffset);
        return (*(ptr_HangEntryModOffset()));
    }
    const HangEntryModOffset&
    get_HangEntryModOffset() const
    {
        AssertSanity(THangEntryModOffset);
        return (*(constptr_HangEntryModOffset()));
    }
    operator HangEntryModOffset&()
    {
        return get_HangEntryModOffset();
    }
    operator const HangEntryModOffset&() const
    {
        return get_HangEntryModOffset();
    }

    HangEntryProgCounter&
    get_HangEntryProgCounter()
    {
        AssertSanity(THangEntryProgCounter);
        return (*(ptr_HangEntryProgCounter()));
    }
    const HangEntryProgCounter&
    get_HangEntryProgCounter() const
    {
        AssertSanity(THangEntryProgCounter);
        return (*(constptr_HangEntryProgCounter()));
    }
    operator HangEntryProgCounter&()
    {
        return get_HangEntryProgCounter();
    }
    operator const HangEntryProgCounter&() const
    {
        return get_HangEntryProgCounter();
    }

    HangEntryContent&
    get_HangEntryContent()
    {
        AssertSanity(THangEntryContent);
        return (*(ptr_HangEntryContent()));
    }
    const HangEntryContent&
    get_HangEntryContent() const
    {
        AssertSanity(THangEntryContent);
        return (*(constptr_HangEntryContent()));
    }
    operator HangEntryContent&()
    {
        return get_HangEntryContent();
    }
    operator const HangEntryContent&() const
    {
        return get_HangEntryContent();
    }

    HangEntryJit&
    get_HangEntryJit()
    {
        AssertSanity(THangEntryJit);
        return (*(ptr_HangEntryJit()));
    }
    const HangEntryJit&
    get_HangEntryJit() const
    {
        AssertSanity(THangEntryJit);
        return (*(constptr_HangEntryJit()));
    }
    operator HangEntryJit&()
    {
        return get_HangEntryJit();
    }
    operator const HangEntryJit&() const
    {
        return get_HangEntryJit();
    }

    HangEntryWasm&
    get_HangEntryWasm()
    {
        AssertSanity(THangEntryWasm);
        return (*(ptr_HangEntryWasm()));
    }
    const HangEntryWasm&
    get_HangEntryWasm() const
    {
        AssertSanity(THangEntryWasm);
        return (*(constptr_HangEntryWasm()));
    }
    operator HangEntryWasm&()
    {
        return get_HangEntryWasm();
    }
    operator const HangEntryWasm&() const
    {
        return get_HangEntryWasm();
    }

    HangEntryChromeScript&
    get_HangEntryChromeScript()
    {
        AssertSanity(THangEntryChromeScript);
        return (*(ptr_HangEntryChromeScript()));
    }
    const HangEntryChromeScript&
    get_HangEntryChromeScript() const
    {
        AssertSanity(THangEntryChromeScript);
        return (*(constptr_HangEntryChromeScript()));
    }
    operator HangEntryChromeScript&()
    {
        return get_HangEntryChromeScript();
    }
    operator const HangEntryChromeScript&() const
    {
        return get_HangEntryChromeScript();
    }

    HangEntrySuppressed&
    get_HangEntrySuppressed()
    {
        AssertSanity(THangEntrySuppressed);
        return (*(ptr_HangEntrySuppressed()));
    }
    const HangEntrySuppressed&
    get_HangEntrySuppressed() const
    {
        AssertSanity(THangEntrySuppressed);
        return (*(constptr_HangEntrySuppressed()));
    }
    operator HangEntrySuppressed&()
    {
        return get_HangEntrySuppressed();
    }
    operator const HangEntrySuppressed&() const
    {
        return get_HangEntrySuppressed();
    }

private:
    union {
        nsCString mVnsCString;
        HangEntryBufOffset mVHangEntryBufOffset;
        HangEntryModOffset mVHangEntryModOffset;
        HangEntryProgCounter mVHangEntryProgCounter;
        HangEntryContent mVHangEntryContent;
        HangEntryJit mVHangEntryJit;
        HangEntryWasm mVHangEntryWasm;
        HangEntryChromeScript mVHangEntryChromeScript;
        HangEntrySuppressed mVHangEntrySuppressed;
    };
    Type mType;
};
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::HangEntry>
{
    typedef ::mozilla::HangEntry 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 HangModule|
//
namespace mozilla {
class HangModule final
{
private:
    typedef ::nsString nsString;
    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
    HangModule() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT HangModule(
            const nsString& _name,
            const nsCString& _breakpadId) :
        name_(_name),
        breakpadId_(_breakpadId)
    {
    }

    MOZ_IMPLICIT HangModule(
            nsString&& _name,
            nsCString&& _breakpadId) :
        name_(std::move(_name)),
        breakpadId_(std::move(_breakpadId))
    {
    }

    nsString&
    name()
    {
        return name_;
    }
    const nsString&
    name() const
    {
        return name_;
    }

    nsCString&
    breakpadId()
    {
        return breakpadId_;
    }
    const nsCString&
    breakpadId() const
    {
        return breakpadId_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<nsString> name_;
    ::mozilla::ipc::IPDLStructMember<nsCString> breakpadId_;
};
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::HangModule>
{
    typedef ::mozilla::HangModule 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 HangStack|
//
namespace mozilla {
class HangStack final
{
private:
    typedef ::mozilla::HangEntry HangEntry;
    typedef ::int8_t int8_t;
    typedef ::mozilla::HangModule HangModule;

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

    MOZ_IMPLICIT HangStack(
            const nsTArray<HangEntry>& _stack,
            const nsTArray<int8_t>& _strbuffer,
            const nsTArray<HangModule>& _modules) :
        stack_(_stack),
        strbuffer_(_strbuffer),
        modules_(_modules)
    {
    }

    MOZ_IMPLICIT HangStack(
            nsTArray<HangEntry>&& _stack,
            nsTArray<int8_t>&& _strbuffer,
            nsTArray<HangModule>&& _modules) :
        stack_(std::move(_stack)),
        strbuffer_(std::move(_strbuffer)),
        modules_(std::move(_modules))
    {
    }

    nsTArray<HangEntry>&
    stack()
    {
        return stack_;
    }
    const nsTArray<HangEntry>&
    stack() const
    {
        return stack_;
    }

    nsTArray<int8_t>&
    strbuffer()
    {
        return strbuffer_;
    }
    const nsTArray<int8_t>&
    strbuffer() const
    {
        return strbuffer_;
    }

    nsTArray<HangModule>&
    modules()
    {
        return modules_;
    }
    const nsTArray<HangModule>&
    modules() const
    {
        return modules_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<HangEntry>> stack_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<int8_t>> strbuffer_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<HangModule>> modules_;
};
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::HangStack>
{
    typedef ::mozilla::HangStack 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 HangAnnotation|
//
namespace mozilla {
class HangAnnotation 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
    HangAnnotation() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT HangAnnotation(
            const nsString& _name,
            const nsString& _value) :
        name_(_name),
        value_(_value)
    {
    }

    MOZ_IMPLICIT HangAnnotation(
            nsString&& _name,
            nsString&& _value) :
        name_(std::move(_name)),
        value_(std::move(_value))
    {
    }

    nsString&
    name()
    {
        return name_;
    }
    const nsString&
    name() const
    {
        return name_;
    }

    nsString&
    value()
    {
        return value_;
    }
    const nsString&
    value() const
    {
        return value_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<nsString> name_;
    ::mozilla::ipc::IPDLStructMember<nsString> value_;
};
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::HangAnnotation>
{
    typedef ::mozilla::HangAnnotation 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 HangDetails|
//
namespace mozilla {
class HangDetails final
{
private:
    typedef ::mozilla::TimeDuration TimeDuration;
    typedef ::nsCString nsCString;
    typedef ::mozilla::HangStack HangStack;
    typedef ::mozilla::HangAnnotation HangAnnotation;

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

    MOZ_IMPLICIT HangDetails(
            const TimeDuration& _duration,
            const nsCString& _process,
            const nsCString& _remoteType,
            const nsCString& _threadName,
            const nsCString& _runnableName,
            const HangStack& _stack,
            const nsTArray<HangAnnotation>& _annotations) :
        duration_(_duration),
        process_(_process),
        remoteType_(_remoteType),
        threadName_(_threadName),
        runnableName_(_runnableName),
        stack_(_stack),
        annotations_(_annotations)
    {
    }

    MOZ_IMPLICIT HangDetails(
            TimeDuration&& _duration,
            nsCString&& _process,
            nsCString&& _remoteType,
            nsCString&& _threadName,
            nsCString&& _runnableName,
            HangStack&& _stack,
            nsTArray<HangAnnotation>&& _annotations) :
        duration_(std::move(_duration)),
        process_(std::move(_process)),
        remoteType_(std::move(_remoteType)),
        threadName_(std::move(_threadName)),
        runnableName_(std::move(_runnableName)),
        stack_(std::move(_stack)),
        annotations_(std::move(_annotations))
    {
    }

    TimeDuration&
    duration()
    {
        return duration_;
    }
    const TimeDuration&
    duration() const
    {
        return duration_;
    }

    nsCString&
    process()
    {
        return process_;
    }
    const nsCString&
    process() const
    {
        return process_;
    }

    nsCString&
    remoteType()
    {
        return remoteType_;
    }
    const nsCString&
    remoteType() const
    {
        return remoteType_;
    }

    nsCString&
    threadName()
    {
        return threadName_;
    }
    const nsCString&
    threadName() const
    {
        return threadName_;
    }

    nsCString&
    runnableName()
    {
        return runnableName_;
    }
    const nsCString&
    runnableName() const
    {
        return runnableName_;
    }

    HangStack&
    stack()
    {
        return stack_;
    }
    const HangStack&
    stack() const
    {
        return stack_;
    }

    nsTArray<HangAnnotation>&
    annotations()
    {
        return annotations_;
    }
    const nsTArray<HangAnnotation>&
    annotations() const
    {
        return annotations_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<TimeDuration> duration_;
    ::mozilla::ipc::IPDLStructMember<nsCString> process_;
    ::mozilla::ipc::IPDLStructMember<nsCString> remoteType_;
    ::mozilla::ipc::IPDLStructMember<nsCString> threadName_;
    ::mozilla::ipc::IPDLStructMember<nsCString> runnableName_;
    ::mozilla::ipc::IPDLStructMember<HangStack> stack_;
    ::mozilla::ipc::IPDLStructMember<CopyableTArray<HangAnnotation>> annotations_;
};
} // namespace mozilla

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

#endif // ifndef HangTypes_h
