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

#ifndef CustomElementTypes_h
#define CustomElementTypes_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/BlobImpl.h"
#include "mozilla/ipc/IPCCore.h"
#include "mozilla/ipc/IPDLStructMember.h"


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |union IPCFormDataValue|
//
namespace mozilla {
namespace dom {
class IPCFormDataValue final
{
public:
    enum Type {
        T__None,
        TBlobImpl = 1,
        TnsString,
        T__Last = TnsString
    };

private:
    typedef ::mozilla::dom::BlobImpl BlobImpl;
    typedef ::nsString nsString;
    typedef mozilla::NotNull<RefPtr<BlobImpl>> BlobImpl__tdef;
    typedef nsString nsString__tdef;

    mozilla::NotNull<RefPtr<BlobImpl>>*
    ptr_BlobImpl()
    {
        return (&(mVBlobImpl));
    }
    const mozilla::NotNull<RefPtr<BlobImpl>>*
    constptr_BlobImpl() const
    {
        return (&(mVBlobImpl));
    }
    nsString*
    ptr_nsString()
    {
        return (&(mVnsString));
    }
    const nsString*
    constptr_nsString() const
    {
        return (&(mVnsString));
    }

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

    MOZ_IMPLICIT IPCFormDataValue(mozilla::NotNull<BlobImpl*> aOther);

    MOZ_IMPLICIT IPCFormDataValue(mozilla::NotNull<RefPtr<BlobImpl>>&& aOther);

    MOZ_IMPLICIT IPCFormDataValue(const nsString& aOther);

    MOZ_IMPLICIT IPCFormDataValue(nsString&& aOther);

    MOZ_IMPLICIT IPCFormDataValue(const IPCFormDataValue& aOther);

    MOZ_IMPLICIT IPCFormDataValue(IPCFormDataValue&& aOther);

    ~IPCFormDataValue();

    Type
    type() const
    {
        return mType;
    }

    IPCFormDataValue&
    operator=(mozilla::NotNull<BlobImpl*> aRhs);

    IPCFormDataValue&
    operator=(mozilla::NotNull<RefPtr<BlobImpl>>&& aRhs);

    IPCFormDataValue&
    operator=(const nsString& aRhs);

    IPCFormDataValue&
    operator=(nsString&& aRhs);

    IPCFormDataValue&
    operator=(const IPCFormDataValue& aRhs);

    IPCFormDataValue&
    operator=(IPCFormDataValue&& aRhs);

    mozilla::NotNull<RefPtr<BlobImpl>>&
    get_BlobImpl()
    {
        AssertSanity(TBlobImpl);
        return (*(ptr_BlobImpl()));
    }
    mozilla::NotNull<BlobImpl*>
    get_BlobImpl() const
    {
        AssertSanity(TBlobImpl);
        return (*(constptr_BlobImpl()));
    }
    operator mozilla::NotNull<RefPtr<BlobImpl>>&()
    {
        return get_BlobImpl();
    }
    operator mozilla::NotNull<BlobImpl*>() const
    {
        return get_BlobImpl();
    }

