From a55f514bc2f495ca35159e542f863ff983716f6f Mon Sep 17 00:00:00 2001 From: Phil Kedy Date: Sun, 4 Feb 2024 15:06:21 -0500 Subject: [PATCH] Union members & version bumps (#15) --- .github/workflows/build.yaml | 4 +- apex.yaml | 4 +- ast/definitions.go | 32 +- ast/document.go | 2 +- ast/location.go | 2 +- ast/nodes.go | 2 +- ast/types.go | 2 +- ast/values.go | 2 +- ast/visitor.go | 23 +- cmd/apex-api/main.go | 2 +- cmd/apex-cli/main.go | 2 +- cmd/host/go.mod | 4 +- cmd/host/go.sum | 4 +- errors/error.go | 2 +- errors/syntax.go | 2 +- go.mod | 4 +- go.sum | 8 +- go.work | 2 +- kinds/kinds.go | 2 +- lexer/lexer.go | 2 +- location/location.go | 2 +- model.axdl | 8 +- model/convert.go | 14 +- model/model.go | 20 +- model/model_tinyjson.go | 896 +++++++++++++---------- model/msgpack.go | 78 +- model/services.go | 16 + parser/parser.go | 26 +- rules/camel_case_directive_names.go | 2 +- rules/known_types.go | 6 +- rules/namespace_first.go | 2 +- rules/pascal_case_type_names.go | 2 +- rules/rules.go | 2 +- rules/single_namespace_defined.go | 2 +- rules/unique_directive_names.go | 2 +- rules/unique_enum_value_indexes.go | 2 +- rules/unique_enum_value_names.go | 2 +- rules/unique_function_names.go | 2 +- rules/unique_object_names.go | 2 +- rules/unique_operation_names.go | 2 +- rules/unique_parameter_names.go | 2 +- rules/unique_type_field_names.go | 2 +- rules/valid_annotation_arguments.go | 2 +- rules/valid_annotation_locations.go | 2 +- rules/valid_directive_locations.go | 2 +- rules/valid_directive_parameter_types.go | 2 +- rules/valid_directive_requires.go | 2 +- rules/valid_enum_value_indexes.go | 2 +- source/source.go | 2 +- 49 files changed, 747 insertions(+), 466 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e84f030..56ba62f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -20,11 +20,11 @@ jobs: - uses: actions/setup-go@v3 with: - go-version: '1.20' + go-version: '1.21' - uses: acifani/setup-tinygo@v1 with: - tinygo-version: 0.27.0 + tinygo-version: 0.30.0 - name: Install wasm-opt run: | diff --git a/apex.yaml b/apex.yaml index 2535051..cc42c41 100644 --- a/apex.yaml +++ b/apex.yaml @@ -4,14 +4,14 @@ config: module: github.com/apexlang/apex-go generates: model/model.go: - module: 'https://deno.land/x/apex_codegen@v0.1.9/go/mod.ts' + module: 'https://deno.land/x/apex_codegen@v0.1.10/go/mod.ts' visitorClass: InterfacesVisitor config: writeTypeInfo: false runAfter: - command: tinyjson -all model/model.go model/msgpack.go: - module: 'https://deno.land/x/apex_codegen@v0.1.9/go/mod.ts' + module: 'https://deno.land/x/apex_codegen@v0.1.10/go/mod.ts' visitorClass: MsgPackVisitor model/wapc.go: module: 'https://deno.land/x/wapc_codegen@v0.0.6/tinygo/mod.ts' diff --git a/ast/definitions.go b/ast/definitions.go index 3d4f960..0a22981 100644 --- a/ast/definitions.go +++ b/ast/definitions.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -317,16 +317,16 @@ type UnionDefinition struct { Name *Name `json:"name"` Description *StringValue `json:"description,omitempty"` // Optional AnnotatedNode - Types []Type `json:"types"` + Members []*UnionMemberDefinition `json:"types"` } -func NewUnionDefinition(loc *Location, name *Name, description *StringValue, annotations []*Annotation, types []Type) *UnionDefinition { +func NewUnionDefinition(loc *Location, name *Name, description *StringValue, annotations []*Annotation, members []*UnionMemberDefinition) *UnionDefinition { return &UnionDefinition{ BaseNode: BaseNode{kinds.UnionDefinition, loc}, Name: name, Description: description, AnnotatedNode: AnnotatedNode{annotations}, - Types: types, + Members: members, } } @@ -335,6 +335,30 @@ func (d *UnionDefinition) Accept(context Context, visitor Visitor) { VisitAnnotations(context, visitor, d.Annotations) } +// UnionMemberDefinition implements Node, Definition +var _ Definition = (*UnionMemberDefinition)(nil) + +type UnionMemberDefinition struct { + BaseNode + Description *StringValue `json:"description,omitempty"` // Optional + Type Type `json:"type"` + AnnotatedNode +} + +func NewUnionMemberDefinition(loc *Location, description *StringValue, t Type, annotations []*Annotation) *UnionMemberDefinition { + return &UnionMemberDefinition{ + BaseNode: BaseNode{kinds.EnumValueDefinition, loc}, + Description: description, + Type: t, + AnnotatedNode: AnnotatedNode{annotations}, + } +} + +func (d *UnionMemberDefinition) Accept(context Context, visitor Visitor) { + visitor.VisitUnionMember(context) + VisitAnnotations(context, visitor, d.Annotations) +} + // EnumDefinition implements Node, Definition var _ Definition = (*EnumDefinition)(nil) diff --git a/ast/document.go b/ast/document.go index 6ee377a..98b4dc8 100644 --- a/ast/document.go +++ b/ast/document.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/ast/location.go b/ast/location.go index 4ee914a..322b3fc 100644 --- a/ast/location.go +++ b/ast/location.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/ast/nodes.go b/ast/nodes.go index 3d7dcf2..9feb6ba 100644 --- a/ast/nodes.go +++ b/ast/nodes.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/ast/types.go b/ast/types.go index 0335bbc..58042ce 100644 --- a/ast/types.go +++ b/ast/types.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/ast/values.go b/ast/values.go index d9269ea..4dd6276 100644 --- a/ast/values.go +++ b/ast/values.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/ast/visitor.go b/ast/visitor.go index fdd669d..c8879bc 100644 --- a/ast/visitor.go +++ b/ast/visitor.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -164,6 +164,9 @@ type Visitor interface { VisitUnionsBefore(context Context) VisitUnion(context Context) + VisitUnionMembersBefore(context Context) + VisitUnionMember(context Context) + VisitUnionMembersAfter(context Context) VisitUnionsAfter(context Context) VisitAnnotationsBefore(context Context) @@ -243,9 +246,12 @@ func (b *BaseVisitor) VisitEnumValuesAfter(context Context) {} func (b *BaseVisitor) VisitEnumAfter(context Context) {} func (b *BaseVisitor) VisitEnumsAfter(context Context) {} -func (b *BaseVisitor) VisitUnionsBefore(context Context) {} -func (b *BaseVisitor) VisitUnion(context Context) {} -func (b *BaseVisitor) VisitUnionsAfter(context Context) {} +func (b *BaseVisitor) VisitUnionsBefore(context Context) {} +func (b *BaseVisitor) VisitUnion(context Context) {} +func (b *BaseVisitor) VisitUnionMembersBefore(context Context) {} +func (b *BaseVisitor) VisitUnionMember(context Context) {} +func (b *BaseVisitor) VisitUnionMembersAfter(context Context) {} +func (b *BaseVisitor) VisitUnionsAfter(context Context) {} func (b *BaseVisitor) VisitAnnotationsBefore(context Context) {} func (b *BaseVisitor) VisitAnnotationBefore(context Context) {} @@ -451,6 +457,15 @@ func (m *MultiVisitor) VisitUnionsBefore(context Context) { func (m *MultiVisitor) VisitUnion(context Context) { m.visit(func(v Visitor) { v.VisitUnionsBefore(context) }) } +func (m *MultiVisitor) VisitUnionMembersBefore(context Context) { + m.visit(func(v Visitor) { v.VisitUnionMembersBefore(context) }) +} +func (m *MultiVisitor) VisitUnionMember(context Context) { + m.visit(func(v Visitor) { v.VisitUnionMember(context) }) +} +func (m *MultiVisitor) VisitUnionMembersAfter(context Context) { + m.visit(func(v Visitor) { v.VisitUnionMembersAfter(context) }) +} func (m *MultiVisitor) VisitUnionsAfter(context Context) { m.visit(func(v Visitor) { v.VisitUnionsAfter(context) }) } diff --git a/cmd/apex-api/main.go b/cmd/apex-api/main.go index 5e21564..d8f748e 100644 --- a/cmd/apex-api/main.go +++ b/cmd/apex-api/main.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/apex-cli/main.go b/cmd/apex-cli/main.go index c0652db..17da20c 100644 --- a/cmd/apex-cli/main.go +++ b/cmd/apex-cli/main.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/cmd/host/go.mod b/cmd/host/go.mod index 6aa84c9..c93f6ff 100644 --- a/cmd/host/go.mod +++ b/cmd/host/go.mod @@ -1,8 +1,8 @@ module github.com/apexlang/apex-go/cmd/host -go 1.19 +go 1.21 require ( github.com/mitchellh/go-homedir v1.1.0 - github.com/tetratelabs/wazero v1.0.1 + github.com/tetratelabs/wazero v1.6.0 ) diff --git a/cmd/host/go.sum b/cmd/host/go.sum index 6188d18..7e138ad 100644 --- a/cmd/host/go.sum +++ b/cmd/host/go.sum @@ -1,4 +1,4 @@ github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/tetratelabs/wazero v1.0.1 h1:xyWBoGyMjYekG3mEQ/W7xm9E05S89kJ/at696d/9yuc= -github.com/tetratelabs/wazero v1.0.1/go.mod h1:wYx2gNRg8/WihJfSDxA1TIL8H+GkfLYm+bIfbblu9VQ= +github.com/tetratelabs/wazero v1.6.0 h1:z0H1iikCdP8t+q341xqepY4EWvHEw8Es7tlqiVzlP3g= +github.com/tetratelabs/wazero v1.6.0/go.mod h1:0U0G41+ochRKoPKCJlh0jMg1CHkyfK8kDqiirMmKY8A= diff --git a/errors/error.go b/errors/error.go index 0b7db1c..bb324a8 100644 --- a/errors/error.go +++ b/errors/error.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/errors/syntax.go b/errors/syntax.go index 635c4b1..b95f874 100644 --- a/errors/syntax.go +++ b/errors/syntax.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/go.mod b/go.mod index daebf1f..be65de6 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,10 @@ module github.com/apexlang/apex-go -go 1.18 +go 1.21 require ( github.com/CosmWasm/tinyjson v0.9.0 - github.com/iancoleman/strcase v0.2.0 + github.com/iancoleman/strcase v0.3.0 github.com/tetratelabs/tinymem v0.1.0 github.com/wapc/tinygo-msgpack v0.1.6 github.com/wapc/wapc-guest-tinygo v0.3.3 diff --git a/go.sum b/go.sum index 31d6d86..89a3598 100644 --- a/go.sum +++ b/go.sum @@ -1,12 +1,15 @@ github.com/apexlang/tinyjson v0.9.1-0.20220929010544-92ef7a6da107 h1:GljFiJysL3S8SBhXWU47Emj34D3pVZgJ+Amj+jhM4fQ= github.com/apexlang/tinyjson v0.9.1-0.20220929010544-92ef7a6da107/go.mod h1:5+7QnSKrkIWnpIdhUT2t2EYzXnII3/3MlM0oDsBSbc8= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/iancoleman/strcase v0.2.0 h1:05I4QRnGpI0m37iZQRuskXh+w77mr6Z41lwQzuHLwW0= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= +github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/tetratelabs/tinymem v0.1.0 h1:Qza1JAg9lquPPJ/CIei5qQYx7t18KLie83O2WR6CM58= github.com/tetratelabs/tinymem v0.1.0/go.mod h1:WFFTZFhLod6lTL+UetFAopVbGaB+KFsVcIY+RUv7NeY= github.com/wapc/tinygo-msgpack v0.1.6 h1:geW3N0MAVehJBZp1ITnK2J1R2woI/S1APJB+tFShO6Y= @@ -14,3 +17,4 @@ github.com/wapc/tinygo-msgpack v0.1.6/go.mod h1:2P4rQimy/6oQAkytwC2LdtVjLJ2D1dYk github.com/wapc/wapc-guest-tinygo v0.3.3 h1:jLebiwjVSHLGnS+BRabQ6+XOV7oihVWAc05Hf1SbeR0= github.com/wapc/wapc-guest-tinygo v0.3.3/go.mod h1:mzM3CnsdSYktfPkaBdZ8v88ZlfUDEy5Jh5XBOV3fYcw= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/go.work b/go.work index e283cd8..3cc08ba 100644 --- a/go.work +++ b/go.work @@ -1,4 +1,4 @@ -go 1.19 +go 1.21 use ( . diff --git a/kinds/kinds.go b/kinds/kinds.go index b79b21d..023d8ce 100644 --- a/kinds/kinds.go +++ b/kinds/kinds.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/lexer/lexer.go b/lexer/lexer.go index 53a7007..963f260 100644 --- a/lexer/lexer.go +++ b/lexer/lexer.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/location/location.go b/location/location.go index 2832a00..f9381ca 100644 --- a/location/location.go +++ b/location/location.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/model.axdl b/model.axdl index 7c0db5a..3fad995 100644 --- a/model.axdl +++ b/model.axdl @@ -109,7 +109,13 @@ type Field { type Union { name: string @after("=") description: string? @docs - types: [TypeRef] @delimiters(["|"]) + members: [UnionMember] @delimiters(["|"]) + annotations: [Annotation]? @prefix("@") +} + +type UnionMember { + description: string? @docs + type: TypeRef annotations: [Annotation]? @prefix("@") } diff --git a/model/convert.go b/model/convert.go index cd57b3c..d277361 100644 --- a/model/convert.go +++ b/model/convert.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -225,20 +225,24 @@ func (c *Converter) convertUnions(items []*ast.UnionDefinition) []Union { s[i] = Union{ Description: stringValuePtr(item.Description), Name: item.Name.Value, - Types: c.convertTypeRefs(item.Types), + Members: c.convertUnionMembers(item.Members), Annotations: c.convertAnnotations(item.Annotations), } } return s } -func (c *Converter) convertTypeRefs(items []ast.Type) []TypeRef { +func (c *Converter) convertUnionMembers(items []*ast.UnionMemberDefinition) []UnionMember { if len(items) == 0 { return nil } - s := make([]TypeRef, len(items)) + s := make([]UnionMember, len(items)) for i, item := range items { - s[i] = c.convertTypeRef(item) + s[i] = UnionMember{ + Description: stringValuePtr(item.Description), + Type: c.convertTypeRef(item.Type), + Annotations: c.convertAnnotations(item.Annotations), + } } return s } diff --git a/model/model.go b/model/model.go index 53bfef1..0f33fac 100644 --- a/model/model.go +++ b/model/model.go @@ -179,10 +179,10 @@ func DefaultField() Field { // Unions types denote that a type can have one of several representations. type Union struct { - Name string `json:"name" yaml:"name" msgpack:"name"` - Description *string `json:"description,omitempty" yaml:"description,omitempty" msgpack:"description,omitempty"` - Types []TypeRef `json:"types" yaml:"types" msgpack:"types"` - Annotations []Annotation `json:"annotations,omitempty" yaml:"annotations,omitempty" msgpack:"annotations,omitempty"` + Name string `json:"name" yaml:"name" msgpack:"name"` + Description *string `json:"description,omitempty" yaml:"description,omitempty" msgpack:"description,omitempty"` + Members []UnionMember `json:"members" yaml:"members" msgpack:"members"` + Annotations []Annotation `json:"annotations,omitempty" yaml:"annotations,omitempty" msgpack:"annotations,omitempty"` } // DefaultUnion returns a `Union` struct populated with its default values. @@ -190,6 +190,18 @@ func DefaultUnion() Union { return Union{} } +type UnionMember struct { + Description *string `json:"description,omitempty" yaml:"description,omitempty" msgpack:"description,omitempty"` + Type TypeRef `json:"type" yaml:"type" msgpack:"type"` + Annotations []Annotation `json:"annotations,omitempty" yaml:"annotations,omitempty" msgpack:"annotations,omitempty"` +} + +// DefaultUnionMember returns a `UnionMember` struct populated with its default +// values. +func DefaultUnionMember() UnionMember { + return UnionMember{} +} + // Enumerations (or enums) are a type that is constrained to a finite set of // allowed values. type Enum struct { diff --git a/model/model_tinyjson.go b/model/model_tinyjson.go index 9e6ea89..4ac028e 100644 --- a/model/model_tinyjson.go +++ b/model/model_tinyjson.go @@ -210,7 +210,131 @@ func (v *Value) UnmarshalJSON(data []byte) error { func (v *Value) UnmarshalTinyJSON(l *jlexer.Lexer) { tinyjson85aaecc5DecodeGithubComApexlangApexGoModel(l, v) } -func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel1(in *jlexer.Lexer, out *Union) { +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel1(in *jlexer.Lexer, out *UnionMember) { + isTopLevel := in.IsStart() + if in.IsNull() { + if isTopLevel { + in.Consumed() + } + in.Skip() + return + } + in.Delim('{') + for !in.IsDelim('}') { + key := in.UnsafeFieldName(false) + in.WantColon() + if in.IsNull() { + in.Skip() + in.WantComma() + continue + } + switch key { + case "description": + if in.IsNull() { + in.Skip() + out.Description = nil + } else { + if out.Description == nil { + out.Description = new(string) + } + *out.Description = string(in.String()) + } + case "type": + (out.Type).UnmarshalTinyJSON(in) + case "annotations": + if in.IsNull() { + in.Skip() + out.Annotations = nil + } else { + in.Delim('[') + if out.Annotations == nil { + if !in.IsDelim(']') { + out.Annotations = make([]Annotation, 0, 1) + } else { + out.Annotations = []Annotation{} + } + } else { + out.Annotations = (out.Annotations)[:0] + } + for !in.IsDelim(']') { + var v1 Annotation + (v1).UnmarshalTinyJSON(in) + out.Annotations = append(out.Annotations, v1) + in.WantComma() + } + in.Delim(']') + } + default: + in.SkipRecursive() + } + in.WantComma() + } + in.Delim('}') + if isTopLevel { + in.Consumed() + } +} +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel1(out *jwriter.Writer, in UnionMember) { + out.RawByte('{') + first := true + _ = first + if in.Description != nil { + const prefix string = ",\"description\":" + first = false + out.RawString(prefix[1:]) + out.String(string(*in.Description)) + } + { + const prefix string = ",\"type\":" + if first { + first = false + out.RawString(prefix[1:]) + } else { + out.RawString(prefix) + } + (in.Type).MarshalTinyJSON(out) + } + if len(in.Annotations) != 0 { + const prefix string = ",\"annotations\":" + out.RawString(prefix) + { + out.RawByte('[') + for v2, v3 := range in.Annotations { + if v2 > 0 { + out.RawByte(',') + } + (v3).MarshalTinyJSON(out) + } + out.RawByte(']') + } + } + out.RawByte('}') +} + +// MarshalJSON supports json.Marshaler interface +func (v UnionMember) MarshalJSON() ([]byte, error) { + w := jwriter.Writer{} + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel1(&w, v) + return w.Buffer.BuildBytes(), w.Error +} + +// MarshalTinyJSON supports tinyjson.Marshaler interface +func (v UnionMember) MarshalTinyJSON(w *jwriter.Writer) { + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel1(w, v) +} + +// UnmarshalJSON supports json.Unmarshaler interface +func (v *UnionMember) UnmarshalJSON(data []byte) error { + r := jlexer.Lexer{Data: data} + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel1(&r, v) + return r.Error() +} + +// UnmarshalTinyJSON supports tinyjson.Unmarshaler interface +func (v *UnionMember) UnmarshalTinyJSON(l *jlexer.Lexer) { + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel1(l, v) +} +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel2(in *jlexer.Lexer, out *Union) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -241,25 +365,25 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel1(in *jlexer.Lexer, out * } *out.Description = string(in.String()) } - case "types": + case "members": if in.IsNull() { in.Skip() - out.Types = nil + out.Members = nil } else { in.Delim('[') - if out.Types == nil { + if out.Members == nil { if !in.IsDelim(']') { - out.Types = make([]TypeRef, 0, 1) + out.Members = make([]UnionMember, 0, 0) } else { - out.Types = []TypeRef{} + out.Members = []UnionMember{} } } else { - out.Types = (out.Types)[:0] + out.Members = (out.Members)[:0] } for !in.IsDelim(']') { - var v1 TypeRef - (v1).UnmarshalTinyJSON(in) - out.Types = append(out.Types, v1) + var v4 UnionMember + (v4).UnmarshalTinyJSON(in) + out.Members = append(out.Members, v4) in.WantComma() } in.Delim(']') @@ -280,9 +404,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel1(in *jlexer.Lexer, out * out.Annotations = (out.Annotations)[:0] } for !in.IsDelim(']') { - var v2 Annotation - (v2).UnmarshalTinyJSON(in) - out.Annotations = append(out.Annotations, v2) + var v5 Annotation + (v5).UnmarshalTinyJSON(in) + out.Annotations = append(out.Annotations, v5) in.WantComma() } in.Delim(']') @@ -297,7 +421,7 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel1(in *jlexer.Lexer, out * in.Consumed() } } -func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel1(out *jwriter.Writer, in Union) { +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel2(out *jwriter.Writer, in Union) { out.RawByte('{') first := true _ = first @@ -312,17 +436,17 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel1(out *jwriter.Writer, in out.String(string(*in.Description)) } { - const prefix string = ",\"types\":" + const prefix string = ",\"members\":" out.RawString(prefix) - if in.Types == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { + if in.Members == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { out.RawString("null") } else { out.RawByte('[') - for v3, v4 := range in.Types { - if v3 > 0 { + for v6, v7 := range in.Members { + if v6 > 0 { out.RawByte(',') } - (v4).MarshalTinyJSON(out) + (v7).MarshalTinyJSON(out) } out.RawByte(']') } @@ -332,11 +456,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel1(out *jwriter.Writer, in out.RawString(prefix) { out.RawByte('[') - for v5, v6 := range in.Annotations { - if v5 > 0 { + for v8, v9 := range in.Annotations { + if v8 > 0 { out.RawByte(',') } - (v6).MarshalTinyJSON(out) + (v9).MarshalTinyJSON(out) } out.RawByte(']') } @@ -347,27 +471,27 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel1(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v Union) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel1(&w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel2(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalTinyJSON supports tinyjson.Marshaler interface func (v Union) MarshalTinyJSON(w *jwriter.Writer) { - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel1(w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel2(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Union) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel1(&r, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel2(&r, v) return r.Error() } // UnmarshalTinyJSON supports tinyjson.Unmarshaler interface func (v *Union) UnmarshalTinyJSON(l *jlexer.Lexer) { - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel1(l, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel2(l, v) } -func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel2(in *jlexer.Lexer, out *TypeRef) { +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel3(in *jlexer.Lexer, out *TypeRef) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -458,7 +582,7 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel2(in *jlexer.Lexer, out * in.Consumed() } } -func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel2(out *jwriter.Writer, in TypeRef) { +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel3(out *jwriter.Writer, in TypeRef) { out.RawByte('{') first := true _ = first @@ -524,27 +648,27 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel2(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v TypeRef) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel2(&w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel3(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalTinyJSON supports tinyjson.Marshaler interface func (v TypeRef) MarshalTinyJSON(w *jwriter.Writer) { - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel2(w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel3(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *TypeRef) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel2(&r, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel3(&r, v) return r.Error() } // UnmarshalTinyJSON supports tinyjson.Unmarshaler interface func (v *TypeRef) UnmarshalTinyJSON(l *jlexer.Lexer) { - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel2(l, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel3(l, v) } -func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel3(in *jlexer.Lexer, out *Type) { +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel4(in *jlexer.Lexer, out *Type) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -591,9 +715,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel3(in *jlexer.Lexer, out * out.Fields = (out.Fields)[:0] } for !in.IsDelim(']') { - var v7 Field - (v7).UnmarshalTinyJSON(in) - out.Fields = append(out.Fields, v7) + var v10 Field + (v10).UnmarshalTinyJSON(in) + out.Fields = append(out.Fields, v10) in.WantComma() } in.Delim(']') @@ -614,9 +738,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel3(in *jlexer.Lexer, out * out.Annotations = (out.Annotations)[:0] } for !in.IsDelim(']') { - var v8 Annotation - (v8).UnmarshalTinyJSON(in) - out.Annotations = append(out.Annotations, v8) + var v11 Annotation + (v11).UnmarshalTinyJSON(in) + out.Annotations = append(out.Annotations, v11) in.WantComma() } in.Delim(']') @@ -631,7 +755,7 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel3(in *jlexer.Lexer, out * in.Consumed() } } -func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel3(out *jwriter.Writer, in Type) { +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel4(out *jwriter.Writer, in Type) { out.RawByte('{') first := true _ = first @@ -652,11 +776,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel3(out *jwriter.Writer, in out.RawString("null") } else { out.RawByte('[') - for v9, v10 := range in.Fields { - if v9 > 0 { + for v12, v13 := range in.Fields { + if v12 > 0 { out.RawByte(',') } - (v10).MarshalTinyJSON(out) + (v13).MarshalTinyJSON(out) } out.RawByte(']') } @@ -666,11 +790,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel3(out *jwriter.Writer, in out.RawString(prefix) { out.RawByte('[') - for v11, v12 := range in.Annotations { - if v11 > 0 { + for v14, v15 := range in.Annotations { + if v14 > 0 { out.RawByte(',') } - (v12).MarshalTinyJSON(out) + (v15).MarshalTinyJSON(out) } out.RawByte(']') } @@ -681,27 +805,27 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel3(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v Type) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel3(&w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel4(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalTinyJSON supports tinyjson.Marshaler interface func (v Type) MarshalTinyJSON(w *jwriter.Writer) { - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel3(w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel4(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Type) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel3(&r, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel4(&r, v) return r.Error() } // UnmarshalTinyJSON supports tinyjson.Unmarshaler interface func (v *Type) UnmarshalTinyJSON(l *jlexer.Lexer) { - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel3(l, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel4(l, v) } -func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel4(in *jlexer.Lexer, out *Stream) { +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel5(in *jlexer.Lexer, out *Stream) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -732,7 +856,7 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel4(in *jlexer.Lexer, out * in.Consumed() } } -func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel4(out *jwriter.Writer, in Stream) { +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel5(out *jwriter.Writer, in Stream) { out.RawByte('{') first := true _ = first @@ -747,27 +871,27 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel4(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v Stream) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel4(&w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel5(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalTinyJSON supports tinyjson.Marshaler interface func (v Stream) MarshalTinyJSON(w *jwriter.Writer) { - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel4(w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel5(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Stream) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel4(&r, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel5(&r, v) return r.Error() } // UnmarshalTinyJSON supports tinyjson.Unmarshaler interface func (v *Stream) UnmarshalTinyJSON(l *jlexer.Lexer) { - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel4(l, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel5(l, v) } -func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel5(in *jlexer.Lexer, out *Reference) { +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel6(in *jlexer.Lexer, out *Reference) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -798,7 +922,7 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel5(in *jlexer.Lexer, out * in.Consumed() } } -func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel5(out *jwriter.Writer, in Reference) { +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel6(out *jwriter.Writer, in Reference) { out.RawByte('{') first := true _ = first @@ -813,27 +937,27 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel5(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v Reference) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel5(&w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel6(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalTinyJSON supports tinyjson.Marshaler interface func (v Reference) MarshalTinyJSON(w *jwriter.Writer) { - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel5(w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel6(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Reference) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel5(&r, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel6(&r, v) return r.Error() } // UnmarshalTinyJSON supports tinyjson.Unmarshaler interface func (v *Reference) UnmarshalTinyJSON(l *jlexer.Lexer) { - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel5(l, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel6(l, v) } -func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel6(in *jlexer.Lexer, out *ParserResult) { +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel7(in *jlexer.Lexer, out *ParserResult) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -878,9 +1002,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel6(in *jlexer.Lexer, out * out.Errors = (out.Errors)[:0] } for !in.IsDelim(']') { - var v13 Error - (v13).UnmarshalTinyJSON(in) - out.Errors = append(out.Errors, v13) + var v16 Error + (v16).UnmarshalTinyJSON(in) + out.Errors = append(out.Errors, v16) in.WantComma() } in.Delim(']') @@ -895,7 +1019,7 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel6(in *jlexer.Lexer, out * in.Consumed() } } -func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel6(out *jwriter.Writer, in ParserResult) { +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel7(out *jwriter.Writer, in ParserResult) { out.RawByte('{') first := true _ = first @@ -915,11 +1039,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel6(out *jwriter.Writer, in } { out.RawByte('[') - for v14, v15 := range in.Errors { - if v14 > 0 { + for v17, v18 := range in.Errors { + if v17 > 0 { out.RawByte(',') } - (v15).MarshalTinyJSON(out) + (v18).MarshalTinyJSON(out) } out.RawByte(']') } @@ -930,27 +1054,27 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel6(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v ParserResult) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel6(&w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel7(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalTinyJSON supports tinyjson.Marshaler interface func (v ParserResult) MarshalTinyJSON(w *jwriter.Writer) { - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel6(w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel7(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ParserResult) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel6(&r, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel7(&r, v) return r.Error() } // UnmarshalTinyJSON supports tinyjson.Unmarshaler interface func (v *ParserResult) UnmarshalTinyJSON(l *jlexer.Lexer) { - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel6(l, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel7(l, v) } -func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel7(in *jlexer.Lexer, out *Parameter) { +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel8(in *jlexer.Lexer, out *Parameter) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1009,9 +1133,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel7(in *jlexer.Lexer, out * out.Annotations = (out.Annotations)[:0] } for !in.IsDelim(']') { - var v16 Annotation - (v16).UnmarshalTinyJSON(in) - out.Annotations = append(out.Annotations, v16) + var v19 Annotation + (v19).UnmarshalTinyJSON(in) + out.Annotations = append(out.Annotations, v19) in.WantComma() } in.Delim(']') @@ -1026,7 +1150,7 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel7(in *jlexer.Lexer, out * in.Consumed() } } -func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel7(out *jwriter.Writer, in Parameter) { +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel8(out *jwriter.Writer, in Parameter) { out.RawByte('{') first := true _ = first @@ -1055,11 +1179,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel7(out *jwriter.Writer, in out.RawString(prefix) { out.RawByte('[') - for v17, v18 := range in.Annotations { - if v17 > 0 { + for v20, v21 := range in.Annotations { + if v20 > 0 { out.RawByte(',') } - (v18).MarshalTinyJSON(out) + (v21).MarshalTinyJSON(out) } out.RawByte(']') } @@ -1070,27 +1194,27 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel7(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v Parameter) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel7(&w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel8(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalTinyJSON supports tinyjson.Marshaler interface func (v Parameter) MarshalTinyJSON(w *jwriter.Writer) { - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel7(w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel8(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Parameter) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel7(&r, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel8(&r, v) return r.Error() } // UnmarshalTinyJSON supports tinyjson.Unmarshaler interface func (v *Parameter) UnmarshalTinyJSON(l *jlexer.Lexer) { - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel7(l, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel8(l, v) } -func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel8(in *jlexer.Lexer, out *Optional) { +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel9(in *jlexer.Lexer, out *Optional) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1121,7 +1245,7 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel8(in *jlexer.Lexer, out * in.Consumed() } } -func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel8(out *jwriter.Writer, in Optional) { +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel9(out *jwriter.Writer, in Optional) { out.RawByte('{') first := true _ = first @@ -1136,27 +1260,27 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel8(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v Optional) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel8(&w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel9(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalTinyJSON supports tinyjson.Marshaler interface func (v Optional) MarshalTinyJSON(w *jwriter.Writer) { - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel8(w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel9(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Optional) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel8(&r, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel9(&r, v) return r.Error() } // UnmarshalTinyJSON supports tinyjson.Unmarshaler interface func (v *Optional) UnmarshalTinyJSON(l *jlexer.Lexer) { - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel8(l, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel9(l, v) } -func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel9(in *jlexer.Lexer, out *Operation) { +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel10(in *jlexer.Lexer, out *Operation) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1203,9 +1327,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel9(in *jlexer.Lexer, out * out.Parameters = (out.Parameters)[:0] } for !in.IsDelim(']') { - var v19 Parameter - (v19).UnmarshalTinyJSON(in) - out.Parameters = append(out.Parameters, v19) + var v22 Parameter + (v22).UnmarshalTinyJSON(in) + out.Parameters = append(out.Parameters, v22) in.WantComma() } in.Delim(']') @@ -1246,9 +1370,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel9(in *jlexer.Lexer, out * out.Annotations = (out.Annotations)[:0] } for !in.IsDelim(']') { - var v20 Annotation - (v20).UnmarshalTinyJSON(in) - out.Annotations = append(out.Annotations, v20) + var v23 Annotation + (v23).UnmarshalTinyJSON(in) + out.Annotations = append(out.Annotations, v23) in.WantComma() } in.Delim(']') @@ -1263,7 +1387,7 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel9(in *jlexer.Lexer, out * in.Consumed() } } -func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel9(out *jwriter.Writer, in Operation) { +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel10(out *jwriter.Writer, in Operation) { out.RawByte('{') first := true _ = first @@ -1282,11 +1406,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel9(out *jwriter.Writer, in out.RawString(prefix) { out.RawByte('[') - for v21, v22 := range in.Parameters { - if v21 > 0 { + for v24, v25 := range in.Parameters { + if v24 > 0 { out.RawByte(',') } - (v22).MarshalTinyJSON(out) + (v25).MarshalTinyJSON(out) } out.RawByte(']') } @@ -1306,11 +1430,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel9(out *jwriter.Writer, in out.RawString(prefix) { out.RawByte('[') - for v23, v24 := range in.Annotations { - if v23 > 0 { + for v26, v27 := range in.Annotations { + if v26 > 0 { out.RawByte(',') } - (v24).MarshalTinyJSON(out) + (v27).MarshalTinyJSON(out) } out.RawByte(']') } @@ -1321,27 +1445,27 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel9(out *jwriter.Writer, in // MarshalJSON supports json.Marshaler interface func (v Operation) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel9(&w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel10(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalTinyJSON supports tinyjson.Marshaler interface func (v Operation) MarshalTinyJSON(w *jwriter.Writer) { - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel9(w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel10(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Operation) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel9(&r, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel10(&r, v) return r.Error() } // UnmarshalTinyJSON supports tinyjson.Unmarshaler interface func (v *Operation) UnmarshalTinyJSON(l *jlexer.Lexer) { - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel9(l, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel10(l, v) } -func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel10(in *jlexer.Lexer, out *ObjectValue) { +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel11(in *jlexer.Lexer, out *ObjectValue) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1376,9 +1500,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel10(in *jlexer.Lexer, out out.Fields = (out.Fields)[:0] } for !in.IsDelim(']') { - var v25 ObjectField - (v25).UnmarshalTinyJSON(in) - out.Fields = append(out.Fields, v25) + var v28 ObjectField + (v28).UnmarshalTinyJSON(in) + out.Fields = append(out.Fields, v28) in.WantComma() } in.Delim(']') @@ -1393,7 +1517,7 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel10(in *jlexer.Lexer, out in.Consumed() } } -func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel10(out *jwriter.Writer, in ObjectValue) { +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel11(out *jwriter.Writer, in ObjectValue) { out.RawByte('{') first := true _ = first @@ -1404,11 +1528,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel10(out *jwriter.Writer, i out.RawString("null") } else { out.RawByte('[') - for v26, v27 := range in.Fields { - if v26 > 0 { + for v29, v30 := range in.Fields { + if v29 > 0 { out.RawByte(',') } - (v27).MarshalTinyJSON(out) + (v30).MarshalTinyJSON(out) } out.RawByte(']') } @@ -1419,27 +1543,27 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel10(out *jwriter.Writer, i // MarshalJSON supports json.Marshaler interface func (v ObjectValue) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel10(&w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel11(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalTinyJSON supports tinyjson.Marshaler interface func (v ObjectValue) MarshalTinyJSON(w *jwriter.Writer) { - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel10(w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel11(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ObjectValue) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel10(&r, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel11(&r, v) return r.Error() } // UnmarshalTinyJSON supports tinyjson.Unmarshaler interface func (v *ObjectValue) UnmarshalTinyJSON(l *jlexer.Lexer) { - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel10(l, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel11(l, v) } -func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel11(in *jlexer.Lexer, out *ObjectField) { +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel12(in *jlexer.Lexer, out *ObjectField) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1472,7 +1596,7 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel11(in *jlexer.Lexer, out in.Consumed() } } -func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel11(out *jwriter.Writer, in ObjectField) { +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel12(out *jwriter.Writer, in ObjectField) { out.RawByte('{') first := true _ = first @@ -1492,27 +1616,27 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel11(out *jwriter.Writer, i // MarshalJSON supports json.Marshaler interface func (v ObjectField) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel11(&w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel12(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalTinyJSON supports tinyjson.Marshaler interface func (v ObjectField) MarshalTinyJSON(w *jwriter.Writer) { - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel11(w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel12(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ObjectField) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel11(&r, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel12(&r, v) return r.Error() } // UnmarshalTinyJSON supports tinyjson.Unmarshaler interface func (v *ObjectField) UnmarshalTinyJSON(l *jlexer.Lexer) { - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel11(l, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel12(l, v) } -func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel12(in *jlexer.Lexer, out *Namespace) { +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel13(in *jlexer.Lexer, out *Namespace) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1559,9 +1683,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel12(in *jlexer.Lexer, out out.Annotations = (out.Annotations)[:0] } for !in.IsDelim(']') { - var v28 Annotation - (v28).UnmarshalTinyJSON(in) - out.Annotations = append(out.Annotations, v28) + var v31 Annotation + (v31).UnmarshalTinyJSON(in) + out.Annotations = append(out.Annotations, v31) in.WantComma() } in.Delim(']') @@ -1582,9 +1706,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel12(in *jlexer.Lexer, out out.Imports = (out.Imports)[:0] } for !in.IsDelim(']') { - var v29 Import - (v29).UnmarshalTinyJSON(in) - out.Imports = append(out.Imports, v29) + var v32 Import + (v32).UnmarshalTinyJSON(in) + out.Imports = append(out.Imports, v32) in.WantComma() } in.Delim(']') @@ -1605,9 +1729,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel12(in *jlexer.Lexer, out out.Directives = (out.Directives)[:0] } for !in.IsDelim(']') { - var v30 Directive - (v30).UnmarshalTinyJSON(in) - out.Directives = append(out.Directives, v30) + var v33 Directive + (v33).UnmarshalTinyJSON(in) + out.Directives = append(out.Directives, v33) in.WantComma() } in.Delim(']') @@ -1628,9 +1752,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel12(in *jlexer.Lexer, out out.Aliases = (out.Aliases)[:0] } for !in.IsDelim(']') { - var v31 Alias - (v31).UnmarshalTinyJSON(in) - out.Aliases = append(out.Aliases, v31) + var v34 Alias + (v34).UnmarshalTinyJSON(in) + out.Aliases = append(out.Aliases, v34) in.WantComma() } in.Delim(']') @@ -1651,9 +1775,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel12(in *jlexer.Lexer, out out.Functions = (out.Functions)[:0] } for !in.IsDelim(']') { - var v32 Operation - (v32).UnmarshalTinyJSON(in) - out.Functions = append(out.Functions, v32) + var v35 Operation + (v35).UnmarshalTinyJSON(in) + out.Functions = append(out.Functions, v35) in.WantComma() } in.Delim(']') @@ -1674,9 +1798,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel12(in *jlexer.Lexer, out out.Interfaces = (out.Interfaces)[:0] } for !in.IsDelim(']') { - var v33 Interface - (v33).UnmarshalTinyJSON(in) - out.Interfaces = append(out.Interfaces, v33) + var v36 Interface + (v36).UnmarshalTinyJSON(in) + out.Interfaces = append(out.Interfaces, v36) in.WantComma() } in.Delim(']') @@ -1697,9 +1821,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel12(in *jlexer.Lexer, out out.Types = (out.Types)[:0] } for !in.IsDelim(']') { - var v34 Type - (v34).UnmarshalTinyJSON(in) - out.Types = append(out.Types, v34) + var v37 Type + (v37).UnmarshalTinyJSON(in) + out.Types = append(out.Types, v37) in.WantComma() } in.Delim(']') @@ -1720,9 +1844,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel12(in *jlexer.Lexer, out out.Unions = (out.Unions)[:0] } for !in.IsDelim(']') { - var v35 Union - (v35).UnmarshalTinyJSON(in) - out.Unions = append(out.Unions, v35) + var v38 Union + (v38).UnmarshalTinyJSON(in) + out.Unions = append(out.Unions, v38) in.WantComma() } in.Delim(']') @@ -1737,7 +1861,7 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel12(in *jlexer.Lexer, out in.Consumed() } } -func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel12(out *jwriter.Writer, in Namespace) { +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel13(out *jwriter.Writer, in Namespace) { out.RawByte('{') first := true _ = first @@ -1756,11 +1880,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel12(out *jwriter.Writer, i out.RawString(prefix) { out.RawByte('[') - for v36, v37 := range in.Annotations { - if v36 > 0 { + for v39, v40 := range in.Annotations { + if v39 > 0 { out.RawByte(',') } - (v37).MarshalTinyJSON(out) + (v40).MarshalTinyJSON(out) } out.RawByte(']') } @@ -1770,11 +1894,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel12(out *jwriter.Writer, i out.RawString(prefix) { out.RawByte('[') - for v38, v39 := range in.Imports { - if v38 > 0 { + for v41, v42 := range in.Imports { + if v41 > 0 { out.RawByte(',') } - (v39).MarshalTinyJSON(out) + (v42).MarshalTinyJSON(out) } out.RawByte(']') } @@ -1784,11 +1908,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel12(out *jwriter.Writer, i out.RawString(prefix) { out.RawByte('[') - for v40, v41 := range in.Directives { - if v40 > 0 { + for v43, v44 := range in.Directives { + if v43 > 0 { out.RawByte(',') } - (v41).MarshalTinyJSON(out) + (v44).MarshalTinyJSON(out) } out.RawByte(']') } @@ -1798,11 +1922,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel12(out *jwriter.Writer, i out.RawString(prefix) { out.RawByte('[') - for v42, v43 := range in.Aliases { - if v42 > 0 { + for v45, v46 := range in.Aliases { + if v45 > 0 { out.RawByte(',') } - (v43).MarshalTinyJSON(out) + (v46).MarshalTinyJSON(out) } out.RawByte(']') } @@ -1812,11 +1936,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel12(out *jwriter.Writer, i out.RawString(prefix) { out.RawByte('[') - for v44, v45 := range in.Functions { - if v44 > 0 { + for v47, v48 := range in.Functions { + if v47 > 0 { out.RawByte(',') } - (v45).MarshalTinyJSON(out) + (v48).MarshalTinyJSON(out) } out.RawByte(']') } @@ -1826,11 +1950,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel12(out *jwriter.Writer, i out.RawString(prefix) { out.RawByte('[') - for v46, v47 := range in.Interfaces { - if v46 > 0 { + for v49, v50 := range in.Interfaces { + if v49 > 0 { out.RawByte(',') } - (v47).MarshalTinyJSON(out) + (v50).MarshalTinyJSON(out) } out.RawByte(']') } @@ -1840,11 +1964,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel12(out *jwriter.Writer, i out.RawString(prefix) { out.RawByte('[') - for v48, v49 := range in.Types { - if v48 > 0 { + for v51, v52 := range in.Types { + if v51 > 0 { out.RawByte(',') } - (v49).MarshalTinyJSON(out) + (v52).MarshalTinyJSON(out) } out.RawByte(']') } @@ -1854,11 +1978,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel12(out *jwriter.Writer, i out.RawString(prefix) { out.RawByte('[') - for v50, v51 := range in.Unions { - if v50 > 0 { + for v53, v54 := range in.Unions { + if v53 > 0 { out.RawByte(',') } - (v51).MarshalTinyJSON(out) + (v54).MarshalTinyJSON(out) } out.RawByte(']') } @@ -1869,27 +1993,27 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel12(out *jwriter.Writer, i // MarshalJSON supports json.Marshaler interface func (v Namespace) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel12(&w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel13(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalTinyJSON supports tinyjson.Marshaler interface func (v Namespace) MarshalTinyJSON(w *jwriter.Writer) { - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel12(w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel13(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Namespace) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel12(&r, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel13(&r, v) return r.Error() } // UnmarshalTinyJSON supports tinyjson.Unmarshaler interface func (v *Namespace) UnmarshalTinyJSON(l *jlexer.Lexer) { - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel12(l, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel13(l, v) } -func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel13(in *jlexer.Lexer, out *Named) { +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel14(in *jlexer.Lexer, out *Named) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1924,7 +2048,7 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel13(in *jlexer.Lexer, out in.Consumed() } } -func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel13(out *jwriter.Writer, in Named) { +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel14(out *jwriter.Writer, in Named) { out.RawByte('{') first := true _ = first @@ -1944,27 +2068,27 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel13(out *jwriter.Writer, i // MarshalJSON supports json.Marshaler interface func (v Named) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel13(&w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel14(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalTinyJSON supports tinyjson.Marshaler interface func (v Named) MarshalTinyJSON(w *jwriter.Writer) { - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel13(w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel14(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Named) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel13(&r, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel14(&r, v) return r.Error() } // UnmarshalTinyJSON supports tinyjson.Unmarshaler interface func (v *Named) UnmarshalTinyJSON(l *jlexer.Lexer) { - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel13(l, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel14(l, v) } -func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel14(in *jlexer.Lexer, out *Map) { +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel15(in *jlexer.Lexer, out *Map) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -1997,7 +2121,7 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel14(in *jlexer.Lexer, out in.Consumed() } } -func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel14(out *jwriter.Writer, in Map) { +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel15(out *jwriter.Writer, in Map) { out.RawByte('{') first := true _ = first @@ -2017,27 +2141,27 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel14(out *jwriter.Writer, i // MarshalJSON supports json.Marshaler interface func (v Map) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel14(&w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel15(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalTinyJSON supports tinyjson.Marshaler interface func (v Map) MarshalTinyJSON(w *jwriter.Writer) { - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel14(w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel15(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Map) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel14(&r, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel15(&r, v) return r.Error() } // UnmarshalTinyJSON supports tinyjson.Unmarshaler interface func (v *Map) UnmarshalTinyJSON(l *jlexer.Lexer) { - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel14(l, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel15(l, v) } -func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel15(in *jlexer.Lexer, out *Location) { +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel16(in *jlexer.Lexer, out *Location) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2070,7 +2194,7 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel15(in *jlexer.Lexer, out in.Consumed() } } -func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel15(out *jwriter.Writer, in Location) { +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel16(out *jwriter.Writer, in Location) { out.RawByte('{') first := true _ = first @@ -2090,27 +2214,27 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel15(out *jwriter.Writer, i // MarshalJSON supports json.Marshaler interface func (v Location) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel15(&w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel16(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalTinyJSON supports tinyjson.Marshaler interface func (v Location) MarshalTinyJSON(w *jwriter.Writer) { - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel15(w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel16(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Location) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel15(&r, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel16(&r, v) return r.Error() } // UnmarshalTinyJSON supports tinyjson.Unmarshaler interface func (v *Location) UnmarshalTinyJSON(l *jlexer.Lexer) { - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel15(l, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel16(l, v) } -func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel16(in *jlexer.Lexer, out *ListValue) { +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel17(in *jlexer.Lexer, out *ListValue) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2145,9 +2269,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel16(in *jlexer.Lexer, out out.Values = (out.Values)[:0] } for !in.IsDelim(']') { - var v52 Value - (v52).UnmarshalTinyJSON(in) - out.Values = append(out.Values, v52) + var v55 Value + (v55).UnmarshalTinyJSON(in) + out.Values = append(out.Values, v55) in.WantComma() } in.Delim(']') @@ -2162,7 +2286,7 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel16(in *jlexer.Lexer, out in.Consumed() } } -func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel16(out *jwriter.Writer, in ListValue) { +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel17(out *jwriter.Writer, in ListValue) { out.RawByte('{') first := true _ = first @@ -2173,11 +2297,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel16(out *jwriter.Writer, i out.RawString("null") } else { out.RawByte('[') - for v53, v54 := range in.Values { - if v53 > 0 { + for v56, v57 := range in.Values { + if v56 > 0 { out.RawByte(',') } - (v54).MarshalTinyJSON(out) + (v57).MarshalTinyJSON(out) } out.RawByte(']') } @@ -2188,27 +2312,27 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel16(out *jwriter.Writer, i // MarshalJSON supports json.Marshaler interface func (v ListValue) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel16(&w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel17(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalTinyJSON supports tinyjson.Marshaler interface func (v ListValue) MarshalTinyJSON(w *jwriter.Writer) { - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel16(w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel17(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ListValue) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel16(&r, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel17(&r, v) return r.Error() } // UnmarshalTinyJSON supports tinyjson.Unmarshaler interface func (v *ListValue) UnmarshalTinyJSON(l *jlexer.Lexer) { - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel16(l, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel17(l, v) } -func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel17(in *jlexer.Lexer, out *List) { +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel18(in *jlexer.Lexer, out *List) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2239,7 +2363,7 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel17(in *jlexer.Lexer, out in.Consumed() } } -func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel17(out *jwriter.Writer, in List) { +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel18(out *jwriter.Writer, in List) { out.RawByte('{') first := true _ = first @@ -2254,27 +2378,27 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel17(out *jwriter.Writer, i // MarshalJSON supports json.Marshaler interface func (v List) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel17(&w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel18(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalTinyJSON supports tinyjson.Marshaler interface func (v List) MarshalTinyJSON(w *jwriter.Writer) { - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel17(w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel18(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *List) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel17(&r, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel18(&r, v) return r.Error() } // UnmarshalTinyJSON supports tinyjson.Unmarshaler interface func (v *List) UnmarshalTinyJSON(l *jlexer.Lexer) { - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel17(l, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel18(l, v) } -func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel18(in *jlexer.Lexer, out *Interface) { +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel19(in *jlexer.Lexer, out *Interface) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2321,9 +2445,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel18(in *jlexer.Lexer, out out.Operations = (out.Operations)[:0] } for !in.IsDelim(']') { - var v55 Operation - (v55).UnmarshalTinyJSON(in) - out.Operations = append(out.Operations, v55) + var v58 Operation + (v58).UnmarshalTinyJSON(in) + out.Operations = append(out.Operations, v58) in.WantComma() } in.Delim(']') @@ -2344,9 +2468,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel18(in *jlexer.Lexer, out out.Annotations = (out.Annotations)[:0] } for !in.IsDelim(']') { - var v56 Annotation - (v56).UnmarshalTinyJSON(in) - out.Annotations = append(out.Annotations, v56) + var v59 Annotation + (v59).UnmarshalTinyJSON(in) + out.Annotations = append(out.Annotations, v59) in.WantComma() } in.Delim(']') @@ -2361,7 +2485,7 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel18(in *jlexer.Lexer, out in.Consumed() } } -func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel18(out *jwriter.Writer, in Interface) { +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel19(out *jwriter.Writer, in Interface) { out.RawByte('{') first := true _ = first @@ -2382,11 +2506,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel18(out *jwriter.Writer, i out.RawString("null") } else { out.RawByte('[') - for v57, v58 := range in.Operations { - if v57 > 0 { + for v60, v61 := range in.Operations { + if v60 > 0 { out.RawByte(',') } - (v58).MarshalTinyJSON(out) + (v61).MarshalTinyJSON(out) } out.RawByte(']') } @@ -2396,11 +2520,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel18(out *jwriter.Writer, i out.RawString(prefix) { out.RawByte('[') - for v59, v60 := range in.Annotations { - if v59 > 0 { + for v62, v63 := range in.Annotations { + if v62 > 0 { out.RawByte(',') } - (v60).MarshalTinyJSON(out) + (v63).MarshalTinyJSON(out) } out.RawByte(']') } @@ -2411,27 +2535,27 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel18(out *jwriter.Writer, i // MarshalJSON supports json.Marshaler interface func (v Interface) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel18(&w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel19(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalTinyJSON supports tinyjson.Marshaler interface func (v Interface) MarshalTinyJSON(w *jwriter.Writer) { - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel18(w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel19(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Interface) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel18(&r, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel19(&r, v) return r.Error() } // UnmarshalTinyJSON supports tinyjson.Unmarshaler interface func (v *Interface) UnmarshalTinyJSON(l *jlexer.Lexer) { - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel18(l, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel19(l, v) } -func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel19(in *jlexer.Lexer, out *ImportRef) { +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel20(in *jlexer.Lexer, out *ImportRef) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2472,7 +2596,7 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel19(in *jlexer.Lexer, out in.Consumed() } } -func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel19(out *jwriter.Writer, in ImportRef) { +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel20(out *jwriter.Writer, in ImportRef) { out.RawByte('{') first := true _ = first @@ -2492,27 +2616,27 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel19(out *jwriter.Writer, i // MarshalJSON supports json.Marshaler interface func (v ImportRef) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel19(&w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel20(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalTinyJSON supports tinyjson.Marshaler interface func (v ImportRef) MarshalTinyJSON(w *jwriter.Writer) { - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel19(w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel20(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *ImportRef) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel19(&r, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel20(&r, v) return r.Error() } // UnmarshalTinyJSON supports tinyjson.Unmarshaler interface func (v *ImportRef) UnmarshalTinyJSON(l *jlexer.Lexer) { - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel19(l, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel20(l, v) } -func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel20(in *jlexer.Lexer, out *Import) { +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel21(in *jlexer.Lexer, out *Import) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2559,9 +2683,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel20(in *jlexer.Lexer, out out.Names = (out.Names)[:0] } for !in.IsDelim(']') { - var v61 ImportRef - (v61).UnmarshalTinyJSON(in) - out.Names = append(out.Names, v61) + var v64 ImportRef + (v64).UnmarshalTinyJSON(in) + out.Names = append(out.Names, v64) in.WantComma() } in.Delim(']') @@ -2584,9 +2708,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel20(in *jlexer.Lexer, out out.Annotations = (out.Annotations)[:0] } for !in.IsDelim(']') { - var v62 Annotation - (v62).UnmarshalTinyJSON(in) - out.Annotations = append(out.Annotations, v62) + var v65 Annotation + (v65).UnmarshalTinyJSON(in) + out.Annotations = append(out.Annotations, v65) in.WantComma() } in.Delim(']') @@ -2601,7 +2725,7 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel20(in *jlexer.Lexer, out in.Consumed() } } -func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel20(out *jwriter.Writer, in Import) { +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel21(out *jwriter.Writer, in Import) { out.RawByte('{') first := true _ = first @@ -2626,11 +2750,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel20(out *jwriter.Writer, i out.RawString(prefix) { out.RawByte('[') - for v63, v64 := range in.Names { - if v63 > 0 { + for v66, v67 := range in.Names { + if v66 > 0 { out.RawByte(',') } - (v64).MarshalTinyJSON(out) + (v67).MarshalTinyJSON(out) } out.RawByte(']') } @@ -2645,11 +2769,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel20(out *jwriter.Writer, i out.RawString(prefix) { out.RawByte('[') - for v65, v66 := range in.Annotations { - if v65 > 0 { + for v68, v69 := range in.Annotations { + if v68 > 0 { out.RawByte(',') } - (v66).MarshalTinyJSON(out) + (v69).MarshalTinyJSON(out) } out.RawByte(']') } @@ -2660,27 +2784,27 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel20(out *jwriter.Writer, i // MarshalJSON supports json.Marshaler interface func (v Import) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel20(&w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel21(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalTinyJSON supports tinyjson.Marshaler interface func (v Import) MarshalTinyJSON(w *jwriter.Writer) { - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel20(w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel21(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Import) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel20(&r, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel21(&r, v) return r.Error() } // UnmarshalTinyJSON supports tinyjson.Unmarshaler interface func (v *Import) UnmarshalTinyJSON(l *jlexer.Lexer) { - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel20(l, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel21(l, v) } -func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel21(in *jlexer.Lexer, out *Field) { +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel22(in *jlexer.Lexer, out *Field) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2739,9 +2863,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel21(in *jlexer.Lexer, out out.Annotations = (out.Annotations)[:0] } for !in.IsDelim(']') { - var v67 Annotation - (v67).UnmarshalTinyJSON(in) - out.Annotations = append(out.Annotations, v67) + var v70 Annotation + (v70).UnmarshalTinyJSON(in) + out.Annotations = append(out.Annotations, v70) in.WantComma() } in.Delim(']') @@ -2756,7 +2880,7 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel21(in *jlexer.Lexer, out in.Consumed() } } -func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel21(out *jwriter.Writer, in Field) { +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel22(out *jwriter.Writer, in Field) { out.RawByte('{') first := true _ = first @@ -2785,11 +2909,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel21(out *jwriter.Writer, i out.RawString(prefix) { out.RawByte('[') - for v68, v69 := range in.Annotations { - if v68 > 0 { + for v71, v72 := range in.Annotations { + if v71 > 0 { out.RawByte(',') } - (v69).MarshalTinyJSON(out) + (v72).MarshalTinyJSON(out) } out.RawByte(']') } @@ -2800,27 +2924,27 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel21(out *jwriter.Writer, i // MarshalJSON supports json.Marshaler interface func (v Field) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel21(&w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel22(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalTinyJSON supports tinyjson.Marshaler interface func (v Field) MarshalTinyJSON(w *jwriter.Writer) { - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel21(w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel22(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Field) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel21(&r, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel22(&r, v) return r.Error() } // UnmarshalTinyJSON supports tinyjson.Unmarshaler interface func (v *Field) UnmarshalTinyJSON(l *jlexer.Lexer) { - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel21(l, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel22(l, v) } -func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel22(in *jlexer.Lexer, out *Error) { +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel23(in *jlexer.Lexer, out *Error) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -2857,9 +2981,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel22(in *jlexer.Lexer, out out.Positions = (out.Positions)[:0] } for !in.IsDelim(']') { - var v70 uint32 - v70 = uint32(in.Uint32()) - out.Positions = append(out.Positions, v70) + var v73 uint32 + v73 = uint32(in.Uint32()) + out.Positions = append(out.Positions, v73) in.WantComma() } in.Delim(']') @@ -2880,9 +3004,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel22(in *jlexer.Lexer, out out.Locations = (out.Locations)[:0] } for !in.IsDelim(']') { - var v71 Location - (v71).UnmarshalTinyJSON(in) - out.Locations = append(out.Locations, v71) + var v74 Location + (v74).UnmarshalTinyJSON(in) + out.Locations = append(out.Locations, v74) in.WantComma() } in.Delim(']') @@ -2897,7 +3021,7 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel22(in *jlexer.Lexer, out in.Consumed() } } -func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel22(out *jwriter.Writer, in Error) { +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel23(out *jwriter.Writer, in Error) { out.RawByte('{') first := true _ = first @@ -2913,11 +3037,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel22(out *jwriter.Writer, i out.RawString("null") } else { out.RawByte('[') - for v72, v73 := range in.Positions { - if v72 > 0 { + for v75, v76 := range in.Positions { + if v75 > 0 { out.RawByte(',') } - out.Uint32(uint32(v73)) + out.Uint32(uint32(v76)) } out.RawByte(']') } @@ -2929,11 +3053,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel22(out *jwriter.Writer, i out.RawString("null") } else { out.RawByte('[') - for v74, v75 := range in.Locations { - if v74 > 0 { + for v77, v78 := range in.Locations { + if v77 > 0 { out.RawByte(',') } - (v75).MarshalTinyJSON(out) + (v78).MarshalTinyJSON(out) } out.RawByte(']') } @@ -2944,27 +3068,27 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel22(out *jwriter.Writer, i // MarshalJSON supports json.Marshaler interface func (v Error) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel22(&w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel23(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalTinyJSON supports tinyjson.Marshaler interface func (v Error) MarshalTinyJSON(w *jwriter.Writer) { - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel22(w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel23(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Error) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel22(&r, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel23(&r, v) return r.Error() } // UnmarshalTinyJSON supports tinyjson.Unmarshaler interface func (v *Error) UnmarshalTinyJSON(l *jlexer.Lexer) { - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel22(l, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel23(l, v) } -func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel23(in *jlexer.Lexer, out *EnumValue) { +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel24(in *jlexer.Lexer, out *EnumValue) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3023,9 +3147,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel23(in *jlexer.Lexer, out out.Annotations = (out.Annotations)[:0] } for !in.IsDelim(']') { - var v76 Annotation - (v76).UnmarshalTinyJSON(in) - out.Annotations = append(out.Annotations, v76) + var v79 Annotation + (v79).UnmarshalTinyJSON(in) + out.Annotations = append(out.Annotations, v79) in.WantComma() } in.Delim(']') @@ -3040,7 +3164,7 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel23(in *jlexer.Lexer, out in.Consumed() } } -func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel23(out *jwriter.Writer, in EnumValue) { +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel24(out *jwriter.Writer, in EnumValue) { out.RawByte('{') first := true _ = first @@ -3069,11 +3193,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel23(out *jwriter.Writer, i out.RawString(prefix) { out.RawByte('[') - for v77, v78 := range in.Annotations { - if v77 > 0 { + for v80, v81 := range in.Annotations { + if v80 > 0 { out.RawByte(',') } - (v78).MarshalTinyJSON(out) + (v81).MarshalTinyJSON(out) } out.RawByte(']') } @@ -3084,27 +3208,27 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel23(out *jwriter.Writer, i // MarshalJSON supports json.Marshaler interface func (v EnumValue) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel23(&w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel24(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalTinyJSON supports tinyjson.Marshaler interface func (v EnumValue) MarshalTinyJSON(w *jwriter.Writer) { - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel23(w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel24(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *EnumValue) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel23(&r, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel24(&r, v) return r.Error() } // UnmarshalTinyJSON supports tinyjson.Unmarshaler interface func (v *EnumValue) UnmarshalTinyJSON(l *jlexer.Lexer) { - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel23(l, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel24(l, v) } -func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel24(in *jlexer.Lexer, out *Enum) { +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel25(in *jlexer.Lexer, out *Enum) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3151,9 +3275,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel24(in *jlexer.Lexer, out out.Values = (out.Values)[:0] } for !in.IsDelim(']') { - var v79 EnumValue - (v79).UnmarshalTinyJSON(in) - out.Values = append(out.Values, v79) + var v82 EnumValue + (v82).UnmarshalTinyJSON(in) + out.Values = append(out.Values, v82) in.WantComma() } in.Delim(']') @@ -3174,9 +3298,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel24(in *jlexer.Lexer, out out.Annotations = (out.Annotations)[:0] } for !in.IsDelim(']') { - var v80 Annotation - (v80).UnmarshalTinyJSON(in) - out.Annotations = append(out.Annotations, v80) + var v83 Annotation + (v83).UnmarshalTinyJSON(in) + out.Annotations = append(out.Annotations, v83) in.WantComma() } in.Delim(']') @@ -3191,7 +3315,7 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel24(in *jlexer.Lexer, out in.Consumed() } } -func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel24(out *jwriter.Writer, in Enum) { +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel25(out *jwriter.Writer, in Enum) { out.RawByte('{') first := true _ = first @@ -3212,11 +3336,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel24(out *jwriter.Writer, i out.RawString("null") } else { out.RawByte('[') - for v81, v82 := range in.Values { - if v81 > 0 { + for v84, v85 := range in.Values { + if v84 > 0 { out.RawByte(',') } - (v82).MarshalTinyJSON(out) + (v85).MarshalTinyJSON(out) } out.RawByte(']') } @@ -3226,11 +3350,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel24(out *jwriter.Writer, i out.RawString(prefix) { out.RawByte('[') - for v83, v84 := range in.Annotations { - if v83 > 0 { + for v86, v87 := range in.Annotations { + if v86 > 0 { out.RawByte(',') } - (v84).MarshalTinyJSON(out) + (v87).MarshalTinyJSON(out) } out.RawByte(']') } @@ -3241,27 +3365,27 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel24(out *jwriter.Writer, i // MarshalJSON supports json.Marshaler interface func (v Enum) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel24(&w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel25(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalTinyJSON supports tinyjson.Marshaler interface func (v Enum) MarshalTinyJSON(w *jwriter.Writer) { - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel24(w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel25(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Enum) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel24(&r, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel25(&r, v) return r.Error() } // UnmarshalTinyJSON supports tinyjson.Unmarshaler interface func (v *Enum) UnmarshalTinyJSON(l *jlexer.Lexer) { - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel24(l, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel25(l, v) } -func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel25(in *jlexer.Lexer, out *DirectiveRequire) { +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel26(in *jlexer.Lexer, out *DirectiveRequire) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3298,11 +3422,11 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel25(in *jlexer.Lexer, out out.Locations = (out.Locations)[:0] } for !in.IsDelim(']') { - var v85 DirectiveLocation + var v88 DirectiveLocation if data := in.Raw(); in.Ok() { - in.AddError((v85).UnmarshalJSON(data)) + in.AddError((v88).UnmarshalJSON(data)) } - out.Locations = append(out.Locations, v85) + out.Locations = append(out.Locations, v88) in.WantComma() } in.Delim(']') @@ -3317,7 +3441,7 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel25(in *jlexer.Lexer, out in.Consumed() } } -func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel25(out *jwriter.Writer, in DirectiveRequire) { +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel26(out *jwriter.Writer, in DirectiveRequire) { out.RawByte('{') first := true _ = first @@ -3333,11 +3457,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel25(out *jwriter.Writer, i out.RawString("null") } else { out.RawByte('[') - for v86, v87 := range in.Locations { - if v86 > 0 { + for v89, v90 := range in.Locations { + if v89 > 0 { out.RawByte(',') } - out.Raw((v87).MarshalJSON()) + out.Raw((v90).MarshalJSON()) } out.RawByte(']') } @@ -3348,27 +3472,27 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel25(out *jwriter.Writer, i // MarshalJSON supports json.Marshaler interface func (v DirectiveRequire) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel25(&w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel26(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalTinyJSON supports tinyjson.Marshaler interface func (v DirectiveRequire) MarshalTinyJSON(w *jwriter.Writer) { - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel25(w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel26(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *DirectiveRequire) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel25(&r, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel26(&r, v) return r.Error() } // UnmarshalTinyJSON supports tinyjson.Unmarshaler interface func (v *DirectiveRequire) UnmarshalTinyJSON(l *jlexer.Lexer) { - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel25(l, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel26(l, v) } -func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel26(in *jlexer.Lexer, out *Directive) { +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel27(in *jlexer.Lexer, out *Directive) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3415,9 +3539,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel26(in *jlexer.Lexer, out out.Parameters = (out.Parameters)[:0] } for !in.IsDelim(']') { - var v88 Parameter - (v88).UnmarshalTinyJSON(in) - out.Parameters = append(out.Parameters, v88) + var v91 Parameter + (v91).UnmarshalTinyJSON(in) + out.Parameters = append(out.Parameters, v91) in.WantComma() } in.Delim(']') @@ -3438,11 +3562,11 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel26(in *jlexer.Lexer, out out.Locations = (out.Locations)[:0] } for !in.IsDelim(']') { - var v89 DirectiveLocation + var v92 DirectiveLocation if data := in.Raw(); in.Ok() { - in.AddError((v89).UnmarshalJSON(data)) + in.AddError((v92).UnmarshalJSON(data)) } - out.Locations = append(out.Locations, v89) + out.Locations = append(out.Locations, v92) in.WantComma() } in.Delim(']') @@ -3463,9 +3587,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel26(in *jlexer.Lexer, out out.Require = (out.Require)[:0] } for !in.IsDelim(']') { - var v90 DirectiveRequire - (v90).UnmarshalTinyJSON(in) - out.Require = append(out.Require, v90) + var v93 DirectiveRequire + (v93).UnmarshalTinyJSON(in) + out.Require = append(out.Require, v93) in.WantComma() } in.Delim(']') @@ -3480,7 +3604,7 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel26(in *jlexer.Lexer, out in.Consumed() } } -func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel26(out *jwriter.Writer, in Directive) { +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel27(out *jwriter.Writer, in Directive) { out.RawByte('{') first := true _ = first @@ -3499,11 +3623,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel26(out *jwriter.Writer, i out.RawString(prefix) { out.RawByte('[') - for v91, v92 := range in.Parameters { - if v91 > 0 { + for v94, v95 := range in.Parameters { + if v94 > 0 { out.RawByte(',') } - (v92).MarshalTinyJSON(out) + (v95).MarshalTinyJSON(out) } out.RawByte(']') } @@ -3515,11 +3639,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel26(out *jwriter.Writer, i out.RawString("null") } else { out.RawByte('[') - for v93, v94 := range in.Locations { - if v93 > 0 { + for v96, v97 := range in.Locations { + if v96 > 0 { out.RawByte(',') } - out.Raw((v94).MarshalJSON()) + out.Raw((v97).MarshalJSON()) } out.RawByte(']') } @@ -3531,11 +3655,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel26(out *jwriter.Writer, i out.RawString("null") } else { out.RawByte('[') - for v95, v96 := range in.Require { - if v95 > 0 { + for v98, v99 := range in.Require { + if v98 > 0 { out.RawByte(',') } - (v96).MarshalTinyJSON(out) + (v99).MarshalTinyJSON(out) } out.RawByte(']') } @@ -3546,27 +3670,27 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel26(out *jwriter.Writer, i // MarshalJSON supports json.Marshaler interface func (v Directive) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel26(&w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel27(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalTinyJSON supports tinyjson.Marshaler interface func (v Directive) MarshalTinyJSON(w *jwriter.Writer) { - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel26(w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel27(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Directive) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel26(&r, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel27(&r, v) return r.Error() } // UnmarshalTinyJSON supports tinyjson.Unmarshaler interface func (v *Directive) UnmarshalTinyJSON(l *jlexer.Lexer) { - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel26(l, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel27(l, v) } -func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel27(in *jlexer.Lexer, out *Argument) { +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel28(in *jlexer.Lexer, out *Argument) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3599,7 +3723,7 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel27(in *jlexer.Lexer, out in.Consumed() } } -func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel27(out *jwriter.Writer, in Argument) { +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel28(out *jwriter.Writer, in Argument) { out.RawByte('{') first := true _ = first @@ -3619,27 +3743,27 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel27(out *jwriter.Writer, i // MarshalJSON supports json.Marshaler interface func (v Argument) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel27(&w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel28(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalTinyJSON supports tinyjson.Marshaler interface func (v Argument) MarshalTinyJSON(w *jwriter.Writer) { - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel27(w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel28(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Argument) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel27(&r, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel28(&r, v) return r.Error() } // UnmarshalTinyJSON supports tinyjson.Unmarshaler interface func (v *Argument) UnmarshalTinyJSON(l *jlexer.Lexer) { - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel27(l, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel28(l, v) } -func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel28(in *jlexer.Lexer, out *Annotation) { +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel29(in *jlexer.Lexer, out *Annotation) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3676,9 +3800,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel28(in *jlexer.Lexer, out out.Arguments = (out.Arguments)[:0] } for !in.IsDelim(']') { - var v97 Argument - (v97).UnmarshalTinyJSON(in) - out.Arguments = append(out.Arguments, v97) + var v100 Argument + (v100).UnmarshalTinyJSON(in) + out.Arguments = append(out.Arguments, v100) in.WantComma() } in.Delim(']') @@ -3693,7 +3817,7 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel28(in *jlexer.Lexer, out in.Consumed() } } -func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel28(out *jwriter.Writer, in Annotation) { +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel29(out *jwriter.Writer, in Annotation) { out.RawByte('{') first := true _ = first @@ -3707,11 +3831,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel28(out *jwriter.Writer, i out.RawString(prefix) { out.RawByte('[') - for v98, v99 := range in.Arguments { - if v98 > 0 { + for v101, v102 := range in.Arguments { + if v101 > 0 { out.RawByte(',') } - (v99).MarshalTinyJSON(out) + (v102).MarshalTinyJSON(out) } out.RawByte(']') } @@ -3722,27 +3846,27 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel28(out *jwriter.Writer, i // MarshalJSON supports json.Marshaler interface func (v Annotation) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel28(&w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel29(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalTinyJSON supports tinyjson.Marshaler interface func (v Annotation) MarshalTinyJSON(w *jwriter.Writer) { - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel28(w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel29(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Annotation) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel28(&r, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel29(&r, v) return r.Error() } // UnmarshalTinyJSON supports tinyjson.Unmarshaler interface func (v *Annotation) UnmarshalTinyJSON(l *jlexer.Lexer) { - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel28(l, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel29(l, v) } -func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel29(in *jlexer.Lexer, out *Alias) { +func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel30(in *jlexer.Lexer, out *Alias) { isTopLevel := in.IsStart() if in.IsNull() { if isTopLevel { @@ -3791,9 +3915,9 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel29(in *jlexer.Lexer, out out.Annotations = (out.Annotations)[:0] } for !in.IsDelim(']') { - var v100 Annotation - (v100).UnmarshalTinyJSON(in) - out.Annotations = append(out.Annotations, v100) + var v103 Annotation + (v103).UnmarshalTinyJSON(in) + out.Annotations = append(out.Annotations, v103) in.WantComma() } in.Delim(']') @@ -3808,7 +3932,7 @@ func tinyjson85aaecc5DecodeGithubComApexlangApexGoModel29(in *jlexer.Lexer, out in.Consumed() } } -func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel29(out *jwriter.Writer, in Alias) { +func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel30(out *jwriter.Writer, in Alias) { out.RawByte('{') first := true _ = first @@ -3832,11 +3956,11 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel29(out *jwriter.Writer, i out.RawString(prefix) { out.RawByte('[') - for v101, v102 := range in.Annotations { - if v101 > 0 { + for v104, v105 := range in.Annotations { + if v104 > 0 { out.RawByte(',') } - (v102).MarshalTinyJSON(out) + (v105).MarshalTinyJSON(out) } out.RawByte(']') } @@ -3847,23 +3971,23 @@ func tinyjson85aaecc5EncodeGithubComApexlangApexGoModel29(out *jwriter.Writer, i // MarshalJSON supports json.Marshaler interface func (v Alias) MarshalJSON() ([]byte, error) { w := jwriter.Writer{} - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel29(&w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel30(&w, v) return w.Buffer.BuildBytes(), w.Error } // MarshalTinyJSON supports tinyjson.Marshaler interface func (v Alias) MarshalTinyJSON(w *jwriter.Writer) { - tinyjson85aaecc5EncodeGithubComApexlangApexGoModel29(w, v) + tinyjson85aaecc5EncodeGithubComApexlangApexGoModel30(w, v) } // UnmarshalJSON supports json.Unmarshaler interface func (v *Alias) UnmarshalJSON(data []byte) error { r := jlexer.Lexer{Data: data} - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel29(&r, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel30(&r, v) return r.Error() } // UnmarshalTinyJSON supports tinyjson.Unmarshaler interface func (v *Alias) UnmarshalTinyJSON(l *jlexer.Lexer) { - tinyjson85aaecc5DecodeGithubComApexlangApexGoModel29(l, v) + tinyjson85aaecc5DecodeGithubComApexlangApexGoModel30(l, v) } diff --git a/model/msgpack.go b/model/msgpack.go index 565e1cd..5f16c51 100644 --- a/model/msgpack.go +++ b/model/msgpack.go @@ -1093,20 +1093,20 @@ func (o *Union) Decode(decoder msgpack.Reader) error { o.Name, err = decoder.ReadString() case "description": o.Description, err = decoder.ReadNillableString() - case "types": + case "members": listSize, err := decoder.ReadArraySize() if err != nil { return err } - o.Types = make([]TypeRef, 0, listSize) + o.Members = make([]UnionMember, 0, listSize) for listSize > 0 { listSize-- - var nonNilItem TypeRef - nonNilItem, err = msgpack.Decode[TypeRef](decoder) + var nonNilItem UnionMember + err = nonNilItem.Decode(decoder) if err != nil { return err } - o.Types = append(o.Types, nonNilItem) + o.Members = append(o.Members, nonNilItem) } case "annotations": listSize, err := decoder.ReadArraySize() @@ -1144,9 +1144,9 @@ func (o *Union) Encode(encoder msgpack.Writer) error { encoder.WriteString(o.Name) encoder.WriteString("description") encoder.WriteNillableString(o.Description) - encoder.WriteString("types") - encoder.WriteArraySize(uint32(len(o.Types))) - for _, v := range o.Types { + encoder.WriteString("members") + encoder.WriteArraySize(uint32(len(o.Members))) + for _, v := range o.Members { v.Encode(encoder) } encoder.WriteString("annotations") @@ -1158,6 +1158,68 @@ func (o *Union) Encode(encoder msgpack.Writer) error { return nil } +func (o *UnionMember) Decode(decoder msgpack.Reader) error { + numFields, err := decoder.ReadMapSize() + if err != nil { + return err + } + + for numFields > 0 { + numFields-- + field, err := decoder.ReadString() + if err != nil { + return err + } + switch field { + case "description": + o.Description, err = decoder.ReadNillableString() + case "type": + o.Type, err = msgpack.Decode[TypeRef](decoder) + case "annotations": + listSize, err := decoder.ReadArraySize() + if err != nil { + return err + } + o.Annotations = make([]Annotation, 0, listSize) + for listSize > 0 { + listSize-- + var nonNilItem Annotation + err = nonNilItem.Decode(decoder) + if err != nil { + return err + } + o.Annotations = append(o.Annotations, nonNilItem) + } + default: + err = decoder.Skip() + } + if err != nil { + return err + } + } + + return nil +} + +func (o *UnionMember) Encode(encoder msgpack.Writer) error { + if o == nil { + encoder.WriteNil() + return nil + } + encoder.WriteMapSize(3) + encoder.WriteString("description") + encoder.WriteNillableString(o.Description) + encoder.WriteString("type") + o.Type.Encode(encoder) + encoder.WriteString("annotations") + encoder.WriteArraySize(uint32(len(o.Annotations))) + for _, v := range o.Annotations { + v.Encode(encoder) + } + + return nil +} + func (o *Enum) Decode(decoder msgpack.Reader) error { numFields, err := decoder.ReadMapSize() if err != nil { diff --git a/model/services.go b/model/services.go index 1364f52..c7276e1 100644 --- a/model/services.go +++ b/model/services.go @@ -1,3 +1,19 @@ +/* +Copyright 2024 The Apex Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + package model import ( diff --git a/parser/parser.go b/parser/parser.go index 2860615..f5bd42c 100644 --- a/parser/parser.go +++ b/parser/parser.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -243,7 +243,7 @@ func parseDocument(parser *Parser) (*ast.Document, error) { name, v.Description, v.Annotations, - v.Types, + v.Members, ) nodes = append(nodes, renamedUnion) @@ -1219,14 +1219,28 @@ func parseUnionDefinition(parser *Parser) (ast.Node, error) { * - NamedType * - UnionMembers | NamedType */ -func parseUnionMembers(parser *Parser) ([]ast.Type, error) { - members := []ast.Type{} +func parseUnionMembers(parser *Parser) ([]*ast.UnionMemberDefinition, error) { + members := []*ast.UnionMemberDefinition{} for { - member, err := parseType(parser) + start := parser.Token.Start + description, err := parseDescription(parser) + if err != nil { + return nil, err + } + t, err := parseType(parser) if err != nil { return members, err } - members = append(members, member) + annotations, err := parseAnnotations(parser) + if err != nil { + return nil, err + } + members = append(members, ast.NewUnionMemberDefinition( + loc(parser, start), + description, + t, + annotations, + )) if skp, err := skip(parser, lexer.TokenKind[lexer.PIPE]); err != nil { return nil, err } else if !skp { diff --git a/rules/camel_case_directive_names.go b/rules/camel_case_directive_names.go index 53ad659..be33faa 100644 --- a/rules/camel_case_directive_names.go +++ b/rules/camel_case_directive_names.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/rules/known_types.go b/rules/known_types.go index 6798301..2bb0fb6 100644 --- a/rules/known_types.go +++ b/rules/known_types.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -91,12 +91,12 @@ func (c *knownTypes) VisitField(context ast.Context) { func (c *knownTypes) VisitUnion(context ast.Context) { union := context.Union - for _, ut := range union.Types { + for _, ut := range union.Members { c.checkType( context, fmt.Sprintf(`union %q`, union.Name.Value), union.Name.Value, - ut, + ut.Type, ) } } diff --git a/rules/namespace_first.go b/rules/namespace_first.go index f01075e..3daca32 100644 --- a/rules/namespace_first.go +++ b/rules/namespace_first.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/rules/pascal_case_type_names.go b/rules/pascal_case_type_names.go index a379ba1..2fc034c 100644 --- a/rules/pascal_case_type_names.go +++ b/rules/pascal_case_type_names.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/rules/rules.go b/rules/rules.go index e3d494e..8e9c4d9 100644 --- a/rules/rules.go +++ b/rules/rules.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/rules/single_namespace_defined.go b/rules/single_namespace_defined.go index b538a6b..87dc3b0 100644 --- a/rules/single_namespace_defined.go +++ b/rules/single_namespace_defined.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/rules/unique_directive_names.go b/rules/unique_directive_names.go index a47fa27..7a1cfe8 100644 --- a/rules/unique_directive_names.go +++ b/rules/unique_directive_names.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/rules/unique_enum_value_indexes.go b/rules/unique_enum_value_indexes.go index 6bd2fa7..9612baa 100644 --- a/rules/unique_enum_value_indexes.go +++ b/rules/unique_enum_value_indexes.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/rules/unique_enum_value_names.go b/rules/unique_enum_value_names.go index adab9c4..02b9b85 100644 --- a/rules/unique_enum_value_names.go +++ b/rules/unique_enum_value_names.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/rules/unique_function_names.go b/rules/unique_function_names.go index 9a2b98c..48ee7f5 100644 --- a/rules/unique_function_names.go +++ b/rules/unique_function_names.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/rules/unique_object_names.go b/rules/unique_object_names.go index c4a570b..6e2cf0c 100644 --- a/rules/unique_object_names.go +++ b/rules/unique_object_names.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/rules/unique_operation_names.go b/rules/unique_operation_names.go index a575f2e..6f8440d 100644 --- a/rules/unique_operation_names.go +++ b/rules/unique_operation_names.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/rules/unique_parameter_names.go b/rules/unique_parameter_names.go index 4ee7174..7be6f16 100644 --- a/rules/unique_parameter_names.go +++ b/rules/unique_parameter_names.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/rules/unique_type_field_names.go b/rules/unique_type_field_names.go index f82b255..e6d54b4 100644 --- a/rules/unique_type_field_names.go +++ b/rules/unique_type_field_names.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/rules/valid_annotation_arguments.go b/rules/valid_annotation_arguments.go index ef568cf..fd818d9 100644 --- a/rules/valid_annotation_arguments.go +++ b/rules/valid_annotation_arguments.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/rules/valid_annotation_locations.go b/rules/valid_annotation_locations.go index c35bdf9..70e4bd2 100644 --- a/rules/valid_annotation_locations.go +++ b/rules/valid_annotation_locations.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/rules/valid_directive_locations.go b/rules/valid_directive_locations.go index e1aba6e..f329f5c 100644 --- a/rules/valid_directive_locations.go +++ b/rules/valid_directive_locations.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/rules/valid_directive_parameter_types.go b/rules/valid_directive_parameter_types.go index 1e95bdb..6066de6 100644 --- a/rules/valid_directive_parameter_types.go +++ b/rules/valid_directive_parameter_types.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/rules/valid_directive_requires.go b/rules/valid_directive_requires.go index aacd696..5e0ddc9 100644 --- a/rules/valid_directive_requires.go +++ b/rules/valid_directive_requires.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/rules/valid_enum_value_indexes.go b/rules/valid_enum_value_indexes.go index cea0c02..4dff01b 100644 --- a/rules/valid_enum_value_indexes.go +++ b/rules/valid_enum_value_indexes.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/source/source.go b/source/source.go index 1c0f432..1210150 100644 --- a/source/source.go +++ b/source/source.go @@ -1,5 +1,5 @@ /* -Copyright 2022 The Apex Authors. +Copyright 2024 The Apex Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.