event.go 59 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638
  1. // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
  2. package opencode
  3. import (
  4. "context"
  5. "net/http"
  6. "net/url"
  7. "reflect"
  8. "slices"
  9. "github.com/sst/opencode-sdk-go/internal/apijson"
  10. "github.com/sst/opencode-sdk-go/internal/apiquery"
  11. "github.com/sst/opencode-sdk-go/internal/param"
  12. "github.com/sst/opencode-sdk-go/internal/requestconfig"
  13. "github.com/sst/opencode-sdk-go/option"
  14. "github.com/sst/opencode-sdk-go/packages/ssestream"
  15. "github.com/sst/opencode-sdk-go/shared"
  16. "github.com/tidwall/gjson"
  17. )
  18. // EventService contains methods and other services that help with interacting with
  19. // the opencode API.
  20. //
  21. // Note, unlike clients, this service does not read variables from the environment
  22. // automatically. You should not instantiate this service directly, and instead use
  23. // the [NewEventService] method instead.
  24. type EventService struct {
  25. Options []option.RequestOption
  26. }
  27. // NewEventService generates a new service that applies the given options to each
  28. // request. These options are applied after the parent client's options (if there
  29. // is one), and before any request-specific options.
  30. func NewEventService(opts ...option.RequestOption) (r *EventService) {
  31. r = &EventService{}
  32. r.Options = opts
  33. return
  34. }
  35. // Get events
  36. func (r *EventService) ListStreaming(ctx context.Context, query EventListParams, opts ...option.RequestOption) (stream *ssestream.Stream[EventListResponse]) {
  37. var (
  38. raw *http.Response
  39. err error
  40. )
  41. opts = slices.Concat(r.Options, opts)
  42. opts = append([]option.RequestOption{option.WithHeader("Accept", "text/event-stream")}, opts...)
  43. path := "event"
  44. err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, query, &raw, opts...)
  45. return ssestream.NewStream[EventListResponse](ssestream.NewDecoder(raw), err)
  46. }
  47. type EventListResponse struct {
  48. // This field can have the runtime type of
  49. // [EventListResponseEventInstallationUpdatedProperties],
  50. // [EventListResponseEventLspClientDiagnosticsProperties],
  51. // [EventListResponseEventMessageUpdatedProperties],
  52. // [EventListResponseEventMessageRemovedProperties],
  53. // [EventListResponseEventMessagePartUpdatedProperties],
  54. // [EventListResponseEventMessagePartRemovedProperties],
  55. // [EventListResponseEventSessionCompactedProperties], [Permission],
  56. // [EventListResponseEventPermissionRepliedProperties],
  57. // [EventListResponseEventFileEditedProperties],
  58. // [EventListResponseEventFileWatcherUpdatedProperties],
  59. // [EventListResponseEventTodoUpdatedProperties],
  60. // [EventListResponseEventSessionIdleProperties],
  61. // [EventListResponseEventSessionCreatedProperties],
  62. // [EventListResponseEventSessionUpdatedProperties],
  63. // [EventListResponseEventSessionDeletedProperties],
  64. // [EventListResponseEventSessionErrorProperties], [interface{}],
  65. // [EventListResponseEventIdeInstalledProperties].
  66. Properties interface{} `json:"properties,required"`
  67. Type EventListResponseType `json:"type,required"`
  68. JSON eventListResponseJSON `json:"-"`
  69. union EventListResponseUnion
  70. }
  71. // eventListResponseJSON contains the JSON metadata for the struct
  72. // [EventListResponse]
  73. type eventListResponseJSON struct {
  74. Properties apijson.Field
  75. Type apijson.Field
  76. raw string
  77. ExtraFields map[string]apijson.Field
  78. }
  79. func (r eventListResponseJSON) RawJSON() string {
  80. return r.raw
  81. }
  82. func (r *EventListResponse) UnmarshalJSON(data []byte) (err error) {
  83. *r = EventListResponse{}
  84. err = apijson.UnmarshalRoot(data, &r.union)
  85. if err != nil {
  86. return err
  87. }
  88. return apijson.Port(r.union, &r)
  89. }
  90. // AsUnion returns a [EventListResponseUnion] interface which you can cast to the
  91. // specific types for more type safety.
  92. //
  93. // Possible runtime types of the union are
  94. // [EventListResponseEventInstallationUpdated],
  95. // [EventListResponseEventLspClientDiagnostics],
  96. // [EventListResponseEventMessageUpdated], [EventListResponseEventMessageRemoved],
  97. // [EventListResponseEventMessagePartUpdated],
  98. // [EventListResponseEventMessagePartRemoved],
  99. // [EventListResponseEventSessionCompacted],
  100. // [EventListResponseEventPermissionUpdated],
  101. // [EventListResponseEventPermissionReplied], [EventListResponseEventFileEdited],
  102. // [EventListResponseEventFileWatcherUpdated], [EventListResponseEventTodoUpdated],
  103. // [EventListResponseEventSessionIdle], [EventListResponseEventSessionCreated],
  104. // [EventListResponseEventSessionUpdated], [EventListResponseEventSessionDeleted],
  105. // [EventListResponseEventSessionError], [EventListResponseEventServerConnected],
  106. // [EventListResponseEventIdeInstalled].
  107. func (r EventListResponse) AsUnion() EventListResponseUnion {
  108. return r.union
  109. }
  110. // Union satisfied by [EventListResponseEventInstallationUpdated],
  111. // [EventListResponseEventLspClientDiagnostics],
  112. // [EventListResponseEventMessageUpdated], [EventListResponseEventMessageRemoved],
  113. // [EventListResponseEventMessagePartUpdated],
  114. // [EventListResponseEventMessagePartRemoved],
  115. // [EventListResponseEventSessionCompacted],
  116. // [EventListResponseEventPermissionUpdated],
  117. // [EventListResponseEventPermissionReplied], [EventListResponseEventFileEdited],
  118. // [EventListResponseEventFileWatcherUpdated], [EventListResponseEventTodoUpdated],
  119. // [EventListResponseEventSessionIdle], [EventListResponseEventSessionCreated],
  120. // [EventListResponseEventSessionUpdated], [EventListResponseEventSessionDeleted],
  121. // [EventListResponseEventSessionError], [EventListResponseEventServerConnected] or
  122. // [EventListResponseEventIdeInstalled].
  123. type EventListResponseUnion interface {
  124. implementsEventListResponse()
  125. }
  126. func init() {
  127. apijson.RegisterUnion(
  128. reflect.TypeOf((*EventListResponseUnion)(nil)).Elem(),
  129. "",
  130. apijson.UnionVariant{
  131. TypeFilter: gjson.JSON,
  132. Type: reflect.TypeOf(EventListResponseEventInstallationUpdated{}),
  133. },
  134. apijson.UnionVariant{
  135. TypeFilter: gjson.JSON,
  136. Type: reflect.TypeOf(EventListResponseEventLspClientDiagnostics{}),
  137. },
  138. apijson.UnionVariant{
  139. TypeFilter: gjson.JSON,
  140. Type: reflect.TypeOf(EventListResponseEventMessageUpdated{}),
  141. },
  142. apijson.UnionVariant{
  143. TypeFilter: gjson.JSON,
  144. Type: reflect.TypeOf(EventListResponseEventMessageRemoved{}),
  145. },
  146. apijson.UnionVariant{
  147. TypeFilter: gjson.JSON,
  148. Type: reflect.TypeOf(EventListResponseEventMessagePartUpdated{}),
  149. },
  150. apijson.UnionVariant{
  151. TypeFilter: gjson.JSON,
  152. Type: reflect.TypeOf(EventListResponseEventMessagePartRemoved{}),
  153. },
  154. apijson.UnionVariant{
  155. TypeFilter: gjson.JSON,
  156. Type: reflect.TypeOf(EventListResponseEventSessionCompacted{}),
  157. },
  158. apijson.UnionVariant{
  159. TypeFilter: gjson.JSON,
  160. Type: reflect.TypeOf(EventListResponseEventPermissionUpdated{}),
  161. },
  162. apijson.UnionVariant{
  163. TypeFilter: gjson.JSON,
  164. Type: reflect.TypeOf(EventListResponseEventPermissionReplied{}),
  165. },
  166. apijson.UnionVariant{
  167. TypeFilter: gjson.JSON,
  168. Type: reflect.TypeOf(EventListResponseEventFileEdited{}),
  169. },
  170. apijson.UnionVariant{
  171. TypeFilter: gjson.JSON,
  172. Type: reflect.TypeOf(EventListResponseEventFileWatcherUpdated{}),
  173. },
  174. apijson.UnionVariant{
  175. TypeFilter: gjson.JSON,
  176. Type: reflect.TypeOf(EventListResponseEventTodoUpdated{}),
  177. },
  178. apijson.UnionVariant{
  179. TypeFilter: gjson.JSON,
  180. Type: reflect.TypeOf(EventListResponseEventSessionIdle{}),
  181. },
  182. apijson.UnionVariant{
  183. TypeFilter: gjson.JSON,
  184. Type: reflect.TypeOf(EventListResponseEventSessionCreated{}),
  185. },
  186. apijson.UnionVariant{
  187. TypeFilter: gjson.JSON,
  188. Type: reflect.TypeOf(EventListResponseEventSessionUpdated{}),
  189. },
  190. apijson.UnionVariant{
  191. TypeFilter: gjson.JSON,
  192. Type: reflect.TypeOf(EventListResponseEventSessionDeleted{}),
  193. },
  194. apijson.UnionVariant{
  195. TypeFilter: gjson.JSON,
  196. Type: reflect.TypeOf(EventListResponseEventSessionError{}),
  197. },
  198. apijson.UnionVariant{
  199. TypeFilter: gjson.JSON,
  200. Type: reflect.TypeOf(EventListResponseEventServerConnected{}),
  201. },
  202. apijson.UnionVariant{
  203. TypeFilter: gjson.JSON,
  204. Type: reflect.TypeOf(EventListResponseEventIdeInstalled{}),
  205. },
  206. )
  207. }
  208. type EventListResponseEventInstallationUpdated struct {
  209. Properties EventListResponseEventInstallationUpdatedProperties `json:"properties,required"`
  210. Type EventListResponseEventInstallationUpdatedType `json:"type,required"`
  211. JSON eventListResponseEventInstallationUpdatedJSON `json:"-"`
  212. }
  213. // eventListResponseEventInstallationUpdatedJSON contains the JSON metadata for the
  214. // struct [EventListResponseEventInstallationUpdated]
  215. type eventListResponseEventInstallationUpdatedJSON struct {
  216. Properties apijson.Field
  217. Type apijson.Field
  218. raw string
  219. ExtraFields map[string]apijson.Field
  220. }
  221. func (r *EventListResponseEventInstallationUpdated) UnmarshalJSON(data []byte) (err error) {
  222. return apijson.UnmarshalRoot(data, r)
  223. }
  224. func (r eventListResponseEventInstallationUpdatedJSON) RawJSON() string {
  225. return r.raw
  226. }
  227. func (r EventListResponseEventInstallationUpdated) implementsEventListResponse() {}
  228. type EventListResponseEventInstallationUpdatedProperties struct {
  229. Version string `json:"version,required"`
  230. JSON eventListResponseEventInstallationUpdatedPropertiesJSON `json:"-"`
  231. }
  232. // eventListResponseEventInstallationUpdatedPropertiesJSON contains the JSON
  233. // metadata for the struct [EventListResponseEventInstallationUpdatedProperties]
  234. type eventListResponseEventInstallationUpdatedPropertiesJSON struct {
  235. Version apijson.Field
  236. raw string
  237. ExtraFields map[string]apijson.Field
  238. }
  239. func (r *EventListResponseEventInstallationUpdatedProperties) UnmarshalJSON(data []byte) (err error) {
  240. return apijson.UnmarshalRoot(data, r)
  241. }
  242. func (r eventListResponseEventInstallationUpdatedPropertiesJSON) RawJSON() string {
  243. return r.raw
  244. }
  245. type EventListResponseEventInstallationUpdatedType string
  246. const (
  247. EventListResponseEventInstallationUpdatedTypeInstallationUpdated EventListResponseEventInstallationUpdatedType = "installation.updated"
  248. )
  249. func (r EventListResponseEventInstallationUpdatedType) IsKnown() bool {
  250. switch r {
  251. case EventListResponseEventInstallationUpdatedTypeInstallationUpdated:
  252. return true
  253. }
  254. return false
  255. }
  256. type EventListResponseEventLspClientDiagnostics struct {
  257. Properties EventListResponseEventLspClientDiagnosticsProperties `json:"properties,required"`
  258. Type EventListResponseEventLspClientDiagnosticsType `json:"type,required"`
  259. JSON eventListResponseEventLspClientDiagnosticsJSON `json:"-"`
  260. }
  261. // eventListResponseEventLspClientDiagnosticsJSON contains the JSON metadata for
  262. // the struct [EventListResponseEventLspClientDiagnostics]
  263. type eventListResponseEventLspClientDiagnosticsJSON struct {
  264. Properties apijson.Field
  265. Type apijson.Field
  266. raw string
  267. ExtraFields map[string]apijson.Field
  268. }
  269. func (r *EventListResponseEventLspClientDiagnostics) UnmarshalJSON(data []byte) (err error) {
  270. return apijson.UnmarshalRoot(data, r)
  271. }
  272. func (r eventListResponseEventLspClientDiagnosticsJSON) RawJSON() string {
  273. return r.raw
  274. }
  275. func (r EventListResponseEventLspClientDiagnostics) implementsEventListResponse() {}
  276. type EventListResponseEventLspClientDiagnosticsProperties struct {
  277. Path string `json:"path,required"`
  278. ServerID string `json:"serverID,required"`
  279. JSON eventListResponseEventLspClientDiagnosticsPropertiesJSON `json:"-"`
  280. }
  281. // eventListResponseEventLspClientDiagnosticsPropertiesJSON contains the JSON
  282. // metadata for the struct [EventListResponseEventLspClientDiagnosticsProperties]
  283. type eventListResponseEventLspClientDiagnosticsPropertiesJSON struct {
  284. Path apijson.Field
  285. ServerID apijson.Field
  286. raw string
  287. ExtraFields map[string]apijson.Field
  288. }
  289. func (r *EventListResponseEventLspClientDiagnosticsProperties) UnmarshalJSON(data []byte) (err error) {
  290. return apijson.UnmarshalRoot(data, r)
  291. }
  292. func (r eventListResponseEventLspClientDiagnosticsPropertiesJSON) RawJSON() string {
  293. return r.raw
  294. }
  295. type EventListResponseEventLspClientDiagnosticsType string
  296. const (
  297. EventListResponseEventLspClientDiagnosticsTypeLspClientDiagnostics EventListResponseEventLspClientDiagnosticsType = "lsp.client.diagnostics"
  298. )
  299. func (r EventListResponseEventLspClientDiagnosticsType) IsKnown() bool {
  300. switch r {
  301. case EventListResponseEventLspClientDiagnosticsTypeLspClientDiagnostics:
  302. return true
  303. }
  304. return false
  305. }
  306. type EventListResponseEventMessageUpdated struct {
  307. Properties EventListResponseEventMessageUpdatedProperties `json:"properties,required"`
  308. Type EventListResponseEventMessageUpdatedType `json:"type,required"`
  309. JSON eventListResponseEventMessageUpdatedJSON `json:"-"`
  310. }
  311. // eventListResponseEventMessageUpdatedJSON contains the JSON metadata for the
  312. // struct [EventListResponseEventMessageUpdated]
  313. type eventListResponseEventMessageUpdatedJSON struct {
  314. Properties apijson.Field
  315. Type apijson.Field
  316. raw string
  317. ExtraFields map[string]apijson.Field
  318. }
  319. func (r *EventListResponseEventMessageUpdated) UnmarshalJSON(data []byte) (err error) {
  320. return apijson.UnmarshalRoot(data, r)
  321. }
  322. func (r eventListResponseEventMessageUpdatedJSON) RawJSON() string {
  323. return r.raw
  324. }
  325. func (r EventListResponseEventMessageUpdated) implementsEventListResponse() {}
  326. type EventListResponseEventMessageUpdatedProperties struct {
  327. Info Message `json:"info,required"`
  328. JSON eventListResponseEventMessageUpdatedPropertiesJSON `json:"-"`
  329. }
  330. // eventListResponseEventMessageUpdatedPropertiesJSON contains the JSON metadata
  331. // for the struct [EventListResponseEventMessageUpdatedProperties]
  332. type eventListResponseEventMessageUpdatedPropertiesJSON struct {
  333. Info apijson.Field
  334. raw string
  335. ExtraFields map[string]apijson.Field
  336. }
  337. func (r *EventListResponseEventMessageUpdatedProperties) UnmarshalJSON(data []byte) (err error) {
  338. return apijson.UnmarshalRoot(data, r)
  339. }
  340. func (r eventListResponseEventMessageUpdatedPropertiesJSON) RawJSON() string {
  341. return r.raw
  342. }
  343. type EventListResponseEventMessageUpdatedType string
  344. const (
  345. EventListResponseEventMessageUpdatedTypeMessageUpdated EventListResponseEventMessageUpdatedType = "message.updated"
  346. )
  347. func (r EventListResponseEventMessageUpdatedType) IsKnown() bool {
  348. switch r {
  349. case EventListResponseEventMessageUpdatedTypeMessageUpdated:
  350. return true
  351. }
  352. return false
  353. }
  354. type EventListResponseEventMessageRemoved struct {
  355. Properties EventListResponseEventMessageRemovedProperties `json:"properties,required"`
  356. Type EventListResponseEventMessageRemovedType `json:"type,required"`
  357. JSON eventListResponseEventMessageRemovedJSON `json:"-"`
  358. }
  359. // eventListResponseEventMessageRemovedJSON contains the JSON metadata for the
  360. // struct [EventListResponseEventMessageRemoved]
  361. type eventListResponseEventMessageRemovedJSON struct {
  362. Properties apijson.Field
  363. Type apijson.Field
  364. raw string
  365. ExtraFields map[string]apijson.Field
  366. }
  367. func (r *EventListResponseEventMessageRemoved) UnmarshalJSON(data []byte) (err error) {
  368. return apijson.UnmarshalRoot(data, r)
  369. }
  370. func (r eventListResponseEventMessageRemovedJSON) RawJSON() string {
  371. return r.raw
  372. }
  373. func (r EventListResponseEventMessageRemoved) implementsEventListResponse() {}
  374. type EventListResponseEventMessageRemovedProperties struct {
  375. MessageID string `json:"messageID,required"`
  376. SessionID string `json:"sessionID,required"`
  377. JSON eventListResponseEventMessageRemovedPropertiesJSON `json:"-"`
  378. }
  379. // eventListResponseEventMessageRemovedPropertiesJSON contains the JSON metadata
  380. // for the struct [EventListResponseEventMessageRemovedProperties]
  381. type eventListResponseEventMessageRemovedPropertiesJSON struct {
  382. MessageID apijson.Field
  383. SessionID apijson.Field
  384. raw string
  385. ExtraFields map[string]apijson.Field
  386. }
  387. func (r *EventListResponseEventMessageRemovedProperties) UnmarshalJSON(data []byte) (err error) {
  388. return apijson.UnmarshalRoot(data, r)
  389. }
  390. func (r eventListResponseEventMessageRemovedPropertiesJSON) RawJSON() string {
  391. return r.raw
  392. }
  393. type EventListResponseEventMessageRemovedType string
  394. const (
  395. EventListResponseEventMessageRemovedTypeMessageRemoved EventListResponseEventMessageRemovedType = "message.removed"
  396. )
  397. func (r EventListResponseEventMessageRemovedType) IsKnown() bool {
  398. switch r {
  399. case EventListResponseEventMessageRemovedTypeMessageRemoved:
  400. return true
  401. }
  402. return false
  403. }
  404. type EventListResponseEventMessagePartUpdated struct {
  405. Properties EventListResponseEventMessagePartUpdatedProperties `json:"properties,required"`
  406. Type EventListResponseEventMessagePartUpdatedType `json:"type,required"`
  407. JSON eventListResponseEventMessagePartUpdatedJSON `json:"-"`
  408. }
  409. // eventListResponseEventMessagePartUpdatedJSON contains the JSON metadata for the
  410. // struct [EventListResponseEventMessagePartUpdated]
  411. type eventListResponseEventMessagePartUpdatedJSON struct {
  412. Properties apijson.Field
  413. Type apijson.Field
  414. raw string
  415. ExtraFields map[string]apijson.Field
  416. }
  417. func (r *EventListResponseEventMessagePartUpdated) UnmarshalJSON(data []byte) (err error) {
  418. return apijson.UnmarshalRoot(data, r)
  419. }
  420. func (r eventListResponseEventMessagePartUpdatedJSON) RawJSON() string {
  421. return r.raw
  422. }
  423. func (r EventListResponseEventMessagePartUpdated) implementsEventListResponse() {}
  424. type EventListResponseEventMessagePartUpdatedProperties struct {
  425. Part Part `json:"part,required"`
  426. Delta string `json:"delta"`
  427. JSON eventListResponseEventMessagePartUpdatedPropertiesJSON `json:"-"`
  428. }
  429. // eventListResponseEventMessagePartUpdatedPropertiesJSON contains the JSON
  430. // metadata for the struct [EventListResponseEventMessagePartUpdatedProperties]
  431. type eventListResponseEventMessagePartUpdatedPropertiesJSON struct {
  432. Part apijson.Field
  433. Delta apijson.Field
  434. raw string
  435. ExtraFields map[string]apijson.Field
  436. }
  437. func (r *EventListResponseEventMessagePartUpdatedProperties) UnmarshalJSON(data []byte) (err error) {
  438. return apijson.UnmarshalRoot(data, r)
  439. }
  440. func (r eventListResponseEventMessagePartUpdatedPropertiesJSON) RawJSON() string {
  441. return r.raw
  442. }
  443. type EventListResponseEventMessagePartUpdatedType string
  444. const (
  445. EventListResponseEventMessagePartUpdatedTypeMessagePartUpdated EventListResponseEventMessagePartUpdatedType = "message.part.updated"
  446. )
  447. func (r EventListResponseEventMessagePartUpdatedType) IsKnown() bool {
  448. switch r {
  449. case EventListResponseEventMessagePartUpdatedTypeMessagePartUpdated:
  450. return true
  451. }
  452. return false
  453. }
  454. type EventListResponseEventMessagePartRemoved struct {
  455. Properties EventListResponseEventMessagePartRemovedProperties `json:"properties,required"`
  456. Type EventListResponseEventMessagePartRemovedType `json:"type,required"`
  457. JSON eventListResponseEventMessagePartRemovedJSON `json:"-"`
  458. }
  459. // eventListResponseEventMessagePartRemovedJSON contains the JSON metadata for the
  460. // struct [EventListResponseEventMessagePartRemoved]
  461. type eventListResponseEventMessagePartRemovedJSON struct {
  462. Properties apijson.Field
  463. Type apijson.Field
  464. raw string
  465. ExtraFields map[string]apijson.Field
  466. }
  467. func (r *EventListResponseEventMessagePartRemoved) UnmarshalJSON(data []byte) (err error) {
  468. return apijson.UnmarshalRoot(data, r)
  469. }
  470. func (r eventListResponseEventMessagePartRemovedJSON) RawJSON() string {
  471. return r.raw
  472. }
  473. func (r EventListResponseEventMessagePartRemoved) implementsEventListResponse() {}
  474. type EventListResponseEventMessagePartRemovedProperties struct {
  475. MessageID string `json:"messageID,required"`
  476. PartID string `json:"partID,required"`
  477. SessionID string `json:"sessionID,required"`
  478. JSON eventListResponseEventMessagePartRemovedPropertiesJSON `json:"-"`
  479. }
  480. // eventListResponseEventMessagePartRemovedPropertiesJSON contains the JSON
  481. // metadata for the struct [EventListResponseEventMessagePartRemovedProperties]
  482. type eventListResponseEventMessagePartRemovedPropertiesJSON struct {
  483. MessageID apijson.Field
  484. PartID apijson.Field
  485. SessionID apijson.Field
  486. raw string
  487. ExtraFields map[string]apijson.Field
  488. }
  489. func (r *EventListResponseEventMessagePartRemovedProperties) UnmarshalJSON(data []byte) (err error) {
  490. return apijson.UnmarshalRoot(data, r)
  491. }
  492. func (r eventListResponseEventMessagePartRemovedPropertiesJSON) RawJSON() string {
  493. return r.raw
  494. }
  495. type EventListResponseEventMessagePartRemovedType string
  496. const (
  497. EventListResponseEventMessagePartRemovedTypeMessagePartRemoved EventListResponseEventMessagePartRemovedType = "message.part.removed"
  498. )
  499. func (r EventListResponseEventMessagePartRemovedType) IsKnown() bool {
  500. switch r {
  501. case EventListResponseEventMessagePartRemovedTypeMessagePartRemoved:
  502. return true
  503. }
  504. return false
  505. }
  506. type EventListResponseEventSessionCompacted struct {
  507. Properties EventListResponseEventSessionCompactedProperties `json:"properties,required"`
  508. Type EventListResponseEventSessionCompactedType `json:"type,required"`
  509. JSON eventListResponseEventSessionCompactedJSON `json:"-"`
  510. }
  511. // eventListResponseEventSessionCompactedJSON contains the JSON metadata for the
  512. // struct [EventListResponseEventSessionCompacted]
  513. type eventListResponseEventSessionCompactedJSON struct {
  514. Properties apijson.Field
  515. Type apijson.Field
  516. raw string
  517. ExtraFields map[string]apijson.Field
  518. }
  519. func (r *EventListResponseEventSessionCompacted) UnmarshalJSON(data []byte) (err error) {
  520. return apijson.UnmarshalRoot(data, r)
  521. }
  522. func (r eventListResponseEventSessionCompactedJSON) RawJSON() string {
  523. return r.raw
  524. }
  525. func (r EventListResponseEventSessionCompacted) implementsEventListResponse() {}
  526. type EventListResponseEventSessionCompactedProperties struct {
  527. SessionID string `json:"sessionID,required"`
  528. JSON eventListResponseEventSessionCompactedPropertiesJSON `json:"-"`
  529. }
  530. // eventListResponseEventSessionCompactedPropertiesJSON contains the JSON metadata
  531. // for the struct [EventListResponseEventSessionCompactedProperties]
  532. type eventListResponseEventSessionCompactedPropertiesJSON struct {
  533. SessionID apijson.Field
  534. raw string
  535. ExtraFields map[string]apijson.Field
  536. }
  537. func (r *EventListResponseEventSessionCompactedProperties) UnmarshalJSON(data []byte) (err error) {
  538. return apijson.UnmarshalRoot(data, r)
  539. }
  540. func (r eventListResponseEventSessionCompactedPropertiesJSON) RawJSON() string {
  541. return r.raw
  542. }
  543. type EventListResponseEventSessionCompactedType string
  544. const (
  545. EventListResponseEventSessionCompactedTypeSessionCompacted EventListResponseEventSessionCompactedType = "session.compacted"
  546. )
  547. func (r EventListResponseEventSessionCompactedType) IsKnown() bool {
  548. switch r {
  549. case EventListResponseEventSessionCompactedTypeSessionCompacted:
  550. return true
  551. }
  552. return false
  553. }
  554. type EventListResponseEventPermissionUpdated struct {
  555. Properties Permission `json:"properties,required"`
  556. Type EventListResponseEventPermissionUpdatedType `json:"type,required"`
  557. JSON eventListResponseEventPermissionUpdatedJSON `json:"-"`
  558. }
  559. // eventListResponseEventPermissionUpdatedJSON contains the JSON metadata for the
  560. // struct [EventListResponseEventPermissionUpdated]
  561. type eventListResponseEventPermissionUpdatedJSON struct {
  562. Properties apijson.Field
  563. Type apijson.Field
  564. raw string
  565. ExtraFields map[string]apijson.Field
  566. }
  567. func (r *EventListResponseEventPermissionUpdated) UnmarshalJSON(data []byte) (err error) {
  568. return apijson.UnmarshalRoot(data, r)
  569. }
  570. func (r eventListResponseEventPermissionUpdatedJSON) RawJSON() string {
  571. return r.raw
  572. }
  573. func (r EventListResponseEventPermissionUpdated) implementsEventListResponse() {}
  574. type EventListResponseEventPermissionUpdatedType string
  575. const (
  576. EventListResponseEventPermissionUpdatedTypePermissionUpdated EventListResponseEventPermissionUpdatedType = "permission.updated"
  577. )
  578. func (r EventListResponseEventPermissionUpdatedType) IsKnown() bool {
  579. switch r {
  580. case EventListResponseEventPermissionUpdatedTypePermissionUpdated:
  581. return true
  582. }
  583. return false
  584. }
  585. type EventListResponseEventPermissionReplied struct {
  586. Properties EventListResponseEventPermissionRepliedProperties `json:"properties,required"`
  587. Type EventListResponseEventPermissionRepliedType `json:"type,required"`
  588. JSON eventListResponseEventPermissionRepliedJSON `json:"-"`
  589. }
  590. // eventListResponseEventPermissionRepliedJSON contains the JSON metadata for the
  591. // struct [EventListResponseEventPermissionReplied]
  592. type eventListResponseEventPermissionRepliedJSON struct {
  593. Properties apijson.Field
  594. Type apijson.Field
  595. raw string
  596. ExtraFields map[string]apijson.Field
  597. }
  598. func (r *EventListResponseEventPermissionReplied) UnmarshalJSON(data []byte) (err error) {
  599. return apijson.UnmarshalRoot(data, r)
  600. }
  601. func (r eventListResponseEventPermissionRepliedJSON) RawJSON() string {
  602. return r.raw
  603. }
  604. func (r EventListResponseEventPermissionReplied) implementsEventListResponse() {}
  605. type EventListResponseEventPermissionRepliedProperties struct {
  606. PermissionID string `json:"permissionID,required"`
  607. Response string `json:"response,required"`
  608. SessionID string `json:"sessionID,required"`
  609. JSON eventListResponseEventPermissionRepliedPropertiesJSON `json:"-"`
  610. }
  611. // eventListResponseEventPermissionRepliedPropertiesJSON contains the JSON metadata
  612. // for the struct [EventListResponseEventPermissionRepliedProperties]
  613. type eventListResponseEventPermissionRepliedPropertiesJSON struct {
  614. PermissionID apijson.Field
  615. Response apijson.Field
  616. SessionID apijson.Field
  617. raw string
  618. ExtraFields map[string]apijson.Field
  619. }
  620. func (r *EventListResponseEventPermissionRepliedProperties) UnmarshalJSON(data []byte) (err error) {
  621. return apijson.UnmarshalRoot(data, r)
  622. }
  623. func (r eventListResponseEventPermissionRepliedPropertiesJSON) RawJSON() string {
  624. return r.raw
  625. }
  626. type EventListResponseEventPermissionRepliedType string
  627. const (
  628. EventListResponseEventPermissionRepliedTypePermissionReplied EventListResponseEventPermissionRepliedType = "permission.replied"
  629. )
  630. func (r EventListResponseEventPermissionRepliedType) IsKnown() bool {
  631. switch r {
  632. case EventListResponseEventPermissionRepliedTypePermissionReplied:
  633. return true
  634. }
  635. return false
  636. }
  637. type EventListResponseEventFileEdited struct {
  638. Properties EventListResponseEventFileEditedProperties `json:"properties,required"`
  639. Type EventListResponseEventFileEditedType `json:"type,required"`
  640. JSON eventListResponseEventFileEditedJSON `json:"-"`
  641. }
  642. // eventListResponseEventFileEditedJSON contains the JSON metadata for the struct
  643. // [EventListResponseEventFileEdited]
  644. type eventListResponseEventFileEditedJSON struct {
  645. Properties apijson.Field
  646. Type apijson.Field
  647. raw string
  648. ExtraFields map[string]apijson.Field
  649. }
  650. func (r *EventListResponseEventFileEdited) UnmarshalJSON(data []byte) (err error) {
  651. return apijson.UnmarshalRoot(data, r)
  652. }
  653. func (r eventListResponseEventFileEditedJSON) RawJSON() string {
  654. return r.raw
  655. }
  656. func (r EventListResponseEventFileEdited) implementsEventListResponse() {}
  657. type EventListResponseEventFileEditedProperties struct {
  658. File string `json:"file,required"`
  659. JSON eventListResponseEventFileEditedPropertiesJSON `json:"-"`
  660. }
  661. // eventListResponseEventFileEditedPropertiesJSON contains the JSON metadata for
  662. // the struct [EventListResponseEventFileEditedProperties]
  663. type eventListResponseEventFileEditedPropertiesJSON struct {
  664. File apijson.Field
  665. raw string
  666. ExtraFields map[string]apijson.Field
  667. }
  668. func (r *EventListResponseEventFileEditedProperties) UnmarshalJSON(data []byte) (err error) {
  669. return apijson.UnmarshalRoot(data, r)
  670. }
  671. func (r eventListResponseEventFileEditedPropertiesJSON) RawJSON() string {
  672. return r.raw
  673. }
  674. type EventListResponseEventFileEditedType string
  675. const (
  676. EventListResponseEventFileEditedTypeFileEdited EventListResponseEventFileEditedType = "file.edited"
  677. )
  678. func (r EventListResponseEventFileEditedType) IsKnown() bool {
  679. switch r {
  680. case EventListResponseEventFileEditedTypeFileEdited:
  681. return true
  682. }
  683. return false
  684. }
  685. type EventListResponseEventFileWatcherUpdated struct {
  686. Properties EventListResponseEventFileWatcherUpdatedProperties `json:"properties,required"`
  687. Type EventListResponseEventFileWatcherUpdatedType `json:"type,required"`
  688. JSON eventListResponseEventFileWatcherUpdatedJSON `json:"-"`
  689. }
  690. // eventListResponseEventFileWatcherUpdatedJSON contains the JSON metadata for the
  691. // struct [EventListResponseEventFileWatcherUpdated]
  692. type eventListResponseEventFileWatcherUpdatedJSON struct {
  693. Properties apijson.Field
  694. Type apijson.Field
  695. raw string
  696. ExtraFields map[string]apijson.Field
  697. }
  698. func (r *EventListResponseEventFileWatcherUpdated) UnmarshalJSON(data []byte) (err error) {
  699. return apijson.UnmarshalRoot(data, r)
  700. }
  701. func (r eventListResponseEventFileWatcherUpdatedJSON) RawJSON() string {
  702. return r.raw
  703. }
  704. func (r EventListResponseEventFileWatcherUpdated) implementsEventListResponse() {}
  705. type EventListResponseEventFileWatcherUpdatedProperties struct {
  706. Event EventListResponseEventFileWatcherUpdatedPropertiesEvent `json:"event,required"`
  707. File string `json:"file,required"`
  708. JSON eventListResponseEventFileWatcherUpdatedPropertiesJSON `json:"-"`
  709. }
  710. // eventListResponseEventFileWatcherUpdatedPropertiesJSON contains the JSON
  711. // metadata for the struct [EventListResponseEventFileWatcherUpdatedProperties]
  712. type eventListResponseEventFileWatcherUpdatedPropertiesJSON struct {
  713. Event apijson.Field
  714. File apijson.Field
  715. raw string
  716. ExtraFields map[string]apijson.Field
  717. }
  718. func (r *EventListResponseEventFileWatcherUpdatedProperties) UnmarshalJSON(data []byte) (err error) {
  719. return apijson.UnmarshalRoot(data, r)
  720. }
  721. func (r eventListResponseEventFileWatcherUpdatedPropertiesJSON) RawJSON() string {
  722. return r.raw
  723. }
  724. type EventListResponseEventFileWatcherUpdatedPropertiesEvent string
  725. const (
  726. EventListResponseEventFileWatcherUpdatedPropertiesEventAdd EventListResponseEventFileWatcherUpdatedPropertiesEvent = "add"
  727. EventListResponseEventFileWatcherUpdatedPropertiesEventChange EventListResponseEventFileWatcherUpdatedPropertiesEvent = "change"
  728. EventListResponseEventFileWatcherUpdatedPropertiesEventUnlink EventListResponseEventFileWatcherUpdatedPropertiesEvent = "unlink"
  729. )
  730. func (r EventListResponseEventFileWatcherUpdatedPropertiesEvent) IsKnown() bool {
  731. switch r {
  732. case EventListResponseEventFileWatcherUpdatedPropertiesEventAdd, EventListResponseEventFileWatcherUpdatedPropertiesEventChange, EventListResponseEventFileWatcherUpdatedPropertiesEventUnlink:
  733. return true
  734. }
  735. return false
  736. }
  737. type EventListResponseEventFileWatcherUpdatedType string
  738. const (
  739. EventListResponseEventFileWatcherUpdatedTypeFileWatcherUpdated EventListResponseEventFileWatcherUpdatedType = "file.watcher.updated"
  740. )
  741. func (r EventListResponseEventFileWatcherUpdatedType) IsKnown() bool {
  742. switch r {
  743. case EventListResponseEventFileWatcherUpdatedTypeFileWatcherUpdated:
  744. return true
  745. }
  746. return false
  747. }
  748. type EventListResponseEventTodoUpdated struct {
  749. Properties EventListResponseEventTodoUpdatedProperties `json:"properties,required"`
  750. Type EventListResponseEventTodoUpdatedType `json:"type,required"`
  751. JSON eventListResponseEventTodoUpdatedJSON `json:"-"`
  752. }
  753. // eventListResponseEventTodoUpdatedJSON contains the JSON metadata for the struct
  754. // [EventListResponseEventTodoUpdated]
  755. type eventListResponseEventTodoUpdatedJSON struct {
  756. Properties apijson.Field
  757. Type apijson.Field
  758. raw string
  759. ExtraFields map[string]apijson.Field
  760. }
  761. func (r *EventListResponseEventTodoUpdated) UnmarshalJSON(data []byte) (err error) {
  762. return apijson.UnmarshalRoot(data, r)
  763. }
  764. func (r eventListResponseEventTodoUpdatedJSON) RawJSON() string {
  765. return r.raw
  766. }
  767. func (r EventListResponseEventTodoUpdated) implementsEventListResponse() {}
  768. type EventListResponseEventTodoUpdatedProperties struct {
  769. SessionID string `json:"sessionID,required"`
  770. Todos []EventListResponseEventTodoUpdatedPropertiesTodo `json:"todos,required"`
  771. JSON eventListResponseEventTodoUpdatedPropertiesJSON `json:"-"`
  772. }
  773. // eventListResponseEventTodoUpdatedPropertiesJSON contains the JSON metadata for
  774. // the struct [EventListResponseEventTodoUpdatedProperties]
  775. type eventListResponseEventTodoUpdatedPropertiesJSON struct {
  776. SessionID apijson.Field
  777. Todos apijson.Field
  778. raw string
  779. ExtraFields map[string]apijson.Field
  780. }
  781. func (r *EventListResponseEventTodoUpdatedProperties) UnmarshalJSON(data []byte) (err error) {
  782. return apijson.UnmarshalRoot(data, r)
  783. }
  784. func (r eventListResponseEventTodoUpdatedPropertiesJSON) RawJSON() string {
  785. return r.raw
  786. }
  787. type EventListResponseEventTodoUpdatedPropertiesTodo struct {
  788. // Unique identifier for the todo item
  789. ID string `json:"id,required"`
  790. // Brief description of the task
  791. Content string `json:"content,required"`
  792. // Priority level of the task: high, medium, low
  793. Priority string `json:"priority,required"`
  794. // Current status of the task: pending, in_progress, completed, cancelled
  795. Status string `json:"status,required"`
  796. JSON eventListResponseEventTodoUpdatedPropertiesTodoJSON `json:"-"`
  797. }
  798. // eventListResponseEventTodoUpdatedPropertiesTodoJSON contains the JSON metadata
  799. // for the struct [EventListResponseEventTodoUpdatedPropertiesTodo]
  800. type eventListResponseEventTodoUpdatedPropertiesTodoJSON struct {
  801. ID apijson.Field
  802. Content apijson.Field
  803. Priority apijson.Field
  804. Status apijson.Field
  805. raw string
  806. ExtraFields map[string]apijson.Field
  807. }
  808. func (r *EventListResponseEventTodoUpdatedPropertiesTodo) UnmarshalJSON(data []byte) (err error) {
  809. return apijson.UnmarshalRoot(data, r)
  810. }
  811. func (r eventListResponseEventTodoUpdatedPropertiesTodoJSON) RawJSON() string {
  812. return r.raw
  813. }
  814. type EventListResponseEventTodoUpdatedType string
  815. const (
  816. EventListResponseEventTodoUpdatedTypeTodoUpdated EventListResponseEventTodoUpdatedType = "todo.updated"
  817. )
  818. func (r EventListResponseEventTodoUpdatedType) IsKnown() bool {
  819. switch r {
  820. case EventListResponseEventTodoUpdatedTypeTodoUpdated:
  821. return true
  822. }
  823. return false
  824. }
  825. type EventListResponseEventSessionIdle struct {
  826. Properties EventListResponseEventSessionIdleProperties `json:"properties,required"`
  827. Type EventListResponseEventSessionIdleType `json:"type,required"`
  828. JSON eventListResponseEventSessionIdleJSON `json:"-"`
  829. }
  830. // eventListResponseEventSessionIdleJSON contains the JSON metadata for the struct
  831. // [EventListResponseEventSessionIdle]
  832. type eventListResponseEventSessionIdleJSON struct {
  833. Properties apijson.Field
  834. Type apijson.Field
  835. raw string
  836. ExtraFields map[string]apijson.Field
  837. }
  838. func (r *EventListResponseEventSessionIdle) UnmarshalJSON(data []byte) (err error) {
  839. return apijson.UnmarshalRoot(data, r)
  840. }
  841. func (r eventListResponseEventSessionIdleJSON) RawJSON() string {
  842. return r.raw
  843. }
  844. func (r EventListResponseEventSessionIdle) implementsEventListResponse() {}
  845. type EventListResponseEventSessionIdleProperties struct {
  846. SessionID string `json:"sessionID,required"`
  847. JSON eventListResponseEventSessionIdlePropertiesJSON `json:"-"`
  848. }
  849. // eventListResponseEventSessionIdlePropertiesJSON contains the JSON metadata for
  850. // the struct [EventListResponseEventSessionIdleProperties]
  851. type eventListResponseEventSessionIdlePropertiesJSON struct {
  852. SessionID apijson.Field
  853. raw string
  854. ExtraFields map[string]apijson.Field
  855. }
  856. func (r *EventListResponseEventSessionIdleProperties) UnmarshalJSON(data []byte) (err error) {
  857. return apijson.UnmarshalRoot(data, r)
  858. }
  859. func (r eventListResponseEventSessionIdlePropertiesJSON) RawJSON() string {
  860. return r.raw
  861. }
  862. type EventListResponseEventSessionIdleType string
  863. const (
  864. EventListResponseEventSessionIdleTypeSessionIdle EventListResponseEventSessionIdleType = "session.idle"
  865. )
  866. func (r EventListResponseEventSessionIdleType) IsKnown() bool {
  867. switch r {
  868. case EventListResponseEventSessionIdleTypeSessionIdle:
  869. return true
  870. }
  871. return false
  872. }
  873. type EventListResponseEventSessionCreated struct {
  874. Properties EventListResponseEventSessionCreatedProperties `json:"properties,required"`
  875. Type EventListResponseEventSessionCreatedType `json:"type,required"`
  876. JSON eventListResponseEventSessionCreatedJSON `json:"-"`
  877. }
  878. // eventListResponseEventSessionCreatedJSON contains the JSON metadata for the
  879. // struct [EventListResponseEventSessionCreated]
  880. type eventListResponseEventSessionCreatedJSON struct {
  881. Properties apijson.Field
  882. Type apijson.Field
  883. raw string
  884. ExtraFields map[string]apijson.Field
  885. }
  886. func (r *EventListResponseEventSessionCreated) UnmarshalJSON(data []byte) (err error) {
  887. return apijson.UnmarshalRoot(data, r)
  888. }
  889. func (r eventListResponseEventSessionCreatedJSON) RawJSON() string {
  890. return r.raw
  891. }
  892. func (r EventListResponseEventSessionCreated) implementsEventListResponse() {}
  893. type EventListResponseEventSessionCreatedProperties struct {
  894. Info Session `json:"info,required"`
  895. JSON eventListResponseEventSessionCreatedPropertiesJSON `json:"-"`
  896. }
  897. // eventListResponseEventSessionCreatedPropertiesJSON contains the JSON metadata
  898. // for the struct [EventListResponseEventSessionCreatedProperties]
  899. type eventListResponseEventSessionCreatedPropertiesJSON struct {
  900. Info apijson.Field
  901. raw string
  902. ExtraFields map[string]apijson.Field
  903. }
  904. func (r *EventListResponseEventSessionCreatedProperties) UnmarshalJSON(data []byte) (err error) {
  905. return apijson.UnmarshalRoot(data, r)
  906. }
  907. func (r eventListResponseEventSessionCreatedPropertiesJSON) RawJSON() string {
  908. return r.raw
  909. }
  910. type EventListResponseEventSessionCreatedType string
  911. const (
  912. EventListResponseEventSessionCreatedTypeSessionCreated EventListResponseEventSessionCreatedType = "session.created"
  913. )
  914. func (r EventListResponseEventSessionCreatedType) IsKnown() bool {
  915. switch r {
  916. case EventListResponseEventSessionCreatedTypeSessionCreated:
  917. return true
  918. }
  919. return false
  920. }
  921. type EventListResponseEventSessionUpdated struct {
  922. Properties EventListResponseEventSessionUpdatedProperties `json:"properties,required"`
  923. Type EventListResponseEventSessionUpdatedType `json:"type,required"`
  924. JSON eventListResponseEventSessionUpdatedJSON `json:"-"`
  925. }
  926. // eventListResponseEventSessionUpdatedJSON contains the JSON metadata for the
  927. // struct [EventListResponseEventSessionUpdated]
  928. type eventListResponseEventSessionUpdatedJSON struct {
  929. Properties apijson.Field
  930. Type apijson.Field
  931. raw string
  932. ExtraFields map[string]apijson.Field
  933. }
  934. func (r *EventListResponseEventSessionUpdated) UnmarshalJSON(data []byte) (err error) {
  935. return apijson.UnmarshalRoot(data, r)
  936. }
  937. func (r eventListResponseEventSessionUpdatedJSON) RawJSON() string {
  938. return r.raw
  939. }
  940. func (r EventListResponseEventSessionUpdated) implementsEventListResponse() {}
  941. type EventListResponseEventSessionUpdatedProperties struct {
  942. Info Session `json:"info,required"`
  943. JSON eventListResponseEventSessionUpdatedPropertiesJSON `json:"-"`
  944. }
  945. // eventListResponseEventSessionUpdatedPropertiesJSON contains the JSON metadata
  946. // for the struct [EventListResponseEventSessionUpdatedProperties]
  947. type eventListResponseEventSessionUpdatedPropertiesJSON struct {
  948. Info apijson.Field
  949. raw string
  950. ExtraFields map[string]apijson.Field
  951. }
  952. func (r *EventListResponseEventSessionUpdatedProperties) UnmarshalJSON(data []byte) (err error) {
  953. return apijson.UnmarshalRoot(data, r)
  954. }
  955. func (r eventListResponseEventSessionUpdatedPropertiesJSON) RawJSON() string {
  956. return r.raw
  957. }
  958. type EventListResponseEventSessionUpdatedType string
  959. const (
  960. EventListResponseEventSessionUpdatedTypeSessionUpdated EventListResponseEventSessionUpdatedType = "session.updated"
  961. )
  962. func (r EventListResponseEventSessionUpdatedType) IsKnown() bool {
  963. switch r {
  964. case EventListResponseEventSessionUpdatedTypeSessionUpdated:
  965. return true
  966. }
  967. return false
  968. }
  969. type EventListResponseEventSessionDeleted struct {
  970. Properties EventListResponseEventSessionDeletedProperties `json:"properties,required"`
  971. Type EventListResponseEventSessionDeletedType `json:"type,required"`
  972. JSON eventListResponseEventSessionDeletedJSON `json:"-"`
  973. }
  974. // eventListResponseEventSessionDeletedJSON contains the JSON metadata for the
  975. // struct [EventListResponseEventSessionDeleted]
  976. type eventListResponseEventSessionDeletedJSON struct {
  977. Properties apijson.Field
  978. Type apijson.Field
  979. raw string
  980. ExtraFields map[string]apijson.Field
  981. }
  982. func (r *EventListResponseEventSessionDeleted) UnmarshalJSON(data []byte) (err error) {
  983. return apijson.UnmarshalRoot(data, r)
  984. }
  985. func (r eventListResponseEventSessionDeletedJSON) RawJSON() string {
  986. return r.raw
  987. }
  988. func (r EventListResponseEventSessionDeleted) implementsEventListResponse() {}
  989. type EventListResponseEventSessionDeletedProperties struct {
  990. Info Session `json:"info,required"`
  991. JSON eventListResponseEventSessionDeletedPropertiesJSON `json:"-"`
  992. }
  993. // eventListResponseEventSessionDeletedPropertiesJSON contains the JSON metadata
  994. // for the struct [EventListResponseEventSessionDeletedProperties]
  995. type eventListResponseEventSessionDeletedPropertiesJSON struct {
  996. Info apijson.Field
  997. raw string
  998. ExtraFields map[string]apijson.Field
  999. }
  1000. func (r *EventListResponseEventSessionDeletedProperties) UnmarshalJSON(data []byte) (err error) {
  1001. return apijson.UnmarshalRoot(data, r)
  1002. }
  1003. func (r eventListResponseEventSessionDeletedPropertiesJSON) RawJSON() string {
  1004. return r.raw
  1005. }
  1006. type EventListResponseEventSessionDeletedType string
  1007. const (
  1008. EventListResponseEventSessionDeletedTypeSessionDeleted EventListResponseEventSessionDeletedType = "session.deleted"
  1009. )
  1010. func (r EventListResponseEventSessionDeletedType) IsKnown() bool {
  1011. switch r {
  1012. case EventListResponseEventSessionDeletedTypeSessionDeleted:
  1013. return true
  1014. }
  1015. return false
  1016. }
  1017. type EventListResponseEventSessionError struct {
  1018. Properties EventListResponseEventSessionErrorProperties `json:"properties,required"`
  1019. Type EventListResponseEventSessionErrorType `json:"type,required"`
  1020. JSON eventListResponseEventSessionErrorJSON `json:"-"`
  1021. }
  1022. // eventListResponseEventSessionErrorJSON contains the JSON metadata for the struct
  1023. // [EventListResponseEventSessionError]
  1024. type eventListResponseEventSessionErrorJSON struct {
  1025. Properties apijson.Field
  1026. Type apijson.Field
  1027. raw string
  1028. ExtraFields map[string]apijson.Field
  1029. }
  1030. func (r *EventListResponseEventSessionError) UnmarshalJSON(data []byte) (err error) {
  1031. return apijson.UnmarshalRoot(data, r)
  1032. }
  1033. func (r eventListResponseEventSessionErrorJSON) RawJSON() string {
  1034. return r.raw
  1035. }
  1036. func (r EventListResponseEventSessionError) implementsEventListResponse() {}
  1037. type EventListResponseEventSessionErrorProperties struct {
  1038. Error EventListResponseEventSessionErrorPropertiesError `json:"error"`
  1039. SessionID string `json:"sessionID"`
  1040. JSON eventListResponseEventSessionErrorPropertiesJSON `json:"-"`
  1041. }
  1042. // eventListResponseEventSessionErrorPropertiesJSON contains the JSON metadata for
  1043. // the struct [EventListResponseEventSessionErrorProperties]
  1044. type eventListResponseEventSessionErrorPropertiesJSON struct {
  1045. Error apijson.Field
  1046. SessionID apijson.Field
  1047. raw string
  1048. ExtraFields map[string]apijson.Field
  1049. }
  1050. func (r *EventListResponseEventSessionErrorProperties) UnmarshalJSON(data []byte) (err error) {
  1051. return apijson.UnmarshalRoot(data, r)
  1052. }
  1053. func (r eventListResponseEventSessionErrorPropertiesJSON) RawJSON() string {
  1054. return r.raw
  1055. }
  1056. type EventListResponseEventSessionErrorPropertiesError struct {
  1057. // This field can have the runtime type of [shared.ProviderAuthErrorData],
  1058. // [shared.UnknownErrorData], [interface{}], [shared.MessageAbortedErrorData],
  1059. // [EventListResponseEventSessionErrorPropertiesErrorAPIErrorData].
  1060. Data interface{} `json:"data,required"`
  1061. Name EventListResponseEventSessionErrorPropertiesErrorName `json:"name,required"`
  1062. JSON eventListResponseEventSessionErrorPropertiesErrorJSON `json:"-"`
  1063. union EventListResponseEventSessionErrorPropertiesErrorUnion
  1064. }
  1065. // eventListResponseEventSessionErrorPropertiesErrorJSON contains the JSON metadata
  1066. // for the struct [EventListResponseEventSessionErrorPropertiesError]
  1067. type eventListResponseEventSessionErrorPropertiesErrorJSON struct {
  1068. Data apijson.Field
  1069. Name apijson.Field
  1070. raw string
  1071. ExtraFields map[string]apijson.Field
  1072. }
  1073. func (r eventListResponseEventSessionErrorPropertiesErrorJSON) RawJSON() string {
  1074. return r.raw
  1075. }
  1076. func (r *EventListResponseEventSessionErrorPropertiesError) UnmarshalJSON(data []byte) (err error) {
  1077. *r = EventListResponseEventSessionErrorPropertiesError{}
  1078. err = apijson.UnmarshalRoot(data, &r.union)
  1079. if err != nil {
  1080. return err
  1081. }
  1082. return apijson.Port(r.union, &r)
  1083. }
  1084. // AsUnion returns a [EventListResponseEventSessionErrorPropertiesErrorUnion]
  1085. // interface which you can cast to the specific types for more type safety.
  1086. //
  1087. // Possible runtime types of the union are [shared.ProviderAuthError],
  1088. // [shared.UnknownError],
  1089. // [EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthError],
  1090. // [shared.MessageAbortedError],
  1091. // [EventListResponseEventSessionErrorPropertiesErrorAPIError].
  1092. func (r EventListResponseEventSessionErrorPropertiesError) AsUnion() EventListResponseEventSessionErrorPropertiesErrorUnion {
  1093. return r.union
  1094. }
  1095. // Union satisfied by [shared.ProviderAuthError], [shared.UnknownError],
  1096. // [EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthError],
  1097. // [shared.MessageAbortedError] or
  1098. // [EventListResponseEventSessionErrorPropertiesErrorAPIError].
  1099. type EventListResponseEventSessionErrorPropertiesErrorUnion interface {
  1100. ImplementsEventListResponseEventSessionErrorPropertiesError()
  1101. }
  1102. func init() {
  1103. apijson.RegisterUnion(
  1104. reflect.TypeOf((*EventListResponseEventSessionErrorPropertiesErrorUnion)(nil)).Elem(),
  1105. "",
  1106. apijson.UnionVariant{
  1107. TypeFilter: gjson.JSON,
  1108. Type: reflect.TypeOf(shared.ProviderAuthError{}),
  1109. },
  1110. apijson.UnionVariant{
  1111. TypeFilter: gjson.JSON,
  1112. Type: reflect.TypeOf(shared.UnknownError{}),
  1113. },
  1114. apijson.UnionVariant{
  1115. TypeFilter: gjson.JSON,
  1116. Type: reflect.TypeOf(EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthError{}),
  1117. },
  1118. apijson.UnionVariant{
  1119. TypeFilter: gjson.JSON,
  1120. Type: reflect.TypeOf(shared.MessageAbortedError{}),
  1121. },
  1122. apijson.UnionVariant{
  1123. TypeFilter: gjson.JSON,
  1124. Type: reflect.TypeOf(EventListResponseEventSessionErrorPropertiesErrorAPIError{}),
  1125. },
  1126. )
  1127. }
  1128. type EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthError struct {
  1129. Data interface{} `json:"data,required"`
  1130. Name EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthErrorName `json:"name,required"`
  1131. JSON eventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthErrorJSON `json:"-"`
  1132. }
  1133. // eventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthErrorJSON
  1134. // contains the JSON metadata for the struct
  1135. // [EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthError]
  1136. type eventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthErrorJSON struct {
  1137. Data apijson.Field
  1138. Name apijson.Field
  1139. raw string
  1140. ExtraFields map[string]apijson.Field
  1141. }
  1142. func (r *EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthError) UnmarshalJSON(data []byte) (err error) {
  1143. return apijson.UnmarshalRoot(data, r)
  1144. }
  1145. func (r eventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthErrorJSON) RawJSON() string {
  1146. return r.raw
  1147. }
  1148. func (r EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthError) ImplementsEventListResponseEventSessionErrorPropertiesError() {
  1149. }
  1150. type EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthErrorName string
  1151. const (
  1152. EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthErrorNameMessageOutputLengthError EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthErrorName = "MessageOutputLengthError"
  1153. )
  1154. func (r EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthErrorName) IsKnown() bool {
  1155. switch r {
  1156. case EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthErrorNameMessageOutputLengthError:
  1157. return true
  1158. }
  1159. return false
  1160. }
  1161. type EventListResponseEventSessionErrorPropertiesErrorAPIError struct {
  1162. Data EventListResponseEventSessionErrorPropertiesErrorAPIErrorData `json:"data,required"`
  1163. Name EventListResponseEventSessionErrorPropertiesErrorAPIErrorName `json:"name,required"`
  1164. JSON eventListResponseEventSessionErrorPropertiesErrorAPIErrorJSON `json:"-"`
  1165. }
  1166. // eventListResponseEventSessionErrorPropertiesErrorAPIErrorJSON contains the JSON
  1167. // metadata for the struct
  1168. // [EventListResponseEventSessionErrorPropertiesErrorAPIError]
  1169. type eventListResponseEventSessionErrorPropertiesErrorAPIErrorJSON struct {
  1170. Data apijson.Field
  1171. Name apijson.Field
  1172. raw string
  1173. ExtraFields map[string]apijson.Field
  1174. }
  1175. func (r *EventListResponseEventSessionErrorPropertiesErrorAPIError) UnmarshalJSON(data []byte) (err error) {
  1176. return apijson.UnmarshalRoot(data, r)
  1177. }
  1178. func (r eventListResponseEventSessionErrorPropertiesErrorAPIErrorJSON) RawJSON() string {
  1179. return r.raw
  1180. }
  1181. func (r EventListResponseEventSessionErrorPropertiesErrorAPIError) ImplementsEventListResponseEventSessionErrorPropertiesError() {
  1182. }
  1183. type EventListResponseEventSessionErrorPropertiesErrorAPIErrorData struct {
  1184. IsRetryable bool `json:"isRetryable,required"`
  1185. Message string `json:"message,required"`
  1186. ResponseBody string `json:"responseBody"`
  1187. ResponseHeaders map[string]string `json:"responseHeaders"`
  1188. StatusCode float64 `json:"statusCode"`
  1189. JSON eventListResponseEventSessionErrorPropertiesErrorAPIErrorDataJSON `json:"-"`
  1190. }
  1191. // eventListResponseEventSessionErrorPropertiesErrorAPIErrorDataJSON contains the
  1192. // JSON metadata for the struct
  1193. // [EventListResponseEventSessionErrorPropertiesErrorAPIErrorData]
  1194. type eventListResponseEventSessionErrorPropertiesErrorAPIErrorDataJSON struct {
  1195. IsRetryable apijson.Field
  1196. Message apijson.Field
  1197. ResponseBody apijson.Field
  1198. ResponseHeaders apijson.Field
  1199. StatusCode apijson.Field
  1200. raw string
  1201. ExtraFields map[string]apijson.Field
  1202. }
  1203. func (r *EventListResponseEventSessionErrorPropertiesErrorAPIErrorData) UnmarshalJSON(data []byte) (err error) {
  1204. return apijson.UnmarshalRoot(data, r)
  1205. }
  1206. func (r eventListResponseEventSessionErrorPropertiesErrorAPIErrorDataJSON) RawJSON() string {
  1207. return r.raw
  1208. }
  1209. type EventListResponseEventSessionErrorPropertiesErrorAPIErrorName string
  1210. const (
  1211. EventListResponseEventSessionErrorPropertiesErrorAPIErrorNameAPIError EventListResponseEventSessionErrorPropertiesErrorAPIErrorName = "APIError"
  1212. )
  1213. func (r EventListResponseEventSessionErrorPropertiesErrorAPIErrorName) IsKnown() bool {
  1214. switch r {
  1215. case EventListResponseEventSessionErrorPropertiesErrorAPIErrorNameAPIError:
  1216. return true
  1217. }
  1218. return false
  1219. }
  1220. type EventListResponseEventSessionErrorPropertiesErrorName string
  1221. const (
  1222. EventListResponseEventSessionErrorPropertiesErrorNameProviderAuthError EventListResponseEventSessionErrorPropertiesErrorName = "ProviderAuthError"
  1223. EventListResponseEventSessionErrorPropertiesErrorNameUnknownError EventListResponseEventSessionErrorPropertiesErrorName = "UnknownError"
  1224. EventListResponseEventSessionErrorPropertiesErrorNameMessageOutputLengthError EventListResponseEventSessionErrorPropertiesErrorName = "MessageOutputLengthError"
  1225. EventListResponseEventSessionErrorPropertiesErrorNameMessageAbortedError EventListResponseEventSessionErrorPropertiesErrorName = "MessageAbortedError"
  1226. EventListResponseEventSessionErrorPropertiesErrorNameAPIError EventListResponseEventSessionErrorPropertiesErrorName = "APIError"
  1227. )
  1228. func (r EventListResponseEventSessionErrorPropertiesErrorName) IsKnown() bool {
  1229. switch r {
  1230. case EventListResponseEventSessionErrorPropertiesErrorNameProviderAuthError, EventListResponseEventSessionErrorPropertiesErrorNameUnknownError, EventListResponseEventSessionErrorPropertiesErrorNameMessageOutputLengthError, EventListResponseEventSessionErrorPropertiesErrorNameMessageAbortedError, EventListResponseEventSessionErrorPropertiesErrorNameAPIError:
  1231. return true
  1232. }
  1233. return false
  1234. }
  1235. type EventListResponseEventSessionErrorType string
  1236. const (
  1237. EventListResponseEventSessionErrorTypeSessionError EventListResponseEventSessionErrorType = "session.error"
  1238. )
  1239. func (r EventListResponseEventSessionErrorType) IsKnown() bool {
  1240. switch r {
  1241. case EventListResponseEventSessionErrorTypeSessionError:
  1242. return true
  1243. }
  1244. return false
  1245. }
  1246. type EventListResponseEventServerConnected struct {
  1247. Properties interface{} `json:"properties,required"`
  1248. Type EventListResponseEventServerConnectedType `json:"type,required"`
  1249. JSON eventListResponseEventServerConnectedJSON `json:"-"`
  1250. }
  1251. // eventListResponseEventServerConnectedJSON contains the JSON metadata for the
  1252. // struct [EventListResponseEventServerConnected]
  1253. type eventListResponseEventServerConnectedJSON struct {
  1254. Properties apijson.Field
  1255. Type apijson.Field
  1256. raw string
  1257. ExtraFields map[string]apijson.Field
  1258. }
  1259. func (r *EventListResponseEventServerConnected) UnmarshalJSON(data []byte) (err error) {
  1260. return apijson.UnmarshalRoot(data, r)
  1261. }
  1262. func (r eventListResponseEventServerConnectedJSON) RawJSON() string {
  1263. return r.raw
  1264. }
  1265. func (r EventListResponseEventServerConnected) implementsEventListResponse() {}
  1266. type EventListResponseEventServerConnectedType string
  1267. const (
  1268. EventListResponseEventServerConnectedTypeServerConnected EventListResponseEventServerConnectedType = "server.connected"
  1269. )
  1270. func (r EventListResponseEventServerConnectedType) IsKnown() bool {
  1271. switch r {
  1272. case EventListResponseEventServerConnectedTypeServerConnected:
  1273. return true
  1274. }
  1275. return false
  1276. }
  1277. type EventListResponseEventIdeInstalled struct {
  1278. Properties EventListResponseEventIdeInstalledProperties `json:"properties,required"`
  1279. Type EventListResponseEventIdeInstalledType `json:"type,required"`
  1280. JSON eventListResponseEventIdeInstalledJSON `json:"-"`
  1281. }
  1282. // eventListResponseEventIdeInstalledJSON contains the JSON metadata for the struct
  1283. // [EventListResponseEventIdeInstalled]
  1284. type eventListResponseEventIdeInstalledJSON struct {
  1285. Properties apijson.Field
  1286. Type apijson.Field
  1287. raw string
  1288. ExtraFields map[string]apijson.Field
  1289. }
  1290. func (r *EventListResponseEventIdeInstalled) UnmarshalJSON(data []byte) (err error) {
  1291. return apijson.UnmarshalRoot(data, r)
  1292. }
  1293. func (r eventListResponseEventIdeInstalledJSON) RawJSON() string {
  1294. return r.raw
  1295. }
  1296. func (r EventListResponseEventIdeInstalled) implementsEventListResponse() {}
  1297. type EventListResponseEventIdeInstalledProperties struct {
  1298. Ide string `json:"ide,required"`
  1299. JSON eventListResponseEventIdeInstalledPropertiesJSON `json:"-"`
  1300. }
  1301. // eventListResponseEventIdeInstalledPropertiesJSON contains the JSON metadata for
  1302. // the struct [EventListResponseEventIdeInstalledProperties]
  1303. type eventListResponseEventIdeInstalledPropertiesJSON struct {
  1304. Ide apijson.Field
  1305. raw string
  1306. ExtraFields map[string]apijson.Field
  1307. }
  1308. func (r *EventListResponseEventIdeInstalledProperties) UnmarshalJSON(data []byte) (err error) {
  1309. return apijson.UnmarshalRoot(data, r)
  1310. }
  1311. func (r eventListResponseEventIdeInstalledPropertiesJSON) RawJSON() string {
  1312. return r.raw
  1313. }
  1314. type EventListResponseEventIdeInstalledType string
  1315. const (
  1316. EventListResponseEventIdeInstalledTypeIdeInstalled EventListResponseEventIdeInstalledType = "ide.installed"
  1317. )
  1318. func (r EventListResponseEventIdeInstalledType) IsKnown() bool {
  1319. switch r {
  1320. case EventListResponseEventIdeInstalledTypeIdeInstalled:
  1321. return true
  1322. }
  1323. return false
  1324. }
  1325. type EventListResponseType string
  1326. const (
  1327. EventListResponseTypeInstallationUpdated EventListResponseType = "installation.updated"
  1328. EventListResponseTypeLspClientDiagnostics EventListResponseType = "lsp.client.diagnostics"
  1329. EventListResponseTypeMessageUpdated EventListResponseType = "message.updated"
  1330. EventListResponseTypeMessageRemoved EventListResponseType = "message.removed"
  1331. EventListResponseTypeMessagePartUpdated EventListResponseType = "message.part.updated"
  1332. EventListResponseTypeMessagePartRemoved EventListResponseType = "message.part.removed"
  1333. EventListResponseTypeSessionCompacted EventListResponseType = "session.compacted"
  1334. EventListResponseTypePermissionUpdated EventListResponseType = "permission.updated"
  1335. EventListResponseTypePermissionReplied EventListResponseType = "permission.replied"
  1336. EventListResponseTypeFileEdited EventListResponseType = "file.edited"
  1337. EventListResponseTypeFileWatcherUpdated EventListResponseType = "file.watcher.updated"
  1338. EventListResponseTypeTodoUpdated EventListResponseType = "todo.updated"
  1339. EventListResponseTypeSessionIdle EventListResponseType = "session.idle"
  1340. EventListResponseTypeSessionCreated EventListResponseType = "session.created"
  1341. EventListResponseTypeSessionUpdated EventListResponseType = "session.updated"
  1342. EventListResponseTypeSessionDeleted EventListResponseType = "session.deleted"
  1343. EventListResponseTypeSessionError EventListResponseType = "session.error"
  1344. EventListResponseTypeServerConnected EventListResponseType = "server.connected"
  1345. EventListResponseTypeIdeInstalled EventListResponseType = "ide.installed"
  1346. )
  1347. func (r EventListResponseType) IsKnown() bool {
  1348. switch r {
  1349. case EventListResponseTypeInstallationUpdated, EventListResponseTypeLspClientDiagnostics, EventListResponseTypeMessageUpdated, EventListResponseTypeMessageRemoved, EventListResponseTypeMessagePartUpdated, EventListResponseTypeMessagePartRemoved, EventListResponseTypeSessionCompacted, EventListResponseTypePermissionUpdated, EventListResponseTypePermissionReplied, EventListResponseTypeFileEdited, EventListResponseTypeFileWatcherUpdated, EventListResponseTypeTodoUpdated, EventListResponseTypeSessionIdle, EventListResponseTypeSessionCreated, EventListResponseTypeSessionUpdated, EventListResponseTypeSessionDeleted, EventListResponseTypeSessionError, EventListResponseTypeServerConnected, EventListResponseTypeIdeInstalled:
  1350. return true
  1351. }
  1352. return false
  1353. }
  1354. type EventListParams struct {
  1355. Directory param.Field[string] `query:"directory"`
  1356. }
  1357. // URLQuery serializes [EventListParams]'s query parameters as `url.Values`.
  1358. func (r EventListParams) URLQuery() (v url.Values) {
  1359. return apiquery.MarshalWithSettings(r, apiquery.QuerySettings{
  1360. ArrayFormat: apiquery.ArrayQueryFormatComma,
  1361. NestedFormat: apiquery.NestedQueryFormatBrackets,
  1362. })
  1363. }