LCOV - code coverage report
Current view: top level - out/Release/gen/src/inspector/protocol - Debugger.h (source / functions) Hit Total Coverage
Test: app.info Lines: 97 110 88.2 %
Date: 2019-01-20 Functions: 37 50 74.0 %

          Line data    Source code
       1             : // This file is generated
       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_Debugger_h
       8             : #define v8_inspector_protocol_Debugger_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 "src/inspector/protocol/Runtime.h"
      14             : #include "include/inspector/Debugger.h"
      15             : 
      16             : namespace v8_inspector {
      17             : namespace protocol {
      18             : namespace Debugger {
      19             : 
      20             : // ------------- Forward and enum declarations.
      21             : using BreakpointId = String;
      22             : using CallFrameId = String;
      23             : class Location;
      24             : class ScriptPosition;
      25             : class CallFrame;
      26             : class Scope;
      27             : class SearchMatch;
      28             : class BreakLocation;
      29             : class BreakpointResolvedNotification;
      30             : class PausedNotification;
      31             : using ResumedNotification = Object;
      32             : class ScriptFailedToParseNotification;
      33             : class ScriptParsedNotification;
      34             : 
      35             : namespace ContinueToLocation {
      36             : namespace TargetCallFramesEnum {
      37             :  extern const char* Any;
      38             :  extern const char* Current;
      39             : } // TargetCallFramesEnum
      40             : } // ContinueToLocation
      41             : 
      42             : namespace SetPauseOnExceptions {
      43             : namespace StateEnum {
      44             :  extern const char* None;
      45             :  extern const char* Uncaught;
      46             :  extern const char* All;
      47             : } // StateEnum
      48             : } // SetPauseOnExceptions
      49             : 
      50             : namespace Paused {
      51             : namespace ReasonEnum {
      52             :  extern const char* XHR;
      53             :  extern const char* DOM;
      54             :  extern const char* EventListener;
      55             :  extern const char* Exception;
      56             :  extern const char* Assert;
      57             :  extern const char* DebugCommand;
      58             :  extern const char* PromiseRejection;
      59             :  extern const char* OOM;
      60             :  extern const char* Other;
      61             :  extern const char* Ambiguous;
      62             : } // ReasonEnum
      63             : } // Paused
      64             : 
      65             : // ------------- Type and builder declarations.
      66             : 
      67             : class  Location : public Serializable{
      68             :     PROTOCOL_DISALLOW_COPY(Location);
      69             : public:
      70             :     static std::unique_ptr<Location> fromValue(protocol::Value* value, ErrorSupport* errors);
      71             : 
      72     1213074 :     ~Location() override { }
      73             : 
      74      297997 :     String getScriptId() { return m_scriptId; }
      75      604616 :     void setScriptId(const String& value) { m_scriptId = value; }
      76             : 
      77             :     int getLineNumber() { return m_lineNumber; }
      78      604616 :     void setLineNumber(int value) { m_lineNumber = value; }
      79             : 
      80             :     bool hasColumnNumber() { return m_columnNumber.isJust(); }
      81      151353 :     int getColumnNumber(int defaultValue) { return m_columnNumber.isJust() ? m_columnNumber.fromJust() : defaultValue; }
      82             :     void setColumnNumber(int value) { m_columnNumber = value; }
      83             : 
      84             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
      85           0 :     String serialize() override { return toValue()->serialize(); }
      86             :     std::unique_ptr<Location> clone() const;
      87             : 
      88             :     template<int STATE>
      89             :     class LocationBuilder {
      90             :     public:
      91             :         enum {
      92             :             NoFieldsSet = 0,
      93             :             ScriptIdSet = 1 << 1,
      94             :             LineNumberSet = 1 << 2,
      95             :             AllFieldsSet = (ScriptIdSet | LineNumberSet | 0)};
      96             : 
      97             : 
      98             :         LocationBuilder<STATE | ScriptIdSet>& setScriptId(const String& value)
      99             :         {
     100             :             static_assert(!(STATE & ScriptIdSet), "property scriptId should not be set yet");
     101             :             m_result->setScriptId(value);
     102             :             return castState<ScriptIdSet>();
     103             :         }
     104             : 
     105             :         LocationBuilder<STATE | LineNumberSet>& setLineNumber(int value)
     106             :         {
     107             :             static_assert(!(STATE & LineNumberSet), "property lineNumber should not be set yet");
     108             :             m_result->setLineNumber(value);
     109             :             return castState<LineNumberSet>();
     110             :         }
     111             : 
     112             :         LocationBuilder<STATE>& setColumnNumber(int value)
     113             :         {
     114             :             m_result->setColumnNumber(value);
     115             :             return *this;
     116             :         }
     117             : 
     118             :         std::unique_ptr<Location> build()
     119             :         {
     120             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
     121             :             return std::move(m_result);
     122             :         }
     123             : 
     124             :     private:
     125             :         friend class Location;
     126     1208306 :         LocationBuilder() : m_result(new Location()) { }
     127             : 
     128             :         template<int STEP> LocationBuilder<STATE | STEP>& castState()
     129             :         {
     130             :             return *reinterpret_cast<LocationBuilder<STATE | STEP>*>(this);
     131             :         }
     132             : 
     133             :         std::unique_ptr<protocol::Debugger::Location> m_result;
     134             :     };
     135             : 
     136             :     static LocationBuilder<0> create()
     137             :     {
     138      604153 :         return LocationBuilder<0>();
     139             :     }
     140             : 
     141             : private:
     142             :     Location()
     143      606537 :     {
     144      606537 :           m_lineNumber = 0;
     145             :     }
     146             : 
     147             :     String m_scriptId;
     148             :     int m_lineNumber;
     149             :     Maybe<int> m_columnNumber;
     150             : };
     151             : 
     152             : 
     153             : class  ScriptPosition : public Serializable{
     154             :     PROTOCOL_DISALLOW_COPY(ScriptPosition);
     155             : public:
     156             :     static std::unique_ptr<ScriptPosition> fromValue(protocol::Value* value, ErrorSupport* errors);
     157             : 
     158         190 :     ~ScriptPosition() override { }
     159             : 
     160             :     int getLineNumber() { return m_lineNumber; }
     161             :     void setLineNumber(int value) { m_lineNumber = value; }
     162             : 
     163             :     int getColumnNumber() { return m_columnNumber; }
     164             :     void setColumnNumber(int value) { m_columnNumber = value; }
     165             : 
     166             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
     167           0 :     String serialize() override { return toValue()->serialize(); }
     168             :     std::unique_ptr<ScriptPosition> clone() const;
     169             : 
     170             :     template<int STATE>
     171             :     class ScriptPositionBuilder {
     172             :     public:
     173             :         enum {
     174             :             NoFieldsSet = 0,
     175             :             LineNumberSet = 1 << 1,
     176             :             ColumnNumberSet = 1 << 2,
     177             :             AllFieldsSet = (LineNumberSet | ColumnNumberSet | 0)};
     178             : 
     179             : 
     180             :         ScriptPositionBuilder<STATE | LineNumberSet>& setLineNumber(int value)
     181             :         {
     182             :             static_assert(!(STATE & LineNumberSet), "property lineNumber should not be set yet");
     183             :             m_result->setLineNumber(value);
     184             :             return castState<LineNumberSet>();
     185             :         }
     186             : 
     187             :         ScriptPositionBuilder<STATE | ColumnNumberSet>& setColumnNumber(int value)
     188             :         {
     189             :             static_assert(!(STATE & ColumnNumberSet), "property columnNumber should not be set yet");
     190             :             m_result->setColumnNumber(value);
     191             :             return castState<ColumnNumberSet>();
     192             :         }
     193             : 
     194             :         std::unique_ptr<ScriptPosition> build()
     195             :         {
     196             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
     197             :             return std::move(m_result);
     198             :         }
     199             : 
     200             :     private:
     201             :         friend class ScriptPosition;
     202             :         ScriptPositionBuilder() : m_result(new ScriptPosition()) { }
     203             : 
     204             :         template<int STEP> ScriptPositionBuilder<STATE | STEP>& castState()
     205             :         {
     206             :             return *reinterpret_cast<ScriptPositionBuilder<STATE | STEP>*>(this);
     207             :         }
     208             : 
     209             :         std::unique_ptr<protocol::Debugger::ScriptPosition> m_result;
     210             :     };
     211             : 
     212             :     static ScriptPositionBuilder<0> create()
     213             :     {
     214             :         return ScriptPositionBuilder<0>();
     215             :     }
     216             : 
     217             : private:
     218             :     ScriptPosition()
     219          95 :     {
     220          95 :           m_lineNumber = 0;
     221          95 :           m_columnNumber = 0;
     222             :     }
     223             : 
     224             :     int m_lineNumber;
     225             :     int m_columnNumber;
     226             : };
     227             : 
     228             : 
     229             : class  CallFrame : public Serializable{
     230             :     PROTOCOL_DISALLOW_COPY(CallFrame);
     231             : public:
     232             :     static std::unique_ptr<CallFrame> fromValue(protocol::Value* value, ErrorSupport* errors);
     233             : 
     234      440712 :     ~CallFrame() override { }
     235             : 
     236             :     String getCallFrameId() { return m_callFrameId; }
     237      146904 :     void setCallFrameId(const String& value) { m_callFrameId = value; }
     238             : 
     239             :     String getFunctionName() { return m_functionName; }
     240      146904 :     void setFunctionName(const String& value) { m_functionName = value; }
     241             : 
     242             :     bool hasFunctionLocation() { return m_functionLocation.isJust(); }
     243             :     protocol::Debugger::Location* getFunctionLocation(protocol::Debugger::Location* defaultValue) { return m_functionLocation.isJust() ? m_functionLocation.fromJust() : defaultValue; }
     244             :     void setFunctionLocation(std::unique_ptr<protocol::Debugger::Location> value) { m_functionLocation = std::move(value); }
     245             : 
     246             :     protocol::Debugger::Location* getLocation() { return m_location.get(); }
     247             :     void setLocation(std::unique_ptr<protocol::Debugger::Location> value) { m_location = std::move(value); }
     248             : 
     249             :     String getUrl() { return m_url; }
     250      146904 :     void setUrl(const String& value) { m_url = value; }
     251             : 
     252             :     protocol::Array<protocol::Debugger::Scope>* getScopeChain() { return m_scopeChain.get(); }
     253             :     void setScopeChain(std::unique_ptr<protocol::Array<protocol::Debugger::Scope>> value) { m_scopeChain = std::move(value); }
     254             : 
     255             :     protocol::Runtime::RemoteObject* getThis() { return m_this.get(); }
     256             :     void setThis(std::unique_ptr<protocol::Runtime::RemoteObject> value) { m_this = std::move(value); }
     257             : 
     258             :     bool hasReturnValue() { return m_returnValue.isJust(); }
     259             :     protocol::Runtime::RemoteObject* getReturnValue(protocol::Runtime::RemoteObject* defaultValue) { return m_returnValue.isJust() ? m_returnValue.fromJust() : defaultValue; }
     260             :     void setReturnValue(std::unique_ptr<protocol::Runtime::RemoteObject> value) { m_returnValue = std::move(value); }
     261             : 
     262             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
     263           0 :     String serialize() override { return toValue()->serialize(); }
     264             :     std::unique_ptr<CallFrame> clone() const;
     265             : 
     266             :     template<int STATE>
     267             :     class CallFrameBuilder {
     268             :     public:
     269             :         enum {
     270             :             NoFieldsSet = 0,
     271             :             CallFrameIdSet = 1 << 1,
     272             :             FunctionNameSet = 1 << 2,
     273             :             LocationSet = 1 << 3,
     274             :             UrlSet = 1 << 4,
     275             :             ScopeChainSet = 1 << 5,
     276             :             ThisSet = 1 << 6,
     277             :             AllFieldsSet = (CallFrameIdSet | FunctionNameSet | LocationSet | UrlSet | ScopeChainSet | ThisSet | 0)};
     278             : 
     279             : 
     280             :         CallFrameBuilder<STATE | CallFrameIdSet>& setCallFrameId(const String& value)
     281             :         {
     282             :             static_assert(!(STATE & CallFrameIdSet), "property callFrameId should not be set yet");
     283             :             m_result->setCallFrameId(value);
     284             :             return castState<CallFrameIdSet>();
     285             :         }
     286             : 
     287             :         CallFrameBuilder<STATE | FunctionNameSet>& setFunctionName(const String& value)
     288             :         {
     289             :             static_assert(!(STATE & FunctionNameSet), "property functionName should not be set yet");
     290             :             m_result->setFunctionName(value);
     291             :             return castState<FunctionNameSet>();
     292             :         }
     293             : 
     294             :         CallFrameBuilder<STATE>& setFunctionLocation(std::unique_ptr<protocol::Debugger::Location> value)
     295             :         {
     296             :             m_result->setFunctionLocation(std::move(value));
     297             :             return *this;
     298             :         }
     299             : 
     300             :         CallFrameBuilder<STATE | LocationSet>& setLocation(std::unique_ptr<protocol::Debugger::Location> value)
     301             :         {
     302             :             static_assert(!(STATE & LocationSet), "property location should not be set yet");
     303             :             m_result->setLocation(std::move(value));
     304             :             return castState<LocationSet>();
     305             :         }
     306             : 
     307             :         CallFrameBuilder<STATE | UrlSet>& setUrl(const String& value)
     308             :         {
     309             :             static_assert(!(STATE & UrlSet), "property url should not be set yet");
     310             :             m_result->setUrl(value);
     311             :             return castState<UrlSet>();
     312             :         }
     313             : 
     314             :         CallFrameBuilder<STATE | ScopeChainSet>& setScopeChain(std::unique_ptr<protocol::Array<protocol::Debugger::Scope>> value)
     315             :         {
     316             :             static_assert(!(STATE & ScopeChainSet), "property scopeChain should not be set yet");
     317             :             m_result->setScopeChain(std::move(value));
     318             :             return castState<ScopeChainSet>();
     319             :         }
     320             : 
     321             :         CallFrameBuilder<STATE | ThisSet>& setThis(std::unique_ptr<protocol::Runtime::RemoteObject> value)
     322             :         {
     323             :             static_assert(!(STATE & ThisSet), "property this should not be set yet");
     324             :             m_result->setThis(std::move(value));
     325             :             return castState<ThisSet>();
     326             :         }
     327             : 
     328             :         CallFrameBuilder<STATE>& setReturnValue(std::unique_ptr<protocol::Runtime::RemoteObject> value)
     329             :         {
     330             :             m_result->setReturnValue(std::move(value));
     331             :             return *this;
     332             :         }
     333             : 
     334             :         std::unique_ptr<CallFrame> build()
     335             :         {
     336             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
     337             :             return std::move(m_result);
     338             :         }
     339             : 
     340             :     private:
     341             :         friend class CallFrame;
     342      293808 :         CallFrameBuilder() : m_result(new CallFrame()) { }
     343             : 
     344             :         template<int STEP> CallFrameBuilder<STATE | STEP>& castState()
     345             :         {
     346             :             return *reinterpret_cast<CallFrameBuilder<STATE | STEP>*>(this);
     347             :         }
     348             : 
     349             :         std::unique_ptr<protocol::Debugger::CallFrame> m_result;
     350             :     };
     351             : 
     352             :     static CallFrameBuilder<0> create()
     353             :     {
     354      146904 :         return CallFrameBuilder<0>();
     355             :     }
     356             : 
     357             : private:
     358      146904 :     CallFrame()
     359      293808 :     {
     360      146904 :     }
     361             : 
     362             :     String m_callFrameId;
     363             :     String m_functionName;
     364             :     Maybe<protocol::Debugger::Location> m_functionLocation;
     365             :     std::unique_ptr<protocol::Debugger::Location> m_location;
     366             :     String m_url;
     367             :     std::unique_ptr<protocol::Array<protocol::Debugger::Scope>> m_scopeChain;
     368             :     std::unique_ptr<protocol::Runtime::RemoteObject> m_this;
     369             :     Maybe<protocol::Runtime::RemoteObject> m_returnValue;
     370             : };
     371             : 
     372             : 
     373             : class  Scope : public Serializable{
     374             :     PROTOCOL_DISALLOW_COPY(Scope);
     375             : public:
     376             :     static std::unique_ptr<Scope> fromValue(protocol::Value* value, ErrorSupport* errors);
     377             : 
     378     1115484 :     ~Scope() override { }
     379             : 
     380             :     struct  TypeEnum {
     381             :         static const char* Global;
     382             :         static const char* Local;
     383             :         static const char* With;
     384             :         static const char* Closure;
     385             :         static const char* Catch;
     386             :         static const char* Block;
     387             :         static const char* Script;
     388             :         static const char* Eval;
     389             :         static const char* Module;
     390             :     }; // TypeEnum
     391             : 
     392             :     String getType() { return m_type; }
     393      371828 :     void setType(const String& value) { m_type = value; }
     394             : 
     395             :     protocol::Runtime::RemoteObject* getObject() { return m_object.get(); }
     396             :     void setObject(std::unique_ptr<protocol::Runtime::RemoteObject> value) { m_object = std::move(value); }
     397             : 
     398             :     bool hasName() { return m_name.isJust(); }
     399             :     String getName(const String& defaultValue) { return m_name.isJust() ? m_name.fromJust() : defaultValue; }
     400      177220 :     void setName(const String& value) { m_name = value; }
     401             : 
     402             :     bool hasStartLocation() { return m_startLocation.isJust(); }
     403             :     protocol::Debugger::Location* getStartLocation(protocol::Debugger::Location* defaultValue) { return m_startLocation.isJust() ? m_startLocation.fromJust() : defaultValue; }
     404             :     void setStartLocation(std::unique_ptr<protocol::Debugger::Location> value) { m_startLocation = std::move(value); }
     405             : 
     406             :     bool hasEndLocation() { return m_endLocation.isJust(); }
     407             :     protocol::Debugger::Location* getEndLocation(protocol::Debugger::Location* defaultValue) { return m_endLocation.isJust() ? m_endLocation.fromJust() : defaultValue; }
     408             :     void setEndLocation(std::unique_ptr<protocol::Debugger::Location> value) { m_endLocation = std::move(value); }
     409             : 
     410             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
     411           0 :     String serialize() override { return toValue()->serialize(); }
     412             :     std::unique_ptr<Scope> clone() const;
     413             : 
     414             :     template<int STATE>
     415             :     class ScopeBuilder {
     416             :     public:
     417             :         enum {
     418             :             NoFieldsSet = 0,
     419             :             TypeSet = 1 << 1,
     420             :             ObjectSet = 1 << 2,
     421             :             AllFieldsSet = (TypeSet | ObjectSet | 0)};
     422             : 
     423             : 
     424             :         ScopeBuilder<STATE | TypeSet>& setType(const String& value)
     425             :         {
     426             :             static_assert(!(STATE & TypeSet), "property type should not be set yet");
     427             :             m_result->setType(value);
     428             :             return castState<TypeSet>();
     429             :         }
     430             : 
     431             :         ScopeBuilder<STATE | ObjectSet>& setObject(std::unique_ptr<protocol::Runtime::RemoteObject> value)
     432             :         {
     433             :             static_assert(!(STATE & ObjectSet), "property object should not be set yet");
     434             :             m_result->setObject(std::move(value));
     435             :             return castState<ObjectSet>();
     436             :         }
     437             : 
     438             :         ScopeBuilder<STATE>& setName(const String& value)
     439             :         {
     440             :             m_result->setName(value);
     441             :             return *this;
     442             :         }
     443             : 
     444             :         ScopeBuilder<STATE>& setStartLocation(std::unique_ptr<protocol::Debugger::Location> value)
     445             :         {
     446             :             m_result->setStartLocation(std::move(value));
     447             :             return *this;
     448             :         }
     449             : 
     450             :         ScopeBuilder<STATE>& setEndLocation(std::unique_ptr<protocol::Debugger::Location> value)
     451             :         {
     452             :             m_result->setEndLocation(std::move(value));
     453             :             return *this;
     454             :         }
     455             : 
     456             :         std::unique_ptr<Scope> build()
     457             :         {
     458             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
     459             :             return std::move(m_result);
     460             :         }
     461             : 
     462             :     private:
     463             :         friend class Scope;
     464      743656 :         ScopeBuilder() : m_result(new Scope()) { }
     465             : 
     466             :         template<int STEP> ScopeBuilder<STATE | STEP>& castState()
     467             :         {
     468             :             return *reinterpret_cast<ScopeBuilder<STATE | STEP>*>(this);
     469             :         }
     470             : 
     471             :         std::unique_ptr<protocol::Debugger::Scope> m_result;
     472             :     };
     473             : 
     474             :     static ScopeBuilder<0> create()
     475             :     {
     476      371828 :         return ScopeBuilder<0>();
     477             :     }
     478             : 
     479             : private:
     480      371828 :     Scope()
     481      371828 :     {
     482      371828 :     }
     483             : 
     484             :     String m_type;
     485             :     std::unique_ptr<protocol::Runtime::RemoteObject> m_object;
     486             :     Maybe<String> m_name;
     487             :     Maybe<protocol::Debugger::Location> m_startLocation;
     488             :     Maybe<protocol::Debugger::Location> m_endLocation;
     489             : };
     490             : 
     491             : 
     492             : class  SearchMatch : public Serializable, public API::SearchMatch{
     493             :     PROTOCOL_DISALLOW_COPY(SearchMatch);
     494             : public:
     495             :     static std::unique_ptr<SearchMatch> fromValue(protocol::Value* value, ErrorSupport* errors);
     496             : 
     497           0 :     ~SearchMatch() override { }
     498             : 
     499             :     double getLineNumber() { return m_lineNumber; }
     500           0 :     void setLineNumber(double value) { m_lineNumber = value; }
     501             : 
     502             :     String getLineContent() { return m_lineContent; }
     503           0 :     void setLineContent(const String& value) { m_lineContent = value; }
     504             : 
     505             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
     506           0 :     String serialize() override { return toValue()->serialize(); }
     507             :     std::unique_ptr<SearchMatch> clone() const;
     508             :     std::unique_ptr<StringBuffer> toJSONString() const override;
     509             : 
     510             :     template<int STATE>
     511             :     class SearchMatchBuilder {
     512             :     public:
     513             :         enum {
     514             :             NoFieldsSet = 0,
     515             :             LineNumberSet = 1 << 1,
     516             :             LineContentSet = 1 << 2,
     517             :             AllFieldsSet = (LineNumberSet | LineContentSet | 0)};
     518             : 
     519             : 
     520             :         SearchMatchBuilder<STATE | LineNumberSet>& setLineNumber(double value)
     521             :         {
     522             :             static_assert(!(STATE & LineNumberSet), "property lineNumber should not be set yet");
     523             :             m_result->setLineNumber(value);
     524             :             return castState<LineNumberSet>();
     525             :         }
     526             : 
     527             :         SearchMatchBuilder<STATE | LineContentSet>& setLineContent(const String& value)
     528             :         {
     529             :             static_assert(!(STATE & LineContentSet), "property lineContent should not be set yet");
     530             :             m_result->setLineContent(value);
     531             :             return castState<LineContentSet>();
     532             :         }
     533             : 
     534             :         std::unique_ptr<SearchMatch> build()
     535             :         {
     536             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
     537             :             return std::move(m_result);
     538             :         }
     539             : 
     540             :     private:
     541             :         friend class SearchMatch;
     542           0 :         SearchMatchBuilder() : m_result(new SearchMatch()) { }
     543             : 
     544             :         template<int STEP> SearchMatchBuilder<STATE | STEP>& castState()
     545             :         {
     546             :             return *reinterpret_cast<SearchMatchBuilder<STATE | STEP>*>(this);
     547             :         }
     548             : 
     549             :         std::unique_ptr<protocol::Debugger::SearchMatch> m_result;
     550             :     };
     551             : 
     552             :     static SearchMatchBuilder<0> create()
     553             :     {
     554           0 :         return SearchMatchBuilder<0>();
     555             :     }
     556             : 
     557             : private:
     558             :     SearchMatch()
     559           0 :     {
     560           0 :           m_lineNumber = 0;
     561             :     }
     562             : 
     563             :     double m_lineNumber;
     564             :     String m_lineContent;
     565             : };
     566             : 
     567             : 
     568             : class  BreakLocation : public Serializable{
     569             :     PROTOCOL_DISALLOW_COPY(BreakLocation);
     570             : public:
     571             :     static std::unique_ptr<BreakLocation> fromValue(protocol::Value* value, ErrorSupport* errors);
     572             : 
     573       12690 :     ~BreakLocation() override { }
     574             : 
     575             :     String getScriptId() { return m_scriptId; }
     576        4230 :     void setScriptId(const String& value) { m_scriptId = value; }
     577             : 
     578             :     int getLineNumber() { return m_lineNumber; }
     579        4230 :     void setLineNumber(int value) { m_lineNumber = value; }
     580             : 
     581             :     bool hasColumnNumber() { return m_columnNumber.isJust(); }
     582             :     int getColumnNumber(int defaultValue) { return m_columnNumber.isJust() ? m_columnNumber.fromJust() : defaultValue; }
     583             :     void setColumnNumber(int value) { m_columnNumber = value; }
     584             : 
     585             :     struct  TypeEnum {
     586             :         static const char* DebuggerStatement;
     587             :         static const char* Call;
     588             :         static const char* Return;
     589             :     }; // TypeEnum
     590             : 
     591             :     bool hasType() { return m_type.isJust(); }
     592             :     String getType(const String& defaultValue) { return m_type.isJust() ? m_type.fromJust() : defaultValue; }
     593        4960 :     void setType(const String& value) { m_type = value; }
     594             : 
     595             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
     596           0 :     String serialize() override { return toValue()->serialize(); }
     597             :     std::unique_ptr<BreakLocation> clone() const;
     598             : 
     599             :     template<int STATE>
     600             :     class BreakLocationBuilder {
     601             :     public:
     602             :         enum {
     603             :             NoFieldsSet = 0,
     604             :             ScriptIdSet = 1 << 1,
     605             :             LineNumberSet = 1 << 2,
     606             :             AllFieldsSet = (ScriptIdSet | LineNumberSet | 0)};
     607             : 
     608             : 
     609             :         BreakLocationBuilder<STATE | ScriptIdSet>& setScriptId(const String& value)
     610             :         {
     611             :             static_assert(!(STATE & ScriptIdSet), "property scriptId should not be set yet");
     612             :             m_result->setScriptId(value);
     613             :             return castState<ScriptIdSet>();
     614             :         }
     615             : 
     616             :         BreakLocationBuilder<STATE | LineNumberSet>& setLineNumber(int value)
     617             :         {
     618             :             static_assert(!(STATE & LineNumberSet), "property lineNumber should not be set yet");
     619             :             m_result->setLineNumber(value);
     620             :             return castState<LineNumberSet>();
     621             :         }
     622             : 
     623             :         BreakLocationBuilder<STATE>& setColumnNumber(int value)
     624             :         {
     625             :             m_result->setColumnNumber(value);
     626             :             return *this;
     627             :         }
     628             : 
     629             :         BreakLocationBuilder<STATE>& setType(const String& value)
     630             :         {
     631             :             m_result->setType(value);
     632             :             return *this;
     633             :         }
     634             : 
     635             :         std::unique_ptr<BreakLocation> build()
     636             :         {
     637             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
     638             :             return std::move(m_result);
     639             :         }
     640             : 
     641             :     private:
     642             :         friend class BreakLocation;
     643        8460 :         BreakLocationBuilder() : m_result(new BreakLocation()) { }
     644             : 
     645             :         template<int STEP> BreakLocationBuilder<STATE | STEP>& castState()
     646             :         {
     647             :             return *reinterpret_cast<BreakLocationBuilder<STATE | STEP>*>(this);
     648             :         }
     649             : 
     650             :         std::unique_ptr<protocol::Debugger::BreakLocation> m_result;
     651             :     };
     652             : 
     653             :     static BreakLocationBuilder<0> create()
     654             :     {
     655        4230 :         return BreakLocationBuilder<0>();
     656             :     }
     657             : 
     658             : private:
     659        4230 :     BreakLocation()
     660        4230 :     {
     661        4230 :           m_lineNumber = 0;
     662        4230 :     }
     663             : 
     664             :     String m_scriptId;
     665             :     int m_lineNumber;
     666             :     Maybe<int> m_columnNumber;
     667             :     Maybe<String> m_type;
     668             : };
     669             : 
     670             : 
     671             : class  BreakpointResolvedNotification : public Serializable{
     672             :     PROTOCOL_DISALLOW_COPY(BreakpointResolvedNotification);
     673             : public:
     674             :     static std::unique_ptr<BreakpointResolvedNotification> fromValue(protocol::Value* value, ErrorSupport* errors);
     675             : 
     676         210 :     ~BreakpointResolvedNotification() override { }
     677             : 
     678             :     String getBreakpointId() { return m_breakpointId; }
     679          70 :     void setBreakpointId(const String& value) { m_breakpointId = value; }
     680             : 
     681             :     protocol::Debugger::Location* getLocation() { return m_location.get(); }
     682             :     void setLocation(std::unique_ptr<protocol::Debugger::Location> value) { m_location = std::move(value); }
     683             : 
     684             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
     685         210 :     String serialize() override { return toValue()->serialize(); }
     686             :     std::unique_ptr<BreakpointResolvedNotification> clone() const;
     687             : 
     688             :     template<int STATE>
     689             :     class BreakpointResolvedNotificationBuilder {
     690             :     public:
     691             :         enum {
     692             :             NoFieldsSet = 0,
     693             :             BreakpointIdSet = 1 << 1,
     694             :             LocationSet = 1 << 2,
     695             :             AllFieldsSet = (BreakpointIdSet | LocationSet | 0)};
     696             : 
     697             : 
     698             :         BreakpointResolvedNotificationBuilder<STATE | BreakpointIdSet>& setBreakpointId(const String& value)
     699             :         {
     700             :             static_assert(!(STATE & BreakpointIdSet), "property breakpointId should not be set yet");
     701             :             m_result->setBreakpointId(value);
     702             :             return castState<BreakpointIdSet>();
     703             :         }
     704             : 
     705             :         BreakpointResolvedNotificationBuilder<STATE | LocationSet>& setLocation(std::unique_ptr<protocol::Debugger::Location> value)
     706             :         {
     707             :             static_assert(!(STATE & LocationSet), "property location should not be set yet");
     708             :             m_result->setLocation(std::move(value));
     709             :             return castState<LocationSet>();
     710             :         }
     711             : 
     712             :         std::unique_ptr<BreakpointResolvedNotification> build()
     713             :         {
     714             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
     715             :             return std::move(m_result);
     716             :         }
     717             : 
     718             :     private:
     719             :         friend class BreakpointResolvedNotification;
     720         140 :         BreakpointResolvedNotificationBuilder() : m_result(new BreakpointResolvedNotification()) { }
     721             : 
     722             :         template<int STEP> BreakpointResolvedNotificationBuilder<STATE | STEP>& castState()
     723             :         {
     724             :             return *reinterpret_cast<BreakpointResolvedNotificationBuilder<STATE | STEP>*>(this);
     725             :         }
     726             : 
     727             :         std::unique_ptr<protocol::Debugger::BreakpointResolvedNotification> m_result;
     728             :     };
     729             : 
     730             :     static BreakpointResolvedNotificationBuilder<0> create()
     731             :     {
     732          70 :         return BreakpointResolvedNotificationBuilder<0>();
     733             :     }
     734             : 
     735             : private:
     736             :     BreakpointResolvedNotification()
     737          70 :     {
     738             :     }
     739             : 
     740             :     String m_breakpointId;
     741             :     std::unique_ptr<protocol::Debugger::Location> m_location;
     742             : };
     743             : 
     744             : 
     745             : class  PausedNotification : public Serializable{
     746             :     PROTOCOL_DISALLOW_COPY(PausedNotification);
     747             : public:
     748             :     static std::unique_ptr<PausedNotification> fromValue(protocol::Value* value, ErrorSupport* errors);
     749             : 
     750      166662 :     ~PausedNotification() override { }
     751             : 
     752             :     protocol::Array<protocol::Debugger::CallFrame>* getCallFrames() { return m_callFrames.get(); }
     753             :     void setCallFrames(std::unique_ptr<protocol::Array<protocol::Debugger::CallFrame>> value) { m_callFrames = std::move(value); }
     754             : 
     755             :     struct  ReasonEnum {
     756             :         static const char* XHR;
     757             :         static const char* DOM;
     758             :         static const char* EventListener;
     759             :         static const char* Exception;
     760             :         static const char* Assert;
     761             :         static const char* DebugCommand;
     762             :         static const char* PromiseRejection;
     763             :         static const char* OOM;
     764             :         static const char* Other;
     765             :         static const char* Ambiguous;
     766             :     }; // ReasonEnum
     767             : 
     768             :     String getReason() { return m_reason; }
     769       55554 :     void setReason(const String& value) { m_reason = value; }
     770             : 
     771             :     bool hasData() { return m_data.isJust(); }
     772             :     protocol::DictionaryValue* getData(protocol::DictionaryValue* defaultValue) { return m_data.isJust() ? m_data.fromJust() : defaultValue; }
     773             :     void setData(std::unique_ptr<protocol::DictionaryValue> value) { m_data = std::move(value); }
     774             : 
     775             :     bool hasHitBreakpoints() { return m_hitBreakpoints.isJust(); }
     776             :     protocol::Array<String>* getHitBreakpoints(protocol::Array<String>* defaultValue) { return m_hitBreakpoints.isJust() ? m_hitBreakpoints.fromJust() : defaultValue; }
     777             :     void setHitBreakpoints(std::unique_ptr<protocol::Array<String>> value) { m_hitBreakpoints = std::move(value); }
     778             : 
     779             :     bool hasAsyncStackTrace() { return m_asyncStackTrace.isJust(); }
     780             :     protocol::Runtime::StackTrace* getAsyncStackTrace(protocol::Runtime::StackTrace* defaultValue) { return m_asyncStackTrace.isJust() ? m_asyncStackTrace.fromJust() : defaultValue; }
     781             :     void setAsyncStackTrace(std::unique_ptr<protocol::Runtime::StackTrace> value) { m_asyncStackTrace = std::move(value); }
     782             : 
     783             :     bool hasAsyncStackTraceId() { return m_asyncStackTraceId.isJust(); }
     784             :     protocol::Runtime::StackTraceId* getAsyncStackTraceId(protocol::Runtime::StackTraceId* defaultValue) { return m_asyncStackTraceId.isJust() ? m_asyncStackTraceId.fromJust() : defaultValue; }
     785             :     void setAsyncStackTraceId(std::unique_ptr<protocol::Runtime::StackTraceId> value) { m_asyncStackTraceId = std::move(value); }
     786             : 
     787             :     bool hasAsyncCallStackTraceId() { return m_asyncCallStackTraceId.isJust(); }
     788             :     protocol::Runtime::StackTraceId* getAsyncCallStackTraceId(protocol::Runtime::StackTraceId* defaultValue) { return m_asyncCallStackTraceId.isJust() ? m_asyncCallStackTraceId.fromJust() : defaultValue; }
     789             :     void setAsyncCallStackTraceId(std::unique_ptr<protocol::Runtime::StackTraceId> value) { m_asyncCallStackTraceId = std::move(value); }
     790             : 
     791             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
     792      166662 :     String serialize() override { return toValue()->serialize(); }
     793             :     std::unique_ptr<PausedNotification> clone() const;
     794             : 
     795             :     template<int STATE>
     796             :     class PausedNotificationBuilder {
     797             :     public:
     798             :         enum {
     799             :             NoFieldsSet = 0,
     800             :             CallFramesSet = 1 << 1,
     801             :             ReasonSet = 1 << 2,
     802             :             AllFieldsSet = (CallFramesSet | ReasonSet | 0)};
     803             : 
     804             : 
     805             :         PausedNotificationBuilder<STATE | CallFramesSet>& setCallFrames(std::unique_ptr<protocol::Array<protocol::Debugger::CallFrame>> value)
     806             :         {
     807             :             static_assert(!(STATE & CallFramesSet), "property callFrames should not be set yet");
     808             :             m_result->setCallFrames(std::move(value));
     809             :             return castState<CallFramesSet>();
     810             :         }
     811             : 
     812             :         PausedNotificationBuilder<STATE | ReasonSet>& setReason(const String& value)
     813             :         {
     814             :             static_assert(!(STATE & ReasonSet), "property reason should not be set yet");
     815             :             m_result->setReason(value);
     816             :             return castState<ReasonSet>();
     817             :         }
     818             : 
     819             :         PausedNotificationBuilder<STATE>& setData(std::unique_ptr<protocol::DictionaryValue> value)
     820             :         {
     821             :             m_result->setData(std::move(value));
     822             :             return *this;
     823             :         }
     824             : 
     825             :         PausedNotificationBuilder<STATE>& setHitBreakpoints(std::unique_ptr<protocol::Array<String>> value)
     826             :         {
     827             :             m_result->setHitBreakpoints(std::move(value));
     828             :             return *this;
     829             :         }
     830             : 
     831             :         PausedNotificationBuilder<STATE>& setAsyncStackTrace(std::unique_ptr<protocol::Runtime::StackTrace> value)
     832             :         {
     833             :             m_result->setAsyncStackTrace(std::move(value));
     834             :             return *this;
     835             :         }
     836             : 
     837             :         PausedNotificationBuilder<STATE>& setAsyncStackTraceId(std::unique_ptr<protocol::Runtime::StackTraceId> value)
     838             :         {
     839             :             m_result->setAsyncStackTraceId(std::move(value));
     840             :             return *this;
     841             :         }
     842             : 
     843             :         PausedNotificationBuilder<STATE>& setAsyncCallStackTraceId(std::unique_ptr<protocol::Runtime::StackTraceId> value)
     844             :         {
     845             :             m_result->setAsyncCallStackTraceId(std::move(value));
     846             :             return *this;
     847             :         }
     848             : 
     849             :         std::unique_ptr<PausedNotification> build()
     850             :         {
     851             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
     852             :             return std::move(m_result);
     853             :         }
     854             : 
     855             :     private:
     856             :         friend class PausedNotification;
     857      111108 :         PausedNotificationBuilder() : m_result(new PausedNotification()) { }
     858             : 
     859             :         template<int STEP> PausedNotificationBuilder<STATE | STEP>& castState()
     860             :         {
     861             :             return *reinterpret_cast<PausedNotificationBuilder<STATE | STEP>*>(this);
     862             :         }
     863             : 
     864             :         std::unique_ptr<protocol::Debugger::PausedNotification> m_result;
     865             :     };
     866             : 
     867             :     static PausedNotificationBuilder<0> create()
     868             :     {
     869       55554 :         return PausedNotificationBuilder<0>();
     870             :     }
     871             : 
     872             : private:
     873             :     PausedNotification()
     874       55554 :     {
     875             :     }
     876             : 
     877             :     std::unique_ptr<protocol::Array<protocol::Debugger::CallFrame>> m_callFrames;
     878             :     String m_reason;
     879             :     Maybe<protocol::DictionaryValue> m_data;
     880             :     Maybe<protocol::Array<String>> m_hitBreakpoints;
     881             :     Maybe<protocol::Runtime::StackTrace> m_asyncStackTrace;
     882             :     Maybe<protocol::Runtime::StackTraceId> m_asyncStackTraceId;
     883             :     Maybe<protocol::Runtime::StackTraceId> m_asyncCallStackTraceId;
     884             : };
     885             : 
     886             : 
     887             : class  ScriptFailedToParseNotification : public Serializable{
     888             :     PROTOCOL_DISALLOW_COPY(ScriptFailedToParseNotification);
     889             : public:
     890             :     static std::unique_ptr<ScriptFailedToParseNotification> fromValue(protocol::Value* value, ErrorSupport* errors);
     891             : 
     892       15603 :     ~ScriptFailedToParseNotification() override { }
     893             : 
     894             :     String getScriptId() { return m_scriptId; }
     895        5201 :     void setScriptId(const String& value) { m_scriptId = value; }
     896             : 
     897             :     String getUrl() { return m_url; }
     898        5201 :     void setUrl(const String& value) { m_url = value; }
     899             : 
     900             :     int getStartLine() { return m_startLine; }
     901        5201 :     void setStartLine(int value) { m_startLine = value; }
     902             : 
     903             :     int getStartColumn() { return m_startColumn; }
     904        5201 :     void setStartColumn(int value) { m_startColumn = value; }
     905             : 
     906             :     int getEndLine() { return m_endLine; }
     907        5201 :     void setEndLine(int value) { m_endLine = value; }
     908             : 
     909             :     int getEndColumn() { return m_endColumn; }
     910        5201 :     void setEndColumn(int value) { m_endColumn = value; }
     911             : 
     912             :     int getExecutionContextId() { return m_executionContextId; }
     913        5201 :     void setExecutionContextId(int value) { m_executionContextId = value; }
     914             : 
     915             :     String getHash() { return m_hash; }
     916        5201 :     void setHash(const String& value) { m_hash = value; }
     917             : 
     918             :     bool hasExecutionContextAuxData() { return m_executionContextAuxData.isJust(); }
     919             :     protocol::DictionaryValue* getExecutionContextAuxData(protocol::DictionaryValue* defaultValue) { return m_executionContextAuxData.isJust() ? m_executionContextAuxData.fromJust() : defaultValue; }
     920             :     void setExecutionContextAuxData(std::unique_ptr<protocol::DictionaryValue> value) { m_executionContextAuxData = std::move(value); }
     921             : 
     922             :     bool hasSourceMapURL() { return m_sourceMapURL.isJust(); }
     923             :     String getSourceMapURL(const String& defaultValue) { return m_sourceMapURL.isJust() ? m_sourceMapURL.fromJust() : defaultValue; }
     924       10402 :     void setSourceMapURL(const String& value) { m_sourceMapURL = value; }
     925             : 
     926             :     bool hasHasSourceURL() { return m_hasSourceURL.isJust(); }
     927             :     bool getHasSourceURL(bool defaultValue) { return m_hasSourceURL.isJust() ? m_hasSourceURL.fromJust() : defaultValue; }
     928             :     void setHasSourceURL(bool value) { m_hasSourceURL = value; }
     929             : 
     930             :     bool hasIsModule() { return m_isModule.isJust(); }
     931             :     bool getIsModule(bool defaultValue) { return m_isModule.isJust() ? m_isModule.fromJust() : defaultValue; }
     932             :     void setIsModule(bool value) { m_isModule = value; }
     933             : 
     934             :     bool hasLength() { return m_length.isJust(); }
     935             :     int getLength(int defaultValue) { return m_length.isJust() ? m_length.fromJust() : defaultValue; }
     936             :     void setLength(int value) { m_length = value; }
     937             : 
     938             :     bool hasStackTrace() { return m_stackTrace.isJust(); }
     939             :     protocol::Runtime::StackTrace* getStackTrace(protocol::Runtime::StackTrace* defaultValue) { return m_stackTrace.isJust() ? m_stackTrace.fromJust() : defaultValue; }
     940             :     void setStackTrace(std::unique_ptr<protocol::Runtime::StackTrace> value) { m_stackTrace = std::move(value); }
     941             : 
     942             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
     943       15603 :     String serialize() override { return toValue()->serialize(); }
     944             :     std::unique_ptr<ScriptFailedToParseNotification> clone() const;
     945             : 
     946             :     template<int STATE>
     947             :     class ScriptFailedToParseNotificationBuilder {
     948             :     public:
     949             :         enum {
     950             :             NoFieldsSet = 0,
     951             :             ScriptIdSet = 1 << 1,
     952             :             UrlSet = 1 << 2,
     953             :             StartLineSet = 1 << 3,
     954             :             StartColumnSet = 1 << 4,
     955             :             EndLineSet = 1 << 5,
     956             :             EndColumnSet = 1 << 6,
     957             :             ExecutionContextIdSet = 1 << 7,
     958             :             HashSet = 1 << 8,
     959             :             AllFieldsSet = (ScriptIdSet | UrlSet | StartLineSet | StartColumnSet | EndLineSet | EndColumnSet | ExecutionContextIdSet | HashSet | 0)};
     960             : 
     961             : 
     962             :         ScriptFailedToParseNotificationBuilder<STATE | ScriptIdSet>& setScriptId(const String& value)
     963             :         {
     964             :             static_assert(!(STATE & ScriptIdSet), "property scriptId should not be set yet");
     965             :             m_result->setScriptId(value);
     966             :             return castState<ScriptIdSet>();
     967             :         }
     968             : 
     969             :         ScriptFailedToParseNotificationBuilder<STATE | UrlSet>& setUrl(const String& value)
     970             :         {
     971             :             static_assert(!(STATE & UrlSet), "property url should not be set yet");
     972             :             m_result->setUrl(value);
     973             :             return castState<UrlSet>();
     974             :         }
     975             : 
     976             :         ScriptFailedToParseNotificationBuilder<STATE | StartLineSet>& setStartLine(int value)
     977             :         {
     978             :             static_assert(!(STATE & StartLineSet), "property startLine should not be set yet");
     979             :             m_result->setStartLine(value);
     980             :             return castState<StartLineSet>();
     981             :         }
     982             : 
     983             :         ScriptFailedToParseNotificationBuilder<STATE | StartColumnSet>& setStartColumn(int value)
     984             :         {
     985             :             static_assert(!(STATE & StartColumnSet), "property startColumn should not be set yet");
     986             :             m_result->setStartColumn(value);
     987             :             return castState<StartColumnSet>();
     988             :         }
     989             : 
     990             :         ScriptFailedToParseNotificationBuilder<STATE | EndLineSet>& setEndLine(int value)
     991             :         {
     992             :             static_assert(!(STATE & EndLineSet), "property endLine should not be set yet");
     993             :             m_result->setEndLine(value);
     994             :             return castState<EndLineSet>();
     995             :         }
     996             : 
     997             :         ScriptFailedToParseNotificationBuilder<STATE | EndColumnSet>& setEndColumn(int value)
     998             :         {
     999             :             static_assert(!(STATE & EndColumnSet), "property endColumn should not be set yet");
    1000             :             m_result->setEndColumn(value);
    1001             :             return castState<EndColumnSet>();
    1002             :         }
    1003             : 
    1004             :         ScriptFailedToParseNotificationBuilder<STATE | ExecutionContextIdSet>& setExecutionContextId(int value)
    1005             :         {
    1006             :             static_assert(!(STATE & ExecutionContextIdSet), "property executionContextId should not be set yet");
    1007             :             m_result->setExecutionContextId(value);
    1008             :             return castState<ExecutionContextIdSet>();
    1009             :         }
    1010             : 
    1011             :         ScriptFailedToParseNotificationBuilder<STATE | HashSet>& setHash(const String& value)
    1012             :         {
    1013             :             static_assert(!(STATE & HashSet), "property hash should not be set yet");
    1014             :             m_result->setHash(value);
    1015             :             return castState<HashSet>();
    1016             :         }
    1017             : 
    1018             :         ScriptFailedToParseNotificationBuilder<STATE>& setExecutionContextAuxData(std::unique_ptr<protocol::DictionaryValue> value)
    1019             :         {
    1020             :             m_result->setExecutionContextAuxData(std::move(value));
    1021             :             return *this;
    1022             :         }
    1023             : 
    1024             :         ScriptFailedToParseNotificationBuilder<STATE>& setSourceMapURL(const String& value)
    1025             :         {
    1026             :             m_result->setSourceMapURL(value);
    1027             :             return *this;
    1028             :         }
    1029             : 
    1030             :         ScriptFailedToParseNotificationBuilder<STATE>& setHasSourceURL(bool value)
    1031             :         {
    1032             :             m_result->setHasSourceURL(value);
    1033             :             return *this;
    1034             :         }
    1035             : 
    1036             :         ScriptFailedToParseNotificationBuilder<STATE>& setIsModule(bool value)
    1037             :         {
    1038             :             m_result->setIsModule(value);
    1039             :             return *this;
    1040             :         }
    1041             : 
    1042             :         ScriptFailedToParseNotificationBuilder<STATE>& setLength(int value)
    1043             :         {
    1044             :             m_result->setLength(value);
    1045             :             return *this;
    1046             :         }
    1047             : 
    1048             :         ScriptFailedToParseNotificationBuilder<STATE>& setStackTrace(std::unique_ptr<protocol::Runtime::StackTrace> value)
    1049             :         {
    1050             :             m_result->setStackTrace(std::move(value));
    1051             :             return *this;
    1052             :         }
    1053             : 
    1054             :         std::unique_ptr<ScriptFailedToParseNotification> build()
    1055             :         {
    1056             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
    1057             :             return std::move(m_result);
    1058             :         }
    1059             : 
    1060             :     private:
    1061             :         friend class ScriptFailedToParseNotification;
    1062       10402 :         ScriptFailedToParseNotificationBuilder() : m_result(new ScriptFailedToParseNotification()) { }
    1063             : 
    1064             :         template<int STEP> ScriptFailedToParseNotificationBuilder<STATE | STEP>& castState()
    1065             :         {
    1066             :             return *reinterpret_cast<ScriptFailedToParseNotificationBuilder<STATE | STEP>*>(this);
    1067             :         }
    1068             : 
    1069             :         std::unique_ptr<protocol::Debugger::ScriptFailedToParseNotification> m_result;
    1070             :     };
    1071             : 
    1072             :     static ScriptFailedToParseNotificationBuilder<0> create()
    1073             :     {
    1074        5201 :         return ScriptFailedToParseNotificationBuilder<0>();
    1075             :     }
    1076             : 
    1077             : private:
    1078        5201 :     ScriptFailedToParseNotification()
    1079        5201 :     {
    1080        5201 :           m_startLine = 0;
    1081        5201 :           m_startColumn = 0;
    1082        5201 :           m_endLine = 0;
    1083        5201 :           m_endColumn = 0;
    1084        5201 :           m_executionContextId = 0;
    1085        5201 :     }
    1086             : 
    1087             :     String m_scriptId;
    1088             :     String m_url;
    1089             :     int m_startLine;
    1090             :     int m_startColumn;
    1091             :     int m_endLine;
    1092             :     int m_endColumn;
    1093             :     int m_executionContextId;
    1094             :     String m_hash;
    1095             :     Maybe<protocol::DictionaryValue> m_executionContextAuxData;
    1096             :     Maybe<String> m_sourceMapURL;
    1097             :     Maybe<bool> m_hasSourceURL;
    1098             :     Maybe<bool> m_isModule;
    1099             :     Maybe<int> m_length;
    1100             :     Maybe<protocol::Runtime::StackTrace> m_stackTrace;
    1101             : };
    1102             : 
    1103             : 
    1104             : class  ScriptParsedNotification : public Serializable{
    1105             :     PROTOCOL_DISALLOW_COPY(ScriptParsedNotification);
    1106             : public:
    1107             :     static std::unique_ptr<ScriptParsedNotification> fromValue(protocol::Value* value, ErrorSupport* errors);
    1108             : 
    1109      165681 :     ~ScriptParsedNotification() override { }
    1110             : 
    1111             :     String getScriptId() { return m_scriptId; }
    1112       55227 :     void setScriptId(const String& value) { m_scriptId = value; }
    1113             : 
    1114             :     String getUrl() { return m_url; }
    1115       55227 :     void setUrl(const String& value) { m_url = value; }
    1116             : 
    1117             :     int getStartLine() { return m_startLine; }
    1118       55227 :     void setStartLine(int value) { m_startLine = value; }
    1119             : 
    1120             :     int getStartColumn() { return m_startColumn; }
    1121       55227 :     void setStartColumn(int value) { m_startColumn = value; }
    1122             : 
    1123             :     int getEndLine() { return m_endLine; }
    1124       55227 :     void setEndLine(int value) { m_endLine = value; }
    1125             : 
    1126             :     int getEndColumn() { return m_endColumn; }
    1127       55227 :     void setEndColumn(int value) { m_endColumn = value; }
    1128             : 
    1129             :     int getExecutionContextId() { return m_executionContextId; }
    1130       55227 :     void setExecutionContextId(int value) { m_executionContextId = value; }
    1131             : 
    1132             :     String getHash() { return m_hash; }
    1133       55227 :     void setHash(const String& value) { m_hash = value; }
    1134             : 
    1135             :     bool hasExecutionContextAuxData() { return m_executionContextAuxData.isJust(); }
    1136             :     protocol::DictionaryValue* getExecutionContextAuxData(protocol::DictionaryValue* defaultValue) { return m_executionContextAuxData.isJust() ? m_executionContextAuxData.fromJust() : defaultValue; }
    1137             :     void setExecutionContextAuxData(std::unique_ptr<protocol::DictionaryValue> value) { m_executionContextAuxData = std::move(value); }
    1138             : 
    1139             :     bool hasIsLiveEdit() { return m_isLiveEdit.isJust(); }
    1140             :     bool getIsLiveEdit(bool defaultValue) { return m_isLiveEdit.isJust() ? m_isLiveEdit.fromJust() : defaultValue; }
    1141             :     void setIsLiveEdit(bool value) { m_isLiveEdit = value; }
    1142             : 
    1143             :     bool hasSourceMapURL() { return m_sourceMapURL.isJust(); }
    1144             :     String getSourceMapURL(const String& defaultValue) { return m_sourceMapURL.isJust() ? m_sourceMapURL.fromJust() : defaultValue; }
    1145      110454 :     void setSourceMapURL(const String& value) { m_sourceMapURL = value; }
    1146             : 
    1147             :     bool hasHasSourceURL() { return m_hasSourceURL.isJust(); }
    1148             :     bool getHasSourceURL(bool defaultValue) { return m_hasSourceURL.isJust() ? m_hasSourceURL.fromJust() : defaultValue; }
    1149             :     void setHasSourceURL(bool value) { m_hasSourceURL = value; }
    1150             : 
    1151             :     bool hasIsModule() { return m_isModule.isJust(); }
    1152             :     bool getIsModule(bool defaultValue) { return m_isModule.isJust() ? m_isModule.fromJust() : defaultValue; }
    1153             :     void setIsModule(bool value) { m_isModule = value; }
    1154             : 
    1155             :     bool hasLength() { return m_length.isJust(); }
    1156             :     int getLength(int defaultValue) { return m_length.isJust() ? m_length.fromJust() : defaultValue; }
    1157             :     void setLength(int value) { m_length = value; }
    1158             : 
    1159             :     bool hasStackTrace() { return m_stackTrace.isJust(); }
    1160             :     protocol::Runtime::StackTrace* getStackTrace(protocol::Runtime::StackTrace* defaultValue) { return m_stackTrace.isJust() ? m_stackTrace.fromJust() : defaultValue; }
    1161             :     void setStackTrace(std::unique_ptr<protocol::Runtime::StackTrace> value) { m_stackTrace = std::move(value); }
    1162             : 
    1163             :     std::unique_ptr<protocol::DictionaryValue> toValue() const;
    1164      165681 :     String serialize() override { return toValue()->serialize(); }
    1165             :     std::unique_ptr<ScriptParsedNotification> clone() const;
    1166             : 
    1167             :     template<int STATE>
    1168             :     class ScriptParsedNotificationBuilder {
    1169             :     public:
    1170             :         enum {
    1171             :             NoFieldsSet = 0,
    1172             :             ScriptIdSet = 1 << 1,
    1173             :             UrlSet = 1 << 2,
    1174             :             StartLineSet = 1 << 3,
    1175             :             StartColumnSet = 1 << 4,
    1176             :             EndLineSet = 1 << 5,
    1177             :             EndColumnSet = 1 << 6,
    1178             :             ExecutionContextIdSet = 1 << 7,
    1179             :             HashSet = 1 << 8,
    1180             :             AllFieldsSet = (ScriptIdSet | UrlSet | StartLineSet | StartColumnSet | EndLineSet | EndColumnSet | ExecutionContextIdSet | HashSet | 0)};
    1181             : 
    1182             : 
    1183             :         ScriptParsedNotificationBuilder<STATE | ScriptIdSet>& setScriptId(const String& value)
    1184             :         {
    1185             :             static_assert(!(STATE & ScriptIdSet), "property scriptId should not be set yet");
    1186             :             m_result->setScriptId(value);
    1187             :             return castState<ScriptIdSet>();
    1188             :         }
    1189             : 
    1190             :         ScriptParsedNotificationBuilder<STATE | UrlSet>& setUrl(const String& value)
    1191             :         {
    1192             :             static_assert(!(STATE & UrlSet), "property url should not be set yet");
    1193             :             m_result->setUrl(value);
    1194             :             return castState<UrlSet>();
    1195             :         }
    1196             : 
    1197             :         ScriptParsedNotificationBuilder<STATE | StartLineSet>& setStartLine(int value)
    1198             :         {
    1199             :             static_assert(!(STATE & StartLineSet), "property startLine should not be set yet");
    1200             :             m_result->setStartLine(value);
    1201             :             return castState<StartLineSet>();
    1202             :         }
    1203             : 
    1204             :         ScriptParsedNotificationBuilder<STATE | StartColumnSet>& setStartColumn(int value)
    1205             :         {
    1206             :             static_assert(!(STATE & StartColumnSet), "property startColumn should not be set yet");
    1207             :             m_result->setStartColumn(value);
    1208             :             return castState<StartColumnSet>();
    1209             :         }
    1210             : 
    1211             :         ScriptParsedNotificationBuilder<STATE | EndLineSet>& setEndLine(int value)
    1212             :         {
    1213             :             static_assert(!(STATE & EndLineSet), "property endLine should not be set yet");
    1214             :             m_result->setEndLine(value);
    1215             :             return castState<EndLineSet>();
    1216             :         }
    1217             : 
    1218             :         ScriptParsedNotificationBuilder<STATE | EndColumnSet>& setEndColumn(int value)
    1219             :         {
    1220             :             static_assert(!(STATE & EndColumnSet), "property endColumn should not be set yet");
    1221             :             m_result->setEndColumn(value);
    1222             :             return castState<EndColumnSet>();
    1223             :         }
    1224             : 
    1225             :         ScriptParsedNotificationBuilder<STATE | ExecutionContextIdSet>& setExecutionContextId(int value)
    1226             :         {
    1227             :             static_assert(!(STATE & ExecutionContextIdSet), "property executionContextId should not be set yet");
    1228             :             m_result->setExecutionContextId(value);
    1229             :             return castState<ExecutionContextIdSet>();
    1230             :         }
    1231             : 
    1232             :         ScriptParsedNotificationBuilder<STATE | HashSet>& setHash(const String& value)
    1233             :         {
    1234             :             static_assert(!(STATE & HashSet), "property hash should not be set yet");
    1235             :             m_result->setHash(value);
    1236             :             return castState<HashSet>();
    1237             :         }
    1238             : 
    1239             :         ScriptParsedNotificationBuilder<STATE>& setExecutionContextAuxData(std::unique_ptr<protocol::DictionaryValue> value)
    1240             :         {
    1241             :             m_result->setExecutionContextAuxData(std::move(value));
    1242             :             return *this;
    1243             :         }
    1244             : 
    1245             :         ScriptParsedNotificationBuilder<STATE>& setIsLiveEdit(bool value)
    1246             :         {
    1247             :             m_result->setIsLiveEdit(value);
    1248             :             return *this;
    1249             :         }
    1250             : 
    1251             :         ScriptParsedNotificationBuilder<STATE>& setSourceMapURL(const String& value)
    1252             :         {
    1253             :             m_result->setSourceMapURL(value);
    1254             :             return *this;
    1255             :         }
    1256             : 
    1257             :         ScriptParsedNotificationBuilder<STATE>& setHasSourceURL(bool value)
    1258             :         {
    1259             :             m_result->setHasSourceURL(value);
    1260             :             return *this;
    1261             :         }
    1262             : 
    1263             :         ScriptParsedNotificationBuilder<STATE>& setIsModule(bool value)
    1264             :         {
    1265             :             m_result->setIsModule(value);
    1266             :             return *this;
    1267             :         }
    1268             : 
    1269             :         ScriptParsedNotificationBuilder<STATE>& setLength(int value)
    1270             :         {
    1271             :             m_result->setLength(value);
    1272             :             return *this;
    1273             :         }
    1274             : 
    1275             :         ScriptParsedNotificationBuilder<STATE>& setStackTrace(std::unique_ptr<protocol::Runtime::StackTrace> value)
    1276             :         {
    1277             :             m_result->setStackTrace(std::move(value));
    1278             :             return *this;
    1279             :         }
    1280             : 
    1281             :         std::unique_ptr<ScriptParsedNotification> build()
    1282             :         {
    1283             :             static_assert(STATE == AllFieldsSet, "state should be AllFieldsSet");
    1284             :             return std::move(m_result);
    1285             :         }
    1286             : 
    1287             :     private:
    1288             :         friend class ScriptParsedNotification;
    1289      110454 :         ScriptParsedNotificationBuilder() : m_result(new ScriptParsedNotification()) { }
    1290             : 
    1291             :         template<int STEP> ScriptParsedNotificationBuilder<STATE | STEP>& castState()
    1292             :         {
    1293             :             return *reinterpret_cast<ScriptParsedNotificationBuilder<STATE | STEP>*>(this);
    1294             :         }
    1295             : 
    1296             :         std::unique_ptr<protocol::Debugger::ScriptParsedNotification> m_result;
    1297             :     };
    1298             : 
    1299             :     static ScriptParsedNotificationBuilder<0> create()
    1300             :     {
    1301       55227 :         return ScriptParsedNotificationBuilder<0>();
    1302             :     }
    1303             : 
    1304             : private:
    1305       55227 :     ScriptParsedNotification()
    1306       55227 :     {
    1307       55227 :           m_startLine = 0;
    1308       55227 :           m_startColumn = 0;
    1309       55227 :           m_endLine = 0;
    1310       55227 :           m_endColumn = 0;
    1311       55227 :           m_executionContextId = 0;
    1312       55227 :     }
    1313             : 
    1314             :     String m_scriptId;
    1315             :     String m_url;
    1316             :     int m_startLine;
    1317             :     int m_startColumn;
    1318             :     int m_endLine;
    1319             :     int m_endColumn;
    1320             :     int m_executionContextId;
    1321             :     String m_hash;
    1322             :     Maybe<protocol::DictionaryValue> m_executionContextAuxData;
    1323             :     Maybe<bool> m_isLiveEdit;
    1324             :     Maybe<String> m_sourceMapURL;
    1325             :     Maybe<bool> m_hasSourceURL;
    1326             :     Maybe<bool> m_isModule;
    1327             :     Maybe<int> m_length;
    1328             :     Maybe<protocol::Runtime::StackTrace> m_stackTrace;
    1329             : };
    1330             : 
    1331             : 
    1332             : // ------------- Backend interface.
    1333             : 
    1334        3834 : class  Backend {
    1335             : public:
    1336        3834 :     virtual ~Backend() { }
    1337             : 
    1338             :     virtual DispatchResponse continueToLocation(std::unique_ptr<protocol::Debugger::Location> in_location, Maybe<String> in_targetCallFrames) = 0;
    1339             :     virtual DispatchResponse disable() = 0;
    1340             :     virtual DispatchResponse enable(String* out_debuggerId) = 0;
    1341             :     virtual DispatchResponse evaluateOnCallFrame(const String& in_callFrameId, const String& in_expression, Maybe<String> in_objectGroup, Maybe<bool> in_includeCommandLineAPI, Maybe<bool> in_silent, Maybe<bool> in_returnByValue, Maybe<bool> in_generatePreview, Maybe<bool> in_throwOnSideEffect, Maybe<double> in_timeout, std::unique_ptr<protocol::Runtime::RemoteObject>* out_result, Maybe<protocol::Runtime::ExceptionDetails>* out_exceptionDetails) = 0;
    1342             :     virtual DispatchResponse getPossibleBreakpoints(std::unique_ptr<protocol::Debugger::Location> in_start, Maybe<protocol::Debugger::Location> in_end, Maybe<bool> in_restrictToFunction, std::unique_ptr<protocol::Array<protocol::Debugger::BreakLocation>>* out_locations) = 0;
    1343             :     virtual DispatchResponse getScriptSource(const String& in_scriptId, String* out_scriptSource) = 0;
    1344             :     virtual DispatchResponse getStackTrace(std::unique_ptr<protocol::Runtime::StackTraceId> in_stackTraceId, std::unique_ptr<protocol::Runtime::StackTrace>* out_stackTrace) = 0;
    1345             :     virtual DispatchResponse pause() = 0;
    1346             :     virtual DispatchResponse pauseOnAsyncCall(std::unique_ptr<protocol::Runtime::StackTraceId> in_parentStackTraceId) = 0;
    1347             :     virtual DispatchResponse removeBreakpoint(const String& in_breakpointId) = 0;
    1348             :     virtual DispatchResponse restartFrame(const String& in_callFrameId, std::unique_ptr<protocol::Array<protocol::Debugger::CallFrame>>* out_callFrames, Maybe<protocol::Runtime::StackTrace>* out_asyncStackTrace, Maybe<protocol::Runtime::StackTraceId>* out_asyncStackTraceId) = 0;
    1349             :     virtual DispatchResponse resume() = 0;
    1350             :     virtual DispatchResponse searchInContent(const String& in_scriptId, const String& in_query, Maybe<bool> in_caseSensitive, Maybe<bool> in_isRegex, std::unique_ptr<protocol::Array<protocol::Debugger::SearchMatch>>* out_result) = 0;
    1351             :     virtual DispatchResponse setAsyncCallStackDepth(int in_maxDepth) = 0;
    1352             :     virtual DispatchResponse setBlackboxPatterns(std::unique_ptr<protocol::Array<String>> in_patterns) = 0;
    1353             :     virtual DispatchResponse setBlackboxedRanges(const String& in_scriptId, std::unique_ptr<protocol::Array<protocol::Debugger::ScriptPosition>> in_positions) = 0;
    1354             :     virtual DispatchResponse setBreakpoint(std::unique_ptr<protocol::Debugger::Location> in_location, Maybe<String> in_condition, String* out_breakpointId, std::unique_ptr<protocol::Debugger::Location>* out_actualLocation) = 0;
    1355             :     virtual DispatchResponse setBreakpointByUrl(int in_lineNumber, Maybe<String> in_url, Maybe<String> in_urlRegex, Maybe<String> in_scriptHash, Maybe<int> in_columnNumber, Maybe<String> in_condition, String* out_breakpointId, std::unique_ptr<protocol::Array<protocol::Debugger::Location>>* out_locations) = 0;
    1356             :     virtual DispatchResponse setBreakpointOnFunctionCall(const String& in_objectId, Maybe<String> in_condition, String* out_breakpointId) = 0;
    1357             :     virtual DispatchResponse setBreakpointsActive(bool in_active) = 0;
    1358             :     virtual DispatchResponse setPauseOnExceptions(const String& in_state) = 0;
    1359             :     virtual DispatchResponse setReturnValue(std::unique_ptr<protocol::Runtime::CallArgument> in_newValue) = 0;
    1360             :     virtual DispatchResponse setScriptSource(const String& in_scriptId, const String& in_scriptSource, Maybe<bool> in_dryRun, Maybe<protocol::Array<protocol::Debugger::CallFrame>>* out_callFrames, Maybe<bool>* out_stackChanged, Maybe<protocol::Runtime::StackTrace>* out_asyncStackTrace, Maybe<protocol::Runtime::StackTraceId>* out_asyncStackTraceId, Maybe<protocol::Runtime::ExceptionDetails>* out_exceptionDetails) = 0;
    1361             :     virtual DispatchResponse setSkipAllPauses(bool in_skip) = 0;
    1362             :     virtual DispatchResponse setVariableValue(int in_scopeNumber, const String& in_variableName, std::unique_ptr<protocol::Runtime::CallArgument> in_newValue, const String& in_callFrameId) = 0;
    1363             :     virtual DispatchResponse stepInto(Maybe<bool> in_breakOnAsyncCall) = 0;
    1364             :     virtual DispatchResponse stepOut() = 0;
    1365             :     virtual DispatchResponse stepOver() = 0;
    1366             : 
    1367             : };
    1368             : 
    1369             : // ------------- Frontend interface.
    1370             : 
    1371             : class  Frontend {
    1372             : public:
    1373        3834 :     explicit Frontend(FrontendChannel* frontendChannel) : m_frontendChannel(frontendChannel) { }
    1374             :     void breakpointResolved(const String& breakpointId, std::unique_ptr<protocol::Debugger::Location> location);
    1375             :     void paused(std::unique_ptr<protocol::Array<protocol::Debugger::CallFrame>> callFrames, const String& reason, Maybe<protocol::DictionaryValue> data = Maybe<protocol::DictionaryValue>(), Maybe<protocol::Array<String>> hitBreakpoints = Maybe<protocol::Array<String>>(), Maybe<protocol::Runtime::StackTrace> asyncStackTrace = Maybe<protocol::Runtime::StackTrace>(), Maybe<protocol::Runtime::StackTraceId> asyncStackTraceId = Maybe<protocol::Runtime::StackTraceId>(), Maybe<protocol::Runtime::StackTraceId> asyncCallStackTraceId = Maybe<protocol::Runtime::StackTraceId>());
    1376             :     void resumed();
    1377             :     void scriptFailedToParse(const String& scriptId, const String& url, int startLine, int startColumn, int endLine, int endColumn, int executionContextId, const String& hash, Maybe<protocol::DictionaryValue> executionContextAuxData = Maybe<protocol::DictionaryValue>(), Maybe<String> sourceMapURL = Maybe<String>(), Maybe<bool> hasSourceURL = Maybe<bool>(), Maybe<bool> isModule = Maybe<bool>(), Maybe<int> length = Maybe<int>(), Maybe<protocol::Runtime::StackTrace> stackTrace = Maybe<protocol::Runtime::StackTrace>());
    1378             :     void scriptParsed(const String& scriptId, const String& url, int startLine, int startColumn, int endLine, int endColumn, int executionContextId, const String& hash, Maybe<protocol::DictionaryValue> executionContextAuxData = Maybe<protocol::DictionaryValue>(), Maybe<bool> isLiveEdit = Maybe<bool>(), Maybe<String> sourceMapURL = Maybe<String>(), Maybe<bool> hasSourceURL = Maybe<bool>(), Maybe<bool> isModule = Maybe<bool>(), Maybe<int> length = Maybe<int>(), Maybe<protocol::Runtime::StackTrace> stackTrace = Maybe<protocol::Runtime::StackTrace>());
    1379             : 
    1380             :     void flush();
    1381             :     void sendRawNotification(const String&);
    1382             : private:
    1383             :     FrontendChannel* m_frontendChannel;
    1384             : };
    1385             : 
    1386             : // ------------- Dispatcher.
    1387             : 
    1388             : class  Dispatcher {
    1389             : public:
    1390             :     static void wire(UberDispatcher*, Backend*);
    1391             : 
    1392             : private:
    1393             :     Dispatcher() { }
    1394             : };
    1395             : 
    1396             : // ------------- Metainfo.
    1397             : 
    1398             : class  Metainfo {
    1399             : public:
    1400             :     using BackendClass = Backend;
    1401             :     using FrontendClass = Frontend;
    1402             :     using DispatcherClass = Dispatcher;
    1403             :     static const char domainName[];
    1404             :     static const char commandPrefix[];
    1405             :     static const char version[];
    1406             : };
    1407             : 
    1408             : } // namespace Debugger
    1409             : } // namespace v8_inspector
    1410             : } // namespace protocol
    1411             : 
    1412             : #endif // !defined(v8_inspector_protocol_Debugger_h)

Generated by: LCOV version 1.10