/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */

#ifndef mozilla_dom_APZTestDataBinding_h
#define mozilla_dom_APZTestDataBinding_h

#include "js/RootingAPI.h"
#include "jspubtd.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/dom/BindingDeclarations.h"
#include "mozilla/dom/Nullable.h"

namespace mozilla {
namespace dom {

struct APZBucket;
struct APZBucketAtoms;
struct APZTestDataAtoms;
struct NativePropertyHooks;
class ProtoAndIfaceCache;
struct ScrollFrameData;
struct ScrollFrameDataAtoms;
struct ScrollFrameDataEntry;
struct ScrollFrameDataEntryAtoms;

} // namespace dom
} // namespace mozilla

namespace mozilla {
namespace dom {

struct ScrollFrameDataEntry : public DictionaryBase
{
  Optional<nsString> mKey;
  Optional<nsString> mValue;

  ScrollFrameDataEntry();

  explicit inline ScrollFrameDataEntry(const ScrollFrameDataEntry& aOther)
  {
    *this = aOther;
  }

protected:
  explicit inline ScrollFrameDataEntry(int )
  {
    // Do nothing here; this is used by our "Fast" subclass
  }

private:
  static bool
  InitIds(JSContext* cx, ScrollFrameDataEntryAtoms* atomsCache);

public:
  bool
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);

  bool
  Init(const nsAString& aJSON);

  bool
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;

  bool
  ToJSON(nsAString& aJSON) const;

  void
  TraceDictionary(JSTracer* trc);

  void
  operator=(const ScrollFrameDataEntry& aOther);
};

namespace binding_detail {
struct FastScrollFrameDataEntry : public ScrollFrameDataEntry
{
  inline FastScrollFrameDataEntry()
    : ScrollFrameDataEntry(42)
  {
    // Doesn't matter what int we pass to the parent constructor
  }
};
} // namespace binding_detail


struct ScrollFrameData : public DictionaryBase
{
  Optional<Sequence<ScrollFrameDataEntry>> mEntries;
  Optional<uint64_t> mScrollId;

  ScrollFrameData();

  explicit inline ScrollFrameData(const ScrollFrameData& aOther)
  {
    *this = aOther;
  }

protected:
  explicit inline ScrollFrameData(int )
  {
    // Do nothing here; this is used by our "Fast" subclass
  }

private:
  static bool
  InitIds(JSContext* cx, ScrollFrameDataAtoms* atomsCache);

public:
  bool
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);

  bool
  Init(const nsAString& aJSON);

  bool
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;

  bool
  ToJSON(nsAString& aJSON) const;

  void
  TraceDictionary(JSTracer* trc);

  void
  operator=(const ScrollFrameData& aOther);
};

namespace binding_detail {
struct FastScrollFrameData : public ScrollFrameData
{
  inline FastScrollFrameData()
    : ScrollFrameData(42)
  {
    // Doesn't matter what int we pass to the parent constructor
  }
};
} // namespace binding_detail


struct APZBucket : public DictionaryBase
{
  Optional<Sequence<ScrollFrameData>> mScrollFrames;
  Optional<uint32_t> mSequenceNumber;

  APZBucket();

  explicit inline APZBucket(const APZBucket& aOther)
  {
    *this = aOther;
  }

protected:
  explicit inline APZBucket(int )
  {
    // Do nothing here; this is used by our "Fast" subclass
  }

private:
  static bool
  InitIds(JSContext* cx, APZBucketAtoms* atomsCache);

public:
  bool
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);

  bool
  Init(const nsAString& aJSON);

  bool
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;

  bool
  ToJSON(nsAString& aJSON) const;

  void
  TraceDictionary(JSTracer* trc);

  void
  operator=(const APZBucket& aOther);
};

namespace binding_detail {
struct FastAPZBucket : public APZBucket
{
  inline FastAPZBucket()
    : APZBucket(42)
  {
    // Doesn't matter what int we pass to the parent constructor
  }
};
} // namespace binding_detail


struct APZTestData : public DictionaryBase
{
  Optional<Sequence<APZBucket>> mPaints;
  Optional<Sequence<APZBucket>> mRepaintRequests;

  APZTestData();

  explicit inline APZTestData(const APZTestData& aOther)
  {
    *this = aOther;
  }

protected:
  explicit inline APZTestData(int )
  {
    // Do nothing here; this is used by our "Fast" subclass
  }

private:
  static bool
  InitIds(JSContext* cx, APZTestDataAtoms* atomsCache);

public:
  bool
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);

  bool
  Init(const nsAString& aJSON);

  bool
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;

  bool
  ToJSON(nsAString& aJSON) const;

  void
  TraceDictionary(JSTracer* trc);

  void
  operator=(const APZTestData& aOther);
};

namespace binding_detail {
struct FastAPZTestData : public APZTestData
{
  inline FastAPZTestData()
    : APZTestData(42)
  {
    // Doesn't matter what int we pass to the parent constructor
  }
};
} // namespace binding_detail


} // namespace dom
} // namespace mozilla

#endif // mozilla_dom_APZTestDataBinding_h
