easyjson.go 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. // Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
  2. package eventbreakpoints
  3. import (
  4. json "encoding/json"
  5. easyjson "github.com/mailru/easyjson"
  6. jlexer "github.com/mailru/easyjson/jlexer"
  7. jwriter "github.com/mailru/easyjson/jwriter"
  8. )
  9. // suppress unused package warning
  10. var (
  11. _ *json.RawMessage
  12. _ *jlexer.Lexer
  13. _ *jwriter.Writer
  14. _ easyjson.Marshaler
  15. )
  16. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEventbreakpoints(in *jlexer.Lexer, out *SetInstrumentationBreakpointParams) {
  17. isTopLevel := in.IsStart()
  18. if in.IsNull() {
  19. if isTopLevel {
  20. in.Consumed()
  21. }
  22. in.Skip()
  23. return
  24. }
  25. in.Delim('{')
  26. for !in.IsDelim('}') {
  27. key := in.UnsafeFieldName(false)
  28. in.WantColon()
  29. if in.IsNull() {
  30. in.Skip()
  31. in.WantComma()
  32. continue
  33. }
  34. switch key {
  35. case "eventName":
  36. out.EventName = string(in.String())
  37. default:
  38. in.SkipRecursive()
  39. }
  40. in.WantComma()
  41. }
  42. in.Delim('}')
  43. if isTopLevel {
  44. in.Consumed()
  45. }
  46. }
  47. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEventbreakpoints(out *jwriter.Writer, in SetInstrumentationBreakpointParams) {
  48. out.RawByte('{')
  49. first := true
  50. _ = first
  51. {
  52. const prefix string = ",\"eventName\":"
  53. out.RawString(prefix[1:])
  54. out.String(string(in.EventName))
  55. }
  56. out.RawByte('}')
  57. }
  58. // MarshalJSON supports json.Marshaler interface
  59. func (v SetInstrumentationBreakpointParams) MarshalJSON() ([]byte, error) {
  60. w := jwriter.Writer{}
  61. easyjsonC5a4559bEncodeGithubComChromedpCdprotoEventbreakpoints(&w, v)
  62. return w.Buffer.BuildBytes(), w.Error
  63. }
  64. // MarshalEasyJSON supports easyjson.Marshaler interface
  65. func (v SetInstrumentationBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) {
  66. easyjsonC5a4559bEncodeGithubComChromedpCdprotoEventbreakpoints(w, v)
  67. }
  68. // UnmarshalJSON supports json.Unmarshaler interface
  69. func (v *SetInstrumentationBreakpointParams) UnmarshalJSON(data []byte) error {
  70. r := jlexer.Lexer{Data: data}
  71. easyjsonC5a4559bDecodeGithubComChromedpCdprotoEventbreakpoints(&r, v)
  72. return r.Error()
  73. }
  74. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  75. func (v *SetInstrumentationBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  76. easyjsonC5a4559bDecodeGithubComChromedpCdprotoEventbreakpoints(l, v)
  77. }
  78. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEventbreakpoints1(in *jlexer.Lexer, out *RemoveInstrumentationBreakpointParams) {
  79. isTopLevel := in.IsStart()
  80. if in.IsNull() {
  81. if isTopLevel {
  82. in.Consumed()
  83. }
  84. in.Skip()
  85. return
  86. }
  87. in.Delim('{')
  88. for !in.IsDelim('}') {
  89. key := in.UnsafeFieldName(false)
  90. in.WantColon()
  91. if in.IsNull() {
  92. in.Skip()
  93. in.WantComma()
  94. continue
  95. }
  96. switch key {
  97. case "eventName":
  98. out.EventName = string(in.String())
  99. default:
  100. in.SkipRecursive()
  101. }
  102. in.WantComma()
  103. }
  104. in.Delim('}')
  105. if isTopLevel {
  106. in.Consumed()
  107. }
  108. }
  109. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEventbreakpoints1(out *jwriter.Writer, in RemoveInstrumentationBreakpointParams) {
  110. out.RawByte('{')
  111. first := true
  112. _ = first
  113. {
  114. const prefix string = ",\"eventName\":"
  115. out.RawString(prefix[1:])
  116. out.String(string(in.EventName))
  117. }
  118. out.RawByte('}')
  119. }
  120. // MarshalJSON supports json.Marshaler interface
  121. func (v RemoveInstrumentationBreakpointParams) MarshalJSON() ([]byte, error) {
  122. w := jwriter.Writer{}
  123. easyjsonC5a4559bEncodeGithubComChromedpCdprotoEventbreakpoints1(&w, v)
  124. return w.Buffer.BuildBytes(), w.Error
  125. }
  126. // MarshalEasyJSON supports easyjson.Marshaler interface
  127. func (v RemoveInstrumentationBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) {
  128. easyjsonC5a4559bEncodeGithubComChromedpCdprotoEventbreakpoints1(w, v)
  129. }
  130. // UnmarshalJSON supports json.Unmarshaler interface
  131. func (v *RemoveInstrumentationBreakpointParams) UnmarshalJSON(data []byte) error {
  132. r := jlexer.Lexer{Data: data}
  133. easyjsonC5a4559bDecodeGithubComChromedpCdprotoEventbreakpoints1(&r, v)
  134. return r.Error()
  135. }
  136. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  137. func (v *RemoveInstrumentationBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  138. easyjsonC5a4559bDecodeGithubComChromedpCdprotoEventbreakpoints1(l, v)
  139. }
  140. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoEventbreakpoints2(in *jlexer.Lexer, out *DisableParams) {
  141. isTopLevel := in.IsStart()
  142. if in.IsNull() {
  143. if isTopLevel {
  144. in.Consumed()
  145. }
  146. in.Skip()
  147. return
  148. }
  149. in.Delim('{')
  150. for !in.IsDelim('}') {
  151. key := in.UnsafeFieldName(false)
  152. in.WantColon()
  153. if in.IsNull() {
  154. in.Skip()
  155. in.WantComma()
  156. continue
  157. }
  158. switch key {
  159. default:
  160. in.SkipRecursive()
  161. }
  162. in.WantComma()
  163. }
  164. in.Delim('}')
  165. if isTopLevel {
  166. in.Consumed()
  167. }
  168. }
  169. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoEventbreakpoints2(out *jwriter.Writer, in DisableParams) {
  170. out.RawByte('{')
  171. first := true
  172. _ = first
  173. out.RawByte('}')
  174. }
  175. // MarshalJSON supports json.Marshaler interface
  176. func (v DisableParams) MarshalJSON() ([]byte, error) {
  177. w := jwriter.Writer{}
  178. easyjsonC5a4559bEncodeGithubComChromedpCdprotoEventbreakpoints2(&w, v)
  179. return w.Buffer.BuildBytes(), w.Error
  180. }
  181. // MarshalEasyJSON supports easyjson.Marshaler interface
  182. func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
  183. easyjsonC5a4559bEncodeGithubComChromedpCdprotoEventbreakpoints2(w, v)
  184. }
  185. // UnmarshalJSON supports json.Unmarshaler interface
  186. func (v *DisableParams) UnmarshalJSON(data []byte) error {
  187. r := jlexer.Lexer{Data: data}
  188. easyjsonC5a4559bDecodeGithubComChromedpCdprotoEventbreakpoints2(&r, v)
  189. return r.Error()
  190. }
  191. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  192. func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  193. easyjsonC5a4559bDecodeGithubComChromedpCdprotoEventbreakpoints2(l, v)
  194. }