/* THIS FILE IS AUTOGENERATED FROM APZTestData.webidl BY Codegen.py - 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 FrameUniformity;
struct FrameUniformityAtoms;
struct FrameUniformityResultsAtoms;
struct NativePropertyHooks;
class ProtoAndIfaceCache;
struct ScrollFrameData;
struct ScrollFrameDataAtoms;
struct ScrollFrameDataEntry;
struct ScrollFrameDataEntryAtoms;

} // namespace dom
} // namespace mozilla

namespace mozilla {
namespace dom {

struct FrameUniformity : public DictionaryBase
{
  Optional<float> mFrameUniformity;
  Optional<uint32_t> mLayerAddress;

  FrameUniformity();

  explicit inline FrameUniformity(const FastDictionaryInitializer& )
  {
    // Do nothing here; this is used by our "Fast" subclass
  }

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

  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 FrameUniformity& aOther);

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

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


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

  ScrollFrameDataEntry();

  explicit inline ScrollFrameDataEntry(const FastDictionaryInitializer& )
  {
    // Do nothing here; this is used by our "Fast" subclass
  }

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

  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);

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

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


struct FrameUniformityResults : public DictionaryBase
{
  Optional<Sequence<FrameUniformity>> mLayerUniformities;

  FrameUniformityResults();

  explicit inline FrameUniformityResults(const FastDictionaryInitializer& )
  {
    // Do nothing here; this is used by our "Fast" subclass
  }

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

  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 FrameUniformityResults& aOther);

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

namespace binding_detail {
struct FastFrameUniformityResults : public FrameUniformityResults
{
  inline FastFrameUniformityResults()
    : FrameUniformityResults(FastDictionaryInitializer())
  {
    // 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 FastDictionaryInitializer& )
  {
    // Do nothing here; this is used by our "Fast" subclass
  }

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

  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);

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

namespace binding_detail {
struct FastScrollFrameData : public ScrollFrameData
{
  inline FastScrollFrameData()
    : ScrollFrameData(FastDictionaryInitializer())
  {
    // 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 FastDictionaryInitializer& )
  {
    // Do nothing here; this is used by our "Fast" subclass
  }

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

  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);

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

namespace binding_detail {
struct FastAPZBucket : public APZBucket
{
  inline FastAPZBucket()
    : APZBucket(FastDictionaryInitializer())
  {
    // 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 FastDictionaryInitializer& )
  {
    // Do nothing here; this is used by our "Fast" subclass
  }

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

  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);

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

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


} // namespace dom
} // namespace mozilla

#endif // mozilla_dom_APZTestDataBinding_h
