1// Copyright 2023 The Go Authors. All rights reserved.
   2// Use of this source code is governed by a BSD-style
   3// license that can be found in the LICENSE file.
   4
   5// Code generated for LSP. DO NOT EDIT.
   6
   7package protocol
   8
   9// Code generated from protocol/metaModel.json at ref release/protocol/3.17.6-next.9 (hash c94395b5da53729e6dff931293b051009ccaaaa4).
  10// https://github.com/microsoft/vscode-languageserver-node/blob/release/protocol/3.17.6-next.9/protocol/metaModel.json
  11// LSP metaData.version = 3.17.0.
  12
  13import (
  14	"bytes"
  15	"encoding/json"
  16	"fmt"
  17)
  18
  19// UnmarshalError indicates that a JSON value did not conform to
  20// one of the expected cases of an LSP union type.
  21type UnmarshalError struct {
  22	msg string
  23}
  24
  25func (e UnmarshalError) Error() string {
  26	return e.msg
  27}
  28func (t Or_CancelParams_id) MarshalJSON() ([]byte, error) {
  29	switch x := t.Value.(type) {
  30	case int32:
  31		return json.Marshal(x)
  32	case string:
  33		return json.Marshal(x)
  34	case nil:
  35		return []byte("null"), nil
  36	}
  37	return nil, fmt.Errorf("type %T not one of [int32 string]", t)
  38}
  39
  40func (t *Or_CancelParams_id) UnmarshalJSON(x []byte) error {
  41	if string(x) == "null" {
  42		t.Value = nil
  43		return nil
  44	}
  45	decoder41 := json.NewDecoder(bytes.NewReader(x))
  46	decoder41.DisallowUnknownFields()
  47	var int32Val int32
  48	if err := decoder41.Decode(&int32Val); err == nil {
  49		t.Value = int32Val
  50		return nil
  51	}
  52	decoder42 := json.NewDecoder(bytes.NewReader(x))
  53	decoder42.DisallowUnknownFields()
  54	var stringVal string
  55	if err := decoder42.Decode(&stringVal); err == nil {
  56		t.Value = stringVal
  57		return nil
  58	}
  59	return &UnmarshalError{"unmarshal failed to match one of [int32 string]"}
  60}
  61
  62func (t Or_ClientSemanticTokensRequestOptions_full) MarshalJSON() ([]byte, error) {
  63	switch x := t.Value.(type) {
  64	case ClientSemanticTokensRequestFullDelta:
  65		return json.Marshal(x)
  66	case bool:
  67		return json.Marshal(x)
  68	case nil:
  69		return []byte("null"), nil
  70	}
  71	return nil, fmt.Errorf("type %T not one of [ClientSemanticTokensRequestFullDelta bool]", t)
  72}
  73
  74func (t *Or_ClientSemanticTokensRequestOptions_full) UnmarshalJSON(x []byte) error {
  75	if string(x) == "null" {
  76		t.Value = nil
  77		return nil
  78	}
  79	decoder220 := json.NewDecoder(bytes.NewReader(x))
  80	decoder220.DisallowUnknownFields()
  81	var boolVal bool
  82	if err := decoder220.Decode(&boolVal); err == nil {
  83		t.Value = boolVal
  84		return nil
  85	}
  86	decoder221 := json.NewDecoder(bytes.NewReader(x))
  87	decoder221.DisallowUnknownFields()
  88	var h221 ClientSemanticTokensRequestFullDelta
  89	if err := decoder221.Decode(&h221); err == nil {
  90		t.Value = h221
  91		return nil
  92	}
  93	return &UnmarshalError{"unmarshal failed to match one of [ClientSemanticTokensRequestFullDelta bool]"}
  94}
  95
  96func (t Or_ClientSemanticTokensRequestOptions_range) MarshalJSON() ([]byte, error) {
  97	switch x := t.Value.(type) {
  98	case Lit_ClientSemanticTokensRequestOptions_range_Item1:
  99		return json.Marshal(x)
 100	case bool:
 101		return json.Marshal(x)
 102	case nil:
 103		return []byte("null"), nil
 104	}
 105	return nil, fmt.Errorf("type %T not one of [Lit_ClientSemanticTokensRequestOptions_range_Item1 bool]", t)
 106}
 107
 108func (t *Or_ClientSemanticTokensRequestOptions_range) UnmarshalJSON(x []byte) error {
 109	if string(x) == "null" {
 110		t.Value = nil
 111		return nil
 112	}
 113	decoder217 := json.NewDecoder(bytes.NewReader(x))
 114	decoder217.DisallowUnknownFields()
 115	var boolVal bool
 116	if err := decoder217.Decode(&boolVal); err == nil {
 117		t.Value = boolVal
 118		return nil
 119	}
 120	decoder218 := json.NewDecoder(bytes.NewReader(x))
 121	decoder218.DisallowUnknownFields()
 122	var h218 Lit_ClientSemanticTokensRequestOptions_range_Item1
 123	if err := decoder218.Decode(&h218); err == nil {
 124		t.Value = h218
 125		return nil
 126	}
 127	return &UnmarshalError{"unmarshal failed to match one of [Lit_ClientSemanticTokensRequestOptions_range_Item1 bool]"}
 128}
 129
 130func (t Or_CompletionItemDefaults_editRange) MarshalJSON() ([]byte, error) {
 131	switch x := t.Value.(type) {
 132	case EditRangeWithInsertReplace:
 133		return json.Marshal(x)
 134	case Range:
 135		return json.Marshal(x)
 136	case nil:
 137		return []byte("null"), nil
 138	}
 139	return nil, fmt.Errorf("type %T not one of [EditRangeWithInsertReplace Range]", t)
 140}
 141
 142func (t *Or_CompletionItemDefaults_editRange) UnmarshalJSON(x []byte) error {
 143	if string(x) == "null" {
 144		t.Value = nil
 145		return nil
 146	}
 147	decoder183 := json.NewDecoder(bytes.NewReader(x))
 148	decoder183.DisallowUnknownFields()
 149	var h183 EditRangeWithInsertReplace
 150	if err := decoder183.Decode(&h183); err == nil {
 151		t.Value = h183
 152		return nil
 153	}
 154	decoder184 := json.NewDecoder(bytes.NewReader(x))
 155	decoder184.DisallowUnknownFields()
 156	var h184 Range
 157	if err := decoder184.Decode(&h184); err == nil {
 158		t.Value = h184
 159		return nil
 160	}
 161	return &UnmarshalError{"unmarshal failed to match one of [EditRangeWithInsertReplace Range]"}
 162}
 163
 164func (t Or_CompletionItem_documentation) MarshalJSON() ([]byte, error) {
 165	switch x := t.Value.(type) {
 166	case MarkupContent:
 167		return json.Marshal(x)
 168	case string:
 169		return json.Marshal(x)
 170	case nil:
 171		return []byte("null"), nil
 172	}
 173	return nil, fmt.Errorf("type %T not one of [MarkupContent string]", t)
 174}
 175
 176func (t *Or_CompletionItem_documentation) UnmarshalJSON(x []byte) error {
 177	if string(x) == "null" {
 178		t.Value = nil
 179		return nil
 180	}
 181	decoder25 := json.NewDecoder(bytes.NewReader(x))
 182	decoder25.DisallowUnknownFields()
 183	var stringVal string
 184	if err := decoder25.Decode(&stringVal); err == nil {
 185		t.Value = stringVal
 186		return nil
 187	}
 188	decoder26 := json.NewDecoder(bytes.NewReader(x))
 189	decoder26.DisallowUnknownFields()
 190	var h26 MarkupContent
 191	if err := decoder26.Decode(&h26); err == nil {
 192		t.Value = h26
 193		return nil
 194	}
 195	return &UnmarshalError{"unmarshal failed to match one of [MarkupContent string]"}
 196}
 197
 198func (t Or_CompletionItem_textEdit) MarshalJSON() ([]byte, error) {
 199	switch x := t.Value.(type) {
 200	case InsertReplaceEdit:
 201		return json.Marshal(x)
 202	case TextEdit:
 203		return json.Marshal(x)
 204	case nil:
 205		return []byte("null"), nil
 206	}
 207	return nil, fmt.Errorf("type %T not one of [InsertReplaceEdit TextEdit]", t)
 208}
 209
 210func (t *Or_CompletionItem_textEdit) UnmarshalJSON(x []byte) error {
 211	if string(x) == "null" {
 212		t.Value = nil
 213		return nil
 214	}
 215	decoder29 := json.NewDecoder(bytes.NewReader(x))
 216	decoder29.DisallowUnknownFields()
 217	var h29 InsertReplaceEdit
 218	if err := decoder29.Decode(&h29); err == nil {
 219		t.Value = h29
 220		return nil
 221	}
 222	decoder30 := json.NewDecoder(bytes.NewReader(x))
 223	decoder30.DisallowUnknownFields()
 224	var h30 TextEdit
 225	if err := decoder30.Decode(&h30); err == nil {
 226		t.Value = h30
 227		return nil
 228	}
 229	return &UnmarshalError{"unmarshal failed to match one of [InsertReplaceEdit TextEdit]"}
 230}
 231
 232func (t Or_Declaration) MarshalJSON() ([]byte, error) {
 233	switch x := t.Value.(type) {
 234	case Location:
 235		return json.Marshal(x)
 236	case []Location:
 237		return json.Marshal(x)
 238	case nil:
 239		return []byte("null"), nil
 240	}
 241	return nil, fmt.Errorf("type %T not one of [Location []Location]", t)
 242}
 243
 244func (t *Or_Declaration) UnmarshalJSON(x []byte) error {
 245	if string(x) == "null" {
 246		t.Value = nil
 247		return nil
 248	}
 249	decoder237 := json.NewDecoder(bytes.NewReader(x))
 250	decoder237.DisallowUnknownFields()
 251	var h237 Location
 252	if err := decoder237.Decode(&h237); err == nil {
 253		t.Value = h237
 254		return nil
 255	}
 256	decoder238 := json.NewDecoder(bytes.NewReader(x))
 257	decoder238.DisallowUnknownFields()
 258	var h238 []Location
 259	if err := decoder238.Decode(&h238); err == nil {
 260		t.Value = h238
 261		return nil
 262	}
 263	return &UnmarshalError{"unmarshal failed to match one of [Location []Location]"}
 264}
 265
 266func (t Or_Definition) MarshalJSON() ([]byte, error) {
 267	switch x := t.Value.(type) {
 268	case Location:
 269		return json.Marshal(x)
 270	case []Location:
 271		return json.Marshal(x)
 272	case nil:
 273		return []byte("null"), nil
 274	}
 275	return nil, fmt.Errorf("type %T not one of [Location []Location]", t)
 276}
 277
 278func (t *Or_Definition) UnmarshalJSON(x []byte) error {
 279	if string(x) == "null" {
 280		t.Value = nil
 281		return nil
 282	}
 283	decoder224 := json.NewDecoder(bytes.NewReader(x))
 284	decoder224.DisallowUnknownFields()
 285	var h224 Location
 286	if err := decoder224.Decode(&h224); err == nil {
 287		t.Value = h224
 288		return nil
 289	}
 290	decoder225 := json.NewDecoder(bytes.NewReader(x))
 291	decoder225.DisallowUnknownFields()
 292	var h225 []Location
 293	if err := decoder225.Decode(&h225); err == nil {
 294		t.Value = h225
 295		return nil
 296	}
 297	return &UnmarshalError{"unmarshal failed to match one of [Location []Location]"}
 298}
 299
 300func (t Or_Diagnostic_code) MarshalJSON() ([]byte, error) {
 301	switch x := t.Value.(type) {
 302	case int32:
 303		return json.Marshal(x)
 304	case string:
 305		return json.Marshal(x)
 306	case nil:
 307		return []byte("null"), nil
 308	}
 309	return nil, fmt.Errorf("type %T not one of [int32 string]", t)
 310}
 311
 312func (t *Or_Diagnostic_code) UnmarshalJSON(x []byte) error {
 313	if string(x) == "null" {
 314		t.Value = nil
 315		return nil
 316	}
 317	decoder179 := json.NewDecoder(bytes.NewReader(x))
 318	decoder179.DisallowUnknownFields()
 319	var int32Val int32
 320	if err := decoder179.Decode(&int32Val); err == nil {
 321		t.Value = int32Val
 322		return nil
 323	}
 324	decoder180 := json.NewDecoder(bytes.NewReader(x))
 325	decoder180.DisallowUnknownFields()
 326	var stringVal string
 327	if err := decoder180.Decode(&stringVal); err == nil {
 328		t.Value = stringVal
 329		return nil
 330	}
 331	return &UnmarshalError{"unmarshal failed to match one of [int32 string]"}
 332}
 333
 334func (t Or_DidChangeConfigurationRegistrationOptions_section) MarshalJSON() ([]byte, error) {
 335	switch x := t.Value.(type) {
 336	case []string:
 337		return json.Marshal(x)
 338	case string:
 339		return json.Marshal(x)
 340	case nil:
 341		return []byte("null"), nil
 342	}
 343	return nil, fmt.Errorf("type %T not one of [[]string string]", t)
 344}
 345
 346func (t *Or_DidChangeConfigurationRegistrationOptions_section) UnmarshalJSON(x []byte) error {
 347	if string(x) == "null" {
 348		t.Value = nil
 349		return nil
 350	}
 351	decoder22 := json.NewDecoder(bytes.NewReader(x))
 352	decoder22.DisallowUnknownFields()
 353	var stringVal string
 354	if err := decoder22.Decode(&stringVal); err == nil {
 355		t.Value = stringVal
 356		return nil
 357	}
 358	decoder23 := json.NewDecoder(bytes.NewReader(x))
 359	decoder23.DisallowUnknownFields()
 360	var h23 []string
 361	if err := decoder23.Decode(&h23); err == nil {
 362		t.Value = h23
 363		return nil
 364	}
 365	return &UnmarshalError{"unmarshal failed to match one of [[]string string]"}
 366}
 367
 368func (t Or_DocumentDiagnosticReport) MarshalJSON() ([]byte, error) {
 369	switch x := t.Value.(type) {
 370	case RelatedFullDocumentDiagnosticReport:
 371		return json.Marshal(x)
 372	case RelatedUnchangedDocumentDiagnosticReport:
 373		return json.Marshal(x)
 374	case nil:
 375		return []byte("null"), nil
 376	}
 377	return nil, fmt.Errorf("type %T not one of [RelatedFullDocumentDiagnosticReport RelatedUnchangedDocumentDiagnosticReport]", t)
 378}
 379
 380func (t *Or_DocumentDiagnosticReport) UnmarshalJSON(x []byte) error {
 381	if string(x) == "null" {
 382		t.Value = nil
 383		return nil
 384	}
 385	decoder247 := json.NewDecoder(bytes.NewReader(x))
 386	decoder247.DisallowUnknownFields()
 387	var h247 RelatedFullDocumentDiagnosticReport
 388	if err := decoder247.Decode(&h247); err == nil {
 389		t.Value = h247
 390		return nil
 391	}
 392	decoder248 := json.NewDecoder(bytes.NewReader(x))
 393	decoder248.DisallowUnknownFields()
 394	var h248 RelatedUnchangedDocumentDiagnosticReport
 395	if err := decoder248.Decode(&h248); err == nil {
 396		t.Value = h248
 397		return nil
 398	}
 399	return &UnmarshalError{"unmarshal failed to match one of [RelatedFullDocumentDiagnosticReport RelatedUnchangedDocumentDiagnosticReport]"}
 400}
 401
 402func (t Or_DocumentDiagnosticReportPartialResult_relatedDocuments_Value) MarshalJSON() ([]byte, error) {
 403	switch x := t.Value.(type) {
 404	case FullDocumentDiagnosticReport:
 405		return json.Marshal(x)
 406	case UnchangedDocumentDiagnosticReport:
 407		return json.Marshal(x)
 408	case nil:
 409		return []byte("null"), nil
 410	}
 411	return nil, fmt.Errorf("type %T not one of [FullDocumentDiagnosticReport UnchangedDocumentDiagnosticReport]", t)
 412}
 413
 414func (t *Or_DocumentDiagnosticReportPartialResult_relatedDocuments_Value) UnmarshalJSON(x []byte) error {
 415	if string(x) == "null" {
 416		t.Value = nil
 417		return nil
 418	}
 419	decoder16 := json.NewDecoder(bytes.NewReader(x))
 420	decoder16.DisallowUnknownFields()
 421	var h16 FullDocumentDiagnosticReport
 422	if err := decoder16.Decode(&h16); err == nil {
 423		t.Value = h16
 424		return nil
 425	}
 426	decoder17 := json.NewDecoder(bytes.NewReader(x))
 427	decoder17.DisallowUnknownFields()
 428	var h17 UnchangedDocumentDiagnosticReport
 429	if err := decoder17.Decode(&h17); err == nil {
 430		t.Value = h17
 431		return nil
 432	}
 433	return &UnmarshalError{"unmarshal failed to match one of [FullDocumentDiagnosticReport UnchangedDocumentDiagnosticReport]"}
 434}
 435
 436func (t Or_DocumentFilter) MarshalJSON() ([]byte, error) {
 437	switch x := t.Value.(type) {
 438	case NotebookCellTextDocumentFilter:
 439		return json.Marshal(x)
 440	case TextDocumentFilter:
 441		return json.Marshal(x)
 442	case nil:
 443		return []byte("null"), nil
 444	}
 445	return nil, fmt.Errorf("type %T not one of [NotebookCellTextDocumentFilter TextDocumentFilter]", t)
 446}
 447
 448func (t *Or_DocumentFilter) UnmarshalJSON(x []byte) error {
 449	if string(x) == "null" {
 450		t.Value = nil
 451		return nil
 452	}
 453	decoder270 := json.NewDecoder(bytes.NewReader(x))
 454	decoder270.DisallowUnknownFields()
 455	var h270 NotebookCellTextDocumentFilter
 456	if err := decoder270.Decode(&h270); err == nil {
 457		t.Value = h270
 458		return nil
 459	}
 460	decoder271 := json.NewDecoder(bytes.NewReader(x))
 461	decoder271.DisallowUnknownFields()
 462	var h271 TextDocumentFilter
 463	if err := decoder271.Decode(&h271); err == nil {
 464		t.Value = h271
 465		return nil
 466	}
 467	return &UnmarshalError{"unmarshal failed to match one of [NotebookCellTextDocumentFilter TextDocumentFilter]"}
 468}
 469
 470func (t Or_GlobPattern) MarshalJSON() ([]byte, error) {
 471	switch x := t.Value.(type) {
 472	case Pattern:
 473		return json.Marshal(x)
 474	case RelativePattern:
 475		return json.Marshal(x)
 476	case nil:
 477		return []byte("null"), nil
 478	}
 479	return nil, fmt.Errorf("type %T not one of [Pattern RelativePattern]", t)
 480}
 481
 482func (t *Or_GlobPattern) UnmarshalJSON(x []byte) error {
 483	if string(x) == "null" {
 484		t.Value = nil
 485		return nil
 486	}
 487	decoder274 := json.NewDecoder(bytes.NewReader(x))
 488	decoder274.DisallowUnknownFields()
 489	var h274 Pattern
 490	if err := decoder274.Decode(&h274); err == nil {
 491		t.Value = h274
 492		return nil
 493	}
 494	decoder275 := json.NewDecoder(bytes.NewReader(x))
 495	decoder275.DisallowUnknownFields()
 496	var h275 RelativePattern
 497	if err := decoder275.Decode(&h275); err == nil {
 498		t.Value = h275
 499		return nil
 500	}
 501	return &UnmarshalError{"unmarshal failed to match one of [Pattern RelativePattern]"}
 502}
 503
 504func (t Or_Hover_contents) MarshalJSON() ([]byte, error) {
 505	switch x := t.Value.(type) {
 506	case MarkedString:
 507		return json.Marshal(x)
 508	case MarkupContent:
 509		return json.Marshal(x)
 510	case []MarkedString:
 511		return json.Marshal(x)
 512	case nil:
 513		return []byte("null"), nil
 514	}
 515	return nil, fmt.Errorf("type %T not one of [MarkedString MarkupContent []MarkedString]", t)
 516}
 517
 518func (t *Or_Hover_contents) UnmarshalJSON(x []byte) error {
 519	if string(x) == "null" {
 520		t.Value = nil
 521		return nil
 522	}
 523	decoder34 := json.NewDecoder(bytes.NewReader(x))
 524	decoder34.DisallowUnknownFields()
 525	var h34 MarkedString
 526	if err := decoder34.Decode(&h34); err == nil {
 527		t.Value = h34
 528		return nil
 529	}
 530	decoder35 := json.NewDecoder(bytes.NewReader(x))
 531	decoder35.DisallowUnknownFields()
 532	var h35 MarkupContent
 533	if err := decoder35.Decode(&h35); err == nil {
 534		t.Value = h35
 535		return nil
 536	}
 537	decoder36 := json.NewDecoder(bytes.NewReader(x))
 538	decoder36.DisallowUnknownFields()
 539	var h36 []MarkedString
 540	if err := decoder36.Decode(&h36); err == nil {
 541		t.Value = h36
 542		return nil
 543	}
 544	return &UnmarshalError{"unmarshal failed to match one of [MarkedString MarkupContent []MarkedString]"}
 545}
 546
 547func (t Or_InlayHintLabelPart_tooltip) MarshalJSON() ([]byte, error) {
 548	switch x := t.Value.(type) {
 549	case MarkupContent:
 550		return json.Marshal(x)
 551	case string:
 552		return json.Marshal(x)
 553	case nil:
 554		return []byte("null"), nil
 555	}
 556	return nil, fmt.Errorf("type %T not one of [MarkupContent string]", t)
 557}
 558
 559func (t *Or_InlayHintLabelPart_tooltip) UnmarshalJSON(x []byte) error {
 560	if string(x) == "null" {
 561		t.Value = nil
 562		return nil
 563	}
 564	decoder56 := json.NewDecoder(bytes.NewReader(x))
 565	decoder56.DisallowUnknownFields()
 566	var stringVal string
 567	if err := decoder56.Decode(&stringVal); err == nil {
 568		t.Value = stringVal
 569		return nil
 570	}
 571	decoder57 := json.NewDecoder(bytes.NewReader(x))
 572	decoder57.DisallowUnknownFields()
 573	var h57 MarkupContent
 574	if err := decoder57.Decode(&h57); err == nil {
 575		t.Value = h57
 576		return nil
 577	}
 578	return &UnmarshalError{"unmarshal failed to match one of [MarkupContent string]"}
 579}
 580
 581func (t Or_InlayHint_label) MarshalJSON() ([]byte, error) {
 582	switch x := t.Value.(type) {
 583	case []InlayHintLabelPart:
 584		return json.Marshal(x)
 585	case string:
 586		return json.Marshal(x)
 587	case nil:
 588		return []byte("null"), nil
 589	}
 590	return nil, fmt.Errorf("type %T not one of [[]InlayHintLabelPart string]", t)
 591}
 592
 593func (t *Or_InlayHint_label) UnmarshalJSON(x []byte) error {
 594	if string(x) == "null" {
 595		t.Value = nil
 596		return nil
 597	}
 598	decoder9 := json.NewDecoder(bytes.NewReader(x))
 599	decoder9.DisallowUnknownFields()
 600	var stringVal string
 601	if err := decoder9.Decode(&stringVal); err == nil {
 602		t.Value = stringVal
 603		return nil
 604	}
 605	decoder10 := json.NewDecoder(bytes.NewReader(x))
 606	decoder10.DisallowUnknownFields()
 607	var h10 []InlayHintLabelPart
 608	if err := decoder10.Decode(&h10); err == nil {
 609		t.Value = h10
 610		return nil
 611	}
 612	return &UnmarshalError{"unmarshal failed to match one of [[]InlayHintLabelPart string]"}
 613}
 614
 615func (t Or_InlayHint_tooltip) MarshalJSON() ([]byte, error) {
 616	switch x := t.Value.(type) {
 617	case MarkupContent:
 618		return json.Marshal(x)
 619	case string:
 620		return json.Marshal(x)
 621	case nil:
 622		return []byte("null"), nil
 623	}
 624	return nil, fmt.Errorf("type %T not one of [MarkupContent string]", t)
 625}
 626
 627func (t *Or_InlayHint_tooltip) UnmarshalJSON(x []byte) error {
 628	if string(x) == "null" {
 629		t.Value = nil
 630		return nil
 631	}
 632	decoder12 := json.NewDecoder(bytes.NewReader(x))
 633	decoder12.DisallowUnknownFields()
 634	var stringVal string
 635	if err := decoder12.Decode(&stringVal); err == nil {
 636		t.Value = stringVal
 637		return nil
 638	}
 639	decoder13 := json.NewDecoder(bytes.NewReader(x))
 640	decoder13.DisallowUnknownFields()
 641	var h13 MarkupContent
 642	if err := decoder13.Decode(&h13); err == nil {
 643		t.Value = h13
 644		return nil
 645	}
 646	return &UnmarshalError{"unmarshal failed to match one of [MarkupContent string]"}
 647}
 648
 649func (t Or_InlineCompletionItem_insertText) MarshalJSON() ([]byte, error) {
 650	switch x := t.Value.(type) {
 651	case StringValue:
 652		return json.Marshal(x)
 653	case string:
 654		return json.Marshal(x)
 655	case nil:
 656		return []byte("null"), nil
 657	}
 658	return nil, fmt.Errorf("type %T not one of [StringValue string]", t)
 659}
 660
 661func (t *Or_InlineCompletionItem_insertText) UnmarshalJSON(x []byte) error {
 662	if string(x) == "null" {
 663		t.Value = nil
 664		return nil
 665	}
 666	decoder19 := json.NewDecoder(bytes.NewReader(x))
 667	decoder19.DisallowUnknownFields()
 668	var stringVal string
 669	if err := decoder19.Decode(&stringVal); err == nil {
 670		t.Value = stringVal
 671		return nil
 672	}
 673	decoder20 := json.NewDecoder(bytes.NewReader(x))
 674	decoder20.DisallowUnknownFields()
 675	var h20 StringValue
 676	if err := decoder20.Decode(&h20); err == nil {
 677		t.Value = h20
 678		return nil
 679	}
 680	return &UnmarshalError{"unmarshal failed to match one of [StringValue string]"}
 681}
 682
 683func (t Or_InlineValue) MarshalJSON() ([]byte, error) {
 684	switch x := t.Value.(type) {
 685	case InlineValueEvaluatableExpression:
 686		return json.Marshal(x)
 687	case InlineValueText:
 688		return json.Marshal(x)
 689	case InlineValueVariableLookup:
 690		return json.Marshal(x)
 691	case nil:
 692		return []byte("null"), nil
 693	}
 694	return nil, fmt.Errorf("type %T not one of [InlineValueEvaluatableExpression InlineValueText InlineValueVariableLookup]", t)
 695}
 696
 697func (t *Or_InlineValue) UnmarshalJSON(x []byte) error {
 698	if string(x) == "null" {
 699		t.Value = nil
 700		return nil
 701	}
 702	decoder242 := json.NewDecoder(bytes.NewReader(x))
 703	decoder242.DisallowUnknownFields()
 704	var h242 InlineValueEvaluatableExpression
 705	if err := decoder242.Decode(&h242); err == nil {
 706		t.Value = h242
 707		return nil
 708	}
 709	decoder243 := json.NewDecoder(bytes.NewReader(x))
 710	decoder243.DisallowUnknownFields()
 711	var h243 InlineValueText
 712	if err := decoder243.Decode(&h243); err == nil {
 713		t.Value = h243
 714		return nil
 715	}
 716	decoder244 := json.NewDecoder(bytes.NewReader(x))
 717	decoder244.DisallowUnknownFields()
 718	var h244 InlineValueVariableLookup
 719	if err := decoder244.Decode(&h244); err == nil {
 720		t.Value = h244
 721		return nil
 722	}
 723	return &UnmarshalError{"unmarshal failed to match one of [InlineValueEvaluatableExpression InlineValueText InlineValueVariableLookup]"}
 724}
 725
 726func (t Or_LSPAny) MarshalJSON() ([]byte, error) {
 727	switch x := t.Value.(type) {
 728	case LSPArray:
 729		return json.Marshal(x)
 730	case LSPObject:
 731		return json.Marshal(x)
 732	case bool:
 733		return json.Marshal(x)
 734	case float64:
 735		return json.Marshal(x)
 736	case int32:
 737		return json.Marshal(x)
 738	case string:
 739		return json.Marshal(x)
 740	case uint32:
 741		return json.Marshal(x)
 742	case nil:
 743		return []byte("null"), nil
 744	}
 745	return nil, fmt.Errorf("type %T not one of [LSPArray LSPObject bool float64 int32 string uint32]", t)
 746}
 747
 748func (t *Or_LSPAny) UnmarshalJSON(x []byte) error {
 749	if string(x) == "null" {
 750		t.Value = nil
 751		return nil
 752	}
 753	decoder228 := json.NewDecoder(bytes.NewReader(x))
 754	decoder228.DisallowUnknownFields()
 755	var boolVal bool
 756	if err := decoder228.Decode(&boolVal); err == nil {
 757		t.Value = boolVal
 758		return nil
 759	}
 760	decoder229 := json.NewDecoder(bytes.NewReader(x))
 761	decoder229.DisallowUnknownFields()
 762	var float64Val float64
 763	if err := decoder229.Decode(&float64Val); err == nil {
 764		t.Value = float64Val
 765		return nil
 766	}
 767	decoder230 := json.NewDecoder(bytes.NewReader(x))
 768	decoder230.DisallowUnknownFields()
 769	var int32Val int32
 770	if err := decoder230.Decode(&int32Val); err == nil {
 771		t.Value = int32Val
 772		return nil
 773	}
 774	decoder231 := json.NewDecoder(bytes.NewReader(x))
 775	decoder231.DisallowUnknownFields()
 776	var stringVal string
 777	if err := decoder231.Decode(&stringVal); err == nil {
 778		t.Value = stringVal
 779		return nil
 780	}
 781	decoder232 := json.NewDecoder(bytes.NewReader(x))
 782	decoder232.DisallowUnknownFields()
 783	var uint32Val uint32
 784	if err := decoder232.Decode(&uint32Val); err == nil {
 785		t.Value = uint32Val
 786		return nil
 787	}
 788	decoder233 := json.NewDecoder(bytes.NewReader(x))
 789	decoder233.DisallowUnknownFields()
 790	var h233 LSPArray
 791	if err := decoder233.Decode(&h233); err == nil {
 792		t.Value = h233
 793		return nil
 794	}
 795	decoder234 := json.NewDecoder(bytes.NewReader(x))
 796	decoder234.DisallowUnknownFields()
 797	var h234 LSPObject
 798	if err := decoder234.Decode(&h234); err == nil {
 799		t.Value = h234
 800		return nil
 801	}
 802	return &UnmarshalError{"unmarshal failed to match one of [LSPArray LSPObject bool float64 int32 string uint32]"}
 803}
 804
 805func (t Or_MarkedString) MarshalJSON() ([]byte, error) {
 806	switch x := t.Value.(type) {
 807	case MarkedStringWithLanguage:
 808		return json.Marshal(x)
 809	case string:
 810		return json.Marshal(x)
 811	case nil:
 812		return []byte("null"), nil
 813	}
 814	return nil, fmt.Errorf("type %T not one of [MarkedStringWithLanguage string]", t)
 815}
 816
 817func (t *Or_MarkedString) UnmarshalJSON(x []byte) error {
 818	if string(x) == "null" {
 819		t.Value = nil
 820		return nil
 821	}
 822	decoder266 := json.NewDecoder(bytes.NewReader(x))
 823	decoder266.DisallowUnknownFields()
 824	var stringVal string
 825	if err := decoder266.Decode(&stringVal); err == nil {
 826		t.Value = stringVal
 827		return nil
 828	}
 829	decoder267 := json.NewDecoder(bytes.NewReader(x))
 830	decoder267.DisallowUnknownFields()
 831	var h267 MarkedStringWithLanguage
 832	if err := decoder267.Decode(&h267); err == nil {
 833		t.Value = h267
 834		return nil
 835	}
 836	return &UnmarshalError{"unmarshal failed to match one of [MarkedStringWithLanguage string]"}
 837}
 838
 839func (t Or_NotebookCellTextDocumentFilter_notebook) MarshalJSON() ([]byte, error) {
 840	switch x := t.Value.(type) {
 841	case NotebookDocumentFilter:
 842		return json.Marshal(x)
 843	case string:
 844		return json.Marshal(x)
 845	case nil:
 846		return []byte("null"), nil
 847	}
 848	return nil, fmt.Errorf("type %T not one of [NotebookDocumentFilter string]", t)
 849}
 850
 851func (t *Or_NotebookCellTextDocumentFilter_notebook) UnmarshalJSON(x []byte) error {
 852	if string(x) == "null" {
 853		t.Value = nil
 854		return nil
 855	}
 856	decoder208 := json.NewDecoder(bytes.NewReader(x))
 857	decoder208.DisallowUnknownFields()
 858	var stringVal string
 859	if err := decoder208.Decode(&stringVal); err == nil {
 860		t.Value = stringVal
 861		return nil
 862	}
 863	decoder209 := json.NewDecoder(bytes.NewReader(x))
 864	decoder209.DisallowUnknownFields()
 865	var h209 NotebookDocumentFilter
 866	if err := decoder209.Decode(&h209); err == nil {
 867		t.Value = h209
 868		return nil
 869	}
 870	return &UnmarshalError{"unmarshal failed to match one of [NotebookDocumentFilter string]"}
 871}
 872
 873func (t Or_NotebookDocumentFilter) MarshalJSON() ([]byte, error) {
 874	switch x := t.Value.(type) {
 875	case NotebookDocumentFilterNotebookType:
 876		return json.Marshal(x)
 877	case NotebookDocumentFilterPattern:
 878		return json.Marshal(x)
 879	case NotebookDocumentFilterScheme:
 880		return json.Marshal(x)
 881	case nil:
 882		return []byte("null"), nil
 883	}
 884	return nil, fmt.Errorf("type %T not one of [NotebookDocumentFilterNotebookType NotebookDocumentFilterPattern NotebookDocumentFilterScheme]", t)
 885}
 886
 887func (t *Or_NotebookDocumentFilter) UnmarshalJSON(x []byte) error {
 888	if string(x) == "null" {
 889		t.Value = nil
 890		return nil
 891	}
 892	decoder285 := json.NewDecoder(bytes.NewReader(x))
 893	decoder285.DisallowUnknownFields()
 894	var h285 NotebookDocumentFilterNotebookType
 895	if err := decoder285.Decode(&h285); err == nil {
 896		t.Value = h285
 897		return nil
 898	}
 899	decoder286 := json.NewDecoder(bytes.NewReader(x))
 900	decoder286.DisallowUnknownFields()
 901	var h286 NotebookDocumentFilterPattern
 902	if err := decoder286.Decode(&h286); err == nil {
 903		t.Value = h286
 904		return nil
 905	}
 906	decoder287 := json.NewDecoder(bytes.NewReader(x))
 907	decoder287.DisallowUnknownFields()
 908	var h287 NotebookDocumentFilterScheme
 909	if err := decoder287.Decode(&h287); err == nil {
 910		t.Value = h287
 911		return nil
 912	}
 913	return &UnmarshalError{"unmarshal failed to match one of [NotebookDocumentFilterNotebookType NotebookDocumentFilterPattern NotebookDocumentFilterScheme]"}
 914}
 915
 916func (t Or_NotebookDocumentFilterWithCells_notebook) MarshalJSON() ([]byte, error) {
 917	switch x := t.Value.(type) {
 918	case NotebookDocumentFilter:
 919		return json.Marshal(x)
 920	case string:
 921		return json.Marshal(x)
 922	case nil:
 923		return []byte("null"), nil
 924	}
 925	return nil, fmt.Errorf("type %T not one of [NotebookDocumentFilter string]", t)
 926}
 927
 928func (t *Or_NotebookDocumentFilterWithCells_notebook) UnmarshalJSON(x []byte) error {
 929	if string(x) == "null" {
 930		t.Value = nil
 931		return nil
 932	}
 933	decoder192 := json.NewDecoder(bytes.NewReader(x))
 934	decoder192.DisallowUnknownFields()
 935	var stringVal string
 936	if err := decoder192.Decode(&stringVal); err == nil {
 937		t.Value = stringVal
 938		return nil
 939	}
 940	decoder193 := json.NewDecoder(bytes.NewReader(x))
 941	decoder193.DisallowUnknownFields()
 942	var h193 NotebookDocumentFilter
 943	if err := decoder193.Decode(&h193); err == nil {
 944		t.Value = h193
 945		return nil
 946	}
 947	return &UnmarshalError{"unmarshal failed to match one of [NotebookDocumentFilter string]"}
 948}
 949
 950func (t Or_NotebookDocumentFilterWithNotebook_notebook) MarshalJSON() ([]byte, error) {
 951	switch x := t.Value.(type) {
 952	case NotebookDocumentFilter:
 953		return json.Marshal(x)
 954	case string:
 955		return json.Marshal(x)
 956	case nil:
 957		return []byte("null"), nil
 958	}
 959	return nil, fmt.Errorf("type %T not one of [NotebookDocumentFilter string]", t)
 960}
 961
 962func (t *Or_NotebookDocumentFilterWithNotebook_notebook) UnmarshalJSON(x []byte) error {
 963	if string(x) == "null" {
 964		t.Value = nil
 965		return nil
 966	}
 967	decoder189 := json.NewDecoder(bytes.NewReader(x))
 968	decoder189.DisallowUnknownFields()
 969	var stringVal string
 970	if err := decoder189.Decode(&stringVal); err == nil {
 971		t.Value = stringVal
 972		return nil
 973	}
 974	decoder190 := json.NewDecoder(bytes.NewReader(x))
 975	decoder190.DisallowUnknownFields()
 976	var h190 NotebookDocumentFilter
 977	if err := decoder190.Decode(&h190); err == nil {
 978		t.Value = h190
 979		return nil
 980	}
 981	return &UnmarshalError{"unmarshal failed to match one of [NotebookDocumentFilter string]"}
 982}
 983
 984func (t Or_NotebookDocumentSyncOptions_notebookSelector_Elem) MarshalJSON() ([]byte, error) {
 985	switch x := t.Value.(type) {
 986	case NotebookDocumentFilterWithCells:
 987		return json.Marshal(x)
 988	case NotebookDocumentFilterWithNotebook:
 989		return json.Marshal(x)
 990	case nil:
 991		return []byte("null"), nil
 992	}
 993	return nil, fmt.Errorf("type %T not one of [NotebookDocumentFilterWithCells NotebookDocumentFilterWithNotebook]", t)
 994}
 995
 996func (t *Or_NotebookDocumentSyncOptions_notebookSelector_Elem) UnmarshalJSON(x []byte) error {
 997	if string(x) == "null" {
 998		t.Value = nil
 999		return nil
1000	}
1001	decoder68 := json.NewDecoder(bytes.NewReader(x))
1002	decoder68.DisallowUnknownFields()
1003	var h68 NotebookDocumentFilterWithCells
1004	if err := decoder68.Decode(&h68); err == nil {
1005		t.Value = h68
1006		return nil
1007	}
1008	decoder69 := json.NewDecoder(bytes.NewReader(x))
1009	decoder69.DisallowUnknownFields()
1010	var h69 NotebookDocumentFilterWithNotebook
1011	if err := decoder69.Decode(&h69); err == nil {
1012		t.Value = h69
1013		return nil
1014	}
1015	return &UnmarshalError{"unmarshal failed to match one of [NotebookDocumentFilterWithCells NotebookDocumentFilterWithNotebook]"}
1016}
1017
1018func (t Or_ParameterInformation_documentation) MarshalJSON() ([]byte, error) {
1019	switch x := t.Value.(type) {
1020	case MarkupContent:
1021		return json.Marshal(x)
1022	case string:
1023		return json.Marshal(x)
1024	case nil:
1025		return []byte("null"), nil
1026	}
1027	return nil, fmt.Errorf("type %T not one of [MarkupContent string]", t)
1028}
1029
1030func (t *Or_ParameterInformation_documentation) UnmarshalJSON(x []byte) error {
1031	if string(x) == "null" {
1032		t.Value = nil
1033		return nil
1034	}
1035	decoder205 := json.NewDecoder(bytes.NewReader(x))
1036	decoder205.DisallowUnknownFields()
1037	var stringVal string
1038	if err := decoder205.Decode(&stringVal); err == nil {
1039		t.Value = stringVal
1040		return nil
1041	}
1042	decoder206 := json.NewDecoder(bytes.NewReader(x))
1043	decoder206.DisallowUnknownFields()
1044	var h206 MarkupContent
1045	if err := decoder206.Decode(&h206); err == nil {
1046		t.Value = h206
1047		return nil
1048	}
1049	return &UnmarshalError{"unmarshal failed to match one of [MarkupContent string]"}
1050}
1051
1052func (t Or_ParameterInformation_label) MarshalJSON() ([]byte, error) {
1053	switch x := t.Value.(type) {
1054	case Tuple_ParameterInformation_label_Item1:
1055		return json.Marshal(x)
1056	case string:
1057		return json.Marshal(x)
1058	case nil:
1059		return []byte("null"), nil
1060	}
1061	return nil, fmt.Errorf("type %T not one of [Tuple_ParameterInformation_label_Item1 string]", t)
1062}
1063
1064func (t *Or_ParameterInformation_label) UnmarshalJSON(x []byte) error {
1065	if string(x) == "null" {
1066		t.Value = nil
1067		return nil
1068	}
1069	decoder202 := json.NewDecoder(bytes.NewReader(x))
1070	decoder202.DisallowUnknownFields()
1071	var stringVal string
1072	if err := decoder202.Decode(&stringVal); err == nil {
1073		t.Value = stringVal
1074		return nil
1075	}
1076	decoder203 := json.NewDecoder(bytes.NewReader(x))
1077	decoder203.DisallowUnknownFields()
1078	var h203 Tuple_ParameterInformation_label_Item1
1079	if err := decoder203.Decode(&h203); err == nil {
1080		t.Value = h203
1081		return nil
1082	}
1083	return &UnmarshalError{"unmarshal failed to match one of [Tuple_ParameterInformation_label_Item1 string]"}
1084}
1085
1086func (t Or_PrepareRenameResult) MarshalJSON() ([]byte, error) {
1087	switch x := t.Value.(type) {
1088	case PrepareRenameDefaultBehavior:
1089		return json.Marshal(x)
1090	case PrepareRenamePlaceholder:
1091		return json.Marshal(x)
1092	case Range:
1093		return json.Marshal(x)
1094	case nil:
1095		return []byte("null"), nil
1096	}
1097	return nil, fmt.Errorf("type %T not one of [PrepareRenameDefaultBehavior PrepareRenamePlaceholder Range]", t)
1098}
1099
1100func (t *Or_PrepareRenameResult) UnmarshalJSON(x []byte) error {
1101	if string(x) == "null" {
1102		t.Value = nil
1103		return nil
1104	}
1105	decoder252 := json.NewDecoder(bytes.NewReader(x))
1106	decoder252.DisallowUnknownFields()
1107	var h252 PrepareRenameDefaultBehavior
1108	if err := decoder252.Decode(&h252); err == nil {
1109		t.Value = h252
1110		return nil
1111	}
1112	decoder253 := json.NewDecoder(bytes.NewReader(x))
1113	decoder253.DisallowUnknownFields()
1114	var h253 PrepareRenamePlaceholder
1115	if err := decoder253.Decode(&h253); err == nil {
1116		t.Value = h253
1117		return nil
1118	}
1119	decoder254 := json.NewDecoder(bytes.NewReader(x))
1120	decoder254.DisallowUnknownFields()
1121	var h254 Range
1122	if err := decoder254.Decode(&h254); err == nil {
1123		t.Value = h254
1124		return nil
1125	}
1126	return &UnmarshalError{"unmarshal failed to match one of [PrepareRenameDefaultBehavior PrepareRenamePlaceholder Range]"}
1127}
1128
1129func (t Or_ProgressToken) MarshalJSON() ([]byte, error) {
1130	switch x := t.Value.(type) {
1131	case int32:
1132		return json.Marshal(x)
1133	case string:
1134		return json.Marshal(x)
1135	case nil:
1136		return []byte("null"), nil
1137	}
1138	return nil, fmt.Errorf("type %T not one of [int32 string]", t)
1139}
1140
1141func (t *Or_ProgressToken) UnmarshalJSON(x []byte) error {
1142	if string(x) == "null" {
1143		t.Value = nil
1144		return nil
1145	}
1146	decoder255 := json.NewDecoder(bytes.NewReader(x))
1147	decoder255.DisallowUnknownFields()
1148	var int32Val int32
1149	if err := decoder255.Decode(&int32Val); err == nil {
1150		t.Value = int32Val
1151		return nil
1152	}
1153	decoder256 := json.NewDecoder(bytes.NewReader(x))
1154	decoder256.DisallowUnknownFields()
1155	var stringVal string
1156	if err := decoder256.Decode(&stringVal); err == nil {
1157		t.Value = stringVal
1158		return nil
1159	}
1160	return &UnmarshalError{"unmarshal failed to match one of [int32 string]"}
1161}
1162
1163func (t Or_RelatedFullDocumentDiagnosticReport_relatedDocuments_Value) MarshalJSON() ([]byte, error) {
1164	switch x := t.Value.(type) {
1165	case FullDocumentDiagnosticReport:
1166		return json.Marshal(x)
1167	case UnchangedDocumentDiagnosticReport:
1168		return json.Marshal(x)
1169	case nil:
1170		return []byte("null"), nil
1171	}
1172	return nil, fmt.Errorf("type %T not one of [FullDocumentDiagnosticReport UnchangedDocumentDiagnosticReport]", t)
1173}
1174
1175func (t *Or_RelatedFullDocumentDiagnosticReport_relatedDocuments_Value) UnmarshalJSON(x []byte) error {
1176	if string(x) == "null" {
1177		t.Value = nil
1178		return nil
1179	}
1180	decoder60 := json.NewDecoder(bytes.NewReader(x))
1181	decoder60.DisallowUnknownFields()
1182	var h60 FullDocumentDiagnosticReport
1183	if err := decoder60.Decode(&h60); err == nil {
1184		t.Value = h60
1185		return nil
1186	}
1187	decoder61 := json.NewDecoder(bytes.NewReader(x))
1188	decoder61.DisallowUnknownFields()
1189	var h61 UnchangedDocumentDiagnosticReport
1190	if err := decoder61.Decode(&h61); err == nil {
1191		t.Value = h61
1192		return nil
1193	}
1194	return &UnmarshalError{"unmarshal failed to match one of [FullDocumentDiagnosticReport UnchangedDocumentDiagnosticReport]"}
1195}
1196
1197func (t Or_RelatedUnchangedDocumentDiagnosticReport_relatedDocuments_Value) MarshalJSON() ([]byte, error) {
1198	switch x := t.Value.(type) {
1199	case FullDocumentDiagnosticReport:
1200		return json.Marshal(x)
1201	case UnchangedDocumentDiagnosticReport:
1202		return json.Marshal(x)
1203	case nil:
1204		return []byte("null"), nil
1205	}
1206	return nil, fmt.Errorf("type %T not one of [FullDocumentDiagnosticReport UnchangedDocumentDiagnosticReport]", t)
1207}
1208
1209func (t *Or_RelatedUnchangedDocumentDiagnosticReport_relatedDocuments_Value) UnmarshalJSON(x []byte) error {
1210	if string(x) == "null" {
1211		t.Value = nil
1212		return nil
1213	}
1214	decoder64 := json.NewDecoder(bytes.NewReader(x))
1215	decoder64.DisallowUnknownFields()
1216	var h64 FullDocumentDiagnosticReport
1217	if err := decoder64.Decode(&h64); err == nil {
1218		t.Value = h64
1219		return nil
1220	}
1221	decoder65 := json.NewDecoder(bytes.NewReader(x))
1222	decoder65.DisallowUnknownFields()
1223	var h65 UnchangedDocumentDiagnosticReport
1224	if err := decoder65.Decode(&h65); err == nil {
1225		t.Value = h65
1226		return nil
1227	}
1228	return &UnmarshalError{"unmarshal failed to match one of [FullDocumentDiagnosticReport UnchangedDocumentDiagnosticReport]"}
1229}
1230
1231func (t Or_RelativePattern_baseUri) MarshalJSON() ([]byte, error) {
1232	switch x := t.Value.(type) {
1233	case URI:
1234		return json.Marshal(x)
1235	case WorkspaceFolder:
1236		return json.Marshal(x)
1237	case nil:
1238		return []byte("null"), nil
1239	}
1240	return nil, fmt.Errorf("type %T not one of [URI WorkspaceFolder]", t)
1241}
1242
1243func (t *Or_RelativePattern_baseUri) UnmarshalJSON(x []byte) error {
1244	if string(x) == "null" {
1245		t.Value = nil
1246		return nil
1247	}
1248	decoder214 := json.NewDecoder(bytes.NewReader(x))
1249	decoder214.DisallowUnknownFields()
1250	var h214 URI
1251	if err := decoder214.Decode(&h214); err == nil {
1252		t.Value = h214
1253		return nil
1254	}
1255	decoder215 := json.NewDecoder(bytes.NewReader(x))
1256	decoder215.DisallowUnknownFields()
1257	var h215 WorkspaceFolder
1258	if err := decoder215.Decode(&h215); err == nil {
1259		t.Value = h215
1260		return nil
1261	}
1262	return &UnmarshalError{"unmarshal failed to match one of [URI WorkspaceFolder]"}
1263}
1264
1265func (t Or_Result_textDocument_codeAction_Item0_Elem) MarshalJSON() ([]byte, error) {
1266	switch x := t.Value.(type) {
1267	case CodeAction:
1268		return json.Marshal(x)
1269	case Command:
1270		return json.Marshal(x)
1271	case nil:
1272		return []byte("null"), nil
1273	}
1274	return nil, fmt.Errorf("type %T not one of [CodeAction Command]", t)
1275}
1276
1277func (t *Or_Result_textDocument_codeAction_Item0_Elem) UnmarshalJSON(x []byte) error {
1278	if string(x) == "null" {
1279		t.Value = nil
1280		return nil
1281	}
1282	decoder322 := json.NewDecoder(bytes.NewReader(x))
1283	decoder322.DisallowUnknownFields()
1284	var h322 CodeAction
1285	if err := decoder322.Decode(&h322); err == nil {
1286		t.Value = h322
1287		return nil
1288	}
1289	decoder323 := json.NewDecoder(bytes.NewReader(x))
1290	decoder323.DisallowUnknownFields()
1291	var h323 Command
1292	if err := decoder323.Decode(&h323); err == nil {
1293		t.Value = h323
1294		return nil
1295	}
1296	return &UnmarshalError{"unmarshal failed to match one of [CodeAction Command]"}
1297}
1298
1299func (t Or_Result_textDocument_completion) MarshalJSON() ([]byte, error) {
1300	switch x := t.Value.(type) {
1301	case CompletionList:
1302		return json.Marshal(x)
1303	case []CompletionItem:
1304		return json.Marshal(x)
1305	case nil:
1306		return []byte("null"), nil
1307	}
1308	return nil, fmt.Errorf("type %T not one of [CompletionList []CompletionItem]", t)
1309}
1310
1311func (t *Or_Result_textDocument_completion) UnmarshalJSON(x []byte) error {
1312	if string(x) == "null" {
1313		t.Value = nil
1314		return nil
1315	}
1316	decoder310 := json.NewDecoder(bytes.NewReader(x))
1317	decoder310.DisallowUnknownFields()
1318	var h310 CompletionList
1319	if err := decoder310.Decode(&h310); err == nil {
1320		t.Value = h310
1321		return nil
1322	}
1323	decoder311 := json.NewDecoder(bytes.NewReader(x))
1324	decoder311.DisallowUnknownFields()
1325	var h311 []CompletionItem
1326	if err := decoder311.Decode(&h311); err == nil {
1327		t.Value = h311
1328		return nil
1329	}
1330	return &UnmarshalError{"unmarshal failed to match one of [CompletionList []CompletionItem]"}
1331}
1332
1333func (t Or_Result_textDocument_declaration) MarshalJSON() ([]byte, error) {
1334	switch x := t.Value.(type) {
1335	case Declaration:
1336		return json.Marshal(x)
1337	case []DeclarationLink:
1338		return json.Marshal(x)
1339	case nil:
1340		return []byte("null"), nil
1341	}
1342	return nil, fmt.Errorf("type %T not one of [Declaration []DeclarationLink]", t)
1343}
1344
1345func (t *Or_Result_textDocument_declaration) UnmarshalJSON(x []byte) error {
1346	if string(x) == "null" {
1347		t.Value = nil
1348		return nil
1349	}
1350	decoder298 := json.NewDecoder(bytes.NewReader(x))
1351	decoder298.DisallowUnknownFields()
1352	var h298 Declaration
1353	if err := decoder298.Decode(&h298); err == nil {
1354		t.Value = h298
1355		return nil
1356	}
1357	decoder299 := json.NewDecoder(bytes.NewReader(x))
1358	decoder299.DisallowUnknownFields()
1359	var h299 []DeclarationLink
1360	if err := decoder299.Decode(&h299); err == nil {
1361		t.Value = h299
1362		return nil
1363	}
1364	return &UnmarshalError{"unmarshal failed to match one of [Declaration []DeclarationLink]"}
1365}
1366
1367func (t Or_Result_textDocument_definition) MarshalJSON() ([]byte, error) {
1368	switch x := t.Value.(type) {
1369	case Definition:
1370		return json.Marshal(x)
1371	case []DefinitionLink:
1372		return json.Marshal(x)
1373	case nil:
1374		return []byte("null"), nil
1375	}
1376	return nil, fmt.Errorf("type %T not one of [Definition []DefinitionLink]", t)
1377}
1378
1379func (t *Or_Result_textDocument_definition) UnmarshalJSON(x []byte) error {
1380	if string(x) == "null" {
1381		t.Value = nil
1382		return nil
1383	}
1384	decoder314 := json.NewDecoder(bytes.NewReader(x))
1385	decoder314.DisallowUnknownFields()
1386	var h314 Definition
1387	if err := decoder314.Decode(&h314); err == nil {
1388		t.Value = h314
1389		return nil
1390	}
1391	decoder315 := json.NewDecoder(bytes.NewReader(x))
1392	decoder315.DisallowUnknownFields()
1393	var h315 []DefinitionLink
1394	if err := decoder315.Decode(&h315); err == nil {
1395		t.Value = h315
1396		return nil
1397	}
1398	return &UnmarshalError{"unmarshal failed to match one of [Definition []DefinitionLink]"}
1399}
1400
1401func (t Or_Result_textDocument_documentSymbol) MarshalJSON() ([]byte, error) {
1402	switch x := t.Value.(type) {
1403	case []DocumentSymbol:
1404		return json.Marshal(x)
1405	case []SymbolInformation:
1406		return json.Marshal(x)
1407	case nil:
1408		return []byte("null"), nil
1409	}
1410	return nil, fmt.Errorf("type %T not one of [[]DocumentSymbol []SymbolInformation]", t)
1411}
1412
1413func (t *Or_Result_textDocument_documentSymbol) UnmarshalJSON(x []byte) error {
1414	if string(x) == "null" {
1415		t.Value = nil
1416		return nil
1417	}
1418	decoder318 := json.NewDecoder(bytes.NewReader(x))
1419	decoder318.DisallowUnknownFields()
1420	var h318 []DocumentSymbol
1421	if err := decoder318.Decode(&h318); err == nil {
1422		t.Value = h318
1423		return nil
1424	}
1425	decoder319 := json.NewDecoder(bytes.NewReader(x))
1426	decoder319.DisallowUnknownFields()
1427	var h319 []SymbolInformation
1428	if err := decoder319.Decode(&h319); err == nil {
1429		t.Value = h319
1430		return nil
1431	}
1432	return &UnmarshalError{"unmarshal failed to match one of [[]DocumentSymbol []SymbolInformation]"}
1433}
1434
1435func (t Or_Result_textDocument_implementation) MarshalJSON() ([]byte, error) {
1436	switch x := t.Value.(type) {
1437	case Definition:
1438		return json.Marshal(x)
1439	case []DefinitionLink:
1440		return json.Marshal(x)
1441	case nil:
1442		return []byte("null"), nil
1443	}
1444	return nil, fmt.Errorf("type %T not one of [Definition []DefinitionLink]", t)
1445}
1446
1447func (t *Or_Result_textDocument_implementation) UnmarshalJSON(x []byte) error {
1448	if string(x) == "null" {
1449		t.Value = nil
1450		return nil
1451	}
1452	decoder290 := json.NewDecoder(bytes.NewReader(x))
1453	decoder290.DisallowUnknownFields()
1454	var h290 Definition
1455	if err := decoder290.Decode(&h290); err == nil {
1456		t.Value = h290
1457		return nil
1458	}
1459	decoder291 := json.NewDecoder(bytes.NewReader(x))
1460	decoder291.DisallowUnknownFields()
1461	var h291 []DefinitionLink
1462	if err := decoder291.Decode(&h291); err == nil {
1463		t.Value = h291
1464		return nil
1465	}
1466	return &UnmarshalError{"unmarshal failed to match one of [Definition []DefinitionLink]"}
1467}
1468
1469func (t Or_Result_textDocument_inlineCompletion) MarshalJSON() ([]byte, error) {
1470	switch x := t.Value.(type) {
1471	case InlineCompletionList:
1472		return json.Marshal(x)
1473	case []InlineCompletionItem:
1474		return json.Marshal(x)
1475	case nil:
1476		return []byte("null"), nil
1477	}
1478	return nil, fmt.Errorf("type %T not one of [InlineCompletionList []InlineCompletionItem]", t)
1479}
1480
1481func (t *Or_Result_textDocument_inlineCompletion) UnmarshalJSON(x []byte) error {
1482	if string(x) == "null" {
1483		t.Value = nil
1484		return nil
1485	}
1486	decoder306 := json.NewDecoder(bytes.NewReader(x))
1487	decoder306.DisallowUnknownFields()
1488	var h306 InlineCompletionList
1489	if err := decoder306.Decode(&h306); err == nil {
1490		t.Value = h306
1491		return nil
1492	}
1493	decoder307 := json.NewDecoder(bytes.NewReader(x))
1494	decoder307.DisallowUnknownFields()
1495	var h307 []InlineCompletionItem
1496	if err := decoder307.Decode(&h307); err == nil {
1497		t.Value = h307
1498		return nil
1499	}
1500	return &UnmarshalError{"unmarshal failed to match one of [InlineCompletionList []InlineCompletionItem]"}
1501}
1502
1503func (t Or_Result_textDocument_semanticTokens_full_delta) MarshalJSON() ([]byte, error) {
1504	switch x := t.Value.(type) {
1505	case SemanticTokens:
1506		return json.Marshal(x)
1507	case SemanticTokensDelta:
1508		return json.Marshal(x)
1509	case nil:
1510		return []byte("null"), nil
1511	}
1512	return nil, fmt.Errorf("type %T not one of [SemanticTokens SemanticTokensDelta]", t)
1513}
1514
1515func (t *Or_Result_textDocument_semanticTokens_full_delta) UnmarshalJSON(x []byte) error {
1516	if string(x) == "null" {
1517		t.Value = nil
1518		return nil
1519	}
1520	decoder302 := json.NewDecoder(bytes.NewReader(x))
1521	decoder302.DisallowUnknownFields()
1522	var h302 SemanticTokens
1523	if err := decoder302.Decode(&h302); err == nil {
1524		t.Value = h302
1525		return nil
1526	}
1527	decoder303 := json.NewDecoder(bytes.NewReader(x))
1528	decoder303.DisallowUnknownFields()
1529	var h303 SemanticTokensDelta
1530	if err := decoder303.Decode(&h303); err == nil {
1531		t.Value = h303
1532		return nil
1533	}
1534	return &UnmarshalError{"unmarshal failed to match one of [SemanticTokens SemanticTokensDelta]"}
1535}
1536
1537func (t Or_Result_textDocument_typeDefinition) MarshalJSON() ([]byte, error) {
1538	switch x := t.Value.(type) {
1539	case Definition:
1540		return json.Marshal(x)
1541	case []DefinitionLink:
1542		return json.Marshal(x)
1543	case nil:
1544		return []byte("null"), nil
1545	}
1546	return nil, fmt.Errorf("type %T not one of [Definition []DefinitionLink]", t)
1547}
1548
1549func (t *Or_Result_textDocument_typeDefinition) UnmarshalJSON(x []byte) error {
1550	if string(x) == "null" {
1551		t.Value = nil
1552		return nil
1553	}
1554	decoder294 := json.NewDecoder(bytes.NewReader(x))
1555	decoder294.DisallowUnknownFields()
1556	var h294 Definition
1557	if err := decoder294.Decode(&h294); err == nil {
1558		t.Value = h294
1559		return nil
1560	}
1561	decoder295 := json.NewDecoder(bytes.NewReader(x))
1562	decoder295.DisallowUnknownFields()
1563	var h295 []DefinitionLink
1564	if err := decoder295.Decode(&h295); err == nil {
1565		t.Value = h295
1566		return nil
1567	}
1568	return &UnmarshalError{"unmarshal failed to match one of [Definition []DefinitionLink]"}
1569}
1570
1571func (t Or_Result_workspace_symbol) MarshalJSON() ([]byte, error) {
1572	switch x := t.Value.(type) {
1573	case []SymbolInformation:
1574		return json.Marshal(x)
1575	case []WorkspaceSymbol:
1576		return json.Marshal(x)
1577	case nil:
1578		return []byte("null"), nil
1579	}
1580	return nil, fmt.Errorf("type %T not one of [[]SymbolInformation []WorkspaceSymbol]", t)
1581}
1582
1583func (t *Or_Result_workspace_symbol) UnmarshalJSON(x []byte) error {
1584	if string(x) == "null" {
1585		t.Value = nil
1586		return nil
1587	}
1588	decoder326 := json.NewDecoder(bytes.NewReader(x))
1589	decoder326.DisallowUnknownFields()
1590	var h326 []SymbolInformation
1591	if err := decoder326.Decode(&h326); err == nil {
1592		t.Value = h326
1593		return nil
1594	}
1595	decoder327 := json.NewDecoder(bytes.NewReader(x))
1596	decoder327.DisallowUnknownFields()
1597	var h327 []WorkspaceSymbol
1598	if err := decoder327.Decode(&h327); err == nil {
1599		t.Value = h327
1600		return nil
1601	}
1602	return &UnmarshalError{"unmarshal failed to match one of [[]SymbolInformation []WorkspaceSymbol]"}
1603}
1604
1605func (t Or_SemanticTokensOptions_full) MarshalJSON() ([]byte, error) {
1606	switch x := t.Value.(type) {
1607	case SemanticTokensFullDelta:
1608		return json.Marshal(x)
1609	case bool:
1610		return json.Marshal(x)
1611	case nil:
1612		return []byte("null"), nil
1613	}
1614	return nil, fmt.Errorf("type %T not one of [SemanticTokensFullDelta bool]", t)
1615}
1616
1617func (t *Or_SemanticTokensOptions_full) UnmarshalJSON(x []byte) error {
1618	if string(x) == "null" {
1619		t.Value = nil
1620		return nil
1621	}
1622	decoder47 := json.NewDecoder(bytes.NewReader(x))
1623	decoder47.DisallowUnknownFields()
1624	var boolVal bool
1625	if err := decoder47.Decode(&boolVal); err == nil {
1626		t.Value = boolVal
1627		return nil
1628	}
1629	decoder48 := json.NewDecoder(bytes.NewReader(x))
1630	decoder48.DisallowUnknownFields()
1631	var h48 SemanticTokensFullDelta
1632	if err := decoder48.Decode(&h48); err == nil {
1633		t.Value = h48
1634		return nil
1635	}
1636	return &UnmarshalError{"unmarshal failed to match one of [SemanticTokensFullDelta bool]"}
1637}
1638
1639func (t Or_SemanticTokensOptions_range) MarshalJSON() ([]byte, error) {
1640	switch x := t.Value.(type) {
1641	case Lit_SemanticTokensOptions_range_Item1:
1642		return json.Marshal(x)
1643	case bool:
1644		return json.Marshal(x)
1645	case nil:
1646		return []byte("null"), nil
1647	}
1648	return nil, fmt.Errorf("type %T not one of [Lit_SemanticTokensOptions_range_Item1 bool]", t)
1649}
1650
1651func (t *Or_SemanticTokensOptions_range) UnmarshalJSON(x []byte) error {
1652	if string(x) == "null" {
1653		t.Value = nil
1654		return nil
1655	}
1656	decoder44 := json.NewDecoder(bytes.NewReader(x))
1657	decoder44.DisallowUnknownFields()
1658	var boolVal bool
1659	if err := decoder44.Decode(&boolVal); err == nil {
1660		t.Value = boolVal
1661		return nil
1662	}
1663	decoder45 := json.NewDecoder(bytes.NewReader(x))
1664	decoder45.DisallowUnknownFields()
1665	var h45 Lit_SemanticTokensOptions_range_Item1
1666	if err := decoder45.Decode(&h45); err == nil {
1667		t.Value = h45
1668		return nil
1669	}
1670	return &UnmarshalError{"unmarshal failed to match one of [Lit_SemanticTokensOptions_range_Item1 bool]"}
1671}
1672
1673func (t Or_ServerCapabilities_callHierarchyProvider) MarshalJSON() ([]byte, error) {
1674	switch x := t.Value.(type) {
1675	case CallHierarchyOptions:
1676		return json.Marshal(x)
1677	case CallHierarchyRegistrationOptions:
1678		return json.Marshal(x)
1679	case bool:
1680		return json.Marshal(x)
1681	case nil:
1682		return []byte("null"), nil
1683	}
1684	return nil, fmt.Errorf("type %T not one of [CallHierarchyOptions CallHierarchyRegistrationOptions bool]", t)
1685}
1686
1687func (t *Or_ServerCapabilities_callHierarchyProvider) UnmarshalJSON(x []byte) error {
1688	if string(x) == "null" {
1689		t.Value = nil
1690		return nil
1691	}
1692	decoder140 := json.NewDecoder(bytes.NewReader(x))
1693	decoder140.DisallowUnknownFields()
1694	var boolVal bool
1695	if err := decoder140.Decode(&boolVal); err == nil {
1696		t.Value = boolVal
1697		return nil
1698	}
1699	decoder141 := json.NewDecoder(bytes.NewReader(x))
1700	decoder141.DisallowUnknownFields()
1701	var h141 CallHierarchyOptions
1702	if err := decoder141.Decode(&h141); err == nil {
1703		t.Value = h141
1704		return nil
1705	}
1706	decoder142 := json.NewDecoder(bytes.NewReader(x))
1707	decoder142.DisallowUnknownFields()
1708	var h142 CallHierarchyRegistrationOptions
1709	if err := decoder142.Decode(&h142); err == nil {
1710		t.Value = h142
1711		return nil
1712	}
1713	return &UnmarshalError{"unmarshal failed to match one of [CallHierarchyOptions CallHierarchyRegistrationOptions bool]"}
1714}
1715
1716func (t Or_ServerCapabilities_codeActionProvider) MarshalJSON() ([]byte, error) {
1717	switch x := t.Value.(type) {
1718	case CodeActionOptions:
1719		return json.Marshal(x)
1720	case bool:
1721		return json.Marshal(x)
1722	case nil:
1723		return []byte("null"), nil
1724	}
1725	return nil, fmt.Errorf("type %T not one of [CodeActionOptions bool]", t)
1726}
1727
1728func (t *Or_ServerCapabilities_codeActionProvider) UnmarshalJSON(x []byte) error {
1729	if string(x) == "null" {
1730		t.Value = nil
1731		return nil
1732	}
1733	decoder109 := json.NewDecoder(bytes.NewReader(x))
1734	decoder109.DisallowUnknownFields()
1735	var boolVal bool
1736	if err := decoder109.Decode(&boolVal); err == nil {
1737		t.Value = boolVal
1738		return nil
1739	}
1740	decoder110 := json.NewDecoder(bytes.NewReader(x))
1741	decoder110.DisallowUnknownFields()
1742	var h110 CodeActionOptions
1743	if err := decoder110.Decode(&h110); err == nil {
1744		t.Value = h110
1745		return nil
1746	}
1747	return &UnmarshalError{"unmarshal failed to match one of [CodeActionOptions bool]"}
1748}
1749
1750func (t Or_ServerCapabilities_colorProvider) MarshalJSON() ([]byte, error) {
1751	switch x := t.Value.(type) {
1752	case DocumentColorOptions:
1753		return json.Marshal(x)
1754	case DocumentColorRegistrationOptions:
1755		return json.Marshal(x)
1756	case bool:
1757		return json.Marshal(x)
1758	case nil:
1759		return []byte("null"), nil
1760	}
1761	return nil, fmt.Errorf("type %T not one of [DocumentColorOptions DocumentColorRegistrationOptions bool]", t)
1762}
1763
1764func (t *Or_ServerCapabilities_colorProvider) UnmarshalJSON(x []byte) error {
1765	if string(x) == "null" {
1766		t.Value = nil
1767		return nil
1768	}
1769	decoder113 := json.NewDecoder(bytes.NewReader(x))
1770	decoder113.DisallowUnknownFields()
1771	var boolVal bool
1772	if err := decoder113.Decode(&boolVal); err == nil {
1773		t.Value = boolVal
1774		return nil
1775	}
1776	decoder114 := json.NewDecoder(bytes.NewReader(x))
1777	decoder114.DisallowUnknownFields()
1778	var h114 DocumentColorOptions
1779	if err := decoder114.Decode(&h114); err == nil {
1780		t.Value = h114
1781		return nil
1782	}
1783	decoder115 := json.NewDecoder(bytes.NewReader(x))
1784	decoder115.DisallowUnknownFields()
1785	var h115 DocumentColorRegistrationOptions
1786	if err := decoder115.Decode(&h115); err == nil {
1787		t.Value = h115
1788		return nil
1789	}
1790	return &UnmarshalError{"unmarshal failed to match one of [DocumentColorOptions DocumentColorRegistrationOptions bool]"}
1791}
1792
1793func (t Or_ServerCapabilities_declarationProvider) MarshalJSON() ([]byte, error) {
1794	switch x := t.Value.(type) {
1795	case DeclarationOptions:
1796		return json.Marshal(x)
1797	case DeclarationRegistrationOptions:
1798		return json.Marshal(x)
1799	case bool:
1800		return json.Marshal(x)
1801	case nil:
1802		return []byte("null"), nil
1803	}
1804	return nil, fmt.Errorf("type %T not one of [DeclarationOptions DeclarationRegistrationOptions bool]", t)
1805}
1806
1807func (t *Or_ServerCapabilities_declarationProvider) UnmarshalJSON(x []byte) error {
1808	if string(x) == "null" {
1809		t.Value = nil
1810		return nil
1811	}
1812	decoder83 := json.NewDecoder(bytes.NewReader(x))
1813	decoder83.DisallowUnknownFields()
1814	var boolVal bool
1815	if err := decoder83.Decode(&boolVal); err == nil {
1816		t.Value = boolVal
1817		return nil
1818	}
1819	decoder84 := json.NewDecoder(bytes.NewReader(x))
1820	decoder84.DisallowUnknownFields()
1821	var h84 DeclarationOptions
1822	if err := decoder84.Decode(&h84); err == nil {
1823		t.Value = h84
1824		return nil
1825	}
1826	decoder85 := json.NewDecoder(bytes.NewReader(x))
1827	decoder85.DisallowUnknownFields()
1828	var h85 DeclarationRegistrationOptions
1829	if err := decoder85.Decode(&h85); err == nil {
1830		t.Value = h85
1831		return nil
1832	}
1833	return &UnmarshalError{"unmarshal failed to match one of [DeclarationOptions DeclarationRegistrationOptions bool]"}
1834}
1835
1836func (t Or_ServerCapabilities_definitionProvider) MarshalJSON() ([]byte, error) {
1837	switch x := t.Value.(type) {
1838	case DefinitionOptions:
1839		return json.Marshal(x)
1840	case bool:
1841		return json.Marshal(x)
1842	case nil:
1843		return []byte("null"), nil
1844	}
1845	return nil, fmt.Errorf("type %T not one of [DefinitionOptions bool]", t)
1846}
1847
1848func (t *Or_ServerCapabilities_definitionProvider) UnmarshalJSON(x []byte) error {
1849	if string(x) == "null" {
1850		t.Value = nil
1851		return nil
1852	}
1853	decoder87 := json.NewDecoder(bytes.NewReader(x))
1854	decoder87.DisallowUnknownFields()
1855	var boolVal bool
1856	if err := decoder87.Decode(&boolVal); err == nil {
1857		t.Value = boolVal
1858		return nil
1859	}
1860	decoder88 := json.NewDecoder(bytes.NewReader(x))
1861	decoder88.DisallowUnknownFields()
1862	var h88 DefinitionOptions
1863	if err := decoder88.Decode(&h88); err == nil {
1864		t.Value = h88
1865		return nil
1866	}
1867	return &UnmarshalError{"unmarshal failed to match one of [DefinitionOptions bool]"}
1868}
1869
1870func (t Or_ServerCapabilities_diagnosticProvider) MarshalJSON() ([]byte, error) {
1871	switch x := t.Value.(type) {
1872	case DiagnosticOptions:
1873		return json.Marshal(x)
1874	case DiagnosticRegistrationOptions:
1875		return json.Marshal(x)
1876	case nil:
1877		return []byte("null"), nil
1878	}
1879	return nil, fmt.Errorf("type %T not one of [DiagnosticOptions DiagnosticRegistrationOptions]", t)
1880}
1881
1882func (t *Or_ServerCapabilities_diagnosticProvider) UnmarshalJSON(x []byte) error {
1883	if string(x) == "null" {
1884		t.Value = nil
1885		return nil
1886	}
1887	decoder174 := json.NewDecoder(bytes.NewReader(x))
1888	decoder174.DisallowUnknownFields()
1889	var h174 DiagnosticOptions
1890	if err := decoder174.Decode(&h174); err == nil {
1891		t.Value = h174
1892		return nil
1893	}
1894	decoder175 := json.NewDecoder(bytes.NewReader(x))
1895	decoder175.DisallowUnknownFields()
1896	var h175 DiagnosticRegistrationOptions
1897	if err := decoder175.Decode(&h175); err == nil {
1898		t.Value = h175
1899		return nil
1900	}
1901	return &UnmarshalError{"unmarshal failed to match one of [DiagnosticOptions DiagnosticRegistrationOptions]"}
1902}
1903
1904func (t Or_ServerCapabilities_documentFormattingProvider) MarshalJSON() ([]byte, error) {
1905	switch x := t.Value.(type) {
1906	case DocumentFormattingOptions:
1907		return json.Marshal(x)
1908	case bool:
1909		return json.Marshal(x)
1910	case nil:
1911		return []byte("null"), nil
1912	}
1913	return nil, fmt.Errorf("type %T not one of [DocumentFormattingOptions bool]", t)
1914}
1915
1916func (t *Or_ServerCapabilities_documentFormattingProvider) UnmarshalJSON(x []byte) error {
1917	if string(x) == "null" {
1918		t.Value = nil
1919		return nil
1920	}
1921	decoder120 := json.NewDecoder(bytes.NewReader(x))
1922	decoder120.DisallowUnknownFields()
1923	var boolVal bool
1924	if err := decoder120.Decode(&boolVal); err == nil {
1925		t.Value = boolVal
1926		return nil
1927	}
1928	decoder121 := json.NewDecoder(bytes.NewReader(x))
1929	decoder121.DisallowUnknownFields()
1930	var h121 DocumentFormattingOptions
1931	if err := decoder121.Decode(&h121); err == nil {
1932		t.Value = h121
1933		return nil
1934	}
1935	return &UnmarshalError{"unmarshal failed to match one of [DocumentFormattingOptions bool]"}
1936}
1937
1938func (t Or_ServerCapabilities_documentHighlightProvider) MarshalJSON() ([]byte, error) {
1939	switch x := t.Value.(type) {
1940	case DocumentHighlightOptions:
1941		return json.Marshal(x)
1942	case bool:
1943		return json.Marshal(x)
1944	case nil:
1945		return []byte("null"), nil
1946	}
1947	return nil, fmt.Errorf("type %T not one of [DocumentHighlightOptions bool]", t)
1948}
1949
1950func (t *Or_ServerCapabilities_documentHighlightProvider) UnmarshalJSON(x []byte) error {
1951	if string(x) == "null" {
1952		t.Value = nil
1953		return nil
1954	}
1955	decoder103 := json.NewDecoder(bytes.NewReader(x))
1956	decoder103.DisallowUnknownFields()
1957	var boolVal bool
1958	if err := decoder103.Decode(&boolVal); err == nil {
1959		t.Value = boolVal
1960		return nil
1961	}
1962	decoder104 := json.NewDecoder(bytes.NewReader(x))
1963	decoder104.DisallowUnknownFields()
1964	var h104 DocumentHighlightOptions
1965	if err := decoder104.Decode(&h104); err == nil {
1966		t.Value = h104
1967		return nil
1968	}
1969	return &UnmarshalError{"unmarshal failed to match one of [DocumentHighlightOptions bool]"}
1970}
1971
1972func (t Or_ServerCapabilities_documentRangeFormattingProvider) MarshalJSON() ([]byte, error) {
1973	switch x := t.Value.(type) {
1974	case DocumentRangeFormattingOptions:
1975		return json.Marshal(x)
1976	case bool:
1977		return json.Marshal(x)
1978	case nil:
1979		return []byte("null"), nil
1980	}
1981	return nil, fmt.Errorf("type %T not one of [DocumentRangeFormattingOptions bool]", t)
1982}
1983
1984func (t *Or_ServerCapabilities_documentRangeFormattingProvider) UnmarshalJSON(x []byte) error {
1985	if string(x) == "null" {
1986		t.Value = nil
1987		return nil
1988	}
1989	decoder123 := json.NewDecoder(bytes.NewReader(x))
1990	decoder123.DisallowUnknownFields()
1991	var boolVal bool
1992	if err := decoder123.Decode(&boolVal); err == nil {
1993		t.Value = boolVal
1994		return nil
1995	}
1996	decoder124 := json.NewDecoder(bytes.NewReader(x))
1997	decoder124.DisallowUnknownFields()
1998	var h124 DocumentRangeFormattingOptions
1999	if err := decoder124.Decode(&h124); err == nil {
2000		t.Value = h124
2001		return nil
2002	}
2003	return &UnmarshalError{"unmarshal failed to match one of [DocumentRangeFormattingOptions bool]"}
2004}
2005
2006func (t Or_ServerCapabilities_documentSymbolProvider) MarshalJSON() ([]byte, error) {
2007	switch x := t.Value.(type) {
2008	case DocumentSymbolOptions:
2009		return json.Marshal(x)
2010	case bool:
2011		return json.Marshal(x)
2012	case nil:
2013		return []byte("null"), nil
2014	}
2015	return nil, fmt.Errorf("type %T not one of [DocumentSymbolOptions bool]", t)
2016}
2017
2018func (t *Or_ServerCapabilities_documentSymbolProvider) UnmarshalJSON(x []byte) error {
2019	if string(x) == "null" {
2020		t.Value = nil
2021		return nil
2022	}
2023	decoder106 := json.NewDecoder(bytes.NewReader(x))
2024	decoder106.DisallowUnknownFields()
2025	var boolVal bool
2026	if err := decoder106.Decode(&boolVal); err == nil {
2027		t.Value = boolVal
2028		return nil
2029	}
2030	decoder107 := json.NewDecoder(bytes.NewReader(x))
2031	decoder107.DisallowUnknownFields()
2032	var h107 DocumentSymbolOptions
2033	if err := decoder107.Decode(&h107); err == nil {
2034		t.Value = h107
2035		return nil
2036	}
2037	return &UnmarshalError{"unmarshal failed to match one of [DocumentSymbolOptions bool]"}
2038}
2039
2040func (t Or_ServerCapabilities_foldingRangeProvider) MarshalJSON() ([]byte, error) {
2041	switch x := t.Value.(type) {
2042	case FoldingRangeOptions:
2043		return json.Marshal(x)
2044	case FoldingRangeRegistrationOptions:
2045		return json.Marshal(x)
2046	case bool:
2047		return json.Marshal(x)
2048	case nil:
2049		return []byte("null"), nil
2050	}
2051	return nil, fmt.Errorf("type %T not one of [FoldingRangeOptions FoldingRangeRegistrationOptions bool]", t)
2052}
2053
2054func (t *Or_ServerCapabilities_foldingRangeProvider) UnmarshalJSON(x []byte) error {
2055	if string(x) == "null" {
2056		t.Value = nil
2057		return nil
2058	}
2059	decoder130 := json.NewDecoder(bytes.NewReader(x))
2060	decoder130.DisallowUnknownFields()
2061	var boolVal bool
2062	if err := decoder130.Decode(&boolVal); err == nil {
2063		t.Value = boolVal
2064		return nil
2065	}
2066	decoder131 := json.NewDecoder(bytes.NewReader(x))
2067	decoder131.DisallowUnknownFields()
2068	var h131 FoldingRangeOptions
2069	if err := decoder131.Decode(&h131); err == nil {
2070		t.Value = h131
2071		return nil
2072	}
2073	decoder132 := json.NewDecoder(bytes.NewReader(x))
2074	decoder132.DisallowUnknownFields()
2075	var h132 FoldingRangeRegistrationOptions
2076	if err := decoder132.Decode(&h132); err == nil {
2077		t.Value = h132
2078		return nil
2079	}
2080	return &UnmarshalError{"unmarshal failed to match one of [FoldingRangeOptions FoldingRangeRegistrationOptions bool]"}
2081}
2082
2083func (t Or_ServerCapabilities_hoverProvider) MarshalJSON() ([]byte, error) {
2084	switch x := t.Value.(type) {
2085	case HoverOptions:
2086		return json.Marshal(x)
2087	case bool:
2088		return json.Marshal(x)
2089	case nil:
2090		return []byte("null"), nil
2091	}
2092	return nil, fmt.Errorf("type %T not one of [HoverOptions bool]", t)
2093}
2094
2095func (t *Or_ServerCapabilities_hoverProvider) UnmarshalJSON(x []byte) error {
2096	if string(x) == "null" {
2097		t.Value = nil
2098		return nil
2099	}
2100	decoder79 := json.NewDecoder(bytes.NewReader(x))
2101	decoder79.DisallowUnknownFields()
2102	var boolVal bool
2103	if err := decoder79.Decode(&boolVal); err == nil {
2104		t.Value = boolVal
2105		return nil
2106	}
2107	decoder80 := json.NewDecoder(bytes.NewReader(x))
2108	decoder80.DisallowUnknownFields()
2109	var h80 HoverOptions
2110	if err := decoder80.Decode(&h80); err == nil {
2111		t.Value = h80
2112		return nil
2113	}
2114	return &UnmarshalError{"unmarshal failed to match one of [HoverOptions bool]"}
2115}
2116
2117func (t Or_ServerCapabilities_implementationProvider) MarshalJSON() ([]byte, error) {
2118	switch x := t.Value.(type) {
2119	case ImplementationOptions:
2120		return json.Marshal(x)
2121	case ImplementationRegistrationOptions:
2122		return json.Marshal(x)
2123	case bool:
2124		return json.Marshal(x)
2125	case nil:
2126		return []byte("null"), nil
2127	}
2128	return nil, fmt.Errorf("type %T not one of [ImplementationOptions ImplementationRegistrationOptions bool]", t)
2129}
2130
2131func (t *Or_ServerCapabilities_implementationProvider) UnmarshalJSON(x []byte) error {
2132	if string(x) == "null" {
2133		t.Value = nil
2134		return nil
2135	}
2136	decoder96 := json.NewDecoder(bytes.NewReader(x))
2137	decoder96.DisallowUnknownFields()
2138	var boolVal bool
2139	if err := decoder96.Decode(&boolVal); err == nil {
2140		t.Value = boolVal
2141		return nil
2142	}
2143	decoder97 := json.NewDecoder(bytes.NewReader(x))
2144	decoder97.DisallowUnknownFields()
2145	var h97 ImplementationOptions
2146	if err := decoder97.Decode(&h97); err == nil {
2147		t.Value = h97
2148		return nil
2149	}
2150	decoder98 := json.NewDecoder(bytes.NewReader(x))
2151	decoder98.DisallowUnknownFields()
2152	var h98 ImplementationRegistrationOptions
2153	if err := decoder98.Decode(&h98); err == nil {
2154		t.Value = h98
2155		return nil
2156	}
2157	return &UnmarshalError{"unmarshal failed to match one of [ImplementationOptions ImplementationRegistrationOptions bool]"}
2158}
2159
2160func (t Or_ServerCapabilities_inlayHintProvider) MarshalJSON() ([]byte, error) {
2161	switch x := t.Value.(type) {
2162	case InlayHintOptions:
2163		return json.Marshal(x)
2164	case InlayHintRegistrationOptions:
2165		return json.Marshal(x)
2166	case bool:
2167		return json.Marshal(x)
2168	case nil:
2169		return []byte("null"), nil
2170	}
2171	return nil, fmt.Errorf("type %T not one of [InlayHintOptions InlayHintRegistrationOptions bool]", t)
2172}
2173
2174func (t *Or_ServerCapabilities_inlayHintProvider) UnmarshalJSON(x []byte) error {
2175	if string(x) == "null" {
2176		t.Value = nil
2177		return nil
2178	}
2179	decoder169 := json.NewDecoder(bytes.NewReader(x))
2180	decoder169.DisallowUnknownFields()
2181	var boolVal bool
2182	if err := decoder169.Decode(&boolVal); err == nil {
2183		t.Value = boolVal
2184		return nil
2185	}
2186	decoder170 := json.NewDecoder(bytes.NewReader(x))
2187	decoder170.DisallowUnknownFields()
2188	var h170 InlayHintOptions
2189	if err := decoder170.Decode(&h170); err == nil {
2190		t.Value = h170
2191		return nil
2192	}
2193	decoder171 := json.NewDecoder(bytes.NewReader(x))
2194	decoder171.DisallowUnknownFields()
2195	var h171 InlayHintRegistrationOptions
2196	if err := decoder171.Decode(&h171); err == nil {
2197		t.Value = h171
2198		return nil
2199	}
2200	return &UnmarshalError{"unmarshal failed to match one of [InlayHintOptions InlayHintRegistrationOptions bool]"}
2201}
2202
2203func (t Or_ServerCapabilities_inlineCompletionProvider) MarshalJSON() ([]byte, error) {
2204	switch x := t.Value.(type) {
2205	case InlineCompletionOptions:
2206		return json.Marshal(x)
2207	case bool:
2208		return json.Marshal(x)
2209	case nil:
2210		return []byte("null"), nil
2211	}
2212	return nil, fmt.Errorf("type %T not one of [InlineCompletionOptions bool]", t)
2213}
2214
2215func (t *Or_ServerCapabilities_inlineCompletionProvider) UnmarshalJSON(x []byte) error {
2216	if string(x) == "null" {
2217		t.Value = nil
2218		return nil
2219	}
2220	decoder177 := json.NewDecoder(bytes.NewReader(x))
2221	decoder177.DisallowUnknownFields()
2222	var boolVal bool
2223	if err := decoder177.Decode(&boolVal); err == nil {
2224		t.Value = boolVal
2225		return nil
2226	}
2227	decoder178 := json.NewDecoder(bytes.NewReader(x))
2228	decoder178.DisallowUnknownFields()
2229	var h178 InlineCompletionOptions
2230	if err := decoder178.Decode(&h178); err == nil {
2231		t.Value = h178
2232		return nil
2233	}
2234	return &UnmarshalError{"unmarshal failed to match one of [InlineCompletionOptions bool]"}
2235}
2236
2237func (t Or_ServerCapabilities_inlineValueProvider) MarshalJSON() ([]byte, error) {
2238	switch x := t.Value.(type) {
2239	case InlineValueOptions:
2240		return json.Marshal(x)
2241	case InlineValueRegistrationOptions:
2242		return json.Marshal(x)
2243	case bool:
2244		return json.Marshal(x)
2245	case nil:
2246		return []byte("null"), nil
2247	}
2248	return nil, fmt.Errorf("type %T not one of [InlineValueOptions InlineValueRegistrationOptions bool]", t)
2249}
2250
2251func (t *Or_ServerCapabilities_inlineValueProvider) UnmarshalJSON(x []byte) error {
2252	if string(x) == "null" {
2253		t.Value = nil
2254		return nil
2255	}
2256	decoder164 := json.NewDecoder(bytes.NewReader(x))
2257	decoder164.DisallowUnknownFields()
2258	var boolVal bool
2259	if err := decoder164.Decode(&boolVal); err == nil {
2260		t.Value = boolVal
2261		return nil
2262	}
2263	decoder165 := json.NewDecoder(bytes.NewReader(x))
2264	decoder165.DisallowUnknownFields()
2265	var h165 InlineValueOptions
2266	if err := decoder165.Decode(&h165); err == nil {
2267		t.Value = h165
2268		return nil
2269	}
2270	decoder166 := json.NewDecoder(bytes.NewReader(x))
2271	decoder166.DisallowUnknownFields()
2272	var h166 InlineValueRegistrationOptions
2273	if err := decoder166.Decode(&h166); err == nil {
2274		t.Value = h166
2275		return nil
2276	}
2277	return &UnmarshalError{"unmarshal failed to match one of [InlineValueOptions InlineValueRegistrationOptions bool]"}
2278}
2279
2280func (t Or_ServerCapabilities_linkedEditingRangeProvider) MarshalJSON() ([]byte, error) {
2281	switch x := t.Value.(type) {
2282	case LinkedEditingRangeOptions:
2283		return json.Marshal(x)
2284	case LinkedEditingRangeRegistrationOptions:
2285		return json.Marshal(x)
2286	case bool:
2287		return json.Marshal(x)
2288	case nil:
2289		return []byte("null"), nil
2290	}
2291	return nil, fmt.Errorf("type %T not one of [LinkedEditingRangeOptions LinkedEditingRangeRegistrationOptions bool]", t)
2292}
2293
2294func (t *Or_ServerCapabilities_linkedEditingRangeProvider) UnmarshalJSON(x []byte) error {
2295	if string(x) == "null" {
2296		t.Value = nil
2297		return nil
2298	}
2299	decoder145 := json.NewDecoder(bytes.NewReader(x))
2300	decoder145.DisallowUnknownFields()
2301	var boolVal bool
2302	if err := decoder145.Decode(&boolVal); err == nil {
2303		t.Value = boolVal
2304		return nil
2305	}
2306	decoder146 := json.NewDecoder(bytes.NewReader(x))
2307	decoder146.DisallowUnknownFields()
2308	var h146 LinkedEditingRangeOptions
2309	if err := decoder146.Decode(&h146); err == nil {
2310		t.Value = h146
2311		return nil
2312	}
2313	decoder147 := json.NewDecoder(bytes.NewReader(x))
2314	decoder147.DisallowUnknownFields()
2315	var h147 LinkedEditingRangeRegistrationOptions
2316	if err := decoder147.Decode(&h147); err == nil {
2317		t.Value = h147
2318		return nil
2319	}
2320	return &UnmarshalError{"unmarshal failed to match one of [LinkedEditingRangeOptions LinkedEditingRangeRegistrationOptions bool]"}
2321}
2322
2323func (t Or_ServerCapabilities_monikerProvider) MarshalJSON() ([]byte, error) {
2324	switch x := t.Value.(type) {
2325	case MonikerOptions:
2326		return json.Marshal(x)
2327	case MonikerRegistrationOptions:
2328		return json.Marshal(x)
2329	case bool:
2330		return json.Marshal(x)
2331	case nil:
2332		return []byte("null"), nil
2333	}
2334	return nil, fmt.Errorf("type %T not one of [MonikerOptions MonikerRegistrationOptions bool]", t)
2335}
2336
2337func (t *Or_ServerCapabilities_monikerProvider) UnmarshalJSON(x []byte) error {
2338	if string(x) == "null" {
2339		t.Value = nil
2340		return nil
2341	}
2342	decoder154 := json.NewDecoder(bytes.NewReader(x))
2343	decoder154.DisallowUnknownFields()
2344	var boolVal bool
2345	if err := decoder154.Decode(&boolVal); err == nil {
2346		t.Value = boolVal
2347		return nil
2348	}
2349	decoder155 := json.NewDecoder(bytes.NewReader(x))
2350	decoder155.DisallowUnknownFields()
2351	var h155 MonikerOptions
2352	if err := decoder155.Decode(&h155); err == nil {
2353		t.Value = h155
2354		return nil
2355	}
2356	decoder156 := json.NewDecoder(bytes.NewReader(x))
2357	decoder156.DisallowUnknownFields()
2358	var h156 MonikerRegistrationOptions
2359	if err := decoder156.Decode(&h156); err == nil {
2360		t.Value = h156
2361		return nil
2362	}
2363	return &UnmarshalError{"unmarshal failed to match one of [MonikerOptions MonikerRegistrationOptions bool]"}
2364}
2365
2366func (t Or_ServerCapabilities_notebookDocumentSync) MarshalJSON() ([]byte, error) {
2367	switch x := t.Value.(type) {
2368	case NotebookDocumentSyncOptions:
2369		return json.Marshal(x)
2370	case NotebookDocumentSyncRegistrationOptions:
2371		return json.Marshal(x)
2372	case nil:
2373		return []byte("null"), nil
2374	}
2375	return nil, fmt.Errorf("type %T not one of [NotebookDocumentSyncOptions NotebookDocumentSyncRegistrationOptions]", t)
2376}
2377
2378func (t *Or_ServerCapabilities_notebookDocumentSync) UnmarshalJSON(x []byte) error {
2379	if string(x) == "null" {
2380		t.Value = nil
2381		return nil
2382	}
2383	decoder76 := json.NewDecoder(bytes.NewReader(x))
2384	decoder76.DisallowUnknownFields()
2385	var h76 NotebookDocumentSyncOptions
2386	if err := decoder76.Decode(&h76); err == nil {
2387		t.Value = h76
2388		return nil
2389	}
2390	decoder77 := json.NewDecoder(bytes.NewReader(x))
2391	decoder77.DisallowUnknownFields()
2392	var h77 NotebookDocumentSyncRegistrationOptions
2393	if err := decoder77.Decode(&h77); err == nil {
2394		t.Value = h77
2395		return nil
2396	}
2397	return &UnmarshalError{"unmarshal failed to match one of [NotebookDocumentSyncOptions NotebookDocumentSyncRegistrationOptions]"}
2398}
2399
2400func (t Or_ServerCapabilities_referencesProvider) MarshalJSON() ([]byte, error) {
2401	switch x := t.Value.(type) {
2402	case ReferenceOptions:
2403		return json.Marshal(x)
2404	case bool:
2405		return json.Marshal(x)
2406	case nil:
2407		return []byte("null"), nil
2408	}
2409	return nil, fmt.Errorf("type %T not one of [ReferenceOptions bool]", t)
2410}
2411
2412func (t *Or_ServerCapabilities_referencesProvider) UnmarshalJSON(x []byte) error {
2413	if string(x) == "null" {
2414		t.Value = nil
2415		return nil
2416	}
2417	decoder100 := json.NewDecoder(bytes.NewReader(x))
2418	decoder100.DisallowUnknownFields()
2419	var boolVal bool
2420	if err := decoder100.Decode(&boolVal); err == nil {
2421		t.Value = boolVal
2422		return nil
2423	}
2424	decoder101 := json.NewDecoder(bytes.NewReader(x))
2425	decoder101.DisallowUnknownFields()
2426	var h101 ReferenceOptions
2427	if err := decoder101.Decode(&h101); err == nil {
2428		t.Value = h101
2429		return nil
2430	}
2431	return &UnmarshalError{"unmarshal failed to match one of [ReferenceOptions bool]"}
2432}
2433
2434func (t Or_ServerCapabilities_renameProvider) MarshalJSON() ([]byte, error) {
2435	switch x := t.Value.(type) {
2436	case RenameOptions:
2437		return json.Marshal(x)
2438	case bool:
2439		return json.Marshal(x)
2440	case nil:
2441		return []byte("null"), nil
2442	}
2443	return nil, fmt.Errorf("type %T not one of [RenameOptions bool]", t)
2444}
2445
2446func (t *Or_ServerCapabilities_renameProvider) UnmarshalJSON(x []byte) error {
2447	if string(x) == "null" {
2448		t.Value = nil
2449		return nil
2450	}
2451	decoder126 := json.NewDecoder(bytes.NewReader(x))
2452	decoder126.DisallowUnknownFields()
2453	var boolVal bool
2454	if err := decoder126.Decode(&boolVal); err == nil {
2455		t.Value = boolVal
2456		return nil
2457	}
2458	decoder127 := json.NewDecoder(bytes.NewReader(x))
2459	decoder127.DisallowUnknownFields()
2460	var h127 RenameOptions
2461	if err := decoder127.Decode(&h127); err == nil {
2462		t.Value = h127
2463		return nil
2464	}
2465	return &UnmarshalError{"unmarshal failed to match one of [RenameOptions bool]"}
2466}
2467
2468func (t Or_ServerCapabilities_selectionRangeProvider) MarshalJSON() ([]byte, error) {
2469	switch x := t.Value.(type) {
2470	case SelectionRangeOptions:
2471		return json.Marshal(x)
2472	case SelectionRangeRegistrationOptions:
2473		return json.Marshal(x)
2474	case bool:
2475		return json.Marshal(x)
2476	case nil:
2477		return []byte("null"), nil
2478	}
2479	return nil, fmt.Errorf("type %T not one of [SelectionRangeOptions SelectionRangeRegistrationOptions bool]", t)
2480}
2481
2482func (t *Or_ServerCapabilities_selectionRangeProvider) UnmarshalJSON(x []byte) error {
2483	if string(x) == "null" {
2484		t.Value = nil
2485		return nil
2486	}
2487	decoder135 := json.NewDecoder(bytes.NewReader(x))
2488	decoder135.DisallowUnknownFields()
2489	var boolVal bool
2490	if err := decoder135.Decode(&boolVal); err == nil {
2491		t.Value = boolVal
2492		return nil
2493	}
2494	decoder136 := json.NewDecoder(bytes.NewReader(x))
2495	decoder136.DisallowUnknownFields()
2496	var h136 SelectionRangeOptions
2497	if err := decoder136.Decode(&h136); err == nil {
2498		t.Value = h136
2499		return nil
2500	}
2501	decoder137 := json.NewDecoder(bytes.NewReader(x))
2502	decoder137.DisallowUnknownFields()
2503	var h137 SelectionRangeRegistrationOptions
2504	if err := decoder137.Decode(&h137); err == nil {
2505		t.Value = h137
2506		return nil
2507	}
2508	return &UnmarshalError{"unmarshal failed to match one of [SelectionRangeOptions SelectionRangeRegistrationOptions bool]"}
2509}
2510
2511func (t Or_ServerCapabilities_semanticTokensProvider) MarshalJSON() ([]byte, error) {
2512	switch x := t.Value.(type) {
2513	case SemanticTokensOptions:
2514		return json.Marshal(x)
2515	case SemanticTokensRegistrationOptions:
2516		return json.Marshal(x)
2517	case nil:
2518		return []byte("null"), nil
2519	}
2520	return nil, fmt.Errorf("type %T not one of [SemanticTokensOptions SemanticTokensRegistrationOptions]", t)
2521}
2522
2523func (t *Or_ServerCapabilities_semanticTokensProvider) UnmarshalJSON(x []byte) error {
2524	if string(x) == "null" {
2525		t.Value = nil
2526		return nil
2527	}
2528	decoder150 := json.NewDecoder(bytes.NewReader(x))
2529	decoder150.DisallowUnknownFields()
2530	var h150 SemanticTokensOptions
2531	if err := decoder150.Decode(&h150); err == nil {
2532		t.Value = h150
2533		return nil
2534	}
2535	decoder151 := json.NewDecoder(bytes.NewReader(x))
2536	decoder151.DisallowUnknownFields()
2537	var h151 SemanticTokensRegistrationOptions
2538	if err := decoder151.Decode(&h151); err == nil {
2539		t.Value = h151
2540		return nil
2541	}
2542	return &UnmarshalError{"unmarshal failed to match one of [SemanticTokensOptions SemanticTokensRegistrationOptions]"}
2543}
2544
2545func (t Or_ServerCapabilities_textDocumentSync) MarshalJSON() ([]byte, error) {
2546	switch x := t.Value.(type) {
2547	case TextDocumentSyncKind:
2548		return json.Marshal(x)
2549	case TextDocumentSyncOptions:
2550		return json.Marshal(x)
2551	case nil:
2552		return []byte("null"), nil
2553	}
2554	return nil, fmt.Errorf("type %T not one of [TextDocumentSyncKind TextDocumentSyncOptions]", t)
2555}
2556
2557func (t *Or_ServerCapabilities_textDocumentSync) UnmarshalJSON(x []byte) error {
2558	if string(x) == "null" {
2559		t.Value = nil
2560		return nil
2561	}
2562	decoder72 := json.NewDecoder(bytes.NewReader(x))
2563	decoder72.DisallowUnknownFields()
2564	var h72 TextDocumentSyncKind
2565	if err := decoder72.Decode(&h72); err == nil {
2566		t.Value = h72
2567		return nil
2568	}
2569	decoder73 := json.NewDecoder(bytes.NewReader(x))
2570	decoder73.DisallowUnknownFields()
2571	var h73 TextDocumentSyncOptions
2572	if err := decoder73.Decode(&h73); err == nil {
2573		t.Value = h73
2574		return nil
2575	}
2576	return &UnmarshalError{"unmarshal failed to match one of [TextDocumentSyncKind TextDocumentSyncOptions]"}
2577}
2578
2579func (t Or_ServerCapabilities_typeDefinitionProvider) MarshalJSON() ([]byte, error) {
2580	switch x := t.Value.(type) {
2581	case TypeDefinitionOptions:
2582		return json.Marshal(x)
2583	case TypeDefinitionRegistrationOptions:
2584		return json.Marshal(x)
2585	case bool:
2586		return json.Marshal(x)
2587	case nil:
2588		return []byte("null"), nil
2589	}
2590	return nil, fmt.Errorf("type %T not one of [TypeDefinitionOptions TypeDefinitionRegistrationOptions bool]", t)
2591}
2592
2593func (t *Or_ServerCapabilities_typeDefinitionProvider) UnmarshalJSON(x []byte) error {
2594	if string(x) == "null" {
2595		t.Value = nil
2596		return nil
2597	}
2598	decoder91 := json.NewDecoder(bytes.NewReader(x))
2599	decoder91.DisallowUnknownFields()
2600	var boolVal bool
2601	if err := decoder91.Decode(&boolVal); err == nil {
2602		t.Value = boolVal
2603		return nil
2604	}
2605	decoder92 := json.NewDecoder(bytes.NewReader(x))
2606	decoder92.DisallowUnknownFields()
2607	var h92 TypeDefinitionOptions
2608	if err := decoder92.Decode(&h92); err == nil {
2609		t.Value = h92
2610		return nil
2611	}
2612	decoder93 := json.NewDecoder(bytes.NewReader(x))
2613	decoder93.DisallowUnknownFields()
2614	var h93 TypeDefinitionRegistrationOptions
2615	if err := decoder93.Decode(&h93); err == nil {
2616		t.Value = h93
2617		return nil
2618	}
2619	return &UnmarshalError{"unmarshal failed to match one of [TypeDefinitionOptions TypeDefinitionRegistrationOptions bool]"}
2620}
2621
2622func (t Or_ServerCapabilities_typeHierarchyProvider) MarshalJSON() ([]byte, error) {
2623	switch x := t.Value.(type) {
2624	case TypeHierarchyOptions:
2625		return json.Marshal(x)
2626	case TypeHierarchyRegistrationOptions:
2627		return json.Marshal(x)
2628	case bool:
2629		return json.Marshal(x)
2630	case nil:
2631		return []byte("null"), nil
2632	}
2633	return nil, fmt.Errorf("type %T not one of [TypeHierarchyOptions TypeHierarchyRegistrationOptions bool]", t)
2634}
2635
2636func (t *Or_ServerCapabilities_typeHierarchyProvider) UnmarshalJSON(x []byte) error {
2637	if string(x) == "null" {
2638		t.Value = nil
2639		return nil
2640	}
2641	decoder159 := json.NewDecoder(bytes.NewReader(x))
2642	decoder159.DisallowUnknownFields()
2643	var boolVal bool
2644	if err := decoder159.Decode(&boolVal); err == nil {
2645		t.Value = boolVal
2646		return nil
2647	}
2648	decoder160 := json.NewDecoder(bytes.NewReader(x))
2649	decoder160.DisallowUnknownFields()
2650	var h160 TypeHierarchyOptions
2651	if err := decoder160.Decode(&h160); err == nil {
2652		t.Value = h160
2653		return nil
2654	}
2655	decoder161 := json.NewDecoder(bytes.NewReader(x))
2656	decoder161.DisallowUnknownFields()
2657	var h161 TypeHierarchyRegistrationOptions
2658	if err := decoder161.Decode(&h161); err == nil {
2659		t.Value = h161
2660		return nil
2661	}
2662	return &UnmarshalError{"unmarshal failed to match one of [TypeHierarchyOptions TypeHierarchyRegistrationOptions bool]"}
2663}
2664
2665func (t Or_ServerCapabilities_workspaceSymbolProvider) MarshalJSON() ([]byte, error) {
2666	switch x := t.Value.(type) {
2667	case WorkspaceSymbolOptions:
2668		return json.Marshal(x)
2669	case bool:
2670		return json.Marshal(x)
2671	case nil:
2672		return []byte("null"), nil
2673	}
2674	return nil, fmt.Errorf("type %T not one of [WorkspaceSymbolOptions bool]", t)
2675}
2676
2677func (t *Or_ServerCapabilities_workspaceSymbolProvider) UnmarshalJSON(x []byte) error {
2678	if string(x) == "null" {
2679		t.Value = nil
2680		return nil
2681	}
2682	decoder117 := json.NewDecoder(bytes.NewReader(x))
2683	decoder117.DisallowUnknownFields()
2684	var boolVal bool
2685	if err := decoder117.Decode(&boolVal); err == nil {
2686		t.Value = boolVal
2687		return nil
2688	}
2689	decoder118 := json.NewDecoder(bytes.NewReader(x))
2690	decoder118.DisallowUnknownFields()
2691	var h118 WorkspaceSymbolOptions
2692	if err := decoder118.Decode(&h118); err == nil {
2693		t.Value = h118
2694		return nil
2695	}
2696	return &UnmarshalError{"unmarshal failed to match one of [WorkspaceSymbolOptions bool]"}
2697}
2698
2699func (t Or_SignatureInformation_documentation) MarshalJSON() ([]byte, error) {
2700	switch x := t.Value.(type) {
2701	case MarkupContent:
2702		return json.Marshal(x)
2703	case string:
2704		return json.Marshal(x)
2705	case nil:
2706		return []byte("null"), nil
2707	}
2708	return nil, fmt.Errorf("type %T not one of [MarkupContent string]", t)
2709}
2710
2711func (t *Or_SignatureInformation_documentation) UnmarshalJSON(x []byte) error {
2712	if string(x) == "null" {
2713		t.Value = nil
2714		return nil
2715	}
2716	decoder186 := json.NewDecoder(bytes.NewReader(x))
2717	decoder186.DisallowUnknownFields()
2718	var stringVal string
2719	if err := decoder186.Decode(&stringVal); err == nil {
2720		t.Value = stringVal
2721		return nil
2722	}
2723	decoder187 := json.NewDecoder(bytes.NewReader(x))
2724	decoder187.DisallowUnknownFields()
2725	var h187 MarkupContent
2726	if err := decoder187.Decode(&h187); err == nil {
2727		t.Value = h187
2728		return nil
2729	}
2730	return &UnmarshalError{"unmarshal failed to match one of [MarkupContent string]"}
2731}
2732
2733func (t Or_TextDocumentContentChangeEvent) MarshalJSON() ([]byte, error) {
2734	switch x := t.Value.(type) {
2735	case TextDocumentContentChangePartial:
2736		return json.Marshal(x)
2737	case TextDocumentContentChangeWholeDocument:
2738		return json.Marshal(x)
2739	case nil:
2740		return []byte("null"), nil
2741	}
2742	return nil, fmt.Errorf("type %T not one of [TextDocumentContentChangePartial TextDocumentContentChangeWholeDocument]", t)
2743}
2744
2745func (t *Or_TextDocumentContentChangeEvent) UnmarshalJSON(x []byte) error {
2746	if string(x) == "null" {
2747		t.Value = nil
2748		return nil
2749	}
2750	decoder263 := json.NewDecoder(bytes.NewReader(x))
2751	decoder263.DisallowUnknownFields()
2752	var h263 TextDocumentContentChangePartial
2753	if err := decoder263.Decode(&h263); err == nil {
2754		t.Value = h263
2755		return nil
2756	}
2757	decoder264 := json.NewDecoder(bytes.NewReader(x))
2758	decoder264.DisallowUnknownFields()
2759	var h264 TextDocumentContentChangeWholeDocument
2760	if err := decoder264.Decode(&h264); err == nil {
2761		t.Value = h264
2762		return nil
2763	}
2764	return &UnmarshalError{"unmarshal failed to match one of [TextDocumentContentChangePartial TextDocumentContentChangeWholeDocument]"}
2765}
2766
2767func (t Or_TextDocumentEdit_edits_Elem) MarshalJSON() ([]byte, error) {
2768	switch x := t.Value.(type) {
2769	case AnnotatedTextEdit:
2770		return json.Marshal(x)
2771	case SnippetTextEdit:
2772		return json.Marshal(x)
2773	case TextEdit:
2774		return json.Marshal(x)
2775	case nil:
2776		return []byte("null"), nil
2777	}
2778	return nil, fmt.Errorf("type %T not one of [AnnotatedTextEdit SnippetTextEdit TextEdit]", t)
2779}
2780
2781func (t *Or_TextDocumentEdit_edits_Elem) UnmarshalJSON(x []byte) error {
2782	if string(x) == "null" {
2783		t.Value = nil
2784		return nil
2785	}
2786	decoder52 := json.NewDecoder(bytes.NewReader(x))
2787	decoder52.DisallowUnknownFields()
2788	var h52 AnnotatedTextEdit
2789	if err := decoder52.Decode(&h52); err == nil {
2790		t.Value = h52
2791		return nil
2792	}
2793	decoder53 := json.NewDecoder(bytes.NewReader(x))
2794	decoder53.DisallowUnknownFields()
2795	var h53 SnippetTextEdit
2796	if err := decoder53.Decode(&h53); err == nil {
2797		t.Value = h53
2798		return nil
2799	}
2800	decoder54 := json.NewDecoder(bytes.NewReader(x))
2801	decoder54.DisallowUnknownFields()
2802	var h54 TextEdit
2803	if err := decoder54.Decode(&h54); err == nil {
2804		t.Value = h54
2805		return nil
2806	}
2807	return &UnmarshalError{"unmarshal failed to match one of [AnnotatedTextEdit SnippetTextEdit TextEdit]"}
2808}
2809
2810func (t Or_TextDocumentFilter) MarshalJSON() ([]byte, error) {
2811	switch x := t.Value.(type) {
2812	case TextDocumentFilterLanguage:
2813		return json.Marshal(x)
2814	case TextDocumentFilterPattern:
2815		return json.Marshal(x)
2816	case TextDocumentFilterScheme:
2817		return json.Marshal(x)
2818	case nil:
2819		return []byte("null"), nil
2820	}
2821	return nil, fmt.Errorf("type %T not one of [TextDocumentFilterLanguage TextDocumentFilterPattern TextDocumentFilterScheme]", t)
2822}
2823
2824func (t *Or_TextDocumentFilter) UnmarshalJSON(x []byte) error {
2825	if string(x) == "null" {
2826		t.Value = nil
2827		return nil
2828	}
2829	decoder279 := json.NewDecoder(bytes.NewReader(x))
2830	decoder279.DisallowUnknownFields()
2831	var h279 TextDocumentFilterLanguage
2832	if err := decoder279.Decode(&h279); err == nil {
2833		t.Value = h279
2834		return nil
2835	}
2836	decoder280 := json.NewDecoder(bytes.NewReader(x))
2837	decoder280.DisallowUnknownFields()
2838	var h280 TextDocumentFilterPattern
2839	if err := decoder280.Decode(&h280); err == nil {
2840		t.Value = h280
2841		return nil
2842	}
2843	decoder281 := json.NewDecoder(bytes.NewReader(x))
2844	decoder281.DisallowUnknownFields()
2845	var h281 TextDocumentFilterScheme
2846	if err := decoder281.Decode(&h281); err == nil {
2847		t.Value = h281
2848		return nil
2849	}
2850	return &UnmarshalError{"unmarshal failed to match one of [TextDocumentFilterLanguage TextDocumentFilterPattern TextDocumentFilterScheme]"}
2851}
2852
2853func (t Or_TextDocumentSyncOptions_save) MarshalJSON() ([]byte, error) {
2854	switch x := t.Value.(type) {
2855	case SaveOptions:
2856		return json.Marshal(x)
2857	case bool:
2858		return json.Marshal(x)
2859	case nil:
2860		return []byte("null"), nil
2861	}
2862	return nil, fmt.Errorf("type %T not one of [SaveOptions bool]", t)
2863}
2864
2865func (t *Or_TextDocumentSyncOptions_save) UnmarshalJSON(x []byte) error {
2866	if string(x) == "null" {
2867		t.Value = nil
2868		return nil
2869	}
2870	decoder195 := json.NewDecoder(bytes.NewReader(x))
2871	decoder195.DisallowUnknownFields()
2872	var boolVal bool
2873	if err := decoder195.Decode(&boolVal); err == nil {
2874		t.Value = boolVal
2875		return nil
2876	}
2877	decoder196 := json.NewDecoder(bytes.NewReader(x))
2878	decoder196.DisallowUnknownFields()
2879	var h196 SaveOptions
2880	if err := decoder196.Decode(&h196); err == nil {
2881		t.Value = h196
2882		return nil
2883	}
2884	return &UnmarshalError{"unmarshal failed to match one of [SaveOptions bool]"}
2885}
2886
2887func (t Or_WorkspaceDocumentDiagnosticReport) MarshalJSON() ([]byte, error) {
2888	switch x := t.Value.(type) {
2889	case WorkspaceFullDocumentDiagnosticReport:
2890		return json.Marshal(x)
2891	case WorkspaceUnchangedDocumentDiagnosticReport:
2892		return json.Marshal(x)
2893	case nil:
2894		return []byte("null"), nil
2895	}
2896	return nil, fmt.Errorf("type %T not one of [WorkspaceFullDocumentDiagnosticReport WorkspaceUnchangedDocumentDiagnosticReport]", t)
2897}
2898
2899func (t *Or_WorkspaceDocumentDiagnosticReport) UnmarshalJSON(x []byte) error {
2900	if string(x) == "null" {
2901		t.Value = nil
2902		return nil
2903	}
2904	decoder259 := json.NewDecoder(bytes.NewReader(x))
2905	decoder259.DisallowUnknownFields()
2906	var h259 WorkspaceFullDocumentDiagnosticReport
2907	if err := decoder259.Decode(&h259); err == nil {
2908		t.Value = h259
2909		return nil
2910	}
2911	decoder260 := json.NewDecoder(bytes.NewReader(x))
2912	decoder260.DisallowUnknownFields()
2913	var h260 WorkspaceUnchangedDocumentDiagnosticReport
2914	if err := decoder260.Decode(&h260); err == nil {
2915		t.Value = h260
2916		return nil
2917	}
2918	return &UnmarshalError{"unmarshal failed to match one of [WorkspaceFullDocumentDiagnosticReport WorkspaceUnchangedDocumentDiagnosticReport]"}
2919}
2920
2921func (t Or_WorkspaceEdit_documentChanges_Elem) MarshalJSON() ([]byte, error) {
2922	switch x := t.Value.(type) {
2923	case CreateFile:
2924		return json.Marshal(x)
2925	case DeleteFile:
2926		return json.Marshal(x)
2927	case RenameFile:
2928		return json.Marshal(x)
2929	case TextDocumentEdit:
2930		return json.Marshal(x)
2931	case nil:
2932		return []byte("null"), nil
2933	}
2934	return nil, fmt.Errorf("type %T not one of [CreateFile DeleteFile RenameFile TextDocumentEdit]", t)
2935}
2936
2937func (t *Or_WorkspaceEdit_documentChanges_Elem) UnmarshalJSON(x []byte) error {
2938	if string(x) == "null" {
2939		t.Value = nil
2940		return nil
2941	}
2942	decoder4 := json.NewDecoder(bytes.NewReader(x))
2943	decoder4.DisallowUnknownFields()
2944	var h4 CreateFile
2945	if err := decoder4.Decode(&h4); err == nil {
2946		t.Value = h4
2947		return nil
2948	}
2949	decoder5 := json.NewDecoder(bytes.NewReader(x))
2950	decoder5.DisallowUnknownFields()
2951	var h5 DeleteFile
2952	if err := decoder5.Decode(&h5); err == nil {
2953		t.Value = h5
2954		return nil
2955	}
2956	decoder6 := json.NewDecoder(bytes.NewReader(x))
2957	decoder6.DisallowUnknownFields()
2958	var h6 RenameFile
2959	if err := decoder6.Decode(&h6); err == nil {
2960		t.Value = h6
2961		return nil
2962	}
2963	decoder7 := json.NewDecoder(bytes.NewReader(x))
2964	decoder7.DisallowUnknownFields()
2965	var h7 TextDocumentEdit
2966	if err := decoder7.Decode(&h7); err == nil {
2967		t.Value = h7
2968		return nil
2969	}
2970	return &UnmarshalError{"unmarshal failed to match one of [CreateFile DeleteFile RenameFile TextDocumentEdit]"}
2971}
2972
2973func (t Or_WorkspaceFoldersServerCapabilities_changeNotifications) MarshalJSON() ([]byte, error) {
2974	switch x := t.Value.(type) {
2975	case bool:
2976		return json.Marshal(x)
2977	case string:
2978		return json.Marshal(x)
2979	case nil:
2980		return []byte("null"), nil
2981	}
2982	return nil, fmt.Errorf("type %T not one of [bool string]", t)
2983}
2984
2985func (t *Or_WorkspaceFoldersServerCapabilities_changeNotifications) UnmarshalJSON(x []byte) error {
2986	if string(x) == "null" {
2987		t.Value = nil
2988		return nil
2989	}
2990	decoder210 := json.NewDecoder(bytes.NewReader(x))
2991	decoder210.DisallowUnknownFields()
2992	var boolVal bool
2993	if err := decoder210.Decode(&boolVal); err == nil {
2994		t.Value = boolVal
2995		return nil
2996	}
2997	decoder211 := json.NewDecoder(bytes.NewReader(x))
2998	decoder211.DisallowUnknownFields()
2999	var stringVal string
3000	if err := decoder211.Decode(&stringVal); err == nil {
3001		t.Value = stringVal
3002		return nil
3003	}
3004	return &UnmarshalError{"unmarshal failed to match one of [bool string]"}
3005}
3006
3007func (t Or_WorkspaceOptions_textDocumentContent) MarshalJSON() ([]byte, error) {
3008	switch x := t.Value.(type) {
3009	case TextDocumentContentOptions:
3010		return json.Marshal(x)
3011	case TextDocumentContentRegistrationOptions:
3012		return json.Marshal(x)
3013	case nil:
3014		return []byte("null"), nil
3015	}
3016	return nil, fmt.Errorf("type %T not one of [TextDocumentContentOptions TextDocumentContentRegistrationOptions]", t)
3017}
3018
3019func (t *Or_WorkspaceOptions_textDocumentContent) UnmarshalJSON(x []byte) error {
3020	if string(x) == "null" {
3021		t.Value = nil
3022		return nil
3023	}
3024	decoder199 := json.NewDecoder(bytes.NewReader(x))
3025	decoder199.DisallowUnknownFields()
3026	var h199 TextDocumentContentOptions
3027	if err := decoder199.Decode(&h199); err == nil {
3028		t.Value = h199
3029		return nil
3030	}
3031	decoder200 := json.NewDecoder(bytes.NewReader(x))
3032	decoder200.DisallowUnknownFields()
3033	var h200 TextDocumentContentRegistrationOptions
3034	if err := decoder200.Decode(&h200); err == nil {
3035		t.Value = h200
3036		return nil
3037	}
3038	return &UnmarshalError{"unmarshal failed to match one of [TextDocumentContentOptions TextDocumentContentRegistrationOptions]"}
3039}
3040
3041func (t Or_WorkspaceSymbol_location) MarshalJSON() ([]byte, error) {
3042	switch x := t.Value.(type) {
3043	case Location:
3044		return json.Marshal(x)
3045	case LocationUriOnly:
3046		return json.Marshal(x)
3047	case nil:
3048		return []byte("null"), nil
3049	}
3050	return nil, fmt.Errorf("type %T not one of [Location LocationUriOnly]", t)
3051}
3052
3053func (t *Or_WorkspaceSymbol_location) UnmarshalJSON(x []byte) error {
3054	if string(x) == "null" {
3055		t.Value = nil
3056		return nil
3057	}
3058	decoder39 := json.NewDecoder(bytes.NewReader(x))
3059	decoder39.DisallowUnknownFields()
3060	var h39 Location
3061	if err := decoder39.Decode(&h39); err == nil {
3062		t.Value = h39
3063		return nil
3064	}
3065	decoder40 := json.NewDecoder(bytes.NewReader(x))
3066	decoder40.DisallowUnknownFields()
3067	var h40 LocationUriOnly
3068	if err := decoder40.Decode(&h40); err == nil {
3069		t.Value = h40
3070		return nil
3071	}
3072	return &UnmarshalError{"unmarshal failed to match one of [Location LocationUriOnly]"}
3073}