    nsString&
    get_nsString()
    {
        AssertSanity(TnsString);
        return (*(ptr_nsString()));
    }
    const nsString&
    get_nsString() const
    {
        AssertSanity(TnsString);
        return (*(constptr_nsString()));
    }
    operator nsString&()
    {
        return get_nsString();
    }
    operator const nsString&() const
    {
        return get_nsString();
    }

private:
    union {
        mozilla::NotNull<RefPtr<BlobImpl>> mVBlobImpl;
        nsString mVnsString;
    };
    Type mType;
};
} // namespace dom
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::IPCFormDataValue>
{
    typedef ::mozilla::dom::IPCFormDataValue 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 FormDataTuple|
//
namespace mozilla {
namespace dom {
class FormDataTuple final
{
private:
    typedef ::nsString nsString;
    typedef ::mozilla::dom::IPCFormDataValue IPCFormDataValue;

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

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

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

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

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

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

namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::FormDataTuple>
{
    typedef ::mozilla::dom::FormDataTuple 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 CustomElementFormValue|
//
namespace mozilla {
namespace dom {
class CustomElementFormValue final
{
public:
    enum Type {
        T__None,
        Tvoid_t = 1,
        TBlobImpl,
        TnsString,
        TArrayOfFormDataTuple,
        T__Last = TArrayOfFormDataTuple
    };

private:
    typedef ::mozilla::void_t void_t;
    typedef ::mozilla::dom::BlobImpl BlobImpl;
    typedef ::nsString nsString;
    typedef ::mozilla::dom::FormDataTuple FormDataTuple;
    typedef void_t void_t__tdef;
    typedef RefPtr<BlobImpl> BlobImpl__tdef;
    typedef nsString nsString__tdef;
    typedef nsTArray<FormDataTuple> ArrayOfFormDataTuple__tdef;

    void_t*
    ptr_void_t()
    {
        return (&(mVvoid_t));
    }
    const void_t*
    constptr_void_t() const
    {
        return (&(mVvoid_t));
    }
    RefPtr<BlobImpl>*
    ptr_BlobImpl()
    {
        return (&(mVBlobImpl));
    }
    const RefPtr<BlobImpl>*
    constptr_BlobImpl() const
    {
        return (&(mVBlobImpl));
    }
    nsString*
    ptr_nsString()
    {
        return (&(mVnsString));
    }
    const nsString*
    constptr_nsString() const
    {
        return (&(mVnsString));
    }
    nsTArray<FormDataTuple>*
    ptr_ArrayOfFormDataTuple()
    {
        return (&(mVArrayOfFormDataTuple));
    }
    const nsTArray<FormDataTuple>*
    constptr_ArrayOfFormDataTuple() const
    {
        return (&(mVArrayOfFormDataTuple));
    }

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

    MOZ_IMPLICIT CustomElementFormValue(const void_t& aOther);

    MOZ_IMPLICIT CustomElementFormValue(void_t&& aOther);

    MOZ_IMPLICIT CustomElementFormValue(BlobImpl* aOther);

    MOZ_IMPLICIT CustomElementFormValue(RefPtr<BlobImpl>&& aOther);

    MOZ_IMPLICIT CustomElementFormValue(const nsString& aOther);

    MOZ_IMPLICIT CustomElementFormValue(nsString&& aOther);

    MOZ_IMPLICIT CustomElementFormValue(const nsTArray<FormDataTuple>& aOther);

    MOZ_IMPLICIT CustomElementFormValue(nsTArray<FormDataTuple>&& aOther);

    MOZ_IMPLICIT CustomElementFormValue(const CustomElementFormValue& aOther);

    MOZ_IMPLICIT CustomElementFormValue(CustomElementFormValue&& aOther);

    ~CustomElementFormValue();

    Type
    type() const
    {
        return mType;
    }

    CustomElementFormValue&
    operator=(const void_t& aRhs);

    CustomElementFormValue&
    operator=(void_t&& aRhs);

    CustomElementFormValue&
    operator=(BlobImpl* aRhs);

    CustomElementFormValue&
    operator=(RefPtr<BlobImpl>&& aRhs);

    CustomElementFormValue&
    operator=(const nsString& aRhs);

    CustomElementFormValue&
    operator=(nsString&& aRhs);

    CustomElementFormValue&
    operator=(const nsTArray<FormDataTuple>& aRhs);

    CustomElementFormValue&
    operator=(nsTArray<FormDataTuple>&& aRhs);

    CustomElementFormValue&
    operator=(const CustomElementFormValue& aRhs);

    CustomElementFormValue&
    operator=(CustomElementFormValue&& aRhs);

    void_t&
    get_void_t()
    {
        AssertSanity(Tvoid_t);
        return (*(ptr_void_t()));
    }
    const void_t&
    get_void_t() const
    {
        AssertSanity(Tvoid_t);
        return (*(constptr_void_t()));
    }
    operator void_t&()
    {
        return get_void_t();
    }
    operator const void_t&() const
    {
        return get_void_t();
    }

    RefPtr<BlobImpl>&
    get_BlobImpl()
    {
        AssertSanity(TBlobImpl);
        return (*(ptr_BlobImpl()));
    }
    BlobImpl*
    get_BlobImpl() const
    {
        AssertSanity(TBlobImpl);
        return (*(constptr_BlobImpl()));
    }
    operator RefPtr<BlobImpl>&()
    {
        return get_BlobImpl();
    }
    operator BlobImpl*() const
    {
        return get_BlobImpl();
    }

    nsString&
    get_nsString()
    {
        AssertSanity(TnsString);
        return (*(ptr_nsString()));
    }
    const nsString&
    get_nsString() const
    {
        AssertSanity(TnsString);
        return (*(constptr_nsString()));
    }
    operator nsString&()
    {
        return get_nsString();
    }
    operator const nsString&() const
    {
        return get_nsString();
    }

    nsTArray<FormDataTuple>&
    get_ArrayOfFormDataTuple()
    {
        AssertSanity(TArrayOfFormDataTuple);
        return (*(ptr_ArrayOfFormDataTuple()));
    }
    const nsTArray<FormDataTuple>&
    get_ArrayOfFormDataTuple() const
    {
        AssertSanity(TArrayOfFormDataTuple);
        return (*(constptr_ArrayOfFormDataTuple()));
    }
    operator nsTArray<FormDataTuple>&()
    {
        return get_ArrayOfFormDataTuple();
    }
    operator const nsTArray<FormDataTuple>&() const
    {
        return get_ArrayOfFormDataTuple();
    }

private:
    union {
        void_t mVvoid_t;
        RefPtr<BlobImpl> mVBlobImpl;
        nsString mVnsString;
        nsTArray<FormDataTuple> mVArrayOfFormDataTuple;
    };
    Type mType;
};
} // namespace dom
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::CustomElementFormValue>
{
    typedef ::mozilla::dom::CustomElementFormValue 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 CustomElementTuple|
//
namespace mozilla {
namespace dom {
class CustomElementTuple final
{
private:
    typedef ::mozilla::dom::CustomElementFormValue CustomElementFormValue;

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

    MOZ_IMPLICIT CustomElementTuple(
            const CustomElementFormValue& _value,
            const CustomElementFormValue& _state) :
        value_(_value),
        state_(_state)
    {
    }

    MOZ_IMPLICIT CustomElementTuple(
            CustomElementFormValue&& _value,
            CustomElementFormValue&& _state) :
        value_(std::move(_value)),
        state_(std::move(_state))
    {
    }

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

    CustomElementFormValue&
    state()
    {
        return state_;
    }
    const CustomElementFormValue&
    state() const
    {
        return state_;
    }

private:
    ::mozilla::ipc::IPDLStructMember<CustomElementFormValue> value_;
    ::mozilla::ipc::IPDLStructMember<CustomElementFormValue> state_;
};
} // namespace dom
} // namespace mozilla

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

#endif // ifndef CustomElementTypes_h
