LCOV - code coverage report
Current view: top level - out/Release/gen/src/inspector/protocol - Runtime.h (source / functions) Hit Total Coverage
Test: app.info Lines: 159 192 82.8 %
Date: 2019-02-19 Functions: 80 129 62.0 %

          Line data    Source code
       1             : // This file is generated by TypeBuilder_h.template.
       2             : 
       3             : // Copyright (c) 2016 The Chromium Authors. All rights reserved.
       4             : // Use of this source code is governed by a BSD-style license that can be
       5             : // found in the LICENSE file.
       6             : 
       7             : #ifndef v8_inspector_protocol_Runtime_h
       8             : #define v8_inspector_protocol_Runtime_h
       9             : 
      10             : #include "src/inspector/protocol/Protocol.h"
      11             : // For each imported domain we generate a ValueConversions struct instead of a full domain definition
      12             : // and include Domain::API version from there.
      13             : #include "include/inspector/Runtime.h"
      14             : 
      15             : namespace v8_inspector {
      16             : namespace protocol {
      17             : namespace Runtime {
      18             : 
      19             : // ------------- Forward and enum declarations.
      20             : using ScriptId = String;
      21             : using RemoteObjectId = String;
      22             : using UnserializableValue = String;
      23             : class RemoteObject;
      24             : class CustomPreview;
      25             : class ObjectPreview;
      26             : class PropertyPreview;
      27             : class EntryPreview;
      28             : class PropertyDescriptor;
      29             : class InternalPropertyDescriptor;
      30             : class CallArgument;
      31             : using ExecutionContextId = int;
      32             : class ExecutionContextDescription;
      33             : class ExceptionDetails;
      34             : using Timestamp = double;
      35             : using TimeDelta = double;
      36             : class CallFrame;
      37             : class StackTrace;
      38             : using UniqueDebuggerId = String;
      39             : class StackTraceId;
      40             : class BindingCalledNotification;
      41             : class ConsoleAPICalledNotification;
      42             : class ExceptionRevokedNotification;
      43             : class ExceptionThrownNotification;
      44             : class ExecutionContextCreatedNotification;
      45             : class ExecutionContextDestroyedNotification;
      46             : using ExecutionContextsClearedNotification = Object;
      47             : class InspectRequestedNotification;
      48             : 
      49             : namespace ConsoleAPICalled {
      50             : namespace TypeEnum {
      51             :  extern const char* Log;
      52             :  extern const char* Debug;
      53             :  extern const char* Info;
      54             :  extern const char* Error;
      55             :  extern const char* Warning;
      56             :  extern const char* Dir;
      57             :  extern const char* Dirxml;
      58             :  extern const char* Table;
      59             :  extern const char* Trace;
      60             :  extern const char* Clear;
      61             :  extern const char* StartGroup;
      62             :  extern const char* StartGroupCollapsed;
      63             :  extern const char* EndGroup;
      64             :  extern const char* Assert;
      65             :  extern const char* Profile;
      66             :  extern const char* ProfileEnd;
      67             :  extern const char* Count;
      68             :  extern const char* TimeEnd;
      69             : } // TypeEnum
      70             : } // ConsoleAPICalled
      71             : 
      72             : // ------------- Type and builder declarations.
      73             : 
      74             : class  RemoteObject : public Serializable, public API::RemoteObject{
      75             :     PROTOCOL_DISALLOW_COPY(RemoteObject);
      76             : public:
      77             :     static std::unique_ptr<RemoteObject> fromValue(protocol::Value* value, ErrorSupport* errors);
      78             : 
      79     9244563 :     ~RemoteObject() override { }
      80             : 
      81             :     struct  TypeEnum {
      82             :         static const char* Object;
      83             :         static const char* Function;
      84             :         static const char* Undefined;
      85             :         static const char* String;
      86             :         static const char* Number;
      87             :         static const char* Boolean;
      88             :         static const char* Symbol;
      89             :         static const char* Bigint;
      90             :     }; // TypeEnum
      91             : 
      92             :     String getType() { return m_type; }
      93             :     void setType(const String& value) { m_type = value; }
      94             : 
      95             :     struct  SubtypeEnum {
      96             :         static const char* Array;
      97             :         static const char* Null;
      98             :         static const char* Node;
      99             :         static const char* Regexp;
     100             :         static const char* Date;
     101             :         static const char* Map;
     102             :         static const char* Set;
     103             :         static const char* Weakmap;
     104             :         static const char* Weakset;
     105             :         static const char* Iterator;
     106             :         static const char* Generator;
     107             :         static const char* Error;
     108             :         static const char* Proxy;
     109             :         static const char* Promise;
     110             :         static const char* Typedarray;
     111             :         static const char* Arraybuffer;
     112             :         static const char* Dataview;
     113             :     }; // SubtypeEnum
     114             : 
     115             :     bool hasSubtype() { return m_subtype.isJust(); }
     116             :     String getSubtype(const String& defaultValue) { return m_subtype.isJust() ? m_subtype.fromJust() : defaultValue; }
     117      119812 :     void setSubtype(const String& value) { m_subtype = value; }
     118             : 
     119             :     bool hasClassName() { return m_className.isJust(); }
     120             :     String getClassName(const String& defaultValue) { return m_className.isJust() ? m_className.fromJust() : defaultValue; }
     121     5458854 :     void setClassName(const String& value) { m_className = value; }
     122             : 
     123             :     bool hasValue() { return m_value.isJust(); }
     124             :     protocol::Value* getValue(protocol::Value* defaultValue) { return m_value.isJust() ? m_value.fromJust() : defaultValue; }
     125             :     void setValue(std::unique_ptr<protocol::Value> value) { m_value = std::move(value); }
     126             : 
     127     2850848 :     bool hasUnserializableValue() { return m_unserializableValue.isJust(); }
     128             :     String getUnserializableValue(const String& defaultValue) { return m_unserializableValue.isJust() ? m_unserializableValue.fromJust() : defaultValue; }
     129       71954 :     void setUnserializableValue(const String& value) { m_unserializableValue = value; }
     130             : 
     131             :     bool hasDescription() { return m_description.isJust(); }
     132             :     String getDescription(const String& defaultValue) { return m_description.isJust() ? m_description.fromJust() : defaultValue; }
     133     5856606 :     void setDescription(const String& value) { m_description = value; }
     134             : 
     135             :     bool hasObjectId() { return m_objectId.isJust(); }
     136             :     String getObjectId(const String& defaultValue) { return m_objectId.isJust() ? m_objectId.fromJust() : defaultValue; }
     137     5495710 :     void setObjectId(const String& value) { m_objectId = value; }
     138             : 
     139             :     bool hasPreview() { return m_preview.isJust(); }
     140             :     protocol::Runtime::ObjectPreview* getPreview(protocol::Runtime::ObjectPreview* defaultValue) { return m_preview.isJust() ? m_preview.fromJust() : defaultValue; }
     141             :     void setPreview(std::unique_ptr<protocol::Runtime::ObjectPreview> value) { m_preview = std::move(value); }
     142             : 
     143             :     bool hasCustomPreview() { return m_customPreview.isJust(); }
     144             :     protocol::Runtime::CustomPreview* getCustomPreview(protocol::Runtime::CustomPreview* defaultValue) { return m_customPreview.isJust() ? m_customPreview.fromJust() : defaultValue; }
     145             :     void setCustomPreview(std::unique_ptr<protocol::Runtime::CustomPreview> value) { m_customPreview = std::move(value); }
     146             : 
     147             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
     148           0 :     String serializeToJSON() override { return toValue()->serializeToJSON(); }
     149           0 :     std::vector<uint8_t> serializeToBinary() override { return toValue()->serializeToBinary(); }
     150          90 :     String toJSON() const { return toValue()->toJSONString(); }
     151             :     std::unique_ptr<RemoteObject> clone() const;
     152             :     std::unique_ptr<StringBuffer> toJSONString() const override;
     153             :     void writeBinary(std::vector<uint8_t>* out) const override;
     154             : 
     155             :     template<int STATE>
     156             :     class RemoteObjectBuilder {
     157             :     public:
     158             :         enum {
     159             :             NoFieldsSet = 0,
     160             :             TypeSet = 1 << 1,
     161             :             AllFieldsSet = (TypeSet | 0)};
     162             : 
     163             : 
     164             :         RemoteObjectBuilder<STATE | TypeSet>& setType(const String& value)
     165             :         {
     166             :             static_assert(!(STATE & TypeSet), "property type should not be set yet");
     167             :             m_result->setType(value);
     168             :             return castState<TypeSet>();
     169             :         }
     170             : 
     171             :         RemoteObjectBuilder<STATE>& setSubtype(const String& value)
     172             :         {
     173          95 :             m_result->setSubtype(value);
     174             :             return *this;
     175             :         }
     176             : 
     177             :         RemoteObjectBuilder<STATE>& setClassName(const String& value)
     178             :         {
     179     2729427 :             m_result->setClassName(value);
     180             :             return *this;
     181             :         }
     182             : 
     183             :         RemoteObjectBuilder<STATE>& setValue(std::unique_ptr<protocol::Value> value)
     184             :         {
     185             :             m_result->setValue(std::move(value));
     186             :             return *this;
     187             :         }
     188             : 
     189             :         RemoteObjectBuilder<STATE>& setUnserializableValue(const String& value)
     190             :         {
     191         103 :             m_result->setUnserializableValue(value);
     192             :             return *this;
     193             :         }
     194             : 
     195             :         RemoteObjectBuilder<STATE>& setDescription(const String& value)
     196             :         {
     197     2928303 :             m_result->setDescription(value);
     198             :             return *this;
     199             :         }
     200             : 
     201             :         RemoteObjectBuilder<STATE>& setObjectId(const String& value)
     202             :         {
     203             :             m_result->setObjectId(value);
     204             :             return *this;
     205             :         }
     206             : 
     207             :         RemoteObjectBuilder<STATE>& setPreview(std::unique_ptr<protocol::Runtime::ObjectPreview> value)
     208             :         {
     209             :             m_result->setPreview(std::move(value));
     210             :             return *this;
     211             :         }
     212             : 
     213             :         RemoteObjectBuilder<STATE>& setCustomPreview(std::unique_ptr<protocol::Runtime::CustomPreview> value)
     214             :         {
     215             :             m_result->setCustomPreview(std::move(value));
     216             :             return *this;
     217             :         }
     218             : 
     219             :         std::unique_ptr<RemoteObject> build()
     220             :         {
     221             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
     222             :             return std::move(m_result);
     223             :         }
     224             : 
     225             :     private:
     226             :         friend class RemoteObject;
     227     6162952 :         RemoteObjectBuilder() : m_result(new RemoteObject()) { }
     228             : 
     229             :         template<int STEP> RemoteObjectBuilder<STATE | STEP>& castState()
     230             :         {
     231             :             return *reinterpret_cast<RemoteObjectBuilder<STATE | STEP>*>(this);
     232             :         }
     233             : 
     234             :         std::unique_ptr<protocol::Runtime::RemoteObject> m_result;
     235             :     };
     236             : 
     237             :     static RemoteObjectBuilder<0> create()
     238             :     {
     239     3081476 :         return RemoteObjectBuilder<0>();
     240             :     }
     241             : 
     242             : private:
     243             :     RemoteObject()
     244     3081521 :     {
     245             :     }
     246             : 
     247             :     String m_type;
     248             :     Maybe<String> m_subtype;
     249             :     Maybe<String> m_className;
     250             :     Maybe<protocol::Value> m_value;
     251             :     Maybe<String> m_unserializableValue;
     252             :     Maybe<String> m_description;
     253             :     Maybe<String> m_objectId;
     254             :     Maybe<protocol::Runtime::ObjectPreview> m_preview;
     255             :     Maybe<protocol::Runtime::CustomPreview> m_customPreview;
     256             : };
     257             : 
     258             : 
     259             : class  CustomPreview : public Serializable{
     260             :     PROTOCOL_DISALLOW_COPY(CustomPreview);
     261             : public:
     262             :     static std::unique_ptr<CustomPreview> fromValue(protocol::Value* value, ErrorSupport* errors);
     263             : 
     264         180 :     ~CustomPreview() override { }
     265             : 
     266             :     String getHeader() { return m_header; }
     267             :     void setHeader(const String& value) { m_header = value; }
     268             : 
     269             :     bool hasBodyGetterId() { return m_bodyGetterId.isJust(); }
     270             :     String getBodyGetterId(const String& defaultValue) { return m_bodyGetterId.isJust() ? m_bodyGetterId.fromJust() : defaultValue; }
     271         100 :     void setBodyGetterId(const String& value) { m_bodyGetterId = value; }
     272             : 
     273             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
     274           0 :     String serializeToJSON() override { return toValue()->serializeToJSON(); }
     275           0 :     std::vector<uint8_t> serializeToBinary() override { return toValue()->serializeToBinary(); }
     276             :     String toJSON() const { return toValue()->toJSONString(); }
     277             :     std::unique_ptr<CustomPreview> clone() const;
     278             : 
     279             :     template<int STATE>
     280             :     class CustomPreviewBuilder {
     281             :     public:
     282             :         enum {
     283             :             NoFieldsSet = 0,
     284             :             HeaderSet = 1 << 1,
     285             :             AllFieldsSet = (HeaderSet | 0)};
     286             : 
     287             : 
     288             :         CustomPreviewBuilder<STATE | HeaderSet>& setHeader(const String& value)
     289             :         {
     290             :             static_assert(!(STATE & HeaderSet), "property header should not be set yet");
     291             :             m_result->setHeader(value);
     292             :             return castState<HeaderSet>();
     293             :         }
     294             : 
     295             :         CustomPreviewBuilder<STATE>& setBodyGetterId(const String& value)
     296             :         {
     297             :             m_result->setBodyGetterId(value);
     298             :             return *this;
     299             :         }
     300             : 
     301             :         std::unique_ptr<CustomPreview> build()
     302             :         {
     303             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
     304             :             return std::move(m_result);
     305             :         }
     306             : 
     307             :     private:
     308             :         friend class CustomPreview;
     309         120 :         CustomPreviewBuilder() : m_result(new CustomPreview()) { }
     310             : 
     311             :         template<int STEP> CustomPreviewBuilder<STATE | STEP>& castState()
     312             :         {
     313             :             return *reinterpret_cast<CustomPreviewBuilder<STATE | STEP>*>(this);
     314             :         }
     315             : 
     316             :         std::unique_ptr<protocol::Runtime::CustomPreview> m_result;
     317             :     };
     318             : 
     319             :     static CustomPreviewBuilder<0> create()
     320             :     {
     321          60 :         return CustomPreviewBuilder<0>();
     322             :     }
     323             : 
     324             : private:
     325             :     CustomPreview()
     326          60 :     {
     327             :     }
     328             : 
     329             :     String m_header;
     330             :     Maybe<String> m_bodyGetterId;
     331             : };
     332             : 
     333             : 
     334             : class  ObjectPreview : public Serializable{
     335             :     PROTOCOL_DISALLOW_COPY(ObjectPreview);
     336             : public:
     337             :     static std::unique_ptr<ObjectPreview> fromValue(protocol::Value* value, ErrorSupport* errors);
     338             : 
     339       33585 :     ~ObjectPreview() override { }
     340             : 
     341             :     struct  TypeEnum {
     342             :         static const char* Object;
     343             :         static const char* Function;
     344             :         static const char* Undefined;
     345             :         static const char* String;
     346             :         static const char* Number;
     347             :         static const char* Boolean;
     348             :         static const char* Symbol;
     349             :         static const char* Bigint;
     350             :     }; // TypeEnum
     351             : 
     352             :     String getType() { return m_type; }
     353             :     void setType(const String& value) { m_type = value; }
     354             : 
     355             :     struct  SubtypeEnum {
     356             :         static const char* Array;
     357             :         static const char* Null;
     358             :         static const char* Node;
     359             :         static const char* Regexp;
     360             :         static const char* Date;
     361             :         static const char* Map;
     362             :         static const char* Set;
     363             :         static const char* Weakmap;
     364             :         static const char* Weakset;
     365             :         static const char* Iterator;
     366             :         static const char* Generator;
     367             :         static const char* Error;
     368             :     }; // SubtypeEnum
     369             : 
     370             :     bool hasSubtype() { return m_subtype.isJust(); }
     371             :     String getSubtype(const String& defaultValue) { return m_subtype.isJust() ? m_subtype.fromJust() : defaultValue; }
     372       21020 :     void setSubtype(const String& value) { m_subtype = value; }
     373             : 
     374             :     bool hasDescription() { return m_description.isJust(); }
     375         310 :     String getDescription(const String& defaultValue) { return m_description.isJust() ? m_description.fromJust() : defaultValue; }
     376       22390 :     void setDescription(const String& value) { m_description = value; }
     377             : 
     378             :     bool getOverflow() { return m_overflow; }
     379       11195 :     void setOverflow(bool value) { m_overflow = value; }
     380             : 
     381             :     protocol::Array<protocol::Runtime::PropertyPreview>* getProperties() { return m_properties.get(); }
     382             :     void setProperties(std::unique_ptr<protocol::Array<protocol::Runtime::PropertyPreview>> value) { m_properties = std::move(value); }
     383             : 
     384             :     bool hasEntries() { return m_entries.isJust(); }
     385             :     protocol::Array<protocol::Runtime::EntryPreview>* getEntries(protocol::Array<protocol::Runtime::EntryPreview>* defaultValue) { return m_entries.isJust() ? m_entries.fromJust() : defaultValue; }
     386             :     void setEntries(std::unique_ptr<protocol::Array<protocol::Runtime::EntryPreview>> value) { m_entries = std::move(value); }
     387             : 
     388             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
     389           0 :     String serializeToJSON() override { return toValue()->serializeToJSON(); }
     390           0 :     std::vector<uint8_t> serializeToBinary() override { return toValue()->serializeToBinary(); }
     391             :     String toJSON() const { return toValue()->toJSONString(); }
     392             :     std::unique_ptr<ObjectPreview> clone() const;
     393             : 
     394             :     template<int STATE>
     395             :     class ObjectPreviewBuilder {
     396             :     public:
     397             :         enum {
     398             :             NoFieldsSet = 0,
     399             :             TypeSet = 1 << 1,
     400             :             OverflowSet = 1 << 2,
     401             :             PropertiesSet = 1 << 3,
     402             :             AllFieldsSet = (TypeSet | OverflowSet | PropertiesSet | 0)};
     403             : 
     404             : 
     405             :         ObjectPreviewBuilder<STATE | TypeSet>& setType(const String& value)
     406             :         {
     407             :             static_assert(!(STATE & TypeSet), "property type should not be set yet");
     408             :             m_result->setType(value);
     409             :             return castState<TypeSet>();
     410             :         }
     411             : 
     412             :         ObjectPreviewBuilder<STATE>& setSubtype(const String& value)
     413             :         {
     414             :             m_result->setSubtype(value);
     415             :             return *this;
     416             :         }
     417             : 
     418             :         ObjectPreviewBuilder<STATE>& setDescription(const String& value)
     419             :         {
     420       11195 :             m_result->setDescription(value);
     421             :             return *this;
     422             :         }
     423             : 
     424             :         ObjectPreviewBuilder<STATE | OverflowSet>& setOverflow(bool value)
     425             :         {
     426             :             static_assert(!(STATE & OverflowSet), "property overflow should not be set yet");
     427             :             m_result->setOverflow(value);
     428             :             return castState<OverflowSet>();
     429             :         }
     430             : 
     431             :         ObjectPreviewBuilder<STATE | PropertiesSet>& setProperties(std::unique_ptr<protocol::Array<protocol::Runtime::PropertyPreview>> value)
     432             :         {
     433             :             static_assert(!(STATE & PropertiesSet), "property properties should not be set yet");
     434             :             m_result->setProperties(std::move(value));
     435             :             return castState<PropertiesSet>();
     436             :         }
     437             : 
     438             :         ObjectPreviewBuilder<STATE>& setEntries(std::unique_ptr<protocol::Array<protocol::Runtime::EntryPreview>> value)
     439             :         {
     440             :             m_result->setEntries(std::move(value));
     441             :             return *this;
     442             :         }
     443             : 
     444             :         std::unique_ptr<ObjectPreview> build()
     445             :         {
     446             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
     447             :             return std::move(m_result);
     448             :         }
     449             : 
     450             :     private:
     451             :         friend class ObjectPreview;
     452       22390 :         ObjectPreviewBuilder() : m_result(new ObjectPreview()) { }
     453             : 
     454             :         template<int STEP> ObjectPreviewBuilder<STATE | STEP>& castState()
     455             :         {
     456             :             return *reinterpret_cast<ObjectPreviewBuilder<STATE | STEP>*>(this);
     457             :         }
     458             : 
     459             :         std::unique_ptr<protocol::Runtime::ObjectPreview> m_result;
     460             :     };
     461             : 
     462             :     static ObjectPreviewBuilder<0> create()
     463             :     {
     464       11195 :         return ObjectPreviewBuilder<0>();
     465             :     }
     466             : 
     467             : private:
     468             :     ObjectPreview()
     469       22390 :     {
     470       11195 :           m_overflow = false;
     471             :     }
     472             : 
     473             :     String m_type;
     474             :     Maybe<String> m_subtype;
     475             :     Maybe<String> m_description;
     476             :     bool m_overflow;
     477             :     std::unique_ptr<protocol::Array<protocol::Runtime::PropertyPreview>> m_properties;
     478             :     Maybe<protocol::Array<protocol::Runtime::EntryPreview>> m_entries;
     479             : };
     480             : 
     481             : 
     482             : class  PropertyPreview : public Serializable{
     483             :     PROTOCOL_DISALLOW_COPY(PropertyPreview);
     484             : public:
     485             :     static std::unique_ptr<PropertyPreview> fromValue(protocol::Value* value, ErrorSupport* errors);
     486             : 
     487       96450 :     ~PropertyPreview() override { }
     488             : 
     489             :     String getName() { return m_name; }
     490             :     void setName(const String& value) { m_name = value; }
     491             : 
     492             :     struct  TypeEnum {
     493             :         static const char* Object;
     494             :         static const char* Function;
     495             :         static const char* Undefined;
     496             :         static const char* String;
     497             :         static const char* Number;
     498             :         static const char* Boolean;
     499             :         static const char* Symbol;
     500             :         static const char* Accessor;
     501             :         static const char* Bigint;
     502             :     }; // TypeEnum
     503             : 
     504             :     String getType() { return m_type; }
     505             :     void setType(const String& value) { m_type = value; }
     506             : 
     507             :     bool hasValue() { return m_value.isJust(); }
     508             :     String getValue(const String& defaultValue) { return m_value.isJust() ? m_value.fromJust() : defaultValue; }
     509       64180 :     void setValue(const String& value) { m_value = value; }
     510             : 
     511             :     bool hasValuePreview() { return m_valuePreview.isJust(); }
     512          25 :     protocol::Runtime::ObjectPreview* getValuePreview(protocol::Runtime::ObjectPreview* defaultValue) { return m_valuePreview.isJust() ? m_valuePreview.fromJust() : defaultValue; }
     513             :     void setValuePreview(std::unique_ptr<protocol::Runtime::ObjectPreview> value) { m_valuePreview = std::move(value); }
     514             : 
     515             :     struct  SubtypeEnum {
     516             :         static const char* Array;
     517             :         static const char* Null;
     518             :         static const char* Node;
     519             :         static const char* Regexp;
     520             :         static const char* Date;
     521             :         static const char* Map;
     522             :         static const char* Set;
     523             :         static const char* Weakmap;
     524             :         static const char* Weakset;
     525             :         static const char* Iterator;
     526             :         static const char* Generator;
     527             :         static const char* Error;
     528             :     }; // SubtypeEnum
     529             : 
     530             :     bool hasSubtype() { return m_subtype.isJust(); }
     531             :     String getSubtype(const String& defaultValue) { return m_subtype.isJust() ? m_subtype.fromJust() : defaultValue; }
     532       20370 :     void setSubtype(const String& value) { m_subtype = value; }
     533             : 
     534             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
     535           0 :     String serializeToJSON() override { return toValue()->serializeToJSON(); }
     536           0 :     std::vector<uint8_t> serializeToBinary() override { return toValue()->serializeToBinary(); }
     537             :     String toJSON() const { return toValue()->toJSONString(); }
     538             :     std::unique_ptr<PropertyPreview> clone() const;
     539             : 
     540             :     template<int STATE>
     541             :     class PropertyPreviewBuilder {
     542             :     public:
     543             :         enum {
     544             :             NoFieldsSet = 0,
     545             :             NameSet = 1 << 1,
     546             :             TypeSet = 1 << 2,
     547             :             AllFieldsSet = (NameSet | TypeSet | 0)};
     548             : 
     549             : 
     550             :         PropertyPreviewBuilder<STATE | NameSet>& setName(const String& value)
     551             :         {
     552             :             static_assert(!(STATE & NameSet), "property name should not be set yet");
     553             :             m_result->setName(value);
     554             :             return castState<NameSet>();
     555             :         }
     556             : 
     557             :         PropertyPreviewBuilder<STATE | TypeSet>& setType(const String& value)
     558             :         {
     559             :             static_assert(!(STATE & TypeSet), "property type should not be set yet");
     560             :             m_result->setType(value);
     561             :             return castState<TypeSet>();
     562             :         }
     563             : 
     564             :         PropertyPreviewBuilder<STATE>& setValue(const String& value)
     565             :         {
     566       32090 :             m_result->setValue(value);
     567             :             return *this;
     568             :         }
     569             : 
     570             :         PropertyPreviewBuilder<STATE>& setValuePreview(std::unique_ptr<protocol::Runtime::ObjectPreview> value)
     571             :         {
     572             :             m_result->setValuePreview(std::move(value));
     573             :             return *this;
     574             :         }
     575             : 
     576             :         PropertyPreviewBuilder<STATE>& setSubtype(const String& value)
     577             :         {
     578             :             m_result->setSubtype(value);
     579             :             return *this;
     580             :         }
     581             : 
     582             :         std::unique_ptr<PropertyPreview> build()
     583             :         {
     584             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
     585             :             return std::move(m_result);
     586             :         }
     587             : 
     588             :     private:
     589             :         friend class PropertyPreview;
     590       64250 :         PropertyPreviewBuilder() : m_result(new PropertyPreview()) { }
     591             : 
     592             :         template<int STEP> PropertyPreviewBuilder<STATE | STEP>& castState()
     593             :         {
     594             :             return *reinterpret_cast<PropertyPreviewBuilder<STATE | STEP>*>(this);
     595             :         }
     596             : 
     597             :         std::unique_ptr<protocol::Runtime::PropertyPreview> m_result;
     598             :     };
     599             : 
     600             :     static PropertyPreviewBuilder<0> create()
     601             :     {
     602       32125 :         return PropertyPreviewBuilder<0>();
     603             :     }
     604             : 
     605             : private:
     606             :     PropertyPreview()
     607       32150 :     {
     608             :     }
     609             : 
     610             :     String m_name;
     611             :     String m_type;
     612             :     Maybe<String> m_value;
     613             :     Maybe<protocol::Runtime::ObjectPreview> m_valuePreview;
     614             :     Maybe<String> m_subtype;
     615             : };
     616             : 
     617             : 
     618             : class  EntryPreview : public Serializable{
     619             :     PROTOCOL_DISALLOW_COPY(EntryPreview);
     620             : public:
     621             :     static std::unique_ptr<EntryPreview> fromValue(protocol::Value* value, ErrorSupport* errors);
     622             : 
     623         570 :     ~EntryPreview() override { }
     624             : 
     625             :     bool hasKey() { return m_key.isJust(); }
     626             :     protocol::Runtime::ObjectPreview* getKey(protocol::Runtime::ObjectPreview* defaultValue) { return m_key.isJust() ? m_key.fromJust() : defaultValue; }
     627             :     void setKey(std::unique_ptr<protocol::Runtime::ObjectPreview> value) { m_key = std::move(value); }
     628             : 
     629             :     protocol::Runtime::ObjectPreview* getValue() { return m_value.get(); }
     630             :     void setValue(std::unique_ptr<protocol::Runtime::ObjectPreview> value) { m_value = std::move(value); }
     631             : 
     632             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
     633           0 :     String serializeToJSON() override { return toValue()->serializeToJSON(); }
     634           0 :     std::vector<uint8_t> serializeToBinary() override { return toValue()->serializeToBinary(); }
     635             :     String toJSON() const { return toValue()->toJSONString(); }
     636             :     std::unique_ptr<EntryPreview> clone() const;
     637             : 
     638             :     template<int STATE>
     639             :     class EntryPreviewBuilder {
     640             :     public:
     641             :         enum {
     642             :             NoFieldsSet = 0,
     643             :             ValueSet = 1 << 1,
     644             :             AllFieldsSet = (ValueSet | 0)};
     645             : 
     646             : 
     647             :         EntryPreviewBuilder<STATE>& setKey(std::unique_ptr<protocol::Runtime::ObjectPreview> value)
     648             :         {
     649             :             m_result->setKey(std::move(value));
     650             :             return *this;
     651             :         }
     652             : 
     653             :         EntryPreviewBuilder<STATE | ValueSet>& setValue(std::unique_ptr<protocol::Runtime::ObjectPreview> value)
     654             :         {
     655             :             static_assert(!(STATE & ValueSet), "property value should not be set yet");
     656             :             m_result->setValue(std::move(value));
     657             :             return castState<ValueSet>();
     658             :         }
     659             : 
     660             :         std::unique_ptr<EntryPreview> build()
     661             :         {
     662             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
     663             :             return std::move(m_result);
     664             :         }
     665             : 
     666             :     private:
     667             :         friend class EntryPreview;
     668         380 :         EntryPreviewBuilder() : m_result(new EntryPreview()) { }
     669             : 
     670             :         template<int STEP> EntryPreviewBuilder<STATE | STEP>& castState()
     671             :         {
     672             :             return *reinterpret_cast<EntryPreviewBuilder<STATE | STEP>*>(this);
     673             :         }
     674             : 
     675             :         std::unique_ptr<protocol::Runtime::EntryPreview> m_result;
     676             :     };
     677             : 
     678             :     static EntryPreviewBuilder<0> create()
     679             :     {
     680         190 :         return EntryPreviewBuilder<0>();
     681             :     }
     682             : 
     683             : private:
     684             :     EntryPreview()
     685         380 :     {
     686             :     }
     687             : 
     688             :     Maybe<protocol::Runtime::ObjectPreview> m_key;
     689             :     std::unique_ptr<protocol::Runtime::ObjectPreview> m_value;
     690             : };
     691             : 
     692             : 
     693             : class  PropertyDescriptor : public Serializable{
     694             :     PROTOCOL_DISALLOW_COPY(PropertyDescriptor);
     695             : public:
     696             :     static std::unique_ptr<PropertyDescriptor> fromValue(protocol::Value* value, ErrorSupport* errors);
     697             : 
     698     7520082 :     ~PropertyDescriptor() override { }
     699             : 
     700             :     String getName() { return m_name; }
     701             :     void setName(const String& value) { m_name = value; }
     702             : 
     703             :     bool hasValue() { return m_value.isJust(); }
     704             :     protocol::Runtime::RemoteObject* getValue(protocol::Runtime::RemoteObject* defaultValue) { return m_value.isJust() ? m_value.fromJust() : defaultValue; }
     705             :     void setValue(std::unique_ptr<protocol::Runtime::RemoteObject> value) { m_value = std::move(value); }
     706             : 
     707             :     bool hasWritable() { return m_writable.isJust(); }
     708             :     bool getWritable(bool defaultValue) { return m_writable.isJust() ? m_writable.fromJust() : defaultValue; }
     709             :     void setWritable(bool value) { m_writable = value; }
     710             : 
     711             :     bool hasGet() { return m_get.isJust(); }
     712             :     protocol::Runtime::RemoteObject* getGet(protocol::Runtime::RemoteObject* defaultValue) { return m_get.isJust() ? m_get.fromJust() : defaultValue; }
     713             :     void setGet(std::unique_ptr<protocol::Runtime::RemoteObject> value) { m_get = std::move(value); }
     714             : 
     715             :     bool hasSet() { return m_set.isJust(); }
     716             :     protocol::Runtime::RemoteObject* getSet(protocol::Runtime::RemoteObject* defaultValue) { return m_set.isJust() ? m_set.fromJust() : defaultValue; }
     717             :     void setSet(std::unique_ptr<protocol::Runtime::RemoteObject> value) { m_set = std::move(value); }
     718             : 
     719             :     bool getConfigurable() { return m_configurable; }
     720     2506694 :     void setConfigurable(bool value) { m_configurable = value; }
     721             : 
     722             :     bool getEnumerable() { return m_enumerable; }
     723     2506694 :     void setEnumerable(bool value) { m_enumerable = value; }
     724             : 
     725             :     bool hasWasThrown() { return m_wasThrown.isJust(); }
     726             :     bool getWasThrown(bool defaultValue) { return m_wasThrown.isJust() ? m_wasThrown.fromJust() : defaultValue; }
     727             :     void setWasThrown(bool value) { m_wasThrown = value; }
     728             : 
     729             :     bool hasIsOwn() { return m_isOwn.isJust(); }
     730             :     bool getIsOwn(bool defaultValue) { return m_isOwn.isJust() ? m_isOwn.fromJust() : defaultValue; }
     731             :     void setIsOwn(bool value) { m_isOwn = value; }
     732             : 
     733             :     bool hasSymbol() { return m_symbol.isJust(); }
     734             :     protocol::Runtime::RemoteObject* getSymbol(protocol::Runtime::RemoteObject* defaultValue) { return m_symbol.isJust() ? m_symbol.fromJust() : defaultValue; }
     735             :     void setSymbol(std::unique_ptr<protocol::Runtime::RemoteObject> value) { m_symbol = std::move(value); }
     736             : 
     737             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
     738           0 :     String serializeToJSON() override { return toValue()->serializeToJSON(); }
     739           0 :     std::vector<uint8_t> serializeToBinary() override { return toValue()->serializeToBinary(); }
     740             :     String toJSON() const { return toValue()->toJSONString(); }
     741             :     std::unique_ptr<PropertyDescriptor> clone() const;
     742             : 
     743             :     template<int STATE>
     744             :     class PropertyDescriptorBuilder {
     745             :     public:
     746             :         enum {
     747             :             NoFieldsSet = 0,
     748             :             NameSet = 1 << 1,
     749             :             ConfigurableSet = 1 << 2,
     750             :             EnumerableSet = 1 << 3,
     751             :             AllFieldsSet = (NameSet | ConfigurableSet | EnumerableSet | 0)};
     752             : 
     753             : 
     754             :         PropertyDescriptorBuilder<STATE | NameSet>& setName(const String& value)
     755             :         {
     756             :             static_assert(!(STATE & NameSet), "property name should not be set yet");
     757             :             m_result->setName(value);
     758             :             return castState<NameSet>();
     759             :         }
     760             : 
     761             :         PropertyDescriptorBuilder<STATE>& setValue(std::unique_ptr<protocol::Runtime::RemoteObject> value)
     762             :         {
     763             :             m_result->setValue(std::move(value));
     764             :             return *this;
     765             :         }
     766             : 
     767             :         PropertyDescriptorBuilder<STATE>& setWritable(bool value)
     768             :         {
     769             :             m_result->setWritable(value);
     770             :             return *this;
     771             :         }
     772             : 
     773             :         PropertyDescriptorBuilder<STATE>& setGet(std::unique_ptr<protocol::Runtime::RemoteObject> value)
     774             :         {
     775             :             m_result->setGet(std::move(value));
     776             :             return *this;
     777             :         }
     778             : 
     779             :         PropertyDescriptorBuilder<STATE>& setSet(std::unique_ptr<protocol::Runtime::RemoteObject> value)
     780             :         {
     781             :             m_result->setSet(std::move(value));
     782             :             return *this;
     783             :         }
     784             : 
     785             :         PropertyDescriptorBuilder<STATE | ConfigurableSet>& setConfigurable(bool value)
     786             :         {
     787             :             static_assert(!(STATE & ConfigurableSet), "property configurable should not be set yet");
     788             :             m_result->setConfigurable(value);
     789             :             return castState<ConfigurableSet>();
     790             :         }
     791             : 
     792             :         PropertyDescriptorBuilder<STATE | EnumerableSet>& setEnumerable(bool value)
     793             :         {
     794             :             static_assert(!(STATE & EnumerableSet), "property enumerable should not be set yet");
     795             :             m_result->setEnumerable(value);
     796             :             return castState<EnumerableSet>();
     797             :         }
     798             : 
     799             :         PropertyDescriptorBuilder<STATE>& setWasThrown(bool value)
     800             :         {
     801             :             m_result->setWasThrown(value);
     802             :             return *this;
     803             :         }
     804             : 
     805             :         PropertyDescriptorBuilder<STATE>& setIsOwn(bool value)
     806             :         {
     807             :             m_result->setIsOwn(value);
     808             :             return *this;
     809             :         }
     810             : 
     811             :         PropertyDescriptorBuilder<STATE>& setSymbol(std::unique_ptr<protocol::Runtime::RemoteObject> value)
     812             :         {
     813             :             m_result->setSymbol(std::move(value));
     814             :             return *this;
     815             :         }
     816             : 
     817             :         std::unique_ptr<PropertyDescriptor> build()
     818             :         {
     819             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
     820             :             return std::move(m_result);
     821             :         }
     822             : 
     823             :     private:
     824             :         friend class PropertyDescriptor;
     825     5013388 :         PropertyDescriptorBuilder() : m_result(new PropertyDescriptor()) { }
     826             : 
     827             :         template<int STEP> PropertyDescriptorBuilder<STATE | STEP>& castState()
     828             :         {
     829             :             return *reinterpret_cast<PropertyDescriptorBuilder<STATE | STEP>*>(this);
     830             :         }
     831             : 
     832             :         std::unique_ptr<protocol::Runtime::PropertyDescriptor> m_result;
     833             :     };
     834             : 
     835             :     static PropertyDescriptorBuilder<0> create()
     836             :     {
     837     2506694 :         return PropertyDescriptorBuilder<0>();
     838             :     }
     839             : 
     840             : private:
     841             :     PropertyDescriptor()
     842     2506694 :     {
     843     2506694 :           m_configurable = false;
     844     2506694 :           m_enumerable = false;
     845             :     }
     846             : 
     847             :     String m_name;
     848             :     Maybe<protocol::Runtime::RemoteObject> m_value;
     849             :     Maybe<bool> m_writable;
     850             :     Maybe<protocol::Runtime::RemoteObject> m_get;
     851             :     Maybe<protocol::Runtime::RemoteObject> m_set;
     852             :     bool m_configurable;
     853             :     bool m_enumerable;
     854             :     Maybe<bool> m_wasThrown;
     855             :     Maybe<bool> m_isOwn;
     856             :     Maybe<protocol::Runtime::RemoteObject> m_symbol;
     857             : };
     858             : 
     859             : 
     860             : class  InternalPropertyDescriptor : public Serializable{
     861             :     PROTOCOL_DISALLOW_COPY(InternalPropertyDescriptor);
     862             : public:
     863             :     static std::unique_ptr<InternalPropertyDescriptor> fromValue(protocol::Value* value, ErrorSupport* errors);
     864             : 
     865        3177 :     ~InternalPropertyDescriptor() override { }
     866             : 
     867             :     String getName() { return m_name; }
     868             :     void setName(const String& value) { m_name = value; }
     869             : 
     870             :     bool hasValue() { return m_value.isJust(); }
     871             :     protocol::Runtime::RemoteObject* getValue(protocol::Runtime::RemoteObject* defaultValue) { return m_value.isJust() ? m_value.fromJust() : defaultValue; }
     872             :     void setValue(std::unique_ptr<protocol::Runtime::RemoteObject> value) { m_value = std::move(value); }
     873             : 
     874             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
     875           0 :     String serializeToJSON() override { return toValue()->serializeToJSON(); }
     876           0 :     std::vector<uint8_t> serializeToBinary() override { return toValue()->serializeToBinary(); }
     877             :     String toJSON() const { return toValue()->toJSONString(); }
     878             :     std::unique_ptr<InternalPropertyDescriptor> clone() const;
     879             : 
     880             :     template<int STATE>
     881             :     class InternalPropertyDescriptorBuilder {
     882             :     public:
     883             :         enum {
     884             :             NoFieldsSet = 0,
     885             :             NameSet = 1 << 1,
     886             :             AllFieldsSet = (NameSet | 0)};
     887             : 
     888             : 
     889             :         InternalPropertyDescriptorBuilder<STATE | NameSet>& setName(const String& value)
     890             :         {
     891             :             static_assert(!(STATE & NameSet), "property name should not be set yet");
     892             :             m_result->setName(value);
     893             :             return castState<NameSet>();
     894             :         }
     895             : 
     896             :         InternalPropertyDescriptorBuilder<STATE>& setValue(std::unique_ptr<protocol::Runtime::RemoteObject> value)
     897             :         {
     898             :             m_result->setValue(std::move(value));
     899             :             return *this;
     900             :         }
     901             : 
     902             :         std::unique_ptr<InternalPropertyDescriptor> build()
     903             :         {
     904             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
     905             :             return std::move(m_result);
     906             :         }
     907             : 
     908             :     private:
     909             :         friend class InternalPropertyDescriptor;
     910        2118 :         InternalPropertyDescriptorBuilder() : m_result(new InternalPropertyDescriptor()) { }
     911             : 
     912             :         template<int STEP> InternalPropertyDescriptorBuilder<STATE | STEP>& castState()
     913             :         {
     914             :             return *reinterpret_cast<InternalPropertyDescriptorBuilder<STATE | STEP>*>(this);
     915             :         }
     916             : 
     917             :         std::unique_ptr<protocol::Runtime::InternalPropertyDescriptor> m_result;
     918             :     };
     919             : 
     920             :     static InternalPropertyDescriptorBuilder<0> create()
     921             :     {
     922        1059 :         return InternalPropertyDescriptorBuilder<0>();
     923             :     }
     924             : 
     925             : private:
     926             :     InternalPropertyDescriptor()
     927        1059 :     {
     928             :     }
     929             : 
     930             :     String m_name;
     931             :     Maybe<protocol::Runtime::RemoteObject> m_value;
     932             : };
     933             : 
     934             : 
     935             : class  CallArgument : public Serializable{
     936             :     PROTOCOL_DISALLOW_COPY(CallArgument);
     937             : public:
     938             :     static std::unique_ptr<CallArgument> fromValue(protocol::Value* value, ErrorSupport* errors);
     939             : 
     940        1128 :     ~CallArgument() override { }
     941             : 
     942             :     bool hasValue() { return m_value.isJust(); }
     943         236 :     protocol::Value* getValue(protocol::Value* defaultValue) { return m_value.isJust() ? m_value.fromJust() : defaultValue; }
     944             :     void setValue(std::unique_ptr<protocol::Value> value) { m_value = std::move(value); }
     945             : 
     946          35 :     bool hasUnserializableValue() { return m_unserializableValue.isJust(); }
     947          60 :     String getUnserializableValue(const String& defaultValue) { return m_unserializableValue.isJust() ? m_unserializableValue.fromJust() : defaultValue; }
     948             :     void setUnserializableValue(const String& value) { m_unserializableValue = value; }
     949             : 
     950         366 :     bool hasObjectId() { return m_objectId.isJust(); }
     951         190 :     String getObjectId(const String& defaultValue) { return m_objectId.isJust() ? m_objectId.fromJust() : defaultValue; }
     952             :     void setObjectId(const String& value) { m_objectId = value; }
     953             : 
     954             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
     955           0 :     String serializeToJSON() override { return toValue()->serializeToJSON(); }
     956           0 :     std::vector<uint8_t> serializeToBinary() override { return toValue()->serializeToBinary(); }
     957             :     String toJSON() const { return toValue()->toJSONString(); }
     958             :     std::unique_ptr<CallArgument> clone() const;
     959             : 
     960             :     template<int STATE>
     961             :     class CallArgumentBuilder {
     962             :     public:
     963             :         enum {
     964             :             NoFieldsSet = 0,
     965             :             AllFieldsSet = (0)};
     966             : 
     967             : 
     968             :         CallArgumentBuilder<STATE>& setValue(std::unique_ptr<protocol::Value> value)
     969             :         {
     970             :             m_result->setValue(std::move(value));
     971             :             return *this;
     972             :         }
     973             : 
     974             :         CallArgumentBuilder<STATE>& setUnserializableValue(const String& value)
     975             :         {
     976             :             m_result->setUnserializableValue(value);
     977             :             return *this;
     978             :         }
     979             : 
     980             :         CallArgumentBuilder<STATE>& setObjectId(const String& value)
     981             :         {
     982             :             m_result->setObjectId(value);
     983             :             return *this;
     984             :         }
     985             : 
     986             :         std::unique_ptr<CallArgument> build()
     987             :         {
     988             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
     989             :             return std::move(m_result);
     990             :         }
     991             : 
     992             :     private:
     993             :         friend class CallArgument;
     994             :         CallArgumentBuilder() : m_result(new CallArgument()) { }
     995             : 
     996             :         template<int STEP> CallArgumentBuilder<STATE | STEP>& castState()
     997             :         {
     998             :             return *reinterpret_cast<CallArgumentBuilder<STATE | STEP>*>(this);
     999             :         }
    1000             : 
    1001             :         std::unique_ptr<protocol::Runtime::CallArgument> m_result;
    1002             :     };
    1003             : 
    1004             :     static CallArgumentBuilder<0> create()
    1005             :     {
    1006             :         return CallArgumentBuilder<0>();
    1007             :     }
    1008             : 
    1009             : private:
    1010             :     CallArgument()
    1011         376 :     {
    1012             :     }
    1013             : 
    1014             :     Maybe<protocol::Value> m_value;
    1015             :     Maybe<String> m_unserializableValue;
    1016             :     Maybe<String> m_objectId;
    1017             : };
    1018             : 
    1019             : 
    1020             : class  ExecutionContextDescription : public Serializable{
    1021             :     PROTOCOL_DISALLOW_COPY(ExecutionContextDescription);
    1022             : public:
    1023             :     static std::unique_ptr<ExecutionContextDescription> fromValue(protocol::Value* value, ErrorSupport* errors);
    1024             : 
    1025        2046 :     ~ExecutionContextDescription() override { }
    1026             : 
    1027             :     int getId() { return m_id; }
    1028         682 :     void setId(int value) { m_id = value; }
    1029             : 
    1030             :     String getOrigin() { return m_origin; }
    1031             :     void setOrigin(const String& value) { m_origin = value; }
    1032             : 
    1033             :     String getName() { return m_name; }
    1034             :     void setName(const String& value) { m_name = value; }
    1035             : 
    1036             :     bool hasAuxData() { return m_auxData.isJust(); }
    1037             :     protocol::DictionaryValue* getAuxData(protocol::DictionaryValue* defaultValue) { return m_auxData.isJust() ? m_auxData.fromJust() : defaultValue; }
    1038             :     void setAuxData(std::unique_ptr<protocol::DictionaryValue> value) { m_auxData = std::move(value); }
    1039             : 
    1040             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
    1041           0 :     String serializeToJSON() override { return toValue()->serializeToJSON(); }
    1042           0 :     std::vector<uint8_t> serializeToBinary() override { return toValue()->serializeToBinary(); }
    1043             :     String toJSON() const { return toValue()->toJSONString(); }
    1044             :     std::unique_ptr<ExecutionContextDescription> clone() const;
    1045             : 
    1046             :     template<int STATE>
    1047             :     class ExecutionContextDescriptionBuilder {
    1048             :     public:
    1049             :         enum {
    1050             :             NoFieldsSet = 0,
    1051             :             IdSet = 1 << 1,
    1052             :             OriginSet = 1 << 2,
    1053             :             NameSet = 1 << 3,
    1054             :             AllFieldsSet = (IdSet | OriginSet | NameSet | 0)};
    1055             : 
    1056             : 
    1057             :         ExecutionContextDescriptionBuilder<STATE | IdSet>& setId(int value)
    1058             :         {
    1059             :             static_assert(!(STATE & IdSet), "property id should not be set yet");
    1060             :             m_result->setId(value);
    1061             :             return castState<IdSet>();
    1062             :         }
    1063             : 
    1064             :         ExecutionContextDescriptionBuilder<STATE | OriginSet>& setOrigin(const String& value)
    1065             :         {
    1066             :             static_assert(!(STATE & OriginSet), "property origin should not be set yet");
    1067             :             m_result->setOrigin(value);
    1068             :             return castState<OriginSet>();
    1069             :         }
    1070             : 
    1071             :         ExecutionContextDescriptionBuilder<STATE | NameSet>& setName(const String& value)
    1072             :         {
    1073             :             static_assert(!(STATE & NameSet), "property name should not be set yet");
    1074             :             m_result->setName(value);
    1075             :             return castState<NameSet>();
    1076             :         }
    1077             : 
    1078             :         ExecutionContextDescriptionBuilder<STATE>& setAuxData(std::unique_ptr<protocol::DictionaryValue> value)
    1079             :         {
    1080             :             m_result->setAuxData(std::move(value));
    1081             :             return *this;
    1082             :         }
    1083             : 
    1084             :         std::unique_ptr<ExecutionContextDescription> build()
    1085             :         {
    1086             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
    1087             :             return std::move(m_result);
    1088             :         }
    1089             : 
    1090             :     private:
    1091             :         friend class ExecutionContextDescription;
    1092        1364 :         ExecutionContextDescriptionBuilder() : m_result(new ExecutionContextDescription()) { }
    1093             : 
    1094             :         template<int STEP> ExecutionContextDescriptionBuilder<STATE | STEP>& castState()
    1095             :         {
    1096             :             return *reinterpret_cast<ExecutionContextDescriptionBuilder<STATE | STEP>*>(this);
    1097             :         }
    1098             : 
    1099             :         std::unique_ptr<protocol::Runtime::ExecutionContextDescription> m_result;
    1100             :     };
    1101             : 
    1102             :     static ExecutionContextDescriptionBuilder<0> create()
    1103             :     {
    1104         682 :         return ExecutionContextDescriptionBuilder<0>();
    1105             :     }
    1106             : 
    1107             : private:
    1108             :     ExecutionContextDescription()
    1109         682 :     {
    1110         682 :           m_id = 0;
    1111             :     }
    1112             : 
    1113             :     int m_id;
    1114             :     String m_origin;
    1115             :     String m_name;
    1116             :     Maybe<protocol::DictionaryValue> m_auxData;
    1117             : };
    1118             : 
    1119             : 
    1120             : class  ExceptionDetails : public Serializable{
    1121             :     PROTOCOL_DISALLOW_COPY(ExceptionDetails);
    1122             : public:
    1123             :     static std::unique_ptr<ExceptionDetails> fromValue(protocol::Value* value, ErrorSupport* errors);
    1124             : 
    1125        5391 :     ~ExceptionDetails() override { }
    1126             : 
    1127             :     int getExceptionId() { return m_exceptionId; }
    1128        1797 :     void setExceptionId(int value) { m_exceptionId = value; }
    1129             : 
    1130             :     String getText() { return m_text; }
    1131             :     void setText(const String& value) { m_text = value; }
    1132             : 
    1133             :     int getLineNumber() { return m_lineNumber; }
    1134        1797 :     void setLineNumber(int value) { m_lineNumber = value; }
    1135             : 
    1136             :     int getColumnNumber() { return m_columnNumber; }
    1137        1797 :     void setColumnNumber(int value) { m_columnNumber = value; }
    1138             : 
    1139             :     bool hasScriptId() { return m_scriptId.isJust(); }
    1140             :     String getScriptId(const String& defaultValue) { return m_scriptId.isJust() ? m_scriptId.fromJust() : defaultValue; }
    1141        3344 :     void setScriptId(const String& value) { m_scriptId = value; }
    1142             : 
    1143             :     bool hasUrl() { return m_url.isJust(); }
    1144             :     String getUrl(const String& defaultValue) { return m_url.isJust() ? m_url.fromJust() : defaultValue; }
    1145          40 :     void setUrl(const String& value) { m_url = value; }
    1146             : 
    1147             :     bool hasStackTrace() { return m_stackTrace.isJust(); }
    1148             :     protocol::Runtime::StackTrace* getStackTrace(protocol::Runtime::StackTrace* defaultValue) { return m_stackTrace.isJust() ? m_stackTrace.fromJust() : defaultValue; }
    1149             :     void setStackTrace(std::unique_ptr<protocol::Runtime::StackTrace> value) { m_stackTrace = std::move(value); }
    1150             : 
    1151             :     bool hasException() { return m_exception.isJust(); }
    1152             :     protocol::Runtime::RemoteObject* getException(protocol::Runtime::RemoteObject* defaultValue) { return m_exception.isJust() ? m_exception.fromJust() : defaultValue; }
    1153             :     void setException(std::unique_ptr<protocol::Runtime::RemoteObject> value) { m_exception = std::move(value); }
    1154             : 
    1155             :     bool hasExecutionContextId() { return m_executionContextId.isJust(); }
    1156             :     int getExecutionContextId(int defaultValue) { return m_executionContextId.isJust() ? m_executionContextId.fromJust() : defaultValue; }
    1157             :     void setExecutionContextId(int value) { m_executionContextId = value; }
    1158             : 
    1159             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
    1160           0 :     String serializeToJSON() override { return toValue()->serializeToJSON(); }
    1161           0 :     std::vector<uint8_t> serializeToBinary() override { return toValue()->serializeToBinary(); }
    1162             :     String toJSON() const { return toValue()->toJSONString(); }
    1163             :     std::unique_ptr<ExceptionDetails> clone() const;
    1164             : 
    1165             :     template<int STATE>
    1166             :     class ExceptionDetailsBuilder {
    1167             :     public:
    1168             :         enum {
    1169             :             NoFieldsSet = 0,
    1170             :             ExceptionIdSet = 1 << 1,
    1171             :             TextSet = 1 << 2,
    1172             :             LineNumberSet = 1 << 3,
    1173             :             ColumnNumberSet = 1 << 4,
    1174             :             AllFieldsSet = (ExceptionIdSet | TextSet | LineNumberSet | ColumnNumberSet | 0)};
    1175             : 
    1176             : 
    1177             :         ExceptionDetailsBuilder<STATE | ExceptionIdSet>& setExceptionId(int value)
    1178             :         {
    1179             :             static_assert(!(STATE & ExceptionIdSet), "property exceptionId should not be set yet");
    1180             :             m_result->setExceptionId(value);
    1181             :             return castState<ExceptionIdSet>();
    1182             :         }
    1183             : 
    1184             :         ExceptionDetailsBuilder<STATE | TextSet>& setText(const String& value)
    1185             :         {
    1186             :             static_assert(!(STATE & TextSet), "property text should not be set yet");
    1187             :             m_result->setText(value);
    1188             :             return castState<TextSet>();
    1189             :         }
    1190             : 
    1191             :         ExceptionDetailsBuilder<STATE | LineNumberSet>& setLineNumber(int value)
    1192             :         {
    1193             :             static_assert(!(STATE & LineNumberSet), "property lineNumber should not be set yet");
    1194             :             m_result->setLineNumber(value);
    1195             :             return castState<LineNumberSet>();
    1196             :         }
    1197             : 
    1198             :         ExceptionDetailsBuilder<STATE | ColumnNumberSet>& setColumnNumber(int value)
    1199             :         {
    1200             :             static_assert(!(STATE & ColumnNumberSet), "property columnNumber should not be set yet");
    1201             :             m_result->setColumnNumber(value);
    1202             :             return castState<ColumnNumberSet>();
    1203             :         }
    1204             : 
    1205             :         ExceptionDetailsBuilder<STATE>& setScriptId(const String& value)
    1206             :         {
    1207             :             m_result->setScriptId(value);
    1208             :             return *this;
    1209             :         }
    1210             : 
    1211             :         ExceptionDetailsBuilder<STATE>& setUrl(const String& value)
    1212             :         {
    1213             :             m_result->setUrl(value);
    1214             :             return *this;
    1215             :         }
    1216             : 
    1217             :         ExceptionDetailsBuilder<STATE>& setStackTrace(std::unique_ptr<protocol::Runtime::StackTrace> value)
    1218             :         {
    1219             :             m_result->setStackTrace(std::move(value));
    1220             :             return *this;
    1221             :         }
    1222             : 
    1223             :         ExceptionDetailsBuilder<STATE>& setException(std::unique_ptr<protocol::Runtime::RemoteObject> value)
    1224             :         {
    1225             :             m_result->setException(std::move(value));
    1226             :             return *this;
    1227             :         }
    1228             : 
    1229             :         ExceptionDetailsBuilder<STATE>& setExecutionContextId(int value)
    1230             :         {
    1231             :             m_result->setExecutionContextId(value);
    1232             :             return *this;
    1233             :         }
    1234             : 
    1235             :         std::unique_ptr<ExceptionDetails> build()
    1236             :         {
    1237             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
    1238             :             return std::move(m_result);
    1239             :         }
    1240             : 
    1241             :     private:
    1242             :         friend class ExceptionDetails;
    1243        3594 :         ExceptionDetailsBuilder() : m_result(new ExceptionDetails()) { }
    1244             : 
    1245             :         template<int STEP> ExceptionDetailsBuilder<STATE | STEP>& castState()
    1246             :         {
    1247             :             return *reinterpret_cast<ExceptionDetailsBuilder<STATE | STEP>*>(this);
    1248             :         }
    1249             : 
    1250             :         std::unique_ptr<protocol::Runtime::ExceptionDetails> m_result;
    1251             :     };
    1252             : 
    1253             :     static ExceptionDetailsBuilder<0> create()
    1254             :     {
    1255        1797 :         return ExceptionDetailsBuilder<0>();
    1256             :     }
    1257             : 
    1258             : private:
    1259             :     ExceptionDetails()
    1260        1797 :     {
    1261        1797 :           m_exceptionId = 0;
    1262        1797 :           m_lineNumber = 0;
    1263        1797 :           m_columnNumber = 0;
    1264             :     }
    1265             : 
    1266             :     int m_exceptionId;
    1267             :     String m_text;
    1268             :     int m_lineNumber;
    1269             :     int m_columnNumber;
    1270             :     Maybe<String> m_scriptId;
    1271             :     Maybe<String> m_url;
    1272             :     Maybe<protocol::Runtime::StackTrace> m_stackTrace;
    1273             :     Maybe<protocol::Runtime::RemoteObject> m_exception;
    1274             :     Maybe<int> m_executionContextId;
    1275             : };
    1276             : 
    1277             : 
    1278             : class  CallFrame : public Serializable{
    1279             :     PROTOCOL_DISALLOW_COPY(CallFrame);
    1280             : public:
    1281             :     static std::unique_ptr<CallFrame> fromValue(protocol::Value* value, ErrorSupport* errors);
    1282             : 
    1283      191649 :     ~CallFrame() override { }
    1284             : 
    1285             :     String getFunctionName() { return m_functionName; }
    1286             :     void setFunctionName(const String& value) { m_functionName = value; }
    1287             : 
    1288             :     String getScriptId() { return m_scriptId; }
    1289             :     void setScriptId(const String& value) { m_scriptId = value; }
    1290             : 
    1291             :     String getUrl() { return m_url; }
    1292             :     void setUrl(const String& value) { m_url = value; }
    1293             : 
    1294             :     int getLineNumber() { return m_lineNumber; }
    1295       63883 :     void setLineNumber(int value) { m_lineNumber = value; }
    1296             : 
    1297             :     int getColumnNumber() { return m_columnNumber; }
    1298       63883 :     void setColumnNumber(int value) { m_columnNumber = value; }
    1299             : 
    1300             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
    1301           0 :     String serializeToJSON() override { return toValue()->serializeToJSON(); }
    1302           0 :     std::vector<uint8_t> serializeToBinary() override { return toValue()->serializeToBinary(); }
    1303             :     String toJSON() const { return toValue()->toJSONString(); }
    1304             :     std::unique_ptr<CallFrame> clone() const;
    1305             : 
    1306             :     template<int STATE>
    1307             :     class CallFrameBuilder {
    1308             :     public:
    1309             :         enum {
    1310             :             NoFieldsSet = 0,
    1311             :             FunctionNameSet = 1 << 1,
    1312             :             ScriptIdSet = 1 << 2,
    1313             :             UrlSet = 1 << 3,
    1314             :             LineNumberSet = 1 << 4,
    1315             :             ColumnNumberSet = 1 << 5,
    1316             :             AllFieldsSet = (FunctionNameSet | ScriptIdSet | UrlSet | LineNumberSet | ColumnNumberSet | 0)};
    1317             : 
    1318             : 
    1319             :         CallFrameBuilder<STATE | FunctionNameSet>& setFunctionName(const String& value)
    1320             :         {
    1321             :             static_assert(!(STATE & FunctionNameSet), "property functionName should not be set yet");
    1322             :             m_result->setFunctionName(value);
    1323             :             return castState<FunctionNameSet>();
    1324             :         }
    1325             : 
    1326             :         CallFrameBuilder<STATE | ScriptIdSet>& setScriptId(const String& value)
    1327             :         {
    1328             :             static_assert(!(STATE & ScriptIdSet), "property scriptId should not be set yet");
    1329             :             m_result->setScriptId(value);
    1330             :             return castState<ScriptIdSet>();
    1331             :         }
    1332             : 
    1333             :         CallFrameBuilder<STATE | UrlSet>& setUrl(const String& value)
    1334             :         {
    1335             :             static_assert(!(STATE & UrlSet), "property url should not be set yet");
    1336             :             m_result->setUrl(value);
    1337             :             return castState<UrlSet>();
    1338             :         }
    1339             : 
    1340             :         CallFrameBuilder<STATE | LineNumberSet>& setLineNumber(int value)
    1341             :         {
    1342             :             static_assert(!(STATE & LineNumberSet), "property lineNumber should not be set yet");
    1343             :             m_result->setLineNumber(value);
    1344             :             return castState<LineNumberSet>();
    1345             :         }
    1346             : 
    1347             :         CallFrameBuilder<STATE | ColumnNumberSet>& setColumnNumber(int value)
    1348             :         {
    1349             :             static_assert(!(STATE & ColumnNumberSet), "property columnNumber should not be set yet");
    1350             :             m_result->setColumnNumber(value);
    1351             :             return castState<ColumnNumberSet>();
    1352             :         }
    1353             : 
    1354             :         std::unique_ptr<CallFrame> build()
    1355             :         {
    1356             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
    1357             :             return std::move(m_result);
    1358             :         }
    1359             : 
    1360             :     private:
    1361             :         friend class CallFrame;
    1362      127766 :         CallFrameBuilder() : m_result(new CallFrame()) { }
    1363             : 
    1364             :         template<int STEP> CallFrameBuilder<STATE | STEP>& castState()
    1365             :         {
    1366             :             return *reinterpret_cast<CallFrameBuilder<STATE | STEP>*>(this);
    1367             :         }
    1368             : 
    1369             :         std::unique_ptr<protocol::Runtime::CallFrame> m_result;
    1370             :     };
    1371             : 
    1372             :     static CallFrameBuilder<0> create()
    1373             :     {
    1374       63883 :         return CallFrameBuilder<0>();
    1375             :     }
    1376             : 
    1377             : private:
    1378             :     CallFrame()
    1379       63883 :     {
    1380       63883 :           m_lineNumber = 0;
    1381       63883 :           m_columnNumber = 0;
    1382             :     }
    1383             : 
    1384             :     String m_functionName;
    1385             :     String m_scriptId;
    1386             :     String m_url;
    1387             :     int m_lineNumber;
    1388             :     int m_columnNumber;
    1389             : };
    1390             : 
    1391             : 
    1392             : class  StackTrace : public Serializable, public API::StackTrace{
    1393             :     PROTOCOL_DISALLOW_COPY(StackTrace);
    1394             : public:
    1395             :     static std::unique_ptr<StackTrace> fromValue(protocol::Value* value, ErrorSupport* errors);
    1396             : 
    1397      185502 :     ~StackTrace() override { }
    1398             : 
    1399             :     bool hasDescription() { return m_description.isJust(); }
    1400             :     String getDescription(const String& defaultValue) { return m_description.isJust() ? m_description.fromJust() : defaultValue; }
    1401        3470 :     void setDescription(const String& value) { m_description = value; }
    1402             : 
    1403             :     protocol::Array<protocol::Runtime::CallFrame>* getCallFrames() { return m_callFrames.get(); }
    1404             :     void setCallFrames(std::unique_ptr<protocol::Array<protocol::Runtime::CallFrame>> value) { m_callFrames = std::move(value); }
    1405             : 
    1406             :     bool hasParent() { return m_parent.isJust(); }
    1407             :     protocol::Runtime::StackTrace* getParent(protocol::Runtime::StackTrace* defaultValue) { return m_parent.isJust() ? m_parent.fromJust() : defaultValue; }
    1408             :     void setParent(std::unique_ptr<protocol::Runtime::StackTrace> value) { m_parent = std::move(value); }
    1409             : 
    1410             :     bool hasParentId() { return m_parentId.isJust(); }
    1411             :     protocol::Runtime::StackTraceId* getParentId(protocol::Runtime::StackTraceId* defaultValue) { return m_parentId.isJust() ? m_parentId.fromJust() : defaultValue; }
    1412             :     void setParentId(std::unique_ptr<protocol::Runtime::StackTraceId> value) { m_parentId = std::move(value); }
    1413             : 
    1414             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
    1415           0 :     String serializeToJSON() override { return toValue()->serializeToJSON(); }
    1416           0 :     std::vector<uint8_t> serializeToBinary() override { return toValue()->serializeToBinary(); }
    1417             :     String toJSON() const { return toValue()->toJSONString(); }
    1418             :     std::unique_ptr<StackTrace> clone() const;
    1419             :     std::unique_ptr<StringBuffer> toJSONString() const override;
    1420             :     void writeBinary(std::vector<uint8_t>* out) const override;
    1421             : 
    1422             :     template<int STATE>
    1423             :     class StackTraceBuilder {
    1424             :     public:
    1425             :         enum {
    1426             :             NoFieldsSet = 0,
    1427             :             CallFramesSet = 1 << 1,
    1428             :             AllFieldsSet = (CallFramesSet | 0)};
    1429             : 
    1430             : 
    1431             :         StackTraceBuilder<STATE>& setDescription(const String& value)
    1432             :         {
    1433             :             m_result->setDescription(value);
    1434             :             return *this;
    1435             :         }
    1436             : 
    1437             :         StackTraceBuilder<STATE | CallFramesSet>& setCallFrames(std::unique_ptr<protocol::Array<protocol::Runtime::CallFrame>> value)
    1438             :         {
    1439             :             static_assert(!(STATE & CallFramesSet), "property callFrames should not be set yet");
    1440             :             m_result->setCallFrames(std::move(value));
    1441             :             return castState<CallFramesSet>();
    1442             :         }
    1443             : 
    1444             :         StackTraceBuilder<STATE>& setParent(std::unique_ptr<protocol::Runtime::StackTrace> value)
    1445             :         {
    1446             :             m_result->setParent(std::move(value));
    1447             :             return *this;
    1448             :         }
    1449             : 
    1450             :         StackTraceBuilder<STATE>& setParentId(std::unique_ptr<protocol::Runtime::StackTraceId> value)
    1451             :         {
    1452             :             m_result->setParentId(std::move(value));
    1453             :             return *this;
    1454             :         }
    1455             : 
    1456             :         std::unique_ptr<StackTrace> build()
    1457             :         {
    1458             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
    1459             :             return std::move(m_result);
    1460             :         }
    1461             : 
    1462             :     private:
    1463             :         friend class StackTrace;
    1464      123668 :         StackTraceBuilder() : m_result(new StackTrace()) { }
    1465             : 
    1466             :         template<int STEP> StackTraceBuilder<STATE | STEP>& castState()
    1467             :         {
    1468             :             return *reinterpret_cast<StackTraceBuilder<STATE | STEP>*>(this);
    1469             :         }
    1470             : 
    1471             :         std::unique_ptr<protocol::Runtime::StackTrace> m_result;
    1472             :     };
    1473             : 
    1474             :     static StackTraceBuilder<0> create()
    1475             :     {
    1476       61834 :         return StackTraceBuilder<0>();
    1477             :     }
    1478             : 
    1479             : private:
    1480             :     StackTrace()
    1481      123668 :     {
    1482             :     }
    1483             : 
    1484             :     Maybe<String> m_description;
    1485             :     std::unique_ptr<protocol::Array<protocol::Runtime::CallFrame>> m_callFrames;
    1486             :     Maybe<protocol::Runtime::StackTrace> m_parent;
    1487             :     Maybe<protocol::Runtime::StackTraceId> m_parentId;
    1488             : };
    1489             : 
    1490             : 
    1491             : class  StackTraceId : public Serializable, public API::StackTraceId{
    1492             :     PROTOCOL_DISALLOW_COPY(StackTraceId);
    1493             : public:
    1494             :     static std::unique_ptr<StackTraceId> fromValue(protocol::Value* value, ErrorSupport* errors);
    1495             : 
    1496        1095 :     ~StackTraceId() override { }
    1497             : 
    1498             :     String getId() { return m_id; }
    1499             :     void setId(const String& value) { m_id = value; }
    1500             : 
    1501          35 :     bool hasDebuggerId() { return m_debuggerId.isJust(); }
    1502         240 :     String getDebuggerId(const String& defaultValue) { return m_debuggerId.isJust() ? m_debuggerId.fromJust() : defaultValue; }
    1503         120 :     void setDebuggerId(const String& value) { m_debuggerId = value; }
    1504             : 
    1505             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
    1506           0 :     String serializeToJSON() override { return toValue()->serializeToJSON(); }
    1507           0 :     std::vector<uint8_t> serializeToBinary() override { return toValue()->serializeToBinary(); }
    1508             :     String toJSON() const { return toValue()->toJSONString(); }
    1509             :     std::unique_ptr<StackTraceId> clone() const;
    1510             :     std::unique_ptr<StringBuffer> toJSONString() const override;
    1511             :     void writeBinary(std::vector<uint8_t>* out) const override;
    1512             : 
    1513             :     template<int STATE>
    1514             :     class StackTraceIdBuilder {
    1515             :     public:
    1516             :         enum {
    1517             :             NoFieldsSet = 0,
    1518             :             IdSet = 1 << 1,
    1519             :             AllFieldsSet = (IdSet | 0)};
    1520             : 
    1521             : 
    1522             :         StackTraceIdBuilder<STATE | IdSet>& setId(const String& value)
    1523             :         {
    1524             :             static_assert(!(STATE & IdSet), "property id should not be set yet");
    1525             :             m_result->setId(value);
    1526             :             return castState<IdSet>();
    1527             :         }
    1528             : 
    1529             :         StackTraceIdBuilder<STATE>& setDebuggerId(const String& value)
    1530             :         {
    1531          50 :             m_result->setDebuggerId(value);
    1532             :             return *this;
    1533             :         }
    1534             : 
    1535             :         std::unique_ptr<StackTraceId> build()
    1536             :         {
    1537             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
    1538             :             return std::move(m_result);
    1539             :         }
    1540             : 
    1541             :     private:
    1542             :         friend class StackTraceId;
    1543         470 :         StackTraceIdBuilder() : m_result(new StackTraceId()) { }
    1544             : 
    1545             :         template<int STEP> StackTraceIdBuilder<STATE | STEP>& castState()
    1546             :         {
    1547             :             return *reinterpret_cast<StackTraceIdBuilder<STATE | STEP>*>(this);
    1548             :         }
    1549             : 
    1550             :         std::unique_ptr<protocol::Runtime::StackTraceId> m_result;
    1551             :     };
    1552             : 
    1553             :     static StackTraceIdBuilder<0> create()
    1554             :     {
    1555         235 :         return StackTraceIdBuilder<0>();
    1556             :     }
    1557             : 
    1558             : private:
    1559             :     StackTraceId()
    1560         365 :     {
    1561             :     }
    1562             : 
    1563             :     String m_id;
    1564             :     Maybe<String> m_debuggerId;
    1565             : };
    1566             : 
    1567             : 
    1568             : class  BindingCalledNotification : public Serializable{
    1569             :     PROTOCOL_DISALLOW_COPY(BindingCalledNotification);
    1570             : public:
    1571             :     static std::unique_ptr<BindingCalledNotification> fromValue(protocol::Value* value, ErrorSupport* errors);
    1572             : 
    1573         105 :     ~BindingCalledNotification() override { }
    1574             : 
    1575             :     String getName() { return m_name; }
    1576             :     void setName(const String& value) { m_name = value; }
    1577             : 
    1578             :     String getPayload() { return m_payload; }
    1579             :     void setPayload(const String& value) { m_payload = value; }
    1580             : 
    1581             :     int getExecutionContextId() { return m_executionContextId; }
    1582          35 :     void setExecutionContextId(int value) { m_executionContextId = value; }
    1583             : 
    1584             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
    1585         105 :     String serializeToJSON() override { return toValue()->serializeToJSON(); }
    1586           0 :     std::vector<uint8_t> serializeToBinary() override { return toValue()->serializeToBinary(); }
    1587             :     String toJSON() const { return toValue()->toJSONString(); }
    1588             :     std::unique_ptr<BindingCalledNotification> clone() const;
    1589             : 
    1590             :     template<int STATE>
    1591             :     class BindingCalledNotificationBuilder {
    1592             :     public:
    1593             :         enum {
    1594             :             NoFieldsSet = 0,
    1595             :             NameSet = 1 << 1,
    1596             :             PayloadSet = 1 << 2,
    1597             :             ExecutionContextIdSet = 1 << 3,
    1598             :             AllFieldsSet = (NameSet | PayloadSet | ExecutionContextIdSet | 0)};
    1599             : 
    1600             : 
    1601             :         BindingCalledNotificationBuilder<STATE | NameSet>& setName(const String& value)
    1602             :         {
    1603             :             static_assert(!(STATE & NameSet), "property name should not be set yet");
    1604             :             m_result->setName(value);
    1605             :             return castState<NameSet>();
    1606             :         }
    1607             : 
    1608             :         BindingCalledNotificationBuilder<STATE | PayloadSet>& setPayload(const String& value)
    1609             :         {
    1610             :             static_assert(!(STATE & PayloadSet), "property payload should not be set yet");
    1611             :             m_result->setPayload(value);
    1612             :             return castState<PayloadSet>();
    1613             :         }
    1614             : 
    1615             :         BindingCalledNotificationBuilder<STATE | ExecutionContextIdSet>& setExecutionContextId(int value)
    1616             :         {
    1617             :             static_assert(!(STATE & ExecutionContextIdSet), "property executionContextId should not be set yet");
    1618             :             m_result->setExecutionContextId(value);
    1619             :             return castState<ExecutionContextIdSet>();
    1620             :         }
    1621             : 
    1622             :         std::unique_ptr<BindingCalledNotification> build()
    1623             :         {
    1624             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
    1625             :             return std::move(m_result);
    1626             :         }
    1627             : 
    1628             :     private:
    1629             :         friend class BindingCalledNotification;
    1630          70 :         BindingCalledNotificationBuilder() : m_result(new BindingCalledNotification()) { }
    1631             : 
    1632             :         template<int STEP> BindingCalledNotificationBuilder<STATE | STEP>& castState()
    1633             :         {
    1634             :             return *reinterpret_cast<BindingCalledNotificationBuilder<STATE | STEP>*>(this);
    1635             :         }
    1636             : 
    1637             :         std::unique_ptr<protocol::Runtime::BindingCalledNotification> m_result;
    1638             :     };
    1639             : 
    1640             :     static BindingCalledNotificationBuilder<0> create()
    1641             :     {
    1642          35 :         return BindingCalledNotificationBuilder<0>();
    1643             :     }
    1644             : 
    1645             : private:
    1646             :     BindingCalledNotification()
    1647          35 :     {
    1648          35 :           m_executionContextId = 0;
    1649             :     }
    1650             : 
    1651             :     String m_name;
    1652             :     String m_payload;
    1653             :     int m_executionContextId;
    1654             : };
    1655             : 
    1656             : 
    1657             : class  ConsoleAPICalledNotification : public Serializable{
    1658             :     PROTOCOL_DISALLOW_COPY(ConsoleAPICalledNotification);
    1659             : public:
    1660             :     static std::unique_ptr<ConsoleAPICalledNotification> fromValue(protocol::Value* value, ErrorSupport* errors);
    1661             : 
    1662       19905 :     ~ConsoleAPICalledNotification() override { }
    1663             : 
    1664             :     struct  TypeEnum {
    1665             :         static const char* Log;
    1666             :         static const char* Debug;
    1667             :         static const char* Info;
    1668             :         static const char* Error;
    1669             :         static const char* Warning;
    1670             :         static const char* Dir;
    1671             :         static const char* Dirxml;
    1672             :         static const char* Table;
    1673             :         static const char* Trace;
    1674             :         static const char* Clear;
    1675             :         static const char* StartGroup;
    1676             :         static const char* StartGroupCollapsed;
    1677             :         static const char* EndGroup;
    1678             :         static const char* Assert;
    1679             :         static const char* Profile;
    1680             :         static const char* ProfileEnd;
    1681             :         static const char* Count;
    1682             :         static const char* TimeEnd;
    1683             :     }; // TypeEnum
    1684             : 
    1685             :     String getType() { return m_type; }
    1686             :     void setType(const String& value) { m_type = value; }
    1687             : 
    1688             :     protocol::Array<protocol::Runtime::RemoteObject>* getArgs() { return m_args.get(); }
    1689             :     void setArgs(std::unique_ptr<protocol::Array<protocol::Runtime::RemoteObject>> value) { m_args = std::move(value); }
    1690             : 
    1691             :     int getExecutionContextId() { return m_executionContextId; }
    1692        6635 :     void setExecutionContextId(int value) { m_executionContextId = value; }
    1693             : 
    1694             :     double getTimestamp() { return m_timestamp; }
    1695        6635 :     void setTimestamp(double value) { m_timestamp = value; }
    1696             : 
    1697             :     bool hasStackTrace() { return m_stackTrace.isJust(); }
    1698             :     protocol::Runtime::StackTrace* getStackTrace(protocol::Runtime::StackTrace* defaultValue) { return m_stackTrace.isJust() ? m_stackTrace.fromJust() : defaultValue; }
    1699             :     void setStackTrace(std::unique_ptr<protocol::Runtime::StackTrace> value) { m_stackTrace = std::move(value); }
    1700             : 
    1701             :     bool hasContext() { return m_context.isJust(); }
    1702             :     String getContext(const String& defaultValue) { return m_context.isJust() ? m_context.fromJust() : defaultValue; }
    1703         140 :     void setContext(const String& value) { m_context = value; }
    1704             : 
    1705             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
    1706       19905 :     String serializeToJSON() override { return toValue()->serializeToJSON(); }
    1707           0 :     std::vector<uint8_t> serializeToBinary() override { return toValue()->serializeToBinary(); }
    1708             :     String toJSON() const { return toValue()->toJSONString(); }
    1709             :     std::unique_ptr<ConsoleAPICalledNotification> clone() const;
    1710             : 
    1711             :     template<int STATE>
    1712             :     class ConsoleAPICalledNotificationBuilder {
    1713             :     public:
    1714             :         enum {
    1715             :             NoFieldsSet = 0,
    1716             :             TypeSet = 1 << 1,
    1717             :             ArgsSet = 1 << 2,
    1718             :             ExecutionContextIdSet = 1 << 3,
    1719             :             TimestampSet = 1 << 4,
    1720             :             AllFieldsSet = (TypeSet | ArgsSet | ExecutionContextIdSet | TimestampSet | 0)};
    1721             : 
    1722             : 
    1723             :         ConsoleAPICalledNotificationBuilder<STATE | TypeSet>& setType(const String& value)
    1724             :         {
    1725             :             static_assert(!(STATE & TypeSet), "property type should not be set yet");
    1726             :             m_result->setType(value);
    1727             :             return castState<TypeSet>();
    1728             :         }
    1729             : 
    1730             :         ConsoleAPICalledNotificationBuilder<STATE | ArgsSet>& setArgs(std::unique_ptr<protocol::Array<protocol::Runtime::RemoteObject>> value)
    1731             :         {
    1732             :             static_assert(!(STATE & ArgsSet), "property args should not be set yet");
    1733             :             m_result->setArgs(std::move(value));
    1734             :             return castState<ArgsSet>();
    1735             :         }
    1736             : 
    1737             :         ConsoleAPICalledNotificationBuilder<STATE | ExecutionContextIdSet>& setExecutionContextId(int value)
    1738             :         {
    1739             :             static_assert(!(STATE & ExecutionContextIdSet), "property executionContextId should not be set yet");
    1740             :             m_result->setExecutionContextId(value);
    1741             :             return castState<ExecutionContextIdSet>();
    1742             :         }
    1743             : 
    1744             :         ConsoleAPICalledNotificationBuilder<STATE | TimestampSet>& setTimestamp(double value)
    1745             :         {
    1746             :             static_assert(!(STATE & TimestampSet), "property timestamp should not be set yet");
    1747             :             m_result->setTimestamp(value);
    1748             :             return castState<TimestampSet>();
    1749             :         }
    1750             : 
    1751             :         ConsoleAPICalledNotificationBuilder<STATE>& setStackTrace(std::unique_ptr<protocol::Runtime::StackTrace> value)
    1752             :         {
    1753             :             m_result->setStackTrace(std::move(value));
    1754             :             return *this;
    1755             :         }
    1756             : 
    1757             :         ConsoleAPICalledNotificationBuilder<STATE>& setContext(const String& value)
    1758             :         {
    1759             :             m_result->setContext(value);
    1760             :             return *this;
    1761             :         }
    1762             : 
    1763             :         std::unique_ptr<ConsoleAPICalledNotification> build()
    1764             :         {
    1765             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
    1766             :             return std::move(m_result);
    1767             :         }
    1768             : 
    1769             :     private:
    1770             :         friend class ConsoleAPICalledNotification;
    1771       13270 :         ConsoleAPICalledNotificationBuilder() : m_result(new ConsoleAPICalledNotification()) { }
    1772             : 
    1773             :         template<int STEP> ConsoleAPICalledNotificationBuilder<STATE | STEP>& castState()
    1774             :         {
    1775             :             return *reinterpret_cast<ConsoleAPICalledNotificationBuilder<STATE | STEP>*>(this);
    1776             :         }
    1777             : 
    1778             :         std::unique_ptr<protocol::Runtime::ConsoleAPICalledNotification> m_result;
    1779             :     };
    1780             : 
    1781             :     static ConsoleAPICalledNotificationBuilder<0> create()
    1782             :     {
    1783        6635 :         return ConsoleAPICalledNotificationBuilder<0>();
    1784             :     }
    1785             : 
    1786             : private:
    1787             :     ConsoleAPICalledNotification()
    1788       13270 :     {
    1789        6635 :           m_executionContextId = 0;
    1790        6635 :           m_timestamp = 0;
    1791             :     }
    1792             : 
    1793             :     String m_type;
    1794             :     std::unique_ptr<protocol::Array<protocol::Runtime::RemoteObject>> m_args;
    1795             :     int m_executionContextId;
    1796             :     double m_timestamp;
    1797             :     Maybe<protocol::Runtime::StackTrace> m_stackTrace;
    1798             :     Maybe<String> m_context;
    1799             : };
    1800             : 
    1801             : 
    1802             : class  ExceptionRevokedNotification : public Serializable{
    1803             :     PROTOCOL_DISALLOW_COPY(ExceptionRevokedNotification);
    1804             : public:
    1805             :     static std::unique_ptr<ExceptionRevokedNotification> fromValue(protocol::Value* value, ErrorSupport* errors);
    1806             : 
    1807         140 :     ~ExceptionRevokedNotification() override { }
    1808             : 
    1809             :     String getReason() { return m_reason; }
    1810             :     void setReason(const String& value) { m_reason = value; }
    1811             : 
    1812             :     int getExceptionId() { return m_exceptionId; }
    1813          70 :     void setExceptionId(int value) { m_exceptionId = value; }
    1814             : 
    1815             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
    1816         210 :     String serializeToJSON() override { return toValue()->serializeToJSON(); }
    1817           0 :     std::vector<uint8_t> serializeToBinary() override { return toValue()->serializeToBinary(); }
    1818             :     String toJSON() const { return toValue()->toJSONString(); }
    1819             :     std::unique_ptr<ExceptionRevokedNotification> clone() const;
    1820             : 
    1821             :     template<int STATE>
    1822             :     class ExceptionRevokedNotificationBuilder {
    1823             :     public:
    1824             :         enum {
    1825             :             NoFieldsSet = 0,
    1826             :             ReasonSet = 1 << 1,
    1827             :             ExceptionIdSet = 1 << 2,
    1828             :             AllFieldsSet = (ReasonSet | ExceptionIdSet | 0)};
    1829             : 
    1830             : 
    1831             :         ExceptionRevokedNotificationBuilder<STATE | ReasonSet>& setReason(const String& value)
    1832             :         {
    1833             :             static_assert(!(STATE & ReasonSet), "property reason should not be set yet");
    1834             :             m_result->setReason(value);
    1835             :             return castState<ReasonSet>();
    1836             :         }
    1837             : 
    1838             :         ExceptionRevokedNotificationBuilder<STATE | ExceptionIdSet>& setExceptionId(int value)
    1839             :         {
    1840             :             static_assert(!(STATE & ExceptionIdSet), "property exceptionId should not be set yet");
    1841             :             m_result->setExceptionId(value);
    1842             :             return castState<ExceptionIdSet>();
    1843             :         }
    1844             : 
    1845             :         std::unique_ptr<ExceptionRevokedNotification> build()
    1846             :         {
    1847             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
    1848             :             return std::move(m_result);
    1849             :         }
    1850             : 
    1851             :     private:
    1852             :         friend class ExceptionRevokedNotification;
    1853         140 :         ExceptionRevokedNotificationBuilder() : m_result(new ExceptionRevokedNotification()) { }
    1854             : 
    1855             :         template<int STEP> ExceptionRevokedNotificationBuilder<STATE | STEP>& castState()
    1856             :         {
    1857             :             return *reinterpret_cast<ExceptionRevokedNotificationBuilder<STATE | STEP>*>(this);
    1858             :         }
    1859             : 
    1860             :         std::unique_ptr<protocol::Runtime::ExceptionRevokedNotification> m_result;
    1861             :     };
    1862             : 
    1863             :     static ExceptionRevokedNotificationBuilder<0> create()
    1864             :     {
    1865          70 :         return ExceptionRevokedNotificationBuilder<0>();
    1866             :     }
    1867             : 
    1868             : private:
    1869             :     ExceptionRevokedNotification()
    1870          70 :     {
    1871          70 :           m_exceptionId = 0;
    1872             :     }
    1873             : 
    1874             :     String m_reason;
    1875             :     int m_exceptionId;
    1876             : };
    1877             : 
    1878             : 
    1879             : class  ExceptionThrownNotification : public Serializable{
    1880             :     PROTOCOL_DISALLOW_COPY(ExceptionThrownNotification);
    1881             : public:
    1882             :     static std::unique_ptr<ExceptionThrownNotification> fromValue(protocol::Value* value, ErrorSupport* errors);
    1883             : 
    1884         350 :     ~ExceptionThrownNotification() override { }
    1885             : 
    1886             :     double getTimestamp() { return m_timestamp; }
    1887         175 :     void setTimestamp(double value) { m_timestamp = value; }
    1888             : 
    1889             :     protocol::Runtime::ExceptionDetails* getExceptionDetails() { return m_exceptionDetails.get(); }
    1890             :     void setExceptionDetails(std::unique_ptr<protocol::Runtime::ExceptionDetails> value) { m_exceptionDetails = std::move(value); }
    1891             : 
    1892             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
    1893         525 :     String serializeToJSON() override { return toValue()->serializeToJSON(); }
    1894           0 :     std::vector<uint8_t> serializeToBinary() override { return toValue()->serializeToBinary(); }
    1895             :     String toJSON() const { return toValue()->toJSONString(); }
    1896             :     std::unique_ptr<ExceptionThrownNotification> clone() const;
    1897             : 
    1898             :     template<int STATE>
    1899             :     class ExceptionThrownNotificationBuilder {
    1900             :     public:
    1901             :         enum {
    1902             :             NoFieldsSet = 0,
    1903             :             TimestampSet = 1 << 1,
    1904             :             ExceptionDetailsSet = 1 << 2,
    1905             :             AllFieldsSet = (TimestampSet | ExceptionDetailsSet | 0)};
    1906             : 
    1907             : 
    1908             :         ExceptionThrownNotificationBuilder<STATE | TimestampSet>& setTimestamp(double value)
    1909             :         {
    1910             :             static_assert(!(STATE & TimestampSet), "property timestamp should not be set yet");
    1911             :             m_result->setTimestamp(value);
    1912             :             return castState<TimestampSet>();
    1913             :         }
    1914             : 
    1915             :         ExceptionThrownNotificationBuilder<STATE | ExceptionDetailsSet>& setExceptionDetails(std::unique_ptr<protocol::Runtime::ExceptionDetails> value)
    1916             :         {
    1917             :             static_assert(!(STATE & ExceptionDetailsSet), "property exceptionDetails should not be set yet");
    1918             :             m_result->setExceptionDetails(std::move(value));
    1919             :             return castState<ExceptionDetailsSet>();
    1920             :         }
    1921             : 
    1922             :         std::unique_ptr<ExceptionThrownNotification> build()
    1923             :         {
    1924             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
    1925             :             return std::move(m_result);
    1926             :         }
    1927             : 
    1928             :     private:
    1929             :         friend class ExceptionThrownNotification;
    1930         350 :         ExceptionThrownNotificationBuilder() : m_result(new ExceptionThrownNotification()) { }
    1931             : 
    1932             :         template<int STEP> ExceptionThrownNotificationBuilder<STATE | STEP>& castState()
    1933             :         {
    1934             :             return *reinterpret_cast<ExceptionThrownNotificationBuilder<STATE | STEP>*>(this);
    1935             :         }
    1936             : 
    1937             :         std::unique_ptr<protocol::Runtime::ExceptionThrownNotification> m_result;
    1938             :     };
    1939             : 
    1940             :     static ExceptionThrownNotificationBuilder<0> create()
    1941             :     {
    1942         175 :         return ExceptionThrownNotificationBuilder<0>();
    1943             :     }
    1944             : 
    1945             : private:
    1946             :     ExceptionThrownNotification()
    1947         175 :     {
    1948         175 :           m_timestamp = 0;
    1949             :     }
    1950             : 
    1951             :     double m_timestamp;
    1952             :     std::unique_ptr<protocol::Runtime::ExceptionDetails> m_exceptionDetails;
    1953             : };
    1954             : 
    1955             : 
    1956             : class  ExecutionContextCreatedNotification : public Serializable{
    1957             :     PROTOCOL_DISALLOW_COPY(ExecutionContextCreatedNotification);
    1958             : public:
    1959             :     static std::unique_ptr<ExecutionContextCreatedNotification> fromValue(protocol::Value* value, ErrorSupport* errors);
    1960             : 
    1961        1364 :     ~ExecutionContextCreatedNotification() override { }
    1962             : 
    1963             :     protocol::Runtime::ExecutionContextDescription* getContext() { return m_context.get(); }
    1964             :     void setContext(std::unique_ptr<protocol::Runtime::ExecutionContextDescription> value) { m_context = std::move(value); }
    1965             : 
    1966             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
    1967        2046 :     String serializeToJSON() override { return toValue()->serializeToJSON(); }
    1968           0 :     std::vector<uint8_t> serializeToBinary() override { return toValue()->serializeToBinary(); }
    1969             :     String toJSON() const { return toValue()->toJSONString(); }
    1970             :     std::unique_ptr<ExecutionContextCreatedNotification> clone() const;
    1971             : 
    1972             :     template<int STATE>
    1973             :     class ExecutionContextCreatedNotificationBuilder {
    1974             :     public:
    1975             :         enum {
    1976             :             NoFieldsSet = 0,
    1977             :             ContextSet = 1 << 1,
    1978             :             AllFieldsSet = (ContextSet | 0)};
    1979             : 
    1980             : 
    1981             :         ExecutionContextCreatedNotificationBuilder<STATE | ContextSet>& setContext(std::unique_ptr<protocol::Runtime::ExecutionContextDescription> value)
    1982             :         {
    1983             :             static_assert(!(STATE & ContextSet), "property context should not be set yet");
    1984             :             m_result->setContext(std::move(value));
    1985             :             return castState<ContextSet>();
    1986             :         }
    1987             : 
    1988             :         std::unique_ptr<ExecutionContextCreatedNotification> build()
    1989             :         {
    1990             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
    1991             :             return std::move(m_result);
    1992             :         }
    1993             : 
    1994             :     private:
    1995             :         friend class ExecutionContextCreatedNotification;
    1996         682 :         ExecutionContextCreatedNotificationBuilder() : m_result(new ExecutionContextCreatedNotification()) { }
    1997             : 
    1998             :         template<int STEP> ExecutionContextCreatedNotificationBuilder<STATE | STEP>& castState()
    1999             :         {
    2000             :             return *reinterpret_cast<ExecutionContextCreatedNotificationBuilder<STATE | STEP>*>(this);
    2001             :         }
    2002             : 
    2003             :         std::unique_ptr<protocol::Runtime::ExecutionContextCreatedNotification> m_result;
    2004             :     };
    2005             : 
    2006             :     static ExecutionContextCreatedNotificationBuilder<0> create()
    2007             :     {
    2008             :         return ExecutionContextCreatedNotificationBuilder<0>();
    2009             :     }
    2010             : 
    2011             : private:
    2012             :     ExecutionContextCreatedNotification()
    2013         682 :     {
    2014             :     }
    2015             : 
    2016             :     std::unique_ptr<protocol::Runtime::ExecutionContextDescription> m_context;
    2017             : };
    2018             : 
    2019             : 
    2020             : class  ExecutionContextDestroyedNotification : public Serializable{
    2021             :     PROTOCOL_DISALLOW_COPY(ExecutionContextDestroyedNotification);
    2022             : public:
    2023             :     static std::unique_ptr<ExecutionContextDestroyedNotification> fromValue(protocol::Value* value, ErrorSupport* errors);
    2024             : 
    2025          50 :     ~ExecutionContextDestroyedNotification() override { }
    2026             : 
    2027             :     int getExecutionContextId() { return m_executionContextId; }
    2028          25 :     void setExecutionContextId(int value) { m_executionContextId = value; }
    2029             : 
    2030             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
    2031          75 :     String serializeToJSON() override { return toValue()->serializeToJSON(); }
    2032           0 :     std::vector<uint8_t> serializeToBinary() override { return toValue()->serializeToBinary(); }
    2033             :     String toJSON() const { return toValue()->toJSONString(); }
    2034             :     std::unique_ptr<ExecutionContextDestroyedNotification> clone() const;
    2035             : 
    2036             :     template<int STATE>
    2037             :     class ExecutionContextDestroyedNotificationBuilder {
    2038             :     public:
    2039             :         enum {
    2040             :             NoFieldsSet = 0,
    2041             :             ExecutionContextIdSet = 1 << 1,
    2042             :             AllFieldsSet = (ExecutionContextIdSet | 0)};
    2043             : 
    2044             : 
    2045             :         ExecutionContextDestroyedNotificationBuilder<STATE | ExecutionContextIdSet>& setExecutionContextId(int value)
    2046             :         {
    2047             :             static_assert(!(STATE & ExecutionContextIdSet), "property executionContextId should not be set yet");
    2048             :             m_result->setExecutionContextId(value);
    2049             :             return castState<ExecutionContextIdSet>();
    2050             :         }
    2051             : 
    2052             :         std::unique_ptr<ExecutionContextDestroyedNotification> build()
    2053             :         {
    2054             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
    2055             :             return std::move(m_result);
    2056             :         }
    2057             : 
    2058             :     private:
    2059             :         friend class ExecutionContextDestroyedNotification;
    2060          25 :         ExecutionContextDestroyedNotificationBuilder() : m_result(new ExecutionContextDestroyedNotification()) { }
    2061             : 
    2062             :         template<int STEP> ExecutionContextDestroyedNotificationBuilder<STATE | STEP>& castState()
    2063             :         {
    2064             :             return *reinterpret_cast<ExecutionContextDestroyedNotificationBuilder<STATE | STEP>*>(this);
    2065             :         }
    2066             : 
    2067             :         std::unique_ptr<protocol::Runtime::ExecutionContextDestroyedNotification> m_result;
    2068             :     };
    2069             : 
    2070             :     static ExecutionContextDestroyedNotificationBuilder<0> create()
    2071             :     {
    2072             :         return ExecutionContextDestroyedNotificationBuilder<0>();
    2073             :     }
    2074             : 
    2075             : private:
    2076             :     ExecutionContextDestroyedNotification()
    2077          25 :     {
    2078          25 :           m_executionContextId = 0;
    2079             :     }
    2080             : 
    2081             :     int m_executionContextId;
    2082             : };
    2083             : 
    2084             : 
    2085             : class  InspectRequestedNotification : public Serializable{
    2086             :     PROTOCOL_DISALLOW_COPY(InspectRequestedNotification);
    2087             : public:
    2088             :     static std::unique_ptr<InspectRequestedNotification> fromValue(protocol::Value* value, ErrorSupport* errors);
    2089             : 
    2090         240 :     ~InspectRequestedNotification() override { }
    2091             : 
    2092             :     protocol::Runtime::RemoteObject* getObject() { return m_object.get(); }
    2093             :     void setObject(std::unique_ptr<protocol::Runtime::RemoteObject> value) { m_object = std::move(value); }
    2094             : 
    2095             :     protocol::DictionaryValue* getHints() { return m_hints.get(); }
    2096             :     void setHints(std::unique_ptr<protocol::DictionaryValue> value) { m_hints = std::move(value); }
    2097             : 
    2098             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
    2099         240 :     String serializeToJSON() override { return toValue()->serializeToJSON(); }
    2100           0 :     std::vector<uint8_t> serializeToBinary() override { return toValue()->serializeToBinary(); }
    2101             :     String toJSON() const { return toValue()->toJSONString(); }
    2102             :     std::unique_ptr<InspectRequestedNotification> clone() const;
    2103             : 
    2104             :     template<int STATE>
    2105             :     class InspectRequestedNotificationBuilder {
    2106             :     public:
    2107             :         enum {
    2108             :             NoFieldsSet = 0,
    2109             :             ObjectSet = 1 << 1,
    2110             :             HintsSet = 1 << 2,
    2111             :             AllFieldsSet = (ObjectSet | HintsSet | 0)};
    2112             : 
    2113             : 
    2114             :         InspectRequestedNotificationBuilder<STATE | ObjectSet>& setObject(std::unique_ptr<protocol::Runtime::RemoteObject> value)
    2115             :         {
    2116             :             static_assert(!(STATE & ObjectSet), "property object should not be set yet");
    2117             :             m_result->setObject(std::move(value));
    2118             :             return castState<ObjectSet>();
    2119             :         }
    2120             : 
    2121             :         InspectRequestedNotificationBuilder<STATE | HintsSet>& setHints(std::unique_ptr<protocol::DictionaryValue> value)
    2122             :         {
    2123             :             static_assert(!(STATE & HintsSet), "property hints should not be set yet");
    2124             :             m_result->setHints(std::move(value));
    2125             :             return castState<HintsSet>();
    2126             :         }
    2127             : 
    2128             :         std::unique_ptr<InspectRequestedNotification> build()
    2129             :         {
    2130             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
    2131             :             return std::move(m_result);
    2132             :         }
    2133             : 
    2134             :     private:
    2135             :         friend class InspectRequestedNotification;
    2136         160 :         InspectRequestedNotificationBuilder() : m_result(new InspectRequestedNotification()) { }
    2137             : 
    2138             :         template<int STEP> InspectRequestedNotificationBuilder<STATE | STEP>& castState()
    2139             :         {
    2140             :             return *reinterpret_cast<InspectRequestedNotificationBuilder<STATE | STEP>*>(this);
    2141             :         }
    2142             : 
    2143             :         std::unique_ptr<protocol::Runtime::InspectRequestedNotification> m_result;
    2144             :     };
    2145             : 
    2146             :     static InspectRequestedNotificationBuilder<0> create()
    2147             :     {
    2148          80 :         return InspectRequestedNotificationBuilder<0>();
    2149             :     }
    2150             : 
    2151             : private:
    2152             :     InspectRequestedNotification()
    2153          80 :     {
    2154             :     }
    2155             : 
    2156             :     std::unique_ptr<protocol::Runtime::RemoteObject> m_object;
    2157             :     std::unique_ptr<protocol::DictionaryValue> m_hints;
    2158             : };
    2159             : 
    2160             : 
    2161             : // ------------- Backend interface.
    2162             : 
    2163        3832 : class  Backend {
    2164             : public:
    2165        3832 :     virtual ~Backend() { }
    2166             : 
    2167          35 :     class  AwaitPromiseCallback {
    2168             :     public:
    2169             :         virtual void sendSuccess(std::unique_ptr<protocol::Runtime::RemoteObject> result, Maybe<protocol::Runtime::ExceptionDetails> exceptionDetails) = 0;
    2170             :         virtual void sendFailure(const DispatchResponse&) = 0;
    2171             :         virtual void fallThrough() = 0;
    2172          35 :         virtual ~AwaitPromiseCallback() { }
    2173             :     };
    2174             :     virtual void awaitPromise(const String& in_promiseObjectId, Maybe<bool> in_returnByValue, Maybe<bool> in_generatePreview, std::unique_ptr<AwaitPromiseCallback> callback) = 0;
    2175         661 :     class  CallFunctionOnCallback {
    2176             :     public:
    2177             :         virtual void sendSuccess(std::unique_ptr<protocol::Runtime::RemoteObject> result, Maybe<protocol::Runtime::ExceptionDetails> exceptionDetails) = 0;
    2178             :         virtual void sendFailure(const DispatchResponse&) = 0;
    2179             :         virtual void fallThrough() = 0;
    2180         661 :         virtual ~CallFunctionOnCallback() { }
    2181             :     };
    2182             :     virtual void callFunctionOn(const String& in_functionDeclaration, Maybe<String> in_objectId, Maybe<protocol::Array<protocol::Runtime::CallArgument>> in_arguments, Maybe<bool> in_silent, Maybe<bool> in_returnByValue, Maybe<bool> in_generatePreview, Maybe<bool> in_userGesture, Maybe<bool> in_awaitPromise, Maybe<int> in_executionContextId, Maybe<String> in_objectGroup, std::unique_ptr<CallFunctionOnCallback> callback) = 0;
    2183             :     virtual DispatchResponse compileScript(const String& in_expression, const String& in_sourceURL, bool in_persistScript, Maybe<int> in_executionContextId, Maybe<String>* out_scriptId, Maybe<protocol::Runtime::ExceptionDetails>* out_exceptionDetails) = 0;
    2184             :     virtual DispatchResponse disable() = 0;
    2185             :     virtual DispatchResponse discardConsoleEntries() = 0;
    2186             :     virtual DispatchResponse enable() = 0;
    2187        8498 :     class  EvaluateCallback {
    2188             :     public:
    2189             :         virtual void sendSuccess(std::unique_ptr<protocol::Runtime::RemoteObject> result, Maybe<protocol::Runtime::ExceptionDetails> exceptionDetails) = 0;
    2190             :         virtual void sendFailure(const DispatchResponse&) = 0;
    2191             :         virtual void fallThrough() = 0;
    2192        8498 :         virtual ~EvaluateCallback() { }
    2193             :     };
    2194             :     virtual void evaluate(const String& in_expression, Maybe<String> in_objectGroup, Maybe<bool> in_includeCommandLineAPI, Maybe<bool> in_silent, Maybe<int> in_contextId, Maybe<bool> in_returnByValue, Maybe<bool> in_generatePreview, Maybe<bool> in_userGesture, Maybe<bool> in_awaitPromise, Maybe<bool> in_throwOnSideEffect, Maybe<double> in_timeout, std::unique_ptr<EvaluateCallback> callback) = 0;
    2195             :     virtual DispatchResponse getIsolateId(String* out_id) = 0;
    2196             :     virtual DispatchResponse getHeapUsage(double* out_usedSize, double* out_totalSize) = 0;
    2197             :     virtual DispatchResponse getProperties(const String& in_objectId, Maybe<bool> in_ownProperties, Maybe<bool> in_accessorPropertiesOnly, Maybe<bool> in_generatePreview, std::unique_ptr<protocol::Array<protocol::Runtime::PropertyDescriptor>>* out_result, Maybe<protocol::Array<protocol::Runtime::InternalPropertyDescriptor>>* out_internalProperties, Maybe<protocol::Runtime::ExceptionDetails>* out_exceptionDetails) = 0;
    2198             :     virtual DispatchResponse globalLexicalScopeNames(Maybe<int> in_executionContextId, std::unique_ptr<protocol::Array<String>>* out_names) = 0;
    2199             :     virtual DispatchResponse queryObjects(const String& in_prototypeObjectId, Maybe<String> in_objectGroup, std::unique_ptr<protocol::Runtime::RemoteObject>* out_objects) = 0;
    2200             :     virtual DispatchResponse releaseObject(const String& in_objectId) = 0;
    2201             :     virtual DispatchResponse releaseObjectGroup(const String& in_objectGroup) = 0;
    2202             :     virtual DispatchResponse runIfWaitingForDebugger() = 0;
    2203         182 :     class  RunScriptCallback {
    2204             :     public:
    2205             :         virtual void sendSuccess(std::unique_ptr<protocol::Runtime::RemoteObject> result, Maybe<protocol::Runtime::ExceptionDetails> exceptionDetails) = 0;
    2206             :         virtual void sendFailure(const DispatchResponse&) = 0;
    2207             :         virtual void fallThrough() = 0;
    2208         182 :         virtual ~RunScriptCallback() { }
    2209             :     };
    2210             :     virtual void runScript(const String& in_scriptId, Maybe<int> in_executionContextId, Maybe<String> in_objectGroup, Maybe<bool> in_silent, Maybe<bool> in_includeCommandLineAPI, Maybe<bool> in_returnByValue, Maybe<bool> in_generatePreview, Maybe<bool> in_awaitPromise, std::unique_ptr<RunScriptCallback> callback) = 0;
    2211             :     virtual DispatchResponse setCustomObjectFormatterEnabled(bool in_enabled) = 0;
    2212             :     virtual DispatchResponse setMaxCallStackSizeToCapture(int in_size) = 0;
    2213          40 :     class  TerminateExecutionCallback {
    2214             :     public:
    2215             :         virtual void sendSuccess() = 0;
    2216             :         virtual void sendFailure(const DispatchResponse&) = 0;
    2217             :         virtual void fallThrough() = 0;
    2218          40 :         virtual ~TerminateExecutionCallback() { }
    2219             :     };
    2220             :     virtual void terminateExecution(std::unique_ptr<TerminateExecutionCallback> callback) = 0;
    2221             :     virtual DispatchResponse addBinding(const String& in_name, Maybe<int> in_executionContextId) = 0;
    2222             :     virtual DispatchResponse removeBinding(const String& in_name) = 0;
    2223             : 
    2224             : };
    2225             : 
    2226             : // ------------- Frontend interface.
    2227             : 
    2228             : class  Frontend {
    2229             : public:
    2230        3832 :     explicit Frontend(FrontendChannel* frontendChannel) : m_frontendChannel(frontendChannel) { }
    2231             :     void bindingCalled(const String& name, const String& payload, int executionContextId);
    2232             :     void consoleAPICalled(const String& type, std::unique_ptr<protocol::Array<protocol::Runtime::RemoteObject>> args, int executionContextId, double timestamp, Maybe<protocol::Runtime::StackTrace> stackTrace = Maybe<protocol::Runtime::StackTrace>(), Maybe<String> context = Maybe<String>());
    2233             :     void exceptionRevoked(const String& reason, int exceptionId);
    2234             :     void exceptionThrown(double timestamp, std::unique_ptr<protocol::Runtime::ExceptionDetails> exceptionDetails);
    2235             :     void executionContextCreated(std::unique_ptr<protocol::Runtime::ExecutionContextDescription> context);
    2236             :     void executionContextDestroyed(int executionContextId);
    2237             :     void executionContextsCleared();
    2238             :     void inspectRequested(std::unique_ptr<protocol::Runtime::RemoteObject> object, std::unique_ptr<protocol::DictionaryValue> hints);
    2239             : 
    2240             :     void flush();
    2241             :     void sendRawNotification(String);
    2242             :     void sendRawNotification(std::vector<uint8_t>);
    2243             : private:
    2244             :     FrontendChannel* m_frontendChannel;
    2245             : };
    2246             : 
    2247             : // ------------- Dispatcher.
    2248             : 
    2249             : class  Dispatcher {
    2250             : public:
    2251             :     static void wire(UberDispatcher*, Backend*);
    2252             : 
    2253             : private:
    2254             :     Dispatcher() { }
    2255             : };
    2256             : 
    2257             : // ------------- Metainfo.
    2258             : 
    2259             : class  Metainfo {
    2260             : public:
    2261             :     using BackendClass = Backend;
    2262             :     using FrontendClass = Frontend;
    2263             :     using DispatcherClass = Dispatcher;
    2264             :     static const char domainName[];
    2265             :     static const char commandPrefix[];
    2266             :     static const char version[];
    2267             : };
    2268             : 
    2269             : } // namespace Runtime
    2270             : } // namespace v8_inspector
    2271             : } // namespace protocol
    2272             : 
    2273             : #endif // !defined(v8_inspector_protocol_Runtime_h)

Generated by: LCOV version 1.10