diff --git a/Makefile b/Makefile index daf463e10..a3e9279a1 100644 --- a/Makefile +++ b/Makefile @@ -208,10 +208,6 @@ run: run-example-gateway go-docs: godoc -http=:6060 -.PHONY: clean-easyjson -clean-easyjson: - find . -name "*.bak" -delete - find . -name "easyjson-bootstrap*.go" -delete .PHONY: kill-dead-benchmarks kill-dead-benchmarks: @@ -265,7 +261,7 @@ clean-vendor: rm -rf ./vendor .PHONY: clean -clean: clean-easyjson clean-cover clean-vendor +clean: clean-cover clean-vendor go clean rm -f $(PROGS) diff --git a/README.md b/README.md index 2acd0c5a4..6af9bf337 100644 --- a/README.md +++ b/README.md @@ -306,7 +306,7 @@ Zanzibar provides HTTP and TChannel runtime components for both clients and serv Zanzibar expects non-custom clients and endpoints to define their interfaces using Thrift ([Zanzibar Thrift file semantics](https://github.com/uber/zanzibar/blob/master/docs/thrift.md)). For example, the `bar` endpoint defines its interfaces using the [bar.thrift](https://github.com/uber/zanzibar/blob/master/examples/example-gateway/idl/endpoints/bar/bar.thrift) as specified in [hello.yaml](https://github.com/uber/zanzibar/blob/master/examples/example-gateway/endpoints/bar/hello.yaml#L5). The data types in such thrift files must have their equivalents in Go. - For tchannel clients/endpoints, network communication is Thrift over TChannel. Zanzibar uses [thriftrw](https://github.com/thriftrw/thriftrw-go) to generate Go structs and thrift (de)serializers; -- For http clients/endpoints, network communication is JSON over HTTP. Zanzibar uses [thriftrw](https://github.com/thriftrw/thriftrw-go) to generate Go structs and then uses [easyjson](https://github.com/mailru/easyjson) to generate JSON (de)serializers. +- For http clients/endpoints, network communication is JSON over HTTP. Zanzibar uses [thriftrw](https://github.com/thriftrw/thriftrw-go) to generate Go structs and encoding/json for (de)serializing. The [pre-steps.sh](https://github.com/uber/zanzibar/blob/master/codegen/runner/pre-steps.sh) script takes care of this part of the code generation, and places the generated code under `build/gen-code` directory. diff --git a/codegen/runner/pre-steps.sh b/codegen/runner/pre-steps.sh index c3d165592..c574a3498 100644 --- a/codegen/runner/pre-steps.sh +++ b/codegen/runner/pre-steps.sh @@ -31,10 +31,6 @@ fi THRIFTRW_SRCS="$(echo "$THRIFTRW_SRCS" | xargs -n1 | sort | uniq)" DIRNAME="$(dirname "$0")" -EASY_JSON_RAW_DIR="$DIRNAME/../../scripts/easy_json" -EASY_JSON_DIR="$(cd "$EASY_JSON_RAW_DIR";pwd)" -EASY_JSON_FILE="$EASY_JSON_DIR/easy_json.go" -EASY_JSON_BINARY="$EASY_JSON_DIR/easy_json" RESOLVE_THRIFT_FILE="$DIRNAME/../../scripts/resolve_thrift/main.go" RESOLVE_THRIFT_BINARY="$DIRNAME/../../scripts/resolve_thrift/resolve_thrift" RESOLVE_I64_FILE="$DIRNAME/../../scripts/resolve_i64/main.go" @@ -139,10 +135,6 @@ end=$(date +%s) runtime=$((end-start)) echo "Generated structs : +$runtime" -go build -o "$EASY_JSON_BINARY" "$EASY_JSON_FILE" -end=$(date +%s) -runtime=$((end-start)) -echo "Compiled easyjson : +$runtime" go build -o "$RESOLVE_THRIFT_BINARY" "$RESOLVE_THRIFT_FILE" go build -o "$RESOLVE_I64_BINARY" "$RESOLVE_I64_FILE" @@ -190,16 +182,4 @@ for config_file in ${config_files}; do done target_dirs=($(echo "$target_dirs" | tr ' ' '\n' | sort | uniq)) -echo "Generating JSON Marshal/Unmarshal" -thriftrw_gofiles=( -$(find "${target_dirs[@]}" -name "*.go" | \ - grep -v "versioncheck.go" | \ - grep -v "easyjson.go" | sort) -) -"$EASY_JSON_BINARY" -all -- "${thriftrw_gofiles[@]}" - goimports -w "$BUILD_DIR/gen-code/" - -end=$(date +%s) -runtime=$((end-start)) -echo "Generated structs : +$runtime" diff --git a/examples/example-gateway/build/gen-code/clients/bar/bar/bar_easyjson.go b/examples/example-gateway/build/gen-code/clients/bar/bar/bar_easyjson.go deleted file mode 100644 index 81c71c069..000000000 --- a/examples/example-gateway/build/gen-code/clients/bar/bar/bar_easyjson.go +++ /dev/null @@ -1,8366 +0,0 @@ -// Code generated by zanzibar -// @generated -// Checksum : 9zgP5K2Lb0boF4QiOt3OzQ== -// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. - -package bar - -import ( - json "encoding/json" - fmt "fmt" - - easyjson "github.com/mailru/easyjson" - jlexer "github.com/mailru/easyjson/jlexer" - jwriter "github.com/mailru/easyjson/jwriter" - base "github.com/uber/zanzibar/examples/example-gateway/build/gen-code/clients/foo/base/base" - foo "github.com/uber/zanzibar/examples/example-gateway/build/gen-code/clients/foo/foo" -) - -// suppress unused package warning -var ( - _ *json.RawMessage - _ *jlexer.Lexer - _ *jwriter.Writer - _ easyjson.Marshaler -) - -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarMapI32BarResponseItem(in *jlexer.Lexer, out *_Map_I32_BarResponse_Item_Zapper) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "Key": - out.Key = int32(in.Int32()) - case "Value": - if in.IsNull() { - in.Skip() - out.Value = nil - } else { - if out.Value == nil { - out.Value = new(BarResponse) - } - (*out.Value).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarMapI32BarResponseItem(out *jwriter.Writer, in _Map_I32_BarResponse_Item_Zapper) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"Key\":" - out.RawString(prefix[1:]) - out.Int32(int32(in.Key)) - } - { - const prefix string = ",\"Value\":" - out.RawString(prefix) - if in.Value == nil { - out.RawString("null") - } else { - (*in.Value).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v _Map_I32_BarResponse_Item_Zapper) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarMapI32BarResponseItem(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v _Map_I32_BarResponse_Item_Zapper) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarMapI32BarResponseItem(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *_Map_I32_BarResponse_Item_Zapper) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarMapI32BarResponseItem(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *_Map_I32_BarResponse_Item_Zapper) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarMapI32BarResponseItem(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarMapBarResponseStringItem(in *jlexer.Lexer, out *_Map_BarResponse_String_Item_Zapper) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "Key": - if in.IsNull() { - in.Skip() - out.Key = nil - } else { - if out.Key == nil { - out.Key = new(BarResponse) - } - (*out.Key).UnmarshalEasyJSON(in) - } - case "Value": - out.Value = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarMapBarResponseStringItem(out *jwriter.Writer, in _Map_BarResponse_String_Item_Zapper) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"Key\":" - out.RawString(prefix[1:]) - if in.Key == nil { - out.RawString("null") - } else { - (*in.Key).MarshalEasyJSON(out) - } - } - { - const prefix string = ",\"Value\":" - out.RawString(prefix) - out.String(string(in.Value)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v _Map_BarResponse_String_Item_Zapper) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarMapBarResponseStringItem(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v _Map_BarResponse_String_Item_Zapper) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarMapBarResponseStringItem(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *_Map_BarResponse_String_Item_Zapper) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarMapBarResponseStringItem(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *_Map_BarResponse_String_Item_Zapper) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarMapBarResponseStringItem(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar(in *jlexer.Lexer, out *RequestWithDuplicateType) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "request1": - if in.IsNull() { - in.Skip() - out.Request1 = nil - } else { - if out.Request1 == nil { - out.Request1 = new(BarRequest) - } - (*out.Request1).UnmarshalEasyJSON(in) - } - case "request2": - if in.IsNull() { - in.Skip() - out.Request2 = nil - } else { - if out.Request2 == nil { - out.Request2 = new(BarRequest) - } - (*out.Request2).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar(out *jwriter.Writer, in RequestWithDuplicateType) { - out.RawByte('{') - first := true - _ = first - if in.Request1 != nil { - const prefix string = ",\"request1\":" - first = false - out.RawString(prefix[1:]) - (*in.Request1).MarshalEasyJSON(out) - } - if in.Request2 != nil { - const prefix string = ",\"request2\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.Request2).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v RequestWithDuplicateType) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v RequestWithDuplicateType) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *RequestWithDuplicateType) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RequestWithDuplicateType) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar1(in *jlexer.Lexer, out *QueryParamsStruct) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var NameSet bool - var FooSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "name": - out.Name = string(in.String()) - NameSet = true - case "userUUID": - if in.IsNull() { - in.Skip() - out.UserUUID = nil - } else { - if out.UserUUID == nil { - out.UserUUID = new(string) - } - *out.UserUUID = string(in.String()) - } - case "authUUID": - if in.IsNull() { - in.Skip() - out.AuthUUID = nil - } else { - if out.AuthUUID == nil { - out.AuthUUID = new(string) - } - *out.AuthUUID = string(in.String()) - } - case "authUUID2": - if in.IsNull() { - in.Skip() - out.AuthUUID2 = nil - } else { - if out.AuthUUID2 == nil { - out.AuthUUID2 = new(string) - } - *out.AuthUUID2 = string(in.String()) - } - case "foo": - if in.IsNull() { - in.Skip() - out.Foo = nil - } else { - in.Delim('[') - if out.Foo == nil { - if !in.IsDelim(']') { - out.Foo = make([]string, 0, 4) - } else { - out.Foo = []string{} - } - } else { - out.Foo = (out.Foo)[:0] - } - for !in.IsDelim(']') { - var v1 string - v1 = string(in.String()) - out.Foo = append(out.Foo, v1) - in.WantComma() - } - in.Delim(']') - } - FooSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !NameSet { - in.AddError(fmt.Errorf("key 'name' is required")) - } - if !FooSet { - in.AddError(fmt.Errorf("key 'foo' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar1(out *jwriter.Writer, in QueryParamsStruct) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"name\":" - out.RawString(prefix[1:]) - out.String(string(in.Name)) - } - if in.UserUUID != nil { - const prefix string = ",\"userUUID\":" - out.RawString(prefix) - out.String(string(*in.UserUUID)) - } - if in.AuthUUID != nil { - const prefix string = ",\"authUUID\":" - out.RawString(prefix) - out.String(string(*in.AuthUUID)) - } - if in.AuthUUID2 != nil { - const prefix string = ",\"authUUID2\":" - out.RawString(prefix) - out.String(string(*in.AuthUUID2)) - } - { - const prefix string = ",\"foo\":" - out.RawString(prefix) - if in.Foo == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v2, v3 := range in.Foo { - if v2 > 0 { - out.RawByte(',') - } - out.String(string(v3)) - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v QueryParamsStruct) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v QueryParamsStruct) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *QueryParamsStruct) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *QueryParamsStruct) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar2(in *jlexer.Lexer, out *QueryParamsOptsStruct) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var NameSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "name": - out.Name = string(in.String()) - NameSet = true - case "userUUID": - if in.IsNull() { - in.Skip() - out.UserUUID = nil - } else { - if out.UserUUID == nil { - out.UserUUID = new(string) - } - *out.UserUUID = string(in.String()) - } - case "authUUID": - if in.IsNull() { - in.Skip() - out.AuthUUID = nil - } else { - if out.AuthUUID == nil { - out.AuthUUID = new(string) - } - *out.AuthUUID = string(in.String()) - } - case "authUUID2": - if in.IsNull() { - in.Skip() - out.AuthUUID2 = nil - } else { - if out.AuthUUID2 == nil { - out.AuthUUID2 = new(string) - } - *out.AuthUUID2 = string(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !NameSet { - in.AddError(fmt.Errorf("key 'name' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar2(out *jwriter.Writer, in QueryParamsOptsStruct) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"name\":" - out.RawString(prefix[1:]) - out.String(string(in.Name)) - } - if in.UserUUID != nil { - const prefix string = ",\"userUUID\":" - out.RawString(prefix) - out.String(string(*in.UserUUID)) - } - if in.AuthUUID != nil { - const prefix string = ",\"authUUID\":" - out.RawString(prefix) - out.String(string(*in.AuthUUID)) - } - if in.AuthUUID2 != nil { - const prefix string = ",\"authUUID2\":" - out.RawString(prefix) - out.String(string(*in.AuthUUID2)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v QueryParamsOptsStruct) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar2(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v QueryParamsOptsStruct) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar2(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *QueryParamsOptsStruct) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar2(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *QueryParamsOptsStruct) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar2(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar3(in *jlexer.Lexer, out *ParamsStruct) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var UserUUIDSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "userUUID": - out.UserUUID = string(in.String()) - UserUUIDSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !UserUUIDSet { - in.AddError(fmt.Errorf("key 'userUUID' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar3(out *jwriter.Writer, in ParamsStruct) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"userUUID\":" - out.RawString(prefix[1:]) - out.String(string(in.UserUUID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ParamsStruct) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar3(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ParamsStruct) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar3(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ParamsStruct) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar3(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ParamsStruct) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar3(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar4(in *jlexer.Lexer, out *OptionalParamsStruct) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "userID": - if in.IsNull() { - in.Skip() - out.UserID = nil - } else { - if out.UserID == nil { - out.UserID = new(string) - } - *out.UserID = string(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar4(out *jwriter.Writer, in OptionalParamsStruct) { - out.RawByte('{') - first := true - _ = first - if in.UserID != nil { - const prefix string = ",\"userID\":" - first = false - out.RawString(prefix[1:]) - out.String(string(*in.UserID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v OptionalParamsStruct) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar4(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v OptionalParamsStruct) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar4(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *OptionalParamsStruct) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar4(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *OptionalParamsStruct) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar4(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoTypedef(in *jlexer.Lexer, out *Echo_EchoTypedef_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(UUID) - } - *out.Success = UUID(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoTypedef(out *jwriter.Writer, in Echo_EchoTypedef_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - out.String(string(*in.Success)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoTypedef_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoTypedef(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoTypedef_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoTypedef(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoTypedef_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoTypedef(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoTypedef_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoTypedef(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoTypedef1(in *jlexer.Lexer, out *Echo_EchoTypedef_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var ArgSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "arg": - out.Arg = UUID(in.String()) - ArgSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !ArgSet { - in.AddError(fmt.Errorf("key 'arg' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoTypedef1(out *jwriter.Writer, in Echo_EchoTypedef_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"arg\":" - out.RawString(prefix[1:]) - out.String(string(in.Arg)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoTypedef_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoTypedef1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoTypedef_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoTypedef1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoTypedef_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoTypedef1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoTypedef_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoTypedef1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructSet(in *jlexer.Lexer, out *Echo_EchoStructSet_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - in.Delim('[') - if out.Success == nil { - if !in.IsDelim(']') { - out.Success = make([]*BarResponse, 0, 8) - } else { - out.Success = []*BarResponse{} - } - } else { - out.Success = (out.Success)[:0] - } - for !in.IsDelim(']') { - var v4 *BarResponse - if in.IsNull() { - in.Skip() - v4 = nil - } else { - if v4 == nil { - v4 = new(BarResponse) - } - (*v4).UnmarshalEasyJSON(in) - } - out.Success = append(out.Success, v4) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructSet(out *jwriter.Writer, in Echo_EchoStructSet_Result) { - out.RawByte('{') - first := true - _ = first - if len(in.Success) != 0 { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - { - out.RawByte('[') - for v5, v6 := range in.Success { - if v5 > 0 { - out.RawByte(',') - } - if v6 == nil { - out.RawString("null") - } else { - (*v6).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoStructSet_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructSet(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoStructSet_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructSet(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoStructSet_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructSet(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoStructSet_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructSet(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructSet1(in *jlexer.Lexer, out *Echo_EchoStructSet_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var ArgSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "arg": - if in.IsNull() { - in.Skip() - out.Arg = nil - } else { - in.Delim('[') - if out.Arg == nil { - if !in.IsDelim(']') { - out.Arg = make([]*BarResponse, 0, 8) - } else { - out.Arg = []*BarResponse{} - } - } else { - out.Arg = (out.Arg)[:0] - } - for !in.IsDelim(']') { - var v7 *BarResponse - if in.IsNull() { - in.Skip() - v7 = nil - } else { - if v7 == nil { - v7 = new(BarResponse) - } - (*v7).UnmarshalEasyJSON(in) - } - out.Arg = append(out.Arg, v7) - in.WantComma() - } - in.Delim(']') - } - ArgSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !ArgSet { - in.AddError(fmt.Errorf("key 'arg' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructSet1(out *jwriter.Writer, in Echo_EchoStructSet_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"arg\":" - out.RawString(prefix[1:]) - if in.Arg == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v8, v9 := range in.Arg { - if v8 > 0 { - out.RawByte(',') - } - if v9 == nil { - out.RawString("null") - } else { - (*v9).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoStructSet_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructSet1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoStructSet_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructSet1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoStructSet_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructSet1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoStructSet_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructSet1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructMap(in *jlexer.Lexer, out *Echo_EchoStructMap_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - in.Delim('[') - if out.Success == nil { - if !in.IsDelim(']') { - out.Success = make([]struct { - Key *BarResponse - Value string - }, 0, 2) - } else { - out.Success = []struct { - Key *BarResponse - Value string - }{} - } - } else { - out.Success = (out.Success)[:0] - } - for !in.IsDelim(']') { - var v10 struct { - Key *BarResponse - Value string - } - easyjson4347b5c1Decode(in, &v10) - out.Success = append(out.Success, v10) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructMap(out *jwriter.Writer, in Echo_EchoStructMap_Result) { - out.RawByte('{') - first := true - _ = first - if len(in.Success) != 0 { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - { - out.RawByte('[') - for v11, v12 := range in.Success { - if v11 > 0 { - out.RawByte(',') - } - easyjson4347b5c1Encode(out, v12) - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoStructMap_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructMap(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoStructMap_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructMap(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoStructMap_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructMap(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoStructMap_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructMap(l, v) -} -func easyjson4347b5c1Decode(in *jlexer.Lexer, out *struct { - Key *BarResponse - Value string -}) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "Key": - if in.IsNull() { - in.Skip() - out.Key = nil - } else { - if out.Key == nil { - out.Key = new(BarResponse) - } - (*out.Key).UnmarshalEasyJSON(in) - } - case "Value": - out.Value = string(in.String()) - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1Encode(out *jwriter.Writer, in struct { - Key *BarResponse - Value string -}) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"Key\":" - out.RawString(prefix[1:]) - if in.Key == nil { - out.RawString("null") - } else { - (*in.Key).MarshalEasyJSON(out) - } - } - { - const prefix string = ",\"Value\":" - out.RawString(prefix) - out.String(string(in.Value)) - } - out.RawByte('}') -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructMap1(in *jlexer.Lexer, out *Echo_EchoStructMap_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var ArgSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "arg": - if in.IsNull() { - in.Skip() - out.Arg = nil - } else { - in.Delim('[') - if out.Arg == nil { - if !in.IsDelim(']') { - out.Arg = make([]struct { - Key *BarResponse - Value string - }, 0, 2) - } else { - out.Arg = []struct { - Key *BarResponse - Value string - }{} - } - } else { - out.Arg = (out.Arg)[:0] - } - for !in.IsDelim(']') { - var v13 struct { - Key *BarResponse - Value string - } - easyjson4347b5c1Decode(in, &v13) - out.Arg = append(out.Arg, v13) - in.WantComma() - } - in.Delim(']') - } - ArgSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !ArgSet { - in.AddError(fmt.Errorf("key 'arg' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructMap1(out *jwriter.Writer, in Echo_EchoStructMap_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"arg\":" - out.RawString(prefix[1:]) - if in.Arg == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v14, v15 := range in.Arg { - if v14 > 0 { - out.RawByte(',') - } - easyjson4347b5c1Encode(out, v15) - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoStructMap_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructMap1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoStructMap_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructMap1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoStructMap_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructMap1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoStructMap_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructMap1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructList(in *jlexer.Lexer, out *Echo_EchoStructList_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - in.Delim('[') - if out.Success == nil { - if !in.IsDelim(']') { - out.Success = make([]*BarResponse, 0, 8) - } else { - out.Success = []*BarResponse{} - } - } else { - out.Success = (out.Success)[:0] - } - for !in.IsDelim(']') { - var v16 *BarResponse - if in.IsNull() { - in.Skip() - v16 = nil - } else { - if v16 == nil { - v16 = new(BarResponse) - } - (*v16).UnmarshalEasyJSON(in) - } - out.Success = append(out.Success, v16) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructList(out *jwriter.Writer, in Echo_EchoStructList_Result) { - out.RawByte('{') - first := true - _ = first - if len(in.Success) != 0 { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - { - out.RawByte('[') - for v17, v18 := range in.Success { - if v17 > 0 { - out.RawByte(',') - } - if v18 == nil { - out.RawString("null") - } else { - (*v18).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoStructList_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructList(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoStructList_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructList(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoStructList_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructList(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoStructList_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructList(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructList1(in *jlexer.Lexer, out *Echo_EchoStructList_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var ArgSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "arg": - if in.IsNull() { - in.Skip() - out.Arg = nil - } else { - in.Delim('[') - if out.Arg == nil { - if !in.IsDelim(']') { - out.Arg = make([]*BarResponse, 0, 8) - } else { - out.Arg = []*BarResponse{} - } - } else { - out.Arg = (out.Arg)[:0] - } - for !in.IsDelim(']') { - var v19 *BarResponse - if in.IsNull() { - in.Skip() - v19 = nil - } else { - if v19 == nil { - v19 = new(BarResponse) - } - (*v19).UnmarshalEasyJSON(in) - } - out.Arg = append(out.Arg, v19) - in.WantComma() - } - in.Delim(']') - } - ArgSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !ArgSet { - in.AddError(fmt.Errorf("key 'arg' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructList1(out *jwriter.Writer, in Echo_EchoStructList_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"arg\":" - out.RawString(prefix[1:]) - if in.Arg == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v20, v21 := range in.Arg { - if v20 > 0 { - out.RawByte(',') - } - if v21 == nil { - out.RawString("null") - } else { - (*v21).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoStructList_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructList1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoStructList_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructList1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoStructList_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructList1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoStructList_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStructList1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoString(in *jlexer.Lexer, out *Echo_EchoString_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(string) - } - *out.Success = string(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoString(out *jwriter.Writer, in Echo_EchoString_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - out.String(string(*in.Success)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoString_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoString(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoString_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoString(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoString_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoString(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoString_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoString(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoString1(in *jlexer.Lexer, out *Echo_EchoString_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var ArgSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "arg": - out.Arg = string(in.String()) - ArgSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !ArgSet { - in.AddError(fmt.Errorf("key 'arg' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoString1(out *jwriter.Writer, in Echo_EchoString_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"arg\":" - out.RawString(prefix[1:]) - out.String(string(in.Arg)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoString_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoString1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoString_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoString1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoString_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoString1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoString_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoString1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringSet(in *jlexer.Lexer, out *Echo_EchoStringSet_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - } else { - in.Delim('{') - if !in.IsDelim('}') { - out.Success = make(map[string]struct{}) - } else { - out.Success = nil - } - for !in.IsDelim('}') { - key := string(in.String()) - in.WantColon() - var v22 struct{} - easyjson4347b5c1Decode1(in, &v22) - (out.Success)[key] = v22 - in.WantComma() - } - in.Delim('}') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringSet(out *jwriter.Writer, in Echo_EchoStringSet_Result) { - out.RawByte('{') - first := true - _ = first - if len(in.Success) != 0 { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - { - out.RawByte('{') - v23First := true - for v23Name, v23Value := range in.Success { - if v23First { - v23First = false - } else { - out.RawByte(',') - } - out.String(string(v23Name)) - out.RawByte(':') - easyjson4347b5c1Encode1(out, v23Value) - } - out.RawByte('}') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoStringSet_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringSet(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoStringSet_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringSet(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoStringSet_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringSet(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoStringSet_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringSet(l, v) -} -func easyjson4347b5c1Decode1(in *jlexer.Lexer, out *struct{}) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1Encode1(out *jwriter.Writer, in struct{}) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringSet1(in *jlexer.Lexer, out *Echo_EchoStringSet_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var ArgSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "arg": - if in.IsNull() { - in.Skip() - } else { - in.Delim('{') - out.Arg = make(map[string]struct{}) - for !in.IsDelim('}') { - key := string(in.String()) - in.WantColon() - var v24 struct{} - easyjson4347b5c1Decode1(in, &v24) - (out.Arg)[key] = v24 - in.WantComma() - } - in.Delim('}') - } - ArgSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !ArgSet { - in.AddError(fmt.Errorf("key 'arg' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringSet1(out *jwriter.Writer, in Echo_EchoStringSet_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"arg\":" - out.RawString(prefix[1:]) - if in.Arg == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 { - out.RawString(`null`) - } else { - out.RawByte('{') - v25First := true - for v25Name, v25Value := range in.Arg { - if v25First { - v25First = false - } else { - out.RawByte(',') - } - out.String(string(v25Name)) - out.RawByte(':') - easyjson4347b5c1Encode1(out, v25Value) - } - out.RawByte('}') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoStringSet_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringSet1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoStringSet_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringSet1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoStringSet_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringSet1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoStringSet_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringSet1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringMap(in *jlexer.Lexer, out *Echo_EchoStringMap_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - } else { - in.Delim('{') - if !in.IsDelim('}') { - out.Success = make(map[string]*BarResponse) - } else { - out.Success = nil - } - for !in.IsDelim('}') { - key := string(in.String()) - in.WantColon() - var v26 *BarResponse - if in.IsNull() { - in.Skip() - v26 = nil - } else { - if v26 == nil { - v26 = new(BarResponse) - } - (*v26).UnmarshalEasyJSON(in) - } - (out.Success)[key] = v26 - in.WantComma() - } - in.Delim('}') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringMap(out *jwriter.Writer, in Echo_EchoStringMap_Result) { - out.RawByte('{') - first := true - _ = first - if len(in.Success) != 0 { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - { - out.RawByte('{') - v27First := true - for v27Name, v27Value := range in.Success { - if v27First { - v27First = false - } else { - out.RawByte(',') - } - out.String(string(v27Name)) - out.RawByte(':') - if v27Value == nil { - out.RawString("null") - } else { - (*v27Value).MarshalEasyJSON(out) - } - } - out.RawByte('}') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoStringMap_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringMap(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoStringMap_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringMap(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoStringMap_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringMap(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoStringMap_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringMap(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringMap1(in *jlexer.Lexer, out *Echo_EchoStringMap_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var ArgSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "arg": - if in.IsNull() { - in.Skip() - } else { - in.Delim('{') - out.Arg = make(map[string]*BarResponse) - for !in.IsDelim('}') { - key := string(in.String()) - in.WantColon() - var v28 *BarResponse - if in.IsNull() { - in.Skip() - v28 = nil - } else { - if v28 == nil { - v28 = new(BarResponse) - } - (*v28).UnmarshalEasyJSON(in) - } - (out.Arg)[key] = v28 - in.WantComma() - } - in.Delim('}') - } - ArgSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !ArgSet { - in.AddError(fmt.Errorf("key 'arg' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringMap1(out *jwriter.Writer, in Echo_EchoStringMap_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"arg\":" - out.RawString(prefix[1:]) - if in.Arg == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 { - out.RawString(`null`) - } else { - out.RawByte('{') - v29First := true - for v29Name, v29Value := range in.Arg { - if v29First { - v29First = false - } else { - out.RawByte(',') - } - out.String(string(v29Name)) - out.RawByte(':') - if v29Value == nil { - out.RawString("null") - } else { - (*v29Value).MarshalEasyJSON(out) - } - } - out.RawByte('}') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoStringMap_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringMap1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoStringMap_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringMap1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoStringMap_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringMap1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoStringMap_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringMap1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringList(in *jlexer.Lexer, out *Echo_EchoStringList_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - in.Delim('[') - if out.Success == nil { - if !in.IsDelim(']') { - out.Success = make([]string, 0, 4) - } else { - out.Success = []string{} - } - } else { - out.Success = (out.Success)[:0] - } - for !in.IsDelim(']') { - var v30 string - v30 = string(in.String()) - out.Success = append(out.Success, v30) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringList(out *jwriter.Writer, in Echo_EchoStringList_Result) { - out.RawByte('{') - first := true - _ = first - if len(in.Success) != 0 { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - { - out.RawByte('[') - for v31, v32 := range in.Success { - if v31 > 0 { - out.RawByte(',') - } - out.String(string(v32)) - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoStringList_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringList(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoStringList_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringList(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoStringList_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringList(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoStringList_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringList(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringList1(in *jlexer.Lexer, out *Echo_EchoStringList_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var ArgSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "arg": - if in.IsNull() { - in.Skip() - out.Arg = nil - } else { - in.Delim('[') - if out.Arg == nil { - if !in.IsDelim(']') { - out.Arg = make([]string, 0, 4) - } else { - out.Arg = []string{} - } - } else { - out.Arg = (out.Arg)[:0] - } - for !in.IsDelim(']') { - var v33 string - v33 = string(in.String()) - out.Arg = append(out.Arg, v33) - in.WantComma() - } - in.Delim(']') - } - ArgSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !ArgSet { - in.AddError(fmt.Errorf("key 'arg' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringList1(out *jwriter.Writer, in Echo_EchoStringList_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"arg\":" - out.RawString(prefix[1:]) - if in.Arg == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v34, v35 := range in.Arg { - if v34 > 0 { - out.RawByte(',') - } - out.String(string(v35)) - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoStringList_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringList1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoStringList_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringList1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoStringList_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringList1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoStringList_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoStringList1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI8(in *jlexer.Lexer, out *Echo_EchoI8_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(int8) - } - *out.Success = int8(in.Int8()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI8(out *jwriter.Writer, in Echo_EchoI8_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - out.Int8(int8(*in.Success)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoI8_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI8(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoI8_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI8(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoI8_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI8(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoI8_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI8(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI81(in *jlexer.Lexer, out *Echo_EchoI8_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var ArgSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "arg": - out.Arg = int8(in.Int8()) - ArgSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !ArgSet { - in.AddError(fmt.Errorf("key 'arg' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI81(out *jwriter.Writer, in Echo_EchoI8_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"arg\":" - out.RawString(prefix[1:]) - out.Int8(int8(in.Arg)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoI8_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI81(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoI8_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI81(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoI8_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI81(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoI8_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI81(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI64(in *jlexer.Lexer, out *Echo_EchoI64_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(int64) - } - *out.Success = int64(in.Int64()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI64(out *jwriter.Writer, in Echo_EchoI64_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - out.Int64(int64(*in.Success)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoI64_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI64(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoI64_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI64(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoI64_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI64(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoI64_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI64(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI641(in *jlexer.Lexer, out *Echo_EchoI64_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var ArgSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "arg": - out.Arg = int64(in.Int64()) - ArgSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !ArgSet { - in.AddError(fmt.Errorf("key 'arg' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI641(out *jwriter.Writer, in Echo_EchoI64_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"arg\":" - out.RawString(prefix[1:]) - out.Int64(int64(in.Arg)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoI64_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI641(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoI64_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI641(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoI64_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI641(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoI64_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI641(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI32(in *jlexer.Lexer, out *Echo_EchoI32_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(int32) - } - *out.Success = int32(in.Int32()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI32(out *jwriter.Writer, in Echo_EchoI32_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - out.Int32(int32(*in.Success)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoI32_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI32(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoI32_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI32(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoI32_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI32(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoI32_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI32(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI321(in *jlexer.Lexer, out *Echo_EchoI32_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var ArgSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "arg": - out.Arg = int32(in.Int32()) - ArgSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !ArgSet { - in.AddError(fmt.Errorf("key 'arg' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI321(out *jwriter.Writer, in Echo_EchoI32_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"arg\":" - out.RawString(prefix[1:]) - out.Int32(int32(in.Arg)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoI32_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI321(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoI32_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI321(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoI32_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI321(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoI32_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI321(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI32Map(in *jlexer.Lexer, out *Echo_EchoI32Map_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - } else { - in.Delim('{') - if !in.IsDelim('}') { - out.Success = make(map[int32]*BarResponse) - } else { - out.Success = nil - } - for !in.IsDelim('}') { - key := int32(in.Int32Str()) - in.WantColon() - var v36 *BarResponse - if in.IsNull() { - in.Skip() - v36 = nil - } else { - if v36 == nil { - v36 = new(BarResponse) - } - (*v36).UnmarshalEasyJSON(in) - } - (out.Success)[key] = v36 - in.WantComma() - } - in.Delim('}') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI32Map(out *jwriter.Writer, in Echo_EchoI32Map_Result) { - out.RawByte('{') - first := true - _ = first - if len(in.Success) != 0 { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - { - out.RawByte('{') - v37First := true - for v37Name, v37Value := range in.Success { - if v37First { - v37First = false - } else { - out.RawByte(',') - } - out.Int32Str(int32(v37Name)) - out.RawByte(':') - if v37Value == nil { - out.RawString("null") - } else { - (*v37Value).MarshalEasyJSON(out) - } - } - out.RawByte('}') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoI32Map_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI32Map(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoI32Map_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI32Map(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoI32Map_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI32Map(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoI32Map_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI32Map(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI32Map1(in *jlexer.Lexer, out *Echo_EchoI32Map_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var ArgSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "arg": - if in.IsNull() { - in.Skip() - } else { - in.Delim('{') - out.Arg = make(map[int32]*BarResponse) - for !in.IsDelim('}') { - key := int32(in.Int32Str()) - in.WantColon() - var v38 *BarResponse - if in.IsNull() { - in.Skip() - v38 = nil - } else { - if v38 == nil { - v38 = new(BarResponse) - } - (*v38).UnmarshalEasyJSON(in) - } - (out.Arg)[key] = v38 - in.WantComma() - } - in.Delim('}') - } - ArgSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !ArgSet { - in.AddError(fmt.Errorf("key 'arg' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI32Map1(out *jwriter.Writer, in Echo_EchoI32Map_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"arg\":" - out.RawString(prefix[1:]) - if in.Arg == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 { - out.RawString(`null`) - } else { - out.RawByte('{') - v39First := true - for v39Name, v39Value := range in.Arg { - if v39First { - v39First = false - } else { - out.RawByte(',') - } - out.Int32Str(int32(v39Name)) - out.RawByte(':') - if v39Value == nil { - out.RawString("null") - } else { - (*v39Value).MarshalEasyJSON(out) - } - } - out.RawByte('}') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoI32Map_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI32Map1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoI32Map_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI32Map1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoI32Map_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI32Map1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoI32Map_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI32Map1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI16(in *jlexer.Lexer, out *Echo_EchoI16_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(int16) - } - *out.Success = int16(in.Int16()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI16(out *jwriter.Writer, in Echo_EchoI16_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - out.Int16(int16(*in.Success)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoI16_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI16(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoI16_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI16(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoI16_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI16(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoI16_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI16(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI161(in *jlexer.Lexer, out *Echo_EchoI16_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var ArgSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "arg": - out.Arg = int16(in.Int16()) - ArgSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !ArgSet { - in.AddError(fmt.Errorf("key 'arg' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI161(out *jwriter.Writer, in Echo_EchoI16_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"arg\":" - out.RawString(prefix[1:]) - out.Int16(int16(in.Arg)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoI16_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI161(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoI16_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI161(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoI16_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI161(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoI16_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoI161(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoEnum(in *jlexer.Lexer, out *Echo_EchoEnum_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(Fruit) - } - if data := in.Raw(); in.Ok() { - in.AddError((*out.Success).UnmarshalJSON(data)) - } - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoEnum(out *jwriter.Writer, in Echo_EchoEnum_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - out.Raw((*in.Success).MarshalJSON()) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoEnum_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoEnum(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoEnum_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoEnum(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoEnum_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoEnum(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoEnum_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoEnum(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoEnum1(in *jlexer.Lexer, out *Echo_EchoEnum_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "arg": - if in.IsNull() { - in.Skip() - out.Arg = nil - } else { - if out.Arg == nil { - out.Arg = new(Fruit) - } - if data := in.Raw(); in.Ok() { - in.AddError((*out.Arg).UnmarshalJSON(data)) - } - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoEnum1(out *jwriter.Writer, in Echo_EchoEnum_Args) { - out.RawByte('{') - first := true - _ = first - if in.Arg != nil { - const prefix string = ",\"arg\":" - first = false - out.RawString(prefix[1:]) - out.Raw((*in.Arg).MarshalJSON()) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoEnum_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoEnum1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoEnum_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoEnum1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoEnum_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoEnum1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoEnum_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoEnum1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoDouble(in *jlexer.Lexer, out *Echo_EchoDouble_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(float64) - } - *out.Success = float64(in.Float64()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoDouble(out *jwriter.Writer, in Echo_EchoDouble_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - out.Float64(float64(*in.Success)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoDouble_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoDouble(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoDouble_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoDouble(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoDouble_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoDouble(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoDouble_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoDouble(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoDouble1(in *jlexer.Lexer, out *Echo_EchoDouble_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var ArgSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "arg": - out.Arg = float64(in.Float64()) - ArgSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !ArgSet { - in.AddError(fmt.Errorf("key 'arg' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoDouble1(out *jwriter.Writer, in Echo_EchoDouble_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"arg\":" - out.RawString(prefix[1:]) - out.Float64(float64(in.Arg)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoDouble_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoDouble1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoDouble_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoDouble1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoDouble_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoDouble1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoDouble_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoDouble1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoBool(in *jlexer.Lexer, out *Echo_EchoBool_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(bool) - } - *out.Success = bool(in.Bool()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoBool(out *jwriter.Writer, in Echo_EchoBool_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - out.Bool(bool(*in.Success)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoBool_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoBool(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoBool_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoBool(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoBool_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoBool(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoBool_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoBool(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoBool1(in *jlexer.Lexer, out *Echo_EchoBool_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var ArgSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "arg": - out.Arg = bool(in.Bool()) - ArgSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !ArgSet { - in.AddError(fmt.Errorf("key 'arg' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoBool1(out *jwriter.Writer, in Echo_EchoBool_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"arg\":" - out.RawString(prefix[1:]) - out.Bool(bool(in.Arg)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoBool_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoBool1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoBool_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoBool1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoBool_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoBool1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoBool_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoBool1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoBinary(in *jlexer.Lexer, out *Echo_EchoBinary_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - out.Success = in.Bytes() - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoBinary(out *jwriter.Writer, in Echo_EchoBinary_Result) { - out.RawByte('{') - first := true - _ = first - if len(in.Success) != 0 { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - out.Base64Bytes(in.Success) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoBinary_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoBinary(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoBinary_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoBinary(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoBinary_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoBinary(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoBinary_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoBinary(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoBinary1(in *jlexer.Lexer, out *Echo_EchoBinary_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var ArgSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "arg": - if in.IsNull() { - in.Skip() - out.Arg = nil - } else { - out.Arg = in.Bytes() - } - ArgSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !ArgSet { - in.AddError(fmt.Errorf("key 'arg' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoBinary1(out *jwriter.Writer, in Echo_EchoBinary_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"arg\":" - out.RawString(prefix[1:]) - out.Base64Bytes(in.Arg) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Echo_EchoBinary_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoBinary1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Echo_EchoBinary_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoBinary1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Echo_EchoBinary_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoBinary1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Echo_EchoBinary_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarEchoEchoBinary1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarTooManyArgs(in *jlexer.Lexer, out *Bar_TooManyArgs_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(BarResponse) - } - (*out.Success).UnmarshalEasyJSON(in) - } - case "barException": - if in.IsNull() { - in.Skip() - out.BarException = nil - } else { - if out.BarException == nil { - out.BarException = new(BarException) - } - (*out.BarException).UnmarshalEasyJSON(in) - } - case "fooException": - if in.IsNull() { - in.Skip() - out.FooException = nil - } else { - if out.FooException == nil { - out.FooException = new(foo.FooException) - } - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooFoo(in, out.FooException) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarTooManyArgs(out *jwriter.Writer, in Bar_TooManyArgs_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - if in.BarException != nil { - const prefix string = ",\"barException\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.BarException).MarshalEasyJSON(out) - } - if in.FooException != nil { - const prefix string = ",\"fooException\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooFoo(out, *in.FooException) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_TooManyArgs_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarTooManyArgs(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_TooManyArgs_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarTooManyArgs(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_TooManyArgs_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarTooManyArgs(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_TooManyArgs_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarTooManyArgs(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooFoo(in *jlexer.Lexer, out *foo.FooException) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var TeapotSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "teapot": - out.Teapot = string(in.String()) - TeapotSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !TeapotSet { - in.AddError(fmt.Errorf("key 'teapot' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooFoo(out *jwriter.Writer, in foo.FooException) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"teapot\":" - out.RawString(prefix[1:]) - out.String(string(in.Teapot)) - } - out.RawByte('}') -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarTooManyArgs1(in *jlexer.Lexer, out *Bar_TooManyArgs_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var RequestSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "request": - if in.IsNull() { - in.Skip() - out.Request = nil - } else { - if out.Request == nil { - out.Request = new(BarRequest) - } - (*out.Request).UnmarshalEasyJSON(in) - } - RequestSet = true - case "foo": - if in.IsNull() { - in.Skip() - out.Foo = nil - } else { - if out.Foo == nil { - out.Foo = new(foo.FooStruct) - } - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooFoo1(in, out.Foo) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !RequestSet { - in.AddError(fmt.Errorf("key 'request' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarTooManyArgs1(out *jwriter.Writer, in Bar_TooManyArgs_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"request\":" - out.RawString(prefix[1:]) - if in.Request == nil { - out.RawString("null") - } else { - (*in.Request).MarshalEasyJSON(out) - } - } - if in.Foo != nil { - const prefix string = ",\"foo\":" - out.RawString(prefix) - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooFoo1(out, *in.Foo) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_TooManyArgs_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarTooManyArgs1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_TooManyArgs_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarTooManyArgs1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_TooManyArgs_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarTooManyArgs1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_TooManyArgs_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarTooManyArgs1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooFoo1(in *jlexer.Lexer, out *foo.FooStruct) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var FooStringSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "fooString": - out.FooString = string(in.String()) - FooStringSet = true - case "fooI32": - if in.IsNull() { - in.Skip() - out.FooI32 = nil - } else { - if out.FooI32 == nil { - out.FooI32 = new(int32) - } - *out.FooI32 = int32(in.Int32()) - } - case "fooI16": - if in.IsNull() { - in.Skip() - out.FooI16 = nil - } else { - if out.FooI16 == nil { - out.FooI16 = new(int16) - } - *out.FooI16 = int16(in.Int16()) - } - case "fooDouble": - if in.IsNull() { - in.Skip() - out.FooDouble = nil - } else { - if out.FooDouble == nil { - out.FooDouble = new(float64) - } - *out.FooDouble = float64(in.Float64()) - } - case "fooBool": - if in.IsNull() { - in.Skip() - out.FooBool = nil - } else { - if out.FooBool == nil { - out.FooBool = new(bool) - } - *out.FooBool = bool(in.Bool()) - } - case "fooMap": - if in.IsNull() { - in.Skip() - } else { - in.Delim('{') - if !in.IsDelim('}') { - out.FooMap = make(map[string]string) - } else { - out.FooMap = nil - } - for !in.IsDelim('}') { - key := string(in.String()) - in.WantColon() - var v46 string - v46 = string(in.String()) - (out.FooMap)[key] = v46 - in.WantComma() - } - in.Delim('}') - } - case "message": - if in.IsNull() { - in.Skip() - out.Message = nil - } else { - if out.Message == nil { - out.Message = new(base.Message) - } - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooBaseBase(in, out.Message) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !FooStringSet { - in.AddError(fmt.Errorf("key 'fooString' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooFoo1(out *jwriter.Writer, in foo.FooStruct) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"fooString\":" - out.RawString(prefix[1:]) - out.String(string(in.FooString)) - } - if in.FooI32 != nil { - const prefix string = ",\"fooI32\":" - out.RawString(prefix) - out.Int32(int32(*in.FooI32)) - } - if in.FooI16 != nil { - const prefix string = ",\"fooI16\":" - out.RawString(prefix) - out.Int16(int16(*in.FooI16)) - } - if in.FooDouble != nil { - const prefix string = ",\"fooDouble\":" - out.RawString(prefix) - out.Float64(float64(*in.FooDouble)) - } - if in.FooBool != nil { - const prefix string = ",\"fooBool\":" - out.RawString(prefix) - out.Bool(bool(*in.FooBool)) - } - if len(in.FooMap) != 0 { - const prefix string = ",\"fooMap\":" - out.RawString(prefix) - { - out.RawByte('{') - v47First := true - for v47Name, v47Value := range in.FooMap { - if v47First { - v47First = false - } else { - out.RawByte(',') - } - out.String(string(v47Name)) - out.RawByte(':') - out.String(string(v47Value)) - } - out.RawByte('}') - } - } - if in.Message != nil { - const prefix string = ",\"message\":" - out.RawString(prefix) - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooBaseBase(out, *in.Message) - } - out.RawByte('}') -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooBaseBase(in *jlexer.Lexer, out *base.Message) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var BodySet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "body": - out.Body = string(in.String()) - BodySet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !BodySet { - in.AddError(fmt.Errorf("key 'body' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooBaseBase(out *jwriter.Writer, in base.Message) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"body\":" - out.RawString(prefix[1:]) - out.String(string(in.Body)) - } - out.RawByte('}') -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNormal(in *jlexer.Lexer, out *Bar_Normal_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(BarResponse) - } - (*out.Success).UnmarshalEasyJSON(in) - } - case "barException": - if in.IsNull() { - in.Skip() - out.BarException = nil - } else { - if out.BarException == nil { - out.BarException = new(BarException) - } - (*out.BarException).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNormal(out *jwriter.Writer, in Bar_Normal_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - if in.BarException != nil { - const prefix string = ",\"barException\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.BarException).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_Normal_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNormal(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_Normal_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNormal(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_Normal_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNormal(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_Normal_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNormal(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNormal1(in *jlexer.Lexer, out *Bar_Normal_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var RequestSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "request": - if in.IsNull() { - in.Skip() - out.Request = nil - } else { - if out.Request == nil { - out.Request = new(BarRequest) - } - (*out.Request).UnmarshalEasyJSON(in) - } - RequestSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !RequestSet { - in.AddError(fmt.Errorf("key 'request' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNormal1(out *jwriter.Writer, in Bar_Normal_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"request\":" - out.RawString(prefix[1:]) - if in.Request == nil { - out.RawString("null") - } else { - (*in.Request).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_Normal_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNormal1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_Normal_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNormal1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_Normal_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNormal1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_Normal_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNormal1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNormalRecur(in *jlexer.Lexer, out *Bar_NormalRecur_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(BarResponseRecur) - } - (*out.Success).UnmarshalEasyJSON(in) - } - case "barException": - if in.IsNull() { - in.Skip() - out.BarException = nil - } else { - if out.BarException == nil { - out.BarException = new(BarException) - } - (*out.BarException).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNormalRecur(out *jwriter.Writer, in Bar_NormalRecur_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - if in.BarException != nil { - const prefix string = ",\"barException\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.BarException).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_NormalRecur_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNormalRecur(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_NormalRecur_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNormalRecur(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_NormalRecur_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNormalRecur(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_NormalRecur_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNormalRecur(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNormalRecur1(in *jlexer.Lexer, out *Bar_NormalRecur_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var RequestSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "request": - if in.IsNull() { - in.Skip() - out.Request = nil - } else { - if out.Request == nil { - out.Request = new(BarRequestRecur) - } - (*out.Request).UnmarshalEasyJSON(in) - } - RequestSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !RequestSet { - in.AddError(fmt.Errorf("key 'request' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNormalRecur1(out *jwriter.Writer, in Bar_NormalRecur_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"request\":" - out.RawString(prefix[1:]) - if in.Request == nil { - out.RawString("null") - } else { - (*in.Request).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_NormalRecur_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNormalRecur1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_NormalRecur_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNormalRecur1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_NormalRecur_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNormalRecur1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_NormalRecur_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNormalRecur1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNoRequest(in *jlexer.Lexer, out *Bar_NoRequest_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(BarResponse) - } - (*out.Success).UnmarshalEasyJSON(in) - } - case "barException": - if in.IsNull() { - in.Skip() - out.BarException = nil - } else { - if out.BarException == nil { - out.BarException = new(BarException) - } - (*out.BarException).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNoRequest(out *jwriter.Writer, in Bar_NoRequest_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - if in.BarException != nil { - const prefix string = ",\"barException\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.BarException).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_NoRequest_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNoRequest(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_NoRequest_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNoRequest(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_NoRequest_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNoRequest(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_NoRequest_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNoRequest(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNoRequest1(in *jlexer.Lexer, out *Bar_NoRequest_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNoRequest1(out *jwriter.Writer, in Bar_NoRequest_Args) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_NoRequest_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNoRequest1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_NoRequest_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNoRequest1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_NoRequest_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNoRequest1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_NoRequest_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarNoRequest1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarMissingArg(in *jlexer.Lexer, out *Bar_MissingArg_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(BarResponse) - } - (*out.Success).UnmarshalEasyJSON(in) - } - case "barException": - if in.IsNull() { - in.Skip() - out.BarException = nil - } else { - if out.BarException == nil { - out.BarException = new(BarException) - } - (*out.BarException).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarMissingArg(out *jwriter.Writer, in Bar_MissingArg_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - if in.BarException != nil { - const prefix string = ",\"barException\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.BarException).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_MissingArg_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarMissingArg(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_MissingArg_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarMissingArg(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_MissingArg_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarMissingArg(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_MissingArg_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarMissingArg(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarMissingArg1(in *jlexer.Lexer, out *Bar_MissingArg_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarMissingArg1(out *jwriter.Writer, in Bar_MissingArg_Args) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_MissingArg_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarMissingArg1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_MissingArg_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarMissingArg1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_MissingArg_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarMissingArg1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_MissingArg_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarMissingArg1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarListAndEnum(in *jlexer.Lexer, out *Bar_ListAndEnum_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(string) - } - *out.Success = string(in.String()) - } - case "barException": - if in.IsNull() { - in.Skip() - out.BarException = nil - } else { - if out.BarException == nil { - out.BarException = new(BarException) - } - (*out.BarException).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarListAndEnum(out *jwriter.Writer, in Bar_ListAndEnum_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - out.String(string(*in.Success)) - } - if in.BarException != nil { - const prefix string = ",\"barException\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.BarException).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ListAndEnum_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarListAndEnum(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ListAndEnum_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarListAndEnum(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ListAndEnum_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarListAndEnum(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ListAndEnum_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarListAndEnum(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarListAndEnum1(in *jlexer.Lexer, out *Bar_ListAndEnum_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var DemoIdsSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "demoIds": - if in.IsNull() { - in.Skip() - out.DemoIds = nil - } else { - in.Delim('[') - if out.DemoIds == nil { - if !in.IsDelim(']') { - out.DemoIds = make([]string, 0, 4) - } else { - out.DemoIds = []string{} - } - } else { - out.DemoIds = (out.DemoIds)[:0] - } - for !in.IsDelim(']') { - var v48 string - v48 = string(in.String()) - out.DemoIds = append(out.DemoIds, v48) - in.WantComma() - } - in.Delim(']') - } - DemoIdsSet = true - case "demoType": - if in.IsNull() { - in.Skip() - out.DemoType = nil - } else { - if out.DemoType == nil { - out.DemoType = new(DemoType) - } - if data := in.Raw(); in.Ok() { - in.AddError((*out.DemoType).UnmarshalJSON(data)) - } - } - case "demos": - if in.IsNull() { - in.Skip() - out.Demos = nil - } else { - in.Delim('[') - if out.Demos == nil { - if !in.IsDelim(']') { - out.Demos = make([]DemoType, 0, 16) - } else { - out.Demos = []DemoType{} - } - } else { - out.Demos = (out.Demos)[:0] - } - for !in.IsDelim(']') { - var v49 DemoType - if data := in.Raw(); in.Ok() { - in.AddError((v49).UnmarshalJSON(data)) - } - out.Demos = append(out.Demos, v49) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !DemoIdsSet { - in.AddError(fmt.Errorf("key 'demoIds' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarListAndEnum1(out *jwriter.Writer, in Bar_ListAndEnum_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"demoIds\":" - out.RawString(prefix[1:]) - if in.DemoIds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v50, v51 := range in.DemoIds { - if v50 > 0 { - out.RawByte(',') - } - out.String(string(v51)) - } - out.RawByte(']') - } - } - if in.DemoType != nil { - const prefix string = ",\"demoType\":" - out.RawString(prefix) - out.Raw((*in.DemoType).MarshalJSON()) - } - if len(in.Demos) != 0 { - const prefix string = ",\"demos\":" - out.RawString(prefix) - { - out.RawByte('[') - for v52, v53 := range in.Demos { - if v52 > 0 { - out.RawByte(',') - } - out.Raw((v53).MarshalJSON()) - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ListAndEnum_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarListAndEnum1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ListAndEnum_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarListAndEnum1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ListAndEnum_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarListAndEnum1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ListAndEnum_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarListAndEnum1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarHelloWorld(in *jlexer.Lexer, out *Bar_HelloWorld_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(string) - } - *out.Success = string(in.String()) - } - case "barException": - if in.IsNull() { - in.Skip() - out.BarException = nil - } else { - if out.BarException == nil { - out.BarException = new(BarException) - } - (*out.BarException).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarHelloWorld(out *jwriter.Writer, in Bar_HelloWorld_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - out.String(string(*in.Success)) - } - if in.BarException != nil { - const prefix string = ",\"barException\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.BarException).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_HelloWorld_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarHelloWorld(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_HelloWorld_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarHelloWorld(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_HelloWorld_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarHelloWorld(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_HelloWorld_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarHelloWorld(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarHelloWorld1(in *jlexer.Lexer, out *Bar_HelloWorld_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarHelloWorld1(out *jwriter.Writer, in Bar_HelloWorld_Args) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_HelloWorld_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarHelloWorld1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_HelloWorld_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarHelloWorld1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_HelloWorld_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarHelloWorld1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_HelloWorld_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarHelloWorld1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarDeleteWithQueryParams(in *jlexer.Lexer, out *Bar_DeleteWithQueryParams_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarDeleteWithQueryParams(out *jwriter.Writer, in Bar_DeleteWithQueryParams_Result) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_DeleteWithQueryParams_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarDeleteWithQueryParams(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_DeleteWithQueryParams_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarDeleteWithQueryParams(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_DeleteWithQueryParams_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarDeleteWithQueryParams(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_DeleteWithQueryParams_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarDeleteWithQueryParams(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarDeleteWithQueryParams1(in *jlexer.Lexer, out *Bar_DeleteWithQueryParams_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var FilterSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "filter": - out.Filter = string(in.String()) - FilterSet = true - case "count": - if in.IsNull() { - in.Skip() - out.Count = nil - } else { - if out.Count == nil { - out.Count = new(int32) - } - *out.Count = int32(in.Int32()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !FilterSet { - in.AddError(fmt.Errorf("key 'filter' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarDeleteWithQueryParams1(out *jwriter.Writer, in Bar_DeleteWithQueryParams_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"filter\":" - out.RawString(prefix[1:]) - out.String(string(in.Filter)) - } - if in.Count != nil { - const prefix string = ",\"count\":" - out.RawString(prefix) - out.Int32(int32(*in.Count)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_DeleteWithQueryParams_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarDeleteWithQueryParams1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_DeleteWithQueryParams_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarDeleteWithQueryParams1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_DeleteWithQueryParams_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarDeleteWithQueryParams1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_DeleteWithQueryParams_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarDeleteWithQueryParams1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarDeleteFoo(in *jlexer.Lexer, out *Bar_DeleteFoo_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarDeleteFoo(out *jwriter.Writer, in Bar_DeleteFoo_Result) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_DeleteFoo_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarDeleteFoo(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_DeleteFoo_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarDeleteFoo(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_DeleteFoo_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarDeleteFoo(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_DeleteFoo_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarDeleteFoo(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarDeleteFoo1(in *jlexer.Lexer, out *Bar_DeleteFoo_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var UserUUIDSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "userUUID": - out.UserUUID = string(in.String()) - UserUUIDSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !UserUUIDSet { - in.AddError(fmt.Errorf("key 'userUUID' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarDeleteFoo1(out *jwriter.Writer, in Bar_DeleteFoo_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"userUUID\":" - out.RawString(prefix[1:]) - out.String(string(in.UserUUID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_DeleteFoo_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarDeleteFoo1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_DeleteFoo_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarDeleteFoo1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_DeleteFoo_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarDeleteFoo1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_DeleteFoo_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarDeleteFoo1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithQueryParams(in *jlexer.Lexer, out *Bar_ArgWithQueryParams_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(BarResponse) - } - (*out.Success).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithQueryParams(out *jwriter.Writer, in Bar_ArgWithQueryParams_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithQueryParams_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithQueryParams(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithQueryParams_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithQueryParams(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithQueryParams_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithQueryParams(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithQueryParams_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithQueryParams(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithQueryParams1(in *jlexer.Lexer, out *Bar_ArgWithQueryParams_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var NameSet bool - var BarSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "name": - out.Name = string(in.String()) - NameSet = true - case "userUUID": - if in.IsNull() { - in.Skip() - out.UserUUID = nil - } else { - if out.UserUUID == nil { - out.UserUUID = new(string) - } - *out.UserUUID = string(in.String()) - } - case "foo": - if in.IsNull() { - in.Skip() - out.Foo = nil - } else { - in.Delim('[') - if out.Foo == nil { - if !in.IsDelim(']') { - out.Foo = make([]string, 0, 4) - } else { - out.Foo = []string{} - } - } else { - out.Foo = (out.Foo)[:0] - } - for !in.IsDelim(']') { - var v54 string - v54 = string(in.String()) - out.Foo = append(out.Foo, v54) - in.WantComma() - } - in.Delim(']') - } - case "bar": - if in.IsNull() { - in.Skip() - out.Bar = nil - } else { - in.Delim('[') - if out.Bar == nil { - if !in.IsDelim(']') { - out.Bar = make([]int8, 0, 64) - } else { - out.Bar = []int8{} - } - } else { - out.Bar = (out.Bar)[:0] - } - for !in.IsDelim(']') { - var v55 int8 - v55 = int8(in.Int8()) - out.Bar = append(out.Bar, v55) - in.WantComma() - } - in.Delim(']') - } - BarSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !NameSet { - in.AddError(fmt.Errorf("key 'name' is required")) - } - if !BarSet { - in.AddError(fmt.Errorf("key 'bar' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithQueryParams1(out *jwriter.Writer, in Bar_ArgWithQueryParams_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"name\":" - out.RawString(prefix[1:]) - out.String(string(in.Name)) - } - if in.UserUUID != nil { - const prefix string = ",\"userUUID\":" - out.RawString(prefix) - out.String(string(*in.UserUUID)) - } - if len(in.Foo) != 0 { - const prefix string = ",\"foo\":" - out.RawString(prefix) - { - out.RawByte('[') - for v56, v57 := range in.Foo { - if v56 > 0 { - out.RawByte(',') - } - out.String(string(v57)) - } - out.RawByte(']') - } - } - { - const prefix string = ",\"bar\":" - out.RawString(prefix) - if in.Bar == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v58, v59 := range in.Bar { - if v58 > 0 { - out.RawByte(',') - } - out.Int8(int8(v59)) - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithQueryParams_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithQueryParams1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithQueryParams_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithQueryParams1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithQueryParams_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithQueryParams1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithQueryParams_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithQueryParams1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithQueryHeader(in *jlexer.Lexer, out *Bar_ArgWithQueryHeader_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(BarResponse) - } - (*out.Success).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithQueryHeader(out *jwriter.Writer, in Bar_ArgWithQueryHeader_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithQueryHeader_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithQueryHeader(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithQueryHeader_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithQueryHeader(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithQueryHeader_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithQueryHeader(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithQueryHeader_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithQueryHeader(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithQueryHeader1(in *jlexer.Lexer, out *Bar_ArgWithQueryHeader_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "userUUID": - if in.IsNull() { - in.Skip() - out.UserUUID = nil - } else { - if out.UserUUID == nil { - out.UserUUID = new(string) - } - *out.UserUUID = string(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithQueryHeader1(out *jwriter.Writer, in Bar_ArgWithQueryHeader_Args) { - out.RawByte('{') - first := true - _ = first - if in.UserUUID != nil { - const prefix string = ",\"userUUID\":" - first = false - out.RawString(prefix[1:]) - out.String(string(*in.UserUUID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithQueryHeader_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithQueryHeader1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithQueryHeader_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithQueryHeader1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithQueryHeader_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithQueryHeader1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithQueryHeader_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithQueryHeader1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithParams(in *jlexer.Lexer, out *Bar_ArgWithParams_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(BarResponse) - } - (*out.Success).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithParams(out *jwriter.Writer, in Bar_ArgWithParams_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithParams_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithParams(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithParams_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithParams(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithParams_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithParams(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithParams_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithParams(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithParams1(in *jlexer.Lexer, out *Bar_ArgWithParams_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var UUIDSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "uuid": - out.UUID = string(in.String()) - UUIDSet = true - case "params": - if in.IsNull() { - in.Skip() - out.Params = nil - } else { - if out.Params == nil { - out.Params = new(ParamsStruct) - } - (*out.Params).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !UUIDSet { - in.AddError(fmt.Errorf("key 'uuid' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithParams1(out *jwriter.Writer, in Bar_ArgWithParams_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"uuid\":" - out.RawString(prefix[1:]) - out.String(string(in.UUID)) - } - if in.Params != nil { - const prefix string = ",\"params\":" - out.RawString(prefix) - (*in.Params).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithParams_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithParams1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithParams_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithParams1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithParams_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithParams1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithParams_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithParams1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithParamsAndDuplicateFields(in *jlexer.Lexer, out *Bar_ArgWithParamsAndDuplicateFields_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(BarResponse) - } - (*out.Success).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithParamsAndDuplicateFields(out *jwriter.Writer, in Bar_ArgWithParamsAndDuplicateFields_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithParamsAndDuplicateFields_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithParamsAndDuplicateFields(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithParamsAndDuplicateFields_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithParamsAndDuplicateFields(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithParamsAndDuplicateFields_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithParamsAndDuplicateFields(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithParamsAndDuplicateFields_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithParamsAndDuplicateFields(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithParamsAndDuplicateFields1(in *jlexer.Lexer, out *Bar_ArgWithParamsAndDuplicateFields_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var RequestSet bool - var EntityUUIDSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "request": - if in.IsNull() { - in.Skip() - out.Request = nil - } else { - if out.Request == nil { - out.Request = new(RequestWithDuplicateType) - } - (*out.Request).UnmarshalEasyJSON(in) - } - RequestSet = true - case "entityUUID": - out.EntityUUID = string(in.String()) - EntityUUIDSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !RequestSet { - in.AddError(fmt.Errorf("key 'request' is required")) - } - if !EntityUUIDSet { - in.AddError(fmt.Errorf("key 'entityUUID' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithParamsAndDuplicateFields1(out *jwriter.Writer, in Bar_ArgWithParamsAndDuplicateFields_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"request\":" - out.RawString(prefix[1:]) - if in.Request == nil { - out.RawString("null") - } else { - (*in.Request).MarshalEasyJSON(out) - } - } - { - const prefix string = ",\"entityUUID\":" - out.RawString(prefix) - out.String(string(in.EntityUUID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithParamsAndDuplicateFields_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithParamsAndDuplicateFields1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithParamsAndDuplicateFields_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithParamsAndDuplicateFields1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithParamsAndDuplicateFields_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithParamsAndDuplicateFields1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithParamsAndDuplicateFields_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithParamsAndDuplicateFields1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithNestedQueryParams(in *jlexer.Lexer, out *Bar_ArgWithNestedQueryParams_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(BarResponse) - } - (*out.Success).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithNestedQueryParams(out *jwriter.Writer, in Bar_ArgWithNestedQueryParams_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithNestedQueryParams_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithNestedQueryParams(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithNestedQueryParams_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithNestedQueryParams(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithNestedQueryParams_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithNestedQueryParams(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithNestedQueryParams_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithNestedQueryParams(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithNestedQueryParams1(in *jlexer.Lexer, out *Bar_ArgWithNestedQueryParams_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var RequestSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "request": - if in.IsNull() { - in.Skip() - out.Request = nil - } else { - if out.Request == nil { - out.Request = new(QueryParamsStruct) - } - (*out.Request).UnmarshalEasyJSON(in) - } - RequestSet = true - case "opt": - if in.IsNull() { - in.Skip() - out.Opt = nil - } else { - if out.Opt == nil { - out.Opt = new(QueryParamsOptsStruct) - } - (*out.Opt).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !RequestSet { - in.AddError(fmt.Errorf("key 'request' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithNestedQueryParams1(out *jwriter.Writer, in Bar_ArgWithNestedQueryParams_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"request\":" - out.RawString(prefix[1:]) - if in.Request == nil { - out.RawString("null") - } else { - (*in.Request).MarshalEasyJSON(out) - } - } - if in.Opt != nil { - const prefix string = ",\"opt\":" - out.RawString(prefix) - (*in.Opt).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithNestedQueryParams_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithNestedQueryParams1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithNestedQueryParams_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithNestedQueryParams1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithNestedQueryParams_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithNestedQueryParams1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithNestedQueryParams_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithNestedQueryParams1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithNearDupQueryParams(in *jlexer.Lexer, out *Bar_ArgWithNearDupQueryParams_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(BarResponse) - } - (*out.Success).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithNearDupQueryParams(out *jwriter.Writer, in Bar_ArgWithNearDupQueryParams_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithNearDupQueryParams_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithNearDupQueryParams(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithNearDupQueryParams_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithNearDupQueryParams(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithNearDupQueryParams_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithNearDupQueryParams(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithNearDupQueryParams_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithNearDupQueryParams(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithNearDupQueryParams1(in *jlexer.Lexer, out *Bar_ArgWithNearDupQueryParams_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var OneSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "one": - out.One = string(in.String()) - OneSet = true - case "two": - if in.IsNull() { - in.Skip() - out.Two = nil - } else { - if out.Two == nil { - out.Two = new(int32) - } - *out.Two = int32(in.Int32()) - } - case "three": - if in.IsNull() { - in.Skip() - out.Three = nil - } else { - if out.Three == nil { - out.Three = new(string) - } - *out.Three = string(in.String()) - } - case "four": - if in.IsNull() { - in.Skip() - out.Four = nil - } else { - if out.Four == nil { - out.Four = new(string) - } - *out.Four = string(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !OneSet { - in.AddError(fmt.Errorf("key 'one' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithNearDupQueryParams1(out *jwriter.Writer, in Bar_ArgWithNearDupQueryParams_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"one\":" - out.RawString(prefix[1:]) - out.String(string(in.One)) - } - if in.Two != nil { - const prefix string = ",\"two\":" - out.RawString(prefix) - out.Int32(int32(*in.Two)) - } - if in.Three != nil { - const prefix string = ",\"three\":" - out.RawString(prefix) - out.String(string(*in.Three)) - } - if in.Four != nil { - const prefix string = ",\"four\":" - out.RawString(prefix) - out.String(string(*in.Four)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithNearDupQueryParams_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithNearDupQueryParams1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithNearDupQueryParams_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithNearDupQueryParams1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithNearDupQueryParams_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithNearDupQueryParams1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithNearDupQueryParams_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithNearDupQueryParams1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithManyQueryParams(in *jlexer.Lexer, out *Bar_ArgWithManyQueryParams_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(BarResponse) - } - (*out.Success).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithManyQueryParams(out *jwriter.Writer, in Bar_ArgWithManyQueryParams_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithManyQueryParams_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithManyQueryParams(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithManyQueryParams_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithManyQueryParams(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithManyQueryParams_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithManyQueryParams(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithManyQueryParams_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithManyQueryParams(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithManyQueryParams1(in *jlexer.Lexer, out *Bar_ArgWithManyQueryParams_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var AStrSet bool - var ABoolSet bool - var AInt8Set bool - var AInt16Set bool - var AInt32Set bool - var AInt64Set bool - var AFloat64Set bool - var AUUIDSet bool - var AListUUIDSet bool - var AStringListSet bool - var AUUIDListSet bool - var ATsSet bool - var AReqDemoSet bool - var AReqFruitsSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "aStr": - out.AStr = string(in.String()) - AStrSet = true - case "anOptStr": - if in.IsNull() { - in.Skip() - out.AnOptStr = nil - } else { - if out.AnOptStr == nil { - out.AnOptStr = new(string) - } - *out.AnOptStr = string(in.String()) - } - case "aBool": - out.ABool = bool(in.Bool()) - ABoolSet = true - case "anOptBool": - if in.IsNull() { - in.Skip() - out.AnOptBool = nil - } else { - if out.AnOptBool == nil { - out.AnOptBool = new(bool) - } - *out.AnOptBool = bool(in.Bool()) - } - case "aInt8": - out.AInt8 = int8(in.Int8()) - AInt8Set = true - case "anOptInt8": - if in.IsNull() { - in.Skip() - out.AnOptInt8 = nil - } else { - if out.AnOptInt8 == nil { - out.AnOptInt8 = new(int8) - } - *out.AnOptInt8 = int8(in.Int8()) - } - case "aInt16": - out.AInt16 = int16(in.Int16()) - AInt16Set = true - case "anOptInt16": - if in.IsNull() { - in.Skip() - out.AnOptInt16 = nil - } else { - if out.AnOptInt16 == nil { - out.AnOptInt16 = new(int16) - } - *out.AnOptInt16 = int16(in.Int16()) - } - case "aInt32": - out.AInt32 = int32(in.Int32()) - AInt32Set = true - case "anOptInt32": - if in.IsNull() { - in.Skip() - out.AnOptInt32 = nil - } else { - if out.AnOptInt32 == nil { - out.AnOptInt32 = new(int32) - } - *out.AnOptInt32 = int32(in.Int32()) - } - case "aInt64": - out.AInt64 = int64(in.Int64()) - AInt64Set = true - case "anOptInt64": - if in.IsNull() { - in.Skip() - out.AnOptInt64 = nil - } else { - if out.AnOptInt64 == nil { - out.AnOptInt64 = new(int64) - } - *out.AnOptInt64 = int64(in.Int64()) - } - case "aFloat64": - out.AFloat64 = float64(in.Float64()) - AFloat64Set = true - case "anOptFloat64": - if in.IsNull() { - in.Skip() - out.AnOptFloat64 = nil - } else { - if out.AnOptFloat64 == nil { - out.AnOptFloat64 = new(float64) - } - *out.AnOptFloat64 = float64(in.Float64()) - } - case "aUUID": - out.AUUID = UUID(in.String()) - AUUIDSet = true - case "anOptUUID": - if in.IsNull() { - in.Skip() - out.AnOptUUID = nil - } else { - if out.AnOptUUID == nil { - out.AnOptUUID = new(UUID) - } - *out.AnOptUUID = UUID(in.String()) - } - case "aListUUID": - if in.IsNull() { - in.Skip() - out.AListUUID = nil - } else { - in.Delim('[') - if out.AListUUID == nil { - if !in.IsDelim(']') { - out.AListUUID = make([]UUID, 0, 4) - } else { - out.AListUUID = []UUID{} - } - } else { - out.AListUUID = (out.AListUUID)[:0] - } - for !in.IsDelim(']') { - var v60 UUID - v60 = UUID(in.String()) - out.AListUUID = append(out.AListUUID, v60) - in.WantComma() - } - in.Delim(']') - } - AListUUIDSet = true - case "anOptListUUID": - if in.IsNull() { - in.Skip() - out.AnOptListUUID = nil - } else { - in.Delim('[') - if out.AnOptListUUID == nil { - if !in.IsDelim(']') { - out.AnOptListUUID = make([]UUID, 0, 4) - } else { - out.AnOptListUUID = []UUID{} - } - } else { - out.AnOptListUUID = (out.AnOptListUUID)[:0] - } - for !in.IsDelim(']') { - var v61 UUID - v61 = UUID(in.String()) - out.AnOptListUUID = append(out.AnOptListUUID, v61) - in.WantComma() - } - in.Delim(']') - } - case "aStringList": - if in.IsNull() { - in.Skip() - out.AStringList = nil - } else { - in.Delim('[') - if out.AStringList == nil { - if !in.IsDelim(']') { - out.AStringList = make(StringList, 0, 4) - } else { - out.AStringList = StringList{} - } - } else { - out.AStringList = (out.AStringList)[:0] - } - for !in.IsDelim(']') { - var v62 string - v62 = string(in.String()) - out.AStringList = append(out.AStringList, v62) - in.WantComma() - } - in.Delim(']') - } - AStringListSet = true - case "anOptStringList": - if in.IsNull() { - in.Skip() - out.AnOptStringList = nil - } else { - in.Delim('[') - if out.AnOptStringList == nil { - if !in.IsDelim(']') { - out.AnOptStringList = make(StringList, 0, 4) - } else { - out.AnOptStringList = StringList{} - } - } else { - out.AnOptStringList = (out.AnOptStringList)[:0] - } - for !in.IsDelim(']') { - var v63 string - v63 = string(in.String()) - out.AnOptStringList = append(out.AnOptStringList, v63) - in.WantComma() - } - in.Delim(']') - } - case "aUUIDList": - if in.IsNull() { - in.Skip() - out.AUUIDList = nil - } else { - in.Delim('[') - if out.AUUIDList == nil { - if !in.IsDelim(']') { - out.AUUIDList = make(UUIDList, 0, 4) - } else { - out.AUUIDList = UUIDList{} - } - } else { - out.AUUIDList = (out.AUUIDList)[:0] - } - for !in.IsDelim(']') { - var v64 UUID - v64 = UUID(in.String()) - out.AUUIDList = append(out.AUUIDList, v64) - in.WantComma() - } - in.Delim(']') - } - AUUIDListSet = true - case "anOptUUIDList": - if in.IsNull() { - in.Skip() - out.AnOptUUIDList = nil - } else { - in.Delim('[') - if out.AnOptUUIDList == nil { - if !in.IsDelim(']') { - out.AnOptUUIDList = make(UUIDList, 0, 4) - } else { - out.AnOptUUIDList = UUIDList{} - } - } else { - out.AnOptUUIDList = (out.AnOptUUIDList)[:0] - } - for !in.IsDelim(']') { - var v65 UUID - v65 = UUID(in.String()) - out.AnOptUUIDList = append(out.AnOptUUIDList, v65) - in.WantComma() - } - in.Delim(']') - } - case "aTs": - if data := in.Raw(); in.Ok() { - in.AddError((out.ATs).UnmarshalJSON(data)) - } - ATsSet = true - case "anOptTs": - if in.IsNull() { - in.Skip() - out.AnOptTs = nil - } else { - if out.AnOptTs == nil { - out.AnOptTs = new(Timestamp) - } - if data := in.Raw(); in.Ok() { - in.AddError((*out.AnOptTs).UnmarshalJSON(data)) - } - } - case "aReqDemo": - if data := in.Raw(); in.Ok() { - in.AddError((out.AReqDemo).UnmarshalJSON(data)) - } - AReqDemoSet = true - case "anOptFruit": - if in.IsNull() { - in.Skip() - out.AnOptFruit = nil - } else { - if out.AnOptFruit == nil { - out.AnOptFruit = new(Fruit) - } - if data := in.Raw(); in.Ok() { - in.AddError((*out.AnOptFruit).UnmarshalJSON(data)) - } - } - case "aReqFruits": - if in.IsNull() { - in.Skip() - out.AReqFruits = nil - } else { - in.Delim('[') - if out.AReqFruits == nil { - if !in.IsDelim(']') { - out.AReqFruits = make([]Fruit, 0, 16) - } else { - out.AReqFruits = []Fruit{} - } - } else { - out.AReqFruits = (out.AReqFruits)[:0] - } - for !in.IsDelim(']') { - var v66 Fruit - if data := in.Raw(); in.Ok() { - in.AddError((v66).UnmarshalJSON(data)) - } - out.AReqFruits = append(out.AReqFruits, v66) - in.WantComma() - } - in.Delim(']') - } - AReqFruitsSet = true - case "anOptDemos": - if in.IsNull() { - in.Skip() - out.AnOptDemos = nil - } else { - in.Delim('[') - if out.AnOptDemos == nil { - if !in.IsDelim(']') { - out.AnOptDemos = make([]DemoType, 0, 16) - } else { - out.AnOptDemos = []DemoType{} - } - } else { - out.AnOptDemos = (out.AnOptDemos)[:0] - } - for !in.IsDelim(']') { - var v67 DemoType - if data := in.Raw(); in.Ok() { - in.AddError((v67).UnmarshalJSON(data)) - } - out.AnOptDemos = append(out.AnOptDemos, v67) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !AStrSet { - in.AddError(fmt.Errorf("key 'aStr' is required")) - } - if !ABoolSet { - in.AddError(fmt.Errorf("key 'aBool' is required")) - } - if !AInt8Set { - in.AddError(fmt.Errorf("key 'aInt8' is required")) - } - if !AInt16Set { - in.AddError(fmt.Errorf("key 'aInt16' is required")) - } - if !AInt32Set { - in.AddError(fmt.Errorf("key 'aInt32' is required")) - } - if !AInt64Set { - in.AddError(fmt.Errorf("key 'aInt64' is required")) - } - if !AFloat64Set { - in.AddError(fmt.Errorf("key 'aFloat64' is required")) - } - if !AUUIDSet { - in.AddError(fmt.Errorf("key 'aUUID' is required")) - } - if !AListUUIDSet { - in.AddError(fmt.Errorf("key 'aListUUID' is required")) - } - if !AStringListSet { - in.AddError(fmt.Errorf("key 'aStringList' is required")) - } - if !AUUIDListSet { - in.AddError(fmt.Errorf("key 'aUUIDList' is required")) - } - if !ATsSet { - in.AddError(fmt.Errorf("key 'aTs' is required")) - } - if !AReqDemoSet { - in.AddError(fmt.Errorf("key 'aReqDemo' is required")) - } - if !AReqFruitsSet { - in.AddError(fmt.Errorf("key 'aReqFruits' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithManyQueryParams1(out *jwriter.Writer, in Bar_ArgWithManyQueryParams_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"aStr\":" - out.RawString(prefix[1:]) - out.String(string(in.AStr)) - } - if in.AnOptStr != nil { - const prefix string = ",\"anOptStr\":" - out.RawString(prefix) - out.String(string(*in.AnOptStr)) - } - { - const prefix string = ",\"aBool\":" - out.RawString(prefix) - out.Bool(bool(in.ABool)) - } - if in.AnOptBool != nil { - const prefix string = ",\"anOptBool\":" - out.RawString(prefix) - out.Bool(bool(*in.AnOptBool)) - } - { - const prefix string = ",\"aInt8\":" - out.RawString(prefix) - out.Int8(int8(in.AInt8)) - } - if in.AnOptInt8 != nil { - const prefix string = ",\"anOptInt8\":" - out.RawString(prefix) - out.Int8(int8(*in.AnOptInt8)) - } - { - const prefix string = ",\"aInt16\":" - out.RawString(prefix) - out.Int16(int16(in.AInt16)) - } - if in.AnOptInt16 != nil { - const prefix string = ",\"anOptInt16\":" - out.RawString(prefix) - out.Int16(int16(*in.AnOptInt16)) - } - { - const prefix string = ",\"aInt32\":" - out.RawString(prefix) - out.Int32(int32(in.AInt32)) - } - if in.AnOptInt32 != nil { - const prefix string = ",\"anOptInt32\":" - out.RawString(prefix) - out.Int32(int32(*in.AnOptInt32)) - } - { - const prefix string = ",\"aInt64\":" - out.RawString(prefix) - out.Int64(int64(in.AInt64)) - } - if in.AnOptInt64 != nil { - const prefix string = ",\"anOptInt64\":" - out.RawString(prefix) - out.Int64(int64(*in.AnOptInt64)) - } - { - const prefix string = ",\"aFloat64\":" - out.RawString(prefix) - out.Float64(float64(in.AFloat64)) - } - if in.AnOptFloat64 != nil { - const prefix string = ",\"anOptFloat64\":" - out.RawString(prefix) - out.Float64(float64(*in.AnOptFloat64)) - } - { - const prefix string = ",\"aUUID\":" - out.RawString(prefix) - out.String(string(in.AUUID)) - } - if in.AnOptUUID != nil { - const prefix string = ",\"anOptUUID\":" - out.RawString(prefix) - out.String(string(*in.AnOptUUID)) - } - { - const prefix string = ",\"aListUUID\":" - out.RawString(prefix) - if in.AListUUID == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v68, v69 := range in.AListUUID { - if v68 > 0 { - out.RawByte(',') - } - out.String(string(v69)) - } - out.RawByte(']') - } - } - if len(in.AnOptListUUID) != 0 { - const prefix string = ",\"anOptListUUID\":" - out.RawString(prefix) - { - out.RawByte('[') - for v70, v71 := range in.AnOptListUUID { - if v70 > 0 { - out.RawByte(',') - } - out.String(string(v71)) - } - out.RawByte(']') - } - } - { - const prefix string = ",\"aStringList\":" - out.RawString(prefix) - if in.AStringList == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v72, v73 := range in.AStringList { - if v72 > 0 { - out.RawByte(',') - } - out.String(string(v73)) - } - out.RawByte(']') - } - } - if len(in.AnOptStringList) != 0 { - const prefix string = ",\"anOptStringList\":" - out.RawString(prefix) - { - out.RawByte('[') - for v74, v75 := range in.AnOptStringList { - if v74 > 0 { - out.RawByte(',') - } - out.String(string(v75)) - } - out.RawByte(']') - } - } - { - const prefix string = ",\"aUUIDList\":" - out.RawString(prefix) - if in.AUUIDList == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v76, v77 := range in.AUUIDList { - if v76 > 0 { - out.RawByte(',') - } - out.String(string(v77)) - } - out.RawByte(']') - } - } - if len(in.AnOptUUIDList) != 0 { - const prefix string = ",\"anOptUUIDList\":" - out.RawString(prefix) - { - out.RawByte('[') - for v78, v79 := range in.AnOptUUIDList { - if v78 > 0 { - out.RawByte(',') - } - out.String(string(v79)) - } - out.RawByte(']') - } - } - { - const prefix string = ",\"aTs\":" - out.RawString(prefix) - out.Raw((in.ATs).MarshalJSON()) - } - if in.AnOptTs != nil { - const prefix string = ",\"anOptTs\":" - out.RawString(prefix) - out.Raw((*in.AnOptTs).MarshalJSON()) - } - { - const prefix string = ",\"aReqDemo\":" - out.RawString(prefix) - out.Raw((in.AReqDemo).MarshalJSON()) - } - if in.AnOptFruit != nil { - const prefix string = ",\"anOptFruit\":" - out.RawString(prefix) - out.Raw((*in.AnOptFruit).MarshalJSON()) - } - { - const prefix string = ",\"aReqFruits\":" - out.RawString(prefix) - if in.AReqFruits == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v80, v81 := range in.AReqFruits { - if v80 > 0 { - out.RawByte(',') - } - out.Raw((v81).MarshalJSON()) - } - out.RawByte(']') - } - } - if len(in.AnOptDemos) != 0 { - const prefix string = ",\"anOptDemos\":" - out.RawString(prefix) - { - out.RawByte('[') - for v82, v83 := range in.AnOptDemos { - if v82 > 0 { - out.RawByte(',') - } - out.Raw((v83).MarshalJSON()) - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithManyQueryParams_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithManyQueryParams1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithManyQueryParams_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithManyQueryParams1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithManyQueryParams_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithManyQueryParams1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithManyQueryParams_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithManyQueryParams1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithHeaders(in *jlexer.Lexer, out *Bar_ArgWithHeaders_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(BarResponse) - } - (*out.Success).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithHeaders(out *jwriter.Writer, in Bar_ArgWithHeaders_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithHeaders_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithHeaders(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithHeaders_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithHeaders(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithHeaders_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithHeaders(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithHeaders_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithHeaders(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithHeaders1(in *jlexer.Lexer, out *Bar_ArgWithHeaders_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "paramsStruct": - if in.IsNull() { - in.Skip() - out.ParamsStruct = nil - } else { - if out.ParamsStruct == nil { - out.ParamsStruct = new(OptionalParamsStruct) - } - (*out.ParamsStruct).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithHeaders1(out *jwriter.Writer, in Bar_ArgWithHeaders_Args) { - out.RawByte('{') - first := true - _ = first - if in.ParamsStruct != nil { - const prefix string = ",\"paramsStruct\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.ParamsStruct).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithHeaders_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithHeaders1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithHeaders_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithHeaders1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithHeaders_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithHeaders1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithHeaders_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgWithHeaders1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgNotStruct(in *jlexer.Lexer, out *Bar_ArgNotStruct_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "barException": - if in.IsNull() { - in.Skip() - out.BarException = nil - } else { - if out.BarException == nil { - out.BarException = new(BarException) - } - (*out.BarException).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgNotStruct(out *jwriter.Writer, in Bar_ArgNotStruct_Result) { - out.RawByte('{') - first := true - _ = first - if in.BarException != nil { - const prefix string = ",\"barException\":" - first = false - out.RawString(prefix[1:]) - (*in.BarException).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgNotStruct_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgNotStruct(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgNotStruct_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgNotStruct(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgNotStruct_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgNotStruct(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgNotStruct_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgNotStruct(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgNotStruct1(in *jlexer.Lexer, out *Bar_ArgNotStruct_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var RequestSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "request": - out.Request = string(in.String()) - RequestSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !RequestSet { - in.AddError(fmt.Errorf("key 'request' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgNotStruct1(out *jwriter.Writer, in Bar_ArgNotStruct_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"request\":" - out.RawString(prefix[1:]) - out.String(string(in.Request)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgNotStruct_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgNotStruct1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgNotStruct_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgNotStruct1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgNotStruct_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgNotStruct1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgNotStruct_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBarBarArgNotStruct1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar5(in *jlexer.Lexer, out *BarResponseRecur) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var NodesSet bool - var HeightSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "nodes": - if in.IsNull() { - in.Skip() - out.Nodes = nil - } else { - in.Delim('[') - if out.Nodes == nil { - if !in.IsDelim(']') { - out.Nodes = make([]string, 0, 4) - } else { - out.Nodes = []string{} - } - } else { - out.Nodes = (out.Nodes)[:0] - } - for !in.IsDelim(']') { - var v84 string - v84 = string(in.String()) - out.Nodes = append(out.Nodes, v84) - in.WantComma() - } - in.Delim(']') - } - NodesSet = true - case "height": - out.Height = int32(in.Int32()) - HeightSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !NodesSet { - in.AddError(fmt.Errorf("key 'nodes' is required")) - } - if !HeightSet { - in.AddError(fmt.Errorf("key 'height' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar5(out *jwriter.Writer, in BarResponseRecur) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"nodes\":" - out.RawString(prefix[1:]) - if in.Nodes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v85, v86 := range in.Nodes { - if v85 > 0 { - out.RawByte(',') - } - out.String(string(v86)) - } - out.RawByte(']') - } - } - { - const prefix string = ",\"height\":" - out.RawString(prefix) - out.Int32(int32(in.Height)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v BarResponseRecur) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar5(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v BarResponseRecur) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar5(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *BarResponseRecur) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar5(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *BarResponseRecur) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar5(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar6(in *jlexer.Lexer, out *BarResponse) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var StringFieldSet bool - var IntWithRangeSet bool - var IntWithoutRangeSet bool - var MapIntWithRangeSet bool - var MapIntWithoutRangeSet bool - var BinaryFieldSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "stringField": - out.StringField = string(in.String()) - StringFieldSet = true - case "intWithRange": - out.IntWithRange = int32(in.Int32()) - IntWithRangeSet = true - case "intWithoutRange": - out.IntWithoutRange = int32(in.Int32()) - IntWithoutRangeSet = true - case "mapIntWithRange": - if in.IsNull() { - in.Skip() - } else { - in.Delim('{') - out.MapIntWithRange = make(map[UUID]int32) - for !in.IsDelim('}') { - key := UUID(in.String()) - in.WantColon() - var v87 int32 - v87 = int32(in.Int32()) - (out.MapIntWithRange)[key] = v87 - in.WantComma() - } - in.Delim('}') - } - MapIntWithRangeSet = true - case "mapIntWithoutRange": - if in.IsNull() { - in.Skip() - } else { - in.Delim('{') - out.MapIntWithoutRange = make(map[string]int32) - for !in.IsDelim('}') { - key := string(in.String()) - in.WantColon() - var v88 int32 - v88 = int32(in.Int32()) - (out.MapIntWithoutRange)[key] = v88 - in.WantComma() - } - in.Delim('}') - } - MapIntWithoutRangeSet = true - case "binaryField": - if in.IsNull() { - in.Skip() - out.BinaryField = nil - } else { - out.BinaryField = in.Bytes() - } - BinaryFieldSet = true - case "nextResponse": - if in.IsNull() { - in.Skip() - out.NextResponse = nil - } else { - if out.NextResponse == nil { - out.NextResponse = new(BarResponse) - } - (*out.NextResponse).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !StringFieldSet { - in.AddError(fmt.Errorf("key 'stringField' is required")) - } - if !IntWithRangeSet { - in.AddError(fmt.Errorf("key 'intWithRange' is required")) - } - if !IntWithoutRangeSet { - in.AddError(fmt.Errorf("key 'intWithoutRange' is required")) - } - if !MapIntWithRangeSet { - in.AddError(fmt.Errorf("key 'mapIntWithRange' is required")) - } - if !MapIntWithoutRangeSet { - in.AddError(fmt.Errorf("key 'mapIntWithoutRange' is required")) - } - if !BinaryFieldSet { - in.AddError(fmt.Errorf("key 'binaryField' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar6(out *jwriter.Writer, in BarResponse) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"stringField\":" - out.RawString(prefix[1:]) - out.String(string(in.StringField)) - } - { - const prefix string = ",\"intWithRange\":" - out.RawString(prefix) - out.Int32(int32(in.IntWithRange)) - } - { - const prefix string = ",\"intWithoutRange\":" - out.RawString(prefix) - out.Int32(int32(in.IntWithoutRange)) - } - { - const prefix string = ",\"mapIntWithRange\":" - out.RawString(prefix) - if in.MapIntWithRange == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 { - out.RawString(`null`) - } else { - out.RawByte('{') - v90First := true - for v90Name, v90Value := range in.MapIntWithRange { - if v90First { - v90First = false - } else { - out.RawByte(',') - } - out.String(string(v90Name)) - out.RawByte(':') - out.Int32(int32(v90Value)) - } - out.RawByte('}') - } - } - { - const prefix string = ",\"mapIntWithoutRange\":" - out.RawString(prefix) - if in.MapIntWithoutRange == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 { - out.RawString(`null`) - } else { - out.RawByte('{') - v91First := true - for v91Name, v91Value := range in.MapIntWithoutRange { - if v91First { - v91First = false - } else { - out.RawByte(',') - } - out.String(string(v91Name)) - out.RawByte(':') - out.Int32(int32(v91Value)) - } - out.RawByte('}') - } - } - { - const prefix string = ",\"binaryField\":" - out.RawString(prefix) - out.Base64Bytes(in.BinaryField) - } - if in.NextResponse != nil { - const prefix string = ",\"nextResponse\":" - out.RawString(prefix) - (*in.NextResponse).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v BarResponse) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar6(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v BarResponse) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar6(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *BarResponse) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar6(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *BarResponse) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar6(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar7(in *jlexer.Lexer, out *BarRequestRecur) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var NameSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "name": - out.Name = string(in.String()) - NameSet = true - case "recur": - if in.IsNull() { - in.Skip() - out.Recur = nil - } else { - if out.Recur == nil { - out.Recur = new(BarRequestRecur) - } - (*out.Recur).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !NameSet { - in.AddError(fmt.Errorf("key 'name' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar7(out *jwriter.Writer, in BarRequestRecur) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"name\":" - out.RawString(prefix[1:]) - out.String(string(in.Name)) - } - if in.Recur != nil { - const prefix string = ",\"recur\":" - out.RawString(prefix) - (*in.Recur).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v BarRequestRecur) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar7(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v BarRequestRecur) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar7(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *BarRequestRecur) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar7(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *BarRequestRecur) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar7(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar8(in *jlexer.Lexer, out *BarRequest) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var StringFieldSet bool - var BoolFieldSet bool - var BinaryFieldSet bool - var TimestampSet bool - var EnumFieldSet bool - var LongFieldSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "stringField": - out.StringField = string(in.String()) - StringFieldSet = true - case "boolField": - out.BoolField = bool(in.Bool()) - BoolFieldSet = true - case "binaryField": - if in.IsNull() { - in.Skip() - out.BinaryField = nil - } else { - out.BinaryField = in.Bytes() - } - BinaryFieldSet = true - case "timestamp": - if data := in.Raw(); in.Ok() { - in.AddError((out.Timestamp).UnmarshalJSON(data)) - } - TimestampSet = true - case "enumField": - if data := in.Raw(); in.Ok() { - in.AddError((out.EnumField).UnmarshalJSON(data)) - } - EnumFieldSet = true - case "longField": - if data := in.Raw(); in.Ok() { - in.AddError((out.LongField).UnmarshalJSON(data)) - } - LongFieldSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !StringFieldSet { - in.AddError(fmt.Errorf("key 'stringField' is required")) - } - if !BoolFieldSet { - in.AddError(fmt.Errorf("key 'boolField' is required")) - } - if !BinaryFieldSet { - in.AddError(fmt.Errorf("key 'binaryField' is required")) - } - if !TimestampSet { - in.AddError(fmt.Errorf("key 'timestamp' is required")) - } - if !EnumFieldSet { - in.AddError(fmt.Errorf("key 'enumField' is required")) - } - if !LongFieldSet { - in.AddError(fmt.Errorf("key 'longField' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar8(out *jwriter.Writer, in BarRequest) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"stringField\":" - out.RawString(prefix[1:]) - out.String(string(in.StringField)) - } - { - const prefix string = ",\"boolField\":" - out.RawString(prefix) - out.Bool(bool(in.BoolField)) - } - { - const prefix string = ",\"binaryField\":" - out.RawString(prefix) - out.Base64Bytes(in.BinaryField) - } - { - const prefix string = ",\"timestamp\":" - out.RawString(prefix) - out.Raw((in.Timestamp).MarshalJSON()) - } - { - const prefix string = ",\"enumField\":" - out.RawString(prefix) - out.Raw((in.EnumField).MarshalJSON()) - } - { - const prefix string = ",\"longField\":" - out.RawString(prefix) - out.Raw((in.LongField).MarshalJSON()) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v BarRequest) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar8(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v BarRequest) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar8(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *BarRequest) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar8(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *BarRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar8(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar9(in *jlexer.Lexer, out *BarException) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var StringFieldSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "stringField": - out.StringField = string(in.String()) - StringFieldSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !StringFieldSet { - in.AddError(fmt.Errorf("key 'stringField' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar9(out *jwriter.Writer, in BarException) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"stringField\":" - out.RawString(prefix[1:]) - out.String(string(in.StringField)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v BarException) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar9(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v BarException) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar9(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *BarException) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar9(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *BarException) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsBarBar9(l, v) -} diff --git a/examples/example-gateway/build/gen-code/clients/bar/bar/types_i64_easyjson.go b/examples/example-gateway/build/gen-code/clients/bar/bar/types_i64_easyjson.go deleted file mode 100644 index dd77aa1b6..000000000 --- a/examples/example-gateway/build/gen-code/clients/bar/bar/types_i64_easyjson.go +++ /dev/null @@ -1,22 +0,0 @@ -// Code generated by zanzibar -// @generated -// Checksum : gYV3V5yK9HSWyPqj8tv9iA== -// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. - -package bar - -import ( - json "encoding/json" - - easyjson "github.com/mailru/easyjson" - jlexer "github.com/mailru/easyjson/jlexer" - jwriter "github.com/mailru/easyjson/jwriter" -) - -// suppress unused package warning -var ( - _ *json.RawMessage - _ *jlexer.Lexer - _ *jwriter.Writer - _ easyjson.Marshaler -) diff --git a/examples/example-gateway/build/gen-code/clients/contacts/contacts/contacts_easyjson.go b/examples/example-gateway/build/gen-code/clients/contacts/contacts/contacts_easyjson.go deleted file mode 100644 index 5a4706166..000000000 --- a/examples/example-gateway/build/gen-code/clients/contacts/contacts/contacts_easyjson.go +++ /dev/null @@ -1,1199 +0,0 @@ -// Code generated by zanzibar -// @generated -// Checksum : fWaKyzheIAOyGfs4PYcEEA== -// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. - -package contacts - -import ( - json "encoding/json" - fmt "fmt" - - easyjson "github.com/mailru/easyjson" - jlexer "github.com/mailru/easyjson/jlexer" - jwriter "github.com/mailru/easyjson/jwriter" -) - -// suppress unused package warning -var ( - _ *json.RawMessage - _ *jlexer.Lexer - _ *jwriter.Writer - _ easyjson.Marshaler -) - -func easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts(in *jlexer.Lexer, out *SaveContactsResponse) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts(out *jwriter.Writer, in SaveContactsResponse) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SaveContactsResponse) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SaveContactsResponse) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SaveContactsResponse) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SaveContactsResponse) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts(l, v) -} -func easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts1(in *jlexer.Lexer, out *SaveContactsRequest) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var UserUUIDSet bool - var ContactsSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "userUUID": - out.UserUUID = string(in.String()) - UserUUIDSet = true - case "contacts": - if in.IsNull() { - in.Skip() - out.Contacts = nil - } else { - in.Delim('[') - if out.Contacts == nil { - if !in.IsDelim(']') { - out.Contacts = make([]*Contact, 0, 8) - } else { - out.Contacts = []*Contact{} - } - } else { - out.Contacts = (out.Contacts)[:0] - } - for !in.IsDelim(']') { - var v1 *Contact - if in.IsNull() { - in.Skip() - v1 = nil - } else { - if v1 == nil { - v1 = new(Contact) - } - (*v1).UnmarshalEasyJSON(in) - } - out.Contacts = append(out.Contacts, v1) - in.WantComma() - } - in.Delim(']') - } - ContactsSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !UserUUIDSet { - in.AddError(fmt.Errorf("key 'userUUID' is required")) - } - if !ContactsSet { - in.AddError(fmt.Errorf("key 'contacts' is required")) - } -} -func easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts1(out *jwriter.Writer, in SaveContactsRequest) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"userUUID\":" - out.RawString(prefix[1:]) - out.String(string(in.UserUUID)) - } - { - const prefix string = ",\"contacts\":" - out.RawString(prefix) - if in.Contacts == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v2, v3 := range in.Contacts { - if v2 > 0 { - out.RawByte(',') - } - if v3 == nil { - out.RawString("null") - } else { - (*v3).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SaveContactsRequest) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SaveContactsRequest) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SaveContactsRequest) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SaveContactsRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts1(l, v) -} -func easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts2(in *jlexer.Lexer, out *NotFound) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts2(out *jwriter.Writer, in NotFound) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v NotFound) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts2(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v NotFound) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts2(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *NotFound) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts2(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *NotFound) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts2(l, v) -} -func easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContactsContactsTestUrlUrl(in *jlexer.Lexer, out *Contacts_TestUrlUrl_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(string) - } - *out.Success = string(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContactsContactsTestUrlUrl(out *jwriter.Writer, in Contacts_TestUrlUrl_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - out.String(string(*in.Success)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Contacts_TestUrlUrl_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContactsContactsTestUrlUrl(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Contacts_TestUrlUrl_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContactsContactsTestUrlUrl(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Contacts_TestUrlUrl_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContactsContactsTestUrlUrl(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Contacts_TestUrlUrl_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContactsContactsTestUrlUrl(l, v) -} -func easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContactsContactsTestUrlUrl1(in *jlexer.Lexer, out *Contacts_TestUrlUrl_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContactsContactsTestUrlUrl1(out *jwriter.Writer, in Contacts_TestUrlUrl_Args) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Contacts_TestUrlUrl_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContactsContactsTestUrlUrl1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Contacts_TestUrlUrl_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContactsContactsTestUrlUrl1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Contacts_TestUrlUrl_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContactsContactsTestUrlUrl1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Contacts_TestUrlUrl_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContactsContactsTestUrlUrl1(l, v) -} -func easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContactsContactsSaveContacts(in *jlexer.Lexer, out *Contacts_SaveContacts_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(SaveContactsResponse) - } - (*out.Success).UnmarshalEasyJSON(in) - } - case "badRequest": - if in.IsNull() { - in.Skip() - out.BadRequest = nil - } else { - if out.BadRequest == nil { - out.BadRequest = new(BadRequest) - } - (*out.BadRequest).UnmarshalEasyJSON(in) - } - case "notFound": - if in.IsNull() { - in.Skip() - out.NotFound = nil - } else { - if out.NotFound == nil { - out.NotFound = new(NotFound) - } - (*out.NotFound).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContactsContactsSaveContacts(out *jwriter.Writer, in Contacts_SaveContacts_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - if in.BadRequest != nil { - const prefix string = ",\"badRequest\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.BadRequest).MarshalEasyJSON(out) - } - if in.NotFound != nil { - const prefix string = ",\"notFound\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.NotFound).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Contacts_SaveContacts_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContactsContactsSaveContacts(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Contacts_SaveContacts_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContactsContactsSaveContacts(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Contacts_SaveContacts_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContactsContactsSaveContacts(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Contacts_SaveContacts_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContactsContactsSaveContacts(l, v) -} -func easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContactsContactsSaveContacts1(in *jlexer.Lexer, out *Contacts_SaveContacts_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var SaveContactsRequestSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "saveContactsRequest": - if in.IsNull() { - in.Skip() - out.SaveContactsRequest = nil - } else { - if out.SaveContactsRequest == nil { - out.SaveContactsRequest = new(SaveContactsRequest) - } - (*out.SaveContactsRequest).UnmarshalEasyJSON(in) - } - SaveContactsRequestSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !SaveContactsRequestSet { - in.AddError(fmt.Errorf("key 'saveContactsRequest' is required")) - } -} -func easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContactsContactsSaveContacts1(out *jwriter.Writer, in Contacts_SaveContacts_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"saveContactsRequest\":" - out.RawString(prefix[1:]) - if in.SaveContactsRequest == nil { - out.RawString("null") - } else { - (*in.SaveContactsRequest).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Contacts_SaveContacts_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContactsContactsSaveContacts1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Contacts_SaveContacts_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContactsContactsSaveContacts1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Contacts_SaveContacts_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContactsContactsSaveContacts1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Contacts_SaveContacts_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContactsContactsSaveContacts1(l, v) -} -func easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts3(in *jlexer.Lexer, out *ContactFragment) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "type": - if in.IsNull() { - in.Skip() - out.Type = nil - } else { - if out.Type == nil { - out.Type = new(ContactFragmentType) - } - *out.Type = ContactFragmentType(in.String()) - } - case "text": - if in.IsNull() { - in.Skip() - out.Text = nil - } else { - if out.Text == nil { - out.Text = new(string) - } - *out.Text = string(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts3(out *jwriter.Writer, in ContactFragment) { - out.RawByte('{') - first := true - _ = first - if in.Type != nil { - const prefix string = ",\"type\":" - first = false - out.RawString(prefix[1:]) - out.String(string(*in.Type)) - } - if in.Text != nil { - const prefix string = ",\"text\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.String(string(*in.Text)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ContactFragment) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts3(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ContactFragment) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts3(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ContactFragment) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts3(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ContactFragment) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts3(l, v) -} -func easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts4(in *jlexer.Lexer, out *ContactAttributes) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "firstName": - if in.IsNull() { - in.Skip() - out.FirstName = nil - } else { - if out.FirstName == nil { - out.FirstName = new(string) - } - *out.FirstName = string(in.String()) - } - case "lastName": - if in.IsNull() { - in.Skip() - out.LastName = nil - } else { - if out.LastName == nil { - out.LastName = new(string) - } - *out.LastName = string(in.String()) - } - case "nickname": - if in.IsNull() { - in.Skip() - out.Nickname = nil - } else { - if out.Nickname == nil { - out.Nickname = new(string) - } - *out.Nickname = string(in.String()) - } - case "hasPhoto": - if in.IsNull() { - in.Skip() - out.HasPhoto = nil - } else { - if out.HasPhoto == nil { - out.HasPhoto = new(bool) - } - *out.HasPhoto = bool(in.Bool()) - } - case "numFields": - if in.IsNull() { - in.Skip() - out.NumFields = nil - } else { - if out.NumFields == nil { - out.NumFields = new(int32) - } - *out.NumFields = int32(in.Int32()) - } - case "timesContacted": - if in.IsNull() { - in.Skip() - out.TimesContacted = nil - } else { - if out.TimesContacted == nil { - out.TimesContacted = new(int32) - } - *out.TimesContacted = int32(in.Int32()) - } - case "lastTimeContacted": - if in.IsNull() { - in.Skip() - out.LastTimeContacted = nil - } else { - if out.LastTimeContacted == nil { - out.LastTimeContacted = new(int32) - } - *out.LastTimeContacted = int32(in.Int32()) - } - case "isStarred": - if in.IsNull() { - in.Skip() - out.IsStarred = nil - } else { - if out.IsStarred == nil { - out.IsStarred = new(bool) - } - *out.IsStarred = bool(in.Bool()) - } - case "hasCustomRingtone": - if in.IsNull() { - in.Skip() - out.HasCustomRingtone = nil - } else { - if out.HasCustomRingtone == nil { - out.HasCustomRingtone = new(bool) - } - *out.HasCustomRingtone = bool(in.Bool()) - } - case "isSendToVoicemail": - if in.IsNull() { - in.Skip() - out.IsSendToVoicemail = nil - } else { - if out.IsSendToVoicemail == nil { - out.IsSendToVoicemail = new(bool) - } - *out.IsSendToVoicemail = bool(in.Bool()) - } - case "hasThumbnail": - if in.IsNull() { - in.Skip() - out.HasThumbnail = nil - } else { - if out.HasThumbnail == nil { - out.HasThumbnail = new(bool) - } - *out.HasThumbnail = bool(in.Bool()) - } - case "namePrefix": - if in.IsNull() { - in.Skip() - out.NamePrefix = nil - } else { - if out.NamePrefix == nil { - out.NamePrefix = new(string) - } - *out.NamePrefix = string(in.String()) - } - case "nameSuffix": - if in.IsNull() { - in.Skip() - out.NameSuffix = nil - } else { - if out.NameSuffix == nil { - out.NameSuffix = new(string) - } - *out.NameSuffix = string(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts4(out *jwriter.Writer, in ContactAttributes) { - out.RawByte('{') - first := true - _ = first - if in.FirstName != nil { - const prefix string = ",\"firstName\":" - first = false - out.RawString(prefix[1:]) - out.String(string(*in.FirstName)) - } - if in.LastName != nil { - const prefix string = ",\"lastName\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.String(string(*in.LastName)) - } - if in.Nickname != nil { - const prefix string = ",\"nickname\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.String(string(*in.Nickname)) - } - if in.HasPhoto != nil { - const prefix string = ",\"hasPhoto\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.Bool(bool(*in.HasPhoto)) - } - if in.NumFields != nil { - const prefix string = ",\"numFields\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.Int32(int32(*in.NumFields)) - } - if in.TimesContacted != nil { - const prefix string = ",\"timesContacted\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.Int32(int32(*in.TimesContacted)) - } - if in.LastTimeContacted != nil { - const prefix string = ",\"lastTimeContacted\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.Int32(int32(*in.LastTimeContacted)) - } - if in.IsStarred != nil { - const prefix string = ",\"isStarred\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.Bool(bool(*in.IsStarred)) - } - if in.HasCustomRingtone != nil { - const prefix string = ",\"hasCustomRingtone\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.Bool(bool(*in.HasCustomRingtone)) - } - if in.IsSendToVoicemail != nil { - const prefix string = ",\"isSendToVoicemail\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.Bool(bool(*in.IsSendToVoicemail)) - } - if in.HasThumbnail != nil { - const prefix string = ",\"hasThumbnail\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.Bool(bool(*in.HasThumbnail)) - } - if in.NamePrefix != nil { - const prefix string = ",\"namePrefix\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.String(string(*in.NamePrefix)) - } - if in.NameSuffix != nil { - const prefix string = ",\"nameSuffix\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.String(string(*in.NameSuffix)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ContactAttributes) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts4(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ContactAttributes) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts4(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ContactAttributes) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts4(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ContactAttributes) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts4(l, v) -} -func easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts5(in *jlexer.Lexer, out *Contact) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "fragments": - if in.IsNull() { - in.Skip() - out.Fragments = nil - } else { - in.Delim('[') - if out.Fragments == nil { - if !in.IsDelim(']') { - out.Fragments = make([]*ContactFragment, 0, 8) - } else { - out.Fragments = []*ContactFragment{} - } - } else { - out.Fragments = (out.Fragments)[:0] - } - for !in.IsDelim(']') { - var v4 *ContactFragment - if in.IsNull() { - in.Skip() - v4 = nil - } else { - if v4 == nil { - v4 = new(ContactFragment) - } - (*v4).UnmarshalEasyJSON(in) - } - out.Fragments = append(out.Fragments, v4) - in.WantComma() - } - in.Delim(']') - } - case "attributes": - if in.IsNull() { - in.Skip() - out.Attributes = nil - } else { - if out.Attributes == nil { - out.Attributes = new(ContactAttributes) - } - (*out.Attributes).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts5(out *jwriter.Writer, in Contact) { - out.RawByte('{') - first := true - _ = first - if len(in.Fragments) != 0 { - const prefix string = ",\"fragments\":" - first = false - out.RawString(prefix[1:]) - { - out.RawByte('[') - for v5, v6 := range in.Fragments { - if v5 > 0 { - out.RawByte(',') - } - if v6 == nil { - out.RawString("null") - } else { - (*v6).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - if in.Attributes != nil { - const prefix string = ",\"attributes\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.Attributes).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Contact) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts5(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Contact) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts5(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Contact) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts5(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Contact) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts5(l, v) -} -func easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts6(in *jlexer.Lexer, out *BadRequest) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts6(out *jwriter.Writer, in BadRequest) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v BadRequest) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts6(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v BadRequest) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts6(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *BadRequest) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts6(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *BadRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsContactsContacts6(l, v) -} diff --git a/examples/example-gateway/build/gen-code/clients/corge/corge/corge_easyjson.go b/examples/example-gateway/build/gen-code/clients/corge/corge/corge_easyjson.go deleted file mode 100644 index 0335da8d5..000000000 --- a/examples/example-gateway/build/gen-code/clients/corge/corge/corge_easyjson.go +++ /dev/null @@ -1,876 +0,0 @@ -// Code generated by zanzibar -// @generated -// Checksum : QTqF+WyAmBnbvt7Ku0+azA== -// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. - -package corge - -import ( - json "encoding/json" - fmt "fmt" - - easyjson "github.com/mailru/easyjson" - jlexer "github.com/mailru/easyjson/jlexer" - jwriter "github.com/mailru/easyjson/jwriter" -) - -// suppress unused package warning -var ( - _ *json.RawMessage - _ *jlexer.Lexer - _ *jwriter.Writer - _ easyjson.Marshaler -) - -func easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorge(in *jlexer.Lexer, out *NotModified) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorge(out *jwriter.Writer, in NotModified) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v NotModified) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorge(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v NotModified) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorge(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *NotModified) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorge(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *NotModified) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorge(l, v) -} -func easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorge1(in *jlexer.Lexer, out *Foo) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorge1(out *jwriter.Writer, in Foo) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Foo) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorge1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Foo) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorge1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Foo) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorge1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Foo) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorge1(l, v) -} -func easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContent(in *jlexer.Lexer, out *Corge_NoContent_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "notModified": - if in.IsNull() { - in.Skip() - out.NotModified = nil - } else { - if out.NotModified == nil { - out.NotModified = new(NotModified) - } - (*out.NotModified).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContent(out *jwriter.Writer, in Corge_NoContent_Result) { - out.RawByte('{') - first := true - _ = first - if in.NotModified != nil { - const prefix string = ",\"notModified\":" - first = false - out.RawString(prefix[1:]) - (*in.NotModified).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Corge_NoContent_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContent(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Corge_NoContent_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContent(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Corge_NoContent_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContent(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Corge_NoContent_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContent(l, v) -} -func easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContent1(in *jlexer.Lexer, out *Corge_NoContent_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var ArgSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "arg": - out.Arg = bool(in.Bool()) - ArgSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !ArgSet { - in.AddError(fmt.Errorf("key 'arg' is required")) - } -} -func easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContent1(out *jwriter.Writer, in Corge_NoContent_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"arg\":" - out.RawString(prefix[1:]) - out.Bool(bool(in.Arg)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Corge_NoContent_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContent1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Corge_NoContent_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContent1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Corge_NoContent_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContent1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Corge_NoContent_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContent1(l, v) -} -func easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContentOnException(in *jlexer.Lexer, out *Corge_NoContentOnException_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(Foo) - } - (*out.Success).UnmarshalEasyJSON(in) - } - case "notModified": - if in.IsNull() { - in.Skip() - out.NotModified = nil - } else { - if out.NotModified == nil { - out.NotModified = new(NotModified) - } - (*out.NotModified).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContentOnException(out *jwriter.Writer, in Corge_NoContentOnException_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - if in.NotModified != nil { - const prefix string = ",\"notModified\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.NotModified).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Corge_NoContentOnException_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContentOnException(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Corge_NoContentOnException_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContentOnException(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Corge_NoContentOnException_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContentOnException(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Corge_NoContentOnException_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContentOnException(l, v) -} -func easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContentOnException1(in *jlexer.Lexer, out *Corge_NoContentOnException_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var ArgSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "arg": - out.Arg = bool(in.Bool()) - ArgSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !ArgSet { - in.AddError(fmt.Errorf("key 'arg' is required")) - } -} -func easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContentOnException1(out *jwriter.Writer, in Corge_NoContentOnException_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"arg\":" - out.RawString(prefix[1:]) - out.Bool(bool(in.Arg)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Corge_NoContentOnException_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContentOnException1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Corge_NoContentOnException_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContentOnException1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Corge_NoContentOnException_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContentOnException1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Corge_NoContentOnException_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContentOnException1(l, v) -} -func easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContentNoException(in *jlexer.Lexer, out *Corge_NoContentNoException_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContentNoException(out *jwriter.Writer, in Corge_NoContentNoException_Result) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Corge_NoContentNoException_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContentNoException(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Corge_NoContentNoException_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContentNoException(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Corge_NoContentNoException_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContentNoException(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Corge_NoContentNoException_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContentNoException(l, v) -} -func easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContentNoException1(in *jlexer.Lexer, out *Corge_NoContentNoException_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var ArgSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "arg": - out.Arg = bool(in.Bool()) - ArgSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !ArgSet { - in.AddError(fmt.Errorf("key 'arg' is required")) - } -} -func easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContentNoException1(out *jwriter.Writer, in Corge_NoContentNoException_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"arg\":" - out.RawString(prefix[1:]) - out.Bool(bool(in.Arg)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Corge_NoContentNoException_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContentNoException1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Corge_NoContentNoException_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContentNoException1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Corge_NoContentNoException_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContentNoException1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Corge_NoContentNoException_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeNoContentNoException1(l, v) -} -func easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeEchoString(in *jlexer.Lexer, out *Corge_EchoString_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(string) - } - *out.Success = string(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeEchoString(out *jwriter.Writer, in Corge_EchoString_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - out.String(string(*in.Success)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Corge_EchoString_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeEchoString(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Corge_EchoString_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeEchoString(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Corge_EchoString_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeEchoString(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Corge_EchoString_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeEchoString(l, v) -} -func easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeEchoString1(in *jlexer.Lexer, out *Corge_EchoString_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var ArgSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "arg": - out.Arg = string(in.String()) - ArgSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !ArgSet { - in.AddError(fmt.Errorf("key 'arg' is required")) - } -} -func easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeEchoString1(out *jwriter.Writer, in Corge_EchoString_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"arg\":" - out.RawString(prefix[1:]) - out.String(string(in.Arg)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Corge_EchoString_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeEchoString1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Corge_EchoString_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeEchoString1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Corge_EchoString_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeEchoString1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Corge_EchoString_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeEchoString1(l, v) -} -func easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeEchoBool(in *jlexer.Lexer, out *Corge_EchoBool_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(bool) - } - *out.Success = bool(in.Bool()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeEchoBool(out *jwriter.Writer, in Corge_EchoBool_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - out.Bool(bool(*in.Success)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Corge_EchoBool_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeEchoBool(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Corge_EchoBool_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeEchoBool(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Corge_EchoBool_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeEchoBool(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Corge_EchoBool_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeEchoBool(l, v) -} -func easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeEchoBool1(in *jlexer.Lexer, out *Corge_EchoBool_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var ArgSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "arg": - out.Arg = bool(in.Bool()) - ArgSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !ArgSet { - in.AddError(fmt.Errorf("key 'arg' is required")) - } -} -func easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeEchoBool1(out *jwriter.Writer, in Corge_EchoBool_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"arg\":" - out.RawString(prefix[1:]) - out.Bool(bool(in.Arg)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Corge_EchoBool_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeEchoBool1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Corge_EchoBool_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonAbe23ddeEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeEchoBool1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Corge_EchoBool_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeEchoBool1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Corge_EchoBool_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonAbe23ddeDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsCorgeCorgeCorgeEchoBool1(l, v) -} diff --git a/examples/example-gateway/build/gen-code/clients/foo/base/base/base_easyjson.go b/examples/example-gateway/build/gen-code/clients/foo/base/base/base_easyjson.go deleted file mode 100644 index aa8d165ac..000000000 --- a/examples/example-gateway/build/gen-code/clients/foo/base/base/base_easyjson.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by zanzibar -// @generated -// Checksum : kOr5FE+JQZqCoXhqQKQSwA== -// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. - -package base - -import ( - json "encoding/json" - fmt "fmt" - - easyjson "github.com/mailru/easyjson" - jlexer "github.com/mailru/easyjson/jlexer" - jwriter "github.com/mailru/easyjson/jwriter" -) - -// suppress unused package warning -var ( - _ *json.RawMessage - _ *jlexer.Lexer - _ *jwriter.Writer - _ easyjson.Marshaler -) - -func easyjson25720c23DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooBaseBase(in *jlexer.Lexer, out *Message) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var BodySet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "body": - out.Body = string(in.String()) - BodySet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !BodySet { - in.AddError(fmt.Errorf("key 'body' is required")) - } -} -func easyjson25720c23EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooBaseBase(out *jwriter.Writer, in Message) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"body\":" - out.RawString(prefix[1:]) - out.String(string(in.Body)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Message) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson25720c23EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooBaseBase(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Message) MarshalEasyJSON(w *jwriter.Writer) { - easyjson25720c23EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooBaseBase(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Message) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson25720c23DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooBaseBase(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Message) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson25720c23DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooBaseBase(l, v) -} diff --git a/examples/example-gateway/build/gen-code/clients/foo/foo/foo_easyjson.go b/examples/example-gateway/build/gen-code/clients/foo/foo/foo_easyjson.go deleted file mode 100644 index 4ad7efd93..000000000 --- a/examples/example-gateway/build/gen-code/clients/foo/foo/foo_easyjson.go +++ /dev/null @@ -1,356 +0,0 @@ -// Code generated by zanzibar -// @generated -// Checksum : AVnsBqDmcUDxMS4iumUCVA== -// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. - -package foo - -import ( - json "encoding/json" - fmt "fmt" - - easyjson "github.com/mailru/easyjson" - jlexer "github.com/mailru/easyjson/jlexer" - jwriter "github.com/mailru/easyjson/jwriter" - base "github.com/uber/zanzibar/examples/example-gateway/build/gen-code/clients/foo/base/base" -) - -// suppress unused package warning -var ( - _ *json.RawMessage - _ *jlexer.Lexer - _ *jwriter.Writer - _ easyjson.Marshaler -) - -func easyjsonE4de407aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooFoo(in *jlexer.Lexer, out *FooStruct) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var FooStringSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "fooString": - out.FooString = string(in.String()) - FooStringSet = true - case "fooI32": - if in.IsNull() { - in.Skip() - out.FooI32 = nil - } else { - if out.FooI32 == nil { - out.FooI32 = new(int32) - } - *out.FooI32 = int32(in.Int32()) - } - case "fooI16": - if in.IsNull() { - in.Skip() - out.FooI16 = nil - } else { - if out.FooI16 == nil { - out.FooI16 = new(int16) - } - *out.FooI16 = int16(in.Int16()) - } - case "fooDouble": - if in.IsNull() { - in.Skip() - out.FooDouble = nil - } else { - if out.FooDouble == nil { - out.FooDouble = new(float64) - } - *out.FooDouble = float64(in.Float64()) - } - case "fooBool": - if in.IsNull() { - in.Skip() - out.FooBool = nil - } else { - if out.FooBool == nil { - out.FooBool = new(bool) - } - *out.FooBool = bool(in.Bool()) - } - case "fooMap": - if in.IsNull() { - in.Skip() - } else { - in.Delim('{') - if !in.IsDelim('}') { - out.FooMap = make(map[string]string) - } else { - out.FooMap = nil - } - for !in.IsDelim('}') { - key := string(in.String()) - in.WantColon() - var v1 string - v1 = string(in.String()) - (out.FooMap)[key] = v1 - in.WantComma() - } - in.Delim('}') - } - case "message": - if in.IsNull() { - in.Skip() - out.Message = nil - } else { - if out.Message == nil { - out.Message = new(base.Message) - } - (*out.Message).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !FooStringSet { - in.AddError(fmt.Errorf("key 'fooString' is required")) - } -} -func easyjsonE4de407aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooFoo(out *jwriter.Writer, in FooStruct) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"fooString\":" - out.RawString(prefix[1:]) - out.String(string(in.FooString)) - } - if in.FooI32 != nil { - const prefix string = ",\"fooI32\":" - out.RawString(prefix) - out.Int32(int32(*in.FooI32)) - } - if in.FooI16 != nil { - const prefix string = ",\"fooI16\":" - out.RawString(prefix) - out.Int16(int16(*in.FooI16)) - } - if in.FooDouble != nil { - const prefix string = ",\"fooDouble\":" - out.RawString(prefix) - out.Float64(float64(*in.FooDouble)) - } - if in.FooBool != nil { - const prefix string = ",\"fooBool\":" - out.RawString(prefix) - out.Bool(bool(*in.FooBool)) - } - if len(in.FooMap) != 0 { - const prefix string = ",\"fooMap\":" - out.RawString(prefix) - { - out.RawByte('{') - v2First := true - for v2Name, v2Value := range in.FooMap { - if v2First { - v2First = false - } else { - out.RawByte(',') - } - out.String(string(v2Name)) - out.RawByte(':') - out.String(string(v2Value)) - } - out.RawByte('}') - } - } - if in.Message != nil { - const prefix string = ",\"message\":" - out.RawString(prefix) - (*in.Message).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v FooStruct) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonE4de407aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooFoo(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v FooStruct) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonE4de407aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooFoo(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *FooStruct) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonE4de407aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooFoo(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *FooStruct) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonE4de407aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooFoo(l, v) -} -func easyjsonE4de407aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooFoo1(in *jlexer.Lexer, out *FooName) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "name": - if in.IsNull() { - in.Skip() - out.Name = nil - } else { - if out.Name == nil { - out.Name = new(string) - } - *out.Name = string(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonE4de407aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooFoo1(out *jwriter.Writer, in FooName) { - out.RawByte('{') - first := true - _ = first - if in.Name != nil { - const prefix string = ",\"name\":" - first = false - out.RawString(prefix[1:]) - out.String(string(*in.Name)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v FooName) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonE4de407aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooFoo1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v FooName) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonE4de407aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooFoo1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *FooName) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonE4de407aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooFoo1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *FooName) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonE4de407aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooFoo1(l, v) -} -func easyjsonE4de407aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooFoo2(in *jlexer.Lexer, out *FooException) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var TeapotSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "teapot": - out.Teapot = string(in.String()) - TeapotSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !TeapotSet { - in.AddError(fmt.Errorf("key 'teapot' is required")) - } -} -func easyjsonE4de407aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooFoo2(out *jwriter.Writer, in FooException) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"teapot\":" - out.RawString(prefix[1:]) - out.String(string(in.Teapot)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v FooException) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonE4de407aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooFoo2(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v FooException) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonE4de407aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooFoo2(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *FooException) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonE4de407aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooFoo2(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *FooException) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonE4de407aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsFooFoo2(l, v) -} diff --git a/examples/example-gateway/build/gen-code/clients/googlenow/googlenow/googlenow_easyjson.go b/examples/example-gateway/build/gen-code/clients/googlenow/googlenow/googlenow_easyjson.go deleted file mode 100644 index a8dcb3f5f..000000000 --- a/examples/example-gateway/build/gen-code/clients/googlenow/googlenow/googlenow_easyjson.go +++ /dev/null @@ -1,272 +0,0 @@ -// Code generated by zanzibar -// @generated -// Checksum : bf66iX7QoNRm/wUusZxtvQ== -// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. - -package googlenow - -import ( - json "encoding/json" - fmt "fmt" - - easyjson "github.com/mailru/easyjson" - jlexer "github.com/mailru/easyjson/jlexer" - jwriter "github.com/mailru/easyjson/jwriter" -) - -// suppress unused package warning -var ( - _ *json.RawMessage - _ *jlexer.Lexer - _ *jwriter.Writer - _ easyjson.Marshaler -) - -func easyjson25b7f9c9DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsGooglenowGooglenowGoogleNowServiceCheckCredentials(in *jlexer.Lexer, out *GoogleNowService_CheckCredentials_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson25b7f9c9EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsGooglenowGooglenowGoogleNowServiceCheckCredentials(out *jwriter.Writer, in GoogleNowService_CheckCredentials_Result) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GoogleNowService_CheckCredentials_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson25b7f9c9EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsGooglenowGooglenowGoogleNowServiceCheckCredentials(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GoogleNowService_CheckCredentials_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson25b7f9c9EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsGooglenowGooglenowGoogleNowServiceCheckCredentials(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GoogleNowService_CheckCredentials_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson25b7f9c9DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsGooglenowGooglenowGoogleNowServiceCheckCredentials(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GoogleNowService_CheckCredentials_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson25b7f9c9DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsGooglenowGooglenowGoogleNowServiceCheckCredentials(l, v) -} -func easyjson25b7f9c9DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsGooglenowGooglenowGoogleNowServiceCheckCredentials1(in *jlexer.Lexer, out *GoogleNowService_CheckCredentials_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson25b7f9c9EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsGooglenowGooglenowGoogleNowServiceCheckCredentials1(out *jwriter.Writer, in GoogleNowService_CheckCredentials_Args) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GoogleNowService_CheckCredentials_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson25b7f9c9EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsGooglenowGooglenowGoogleNowServiceCheckCredentials1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GoogleNowService_CheckCredentials_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson25b7f9c9EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsGooglenowGooglenowGoogleNowServiceCheckCredentials1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GoogleNowService_CheckCredentials_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson25b7f9c9DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsGooglenowGooglenowGoogleNowServiceCheckCredentials1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GoogleNowService_CheckCredentials_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson25b7f9c9DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsGooglenowGooglenowGoogleNowServiceCheckCredentials1(l, v) -} -func easyjson25b7f9c9DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsGooglenowGooglenowGoogleNowServiceAddCredentials(in *jlexer.Lexer, out *GoogleNowService_AddCredentials_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson25b7f9c9EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsGooglenowGooglenowGoogleNowServiceAddCredentials(out *jwriter.Writer, in GoogleNowService_AddCredentials_Result) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GoogleNowService_AddCredentials_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson25b7f9c9EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsGooglenowGooglenowGoogleNowServiceAddCredentials(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GoogleNowService_AddCredentials_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson25b7f9c9EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsGooglenowGooglenowGoogleNowServiceAddCredentials(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GoogleNowService_AddCredentials_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson25b7f9c9DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsGooglenowGooglenowGoogleNowServiceAddCredentials(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GoogleNowService_AddCredentials_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson25b7f9c9DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsGooglenowGooglenowGoogleNowServiceAddCredentials(l, v) -} -func easyjson25b7f9c9DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsGooglenowGooglenowGoogleNowServiceAddCredentials1(in *jlexer.Lexer, out *GoogleNowService_AddCredentials_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var AuthCodeSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "authCode": - out.AuthCode = string(in.String()) - AuthCodeSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !AuthCodeSet { - in.AddError(fmt.Errorf("key 'authCode' is required")) - } -} -func easyjson25b7f9c9EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsGooglenowGooglenowGoogleNowServiceAddCredentials1(out *jwriter.Writer, in GoogleNowService_AddCredentials_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"authCode\":" - out.RawString(prefix[1:]) - out.String(string(in.AuthCode)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GoogleNowService_AddCredentials_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson25b7f9c9EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsGooglenowGooglenowGoogleNowServiceAddCredentials1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GoogleNowService_AddCredentials_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson25b7f9c9EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsGooglenowGooglenowGoogleNowServiceAddCredentials1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GoogleNowService_AddCredentials_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson25b7f9c9DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsGooglenowGooglenowGoogleNowServiceAddCredentials1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GoogleNowService_AddCredentials_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson25b7f9c9DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsGooglenowGooglenowGoogleNowServiceAddCredentials1(l, v) -} diff --git a/examples/example-gateway/build/gen-code/clients/multi/multi/multi_easyjson.go b/examples/example-gateway/build/gen-code/clients/multi/multi/multi_easyjson.go deleted file mode 100644 index 36b414d35..000000000 --- a/examples/example-gateway/build/gen-code/clients/multi/multi/multi_easyjson.go +++ /dev/null @@ -1,425 +0,0 @@ -// Code generated by zanzibar -// @generated -// Checksum : sWgi+fkC4XAzevu+9vNmUg== -// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. - -package multi - -import ( - json "encoding/json" - - easyjson "github.com/mailru/easyjson" - jlexer "github.com/mailru/easyjson/jlexer" - jwriter "github.com/mailru/easyjson/jwriter" -) - -// suppress unused package warning -var ( - _ *json.RawMessage - _ *jlexer.Lexer - _ *jwriter.Writer - _ easyjson.Marshaler -) - -func easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceCBackHello(in *jlexer.Lexer, out *ServiceCBack_Hello_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(string) - } - *out.Success = string(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceCBackHello(out *jwriter.Writer, in ServiceCBack_Hello_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - out.String(string(*in.Success)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ServiceCBack_Hello_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceCBackHello(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ServiceCBack_Hello_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceCBackHello(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ServiceCBack_Hello_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceCBackHello(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ServiceCBack_Hello_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceCBackHello(l, v) -} -func easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceCBackHello1(in *jlexer.Lexer, out *ServiceCBack_Hello_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceCBackHello1(out *jwriter.Writer, in ServiceCBack_Hello_Args) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ServiceCBack_Hello_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceCBackHello1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ServiceCBack_Hello_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceCBackHello1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ServiceCBack_Hello_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceCBackHello1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ServiceCBack_Hello_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceCBackHello1(l, v) -} -func easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceBBackHello(in *jlexer.Lexer, out *ServiceBBack_Hello_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(string) - } - *out.Success = string(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceBBackHello(out *jwriter.Writer, in ServiceBBack_Hello_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - out.String(string(*in.Success)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ServiceBBack_Hello_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceBBackHello(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ServiceBBack_Hello_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceBBackHello(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ServiceBBack_Hello_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceBBackHello(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ServiceBBack_Hello_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceBBackHello(l, v) -} -func easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceBBackHello1(in *jlexer.Lexer, out *ServiceBBack_Hello_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceBBackHello1(out *jwriter.Writer, in ServiceBBack_Hello_Args) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ServiceBBack_Hello_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceBBackHello1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ServiceBBack_Hello_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceBBackHello1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ServiceBBack_Hello_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceBBackHello1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ServiceBBack_Hello_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceBBackHello1(l, v) -} -func easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceABackHello(in *jlexer.Lexer, out *ServiceABack_Hello_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(string) - } - *out.Success = string(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceABackHello(out *jwriter.Writer, in ServiceABack_Hello_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - out.String(string(*in.Success)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ServiceABack_Hello_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceABackHello(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ServiceABack_Hello_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceABackHello(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ServiceABack_Hello_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceABackHello(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ServiceABack_Hello_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceABackHello(l, v) -} -func easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceABackHello1(in *jlexer.Lexer, out *ServiceABack_Hello_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceABackHello1(out *jwriter.Writer, in ServiceABack_Hello_Args) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ServiceABack_Hello_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceABackHello1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ServiceABack_Hello_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceABackHello1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ServiceABack_Hello_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceABackHello1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ServiceABack_Hello_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsMultiMultiServiceABackHello1(l, v) -} diff --git a/examples/example-gateway/build/gen-code/clients/withexceptions/withexceptions/withexceptions_easyjson.go b/examples/example-gateway/build/gen-code/clients/withexceptions/withexceptions/withexceptions_easyjson.go deleted file mode 100644 index 0b3a7018c..000000000 --- a/examples/example-gateway/build/gen-code/clients/withexceptions/withexceptions/withexceptions_easyjson.go +++ /dev/null @@ -1,399 +0,0 @@ -// Code generated by zanzibar -// @generated -// Checksum : D5mK5GMsCL8+xxGPoeoKzg== -// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. - -package withexceptions - -import ( - json "encoding/json" - fmt "fmt" - - easyjson "github.com/mailru/easyjson" - jlexer "github.com/mailru/easyjson/jlexer" - jwriter "github.com/mailru/easyjson/jwriter" -) - -// suppress unused package warning -var ( - _ *json.RawMessage - _ *jlexer.Lexer - _ *jwriter.Writer - _ easyjson.Marshaler -) - -func easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptionsWithExceptionsFunc1(in *jlexer.Lexer, out *WithExceptions_Func1_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(Response) - } - (*out.Success).UnmarshalEasyJSON(in) - } - case "e1": - if in.IsNull() { - in.Skip() - out.E1 = nil - } else { - if out.E1 == nil { - out.E1 = new(ExceptionType1) - } - (*out.E1).UnmarshalEasyJSON(in) - } - case "e2": - if in.IsNull() { - in.Skip() - out.E2 = nil - } else { - if out.E2 == nil { - out.E2 = new(ExceptionType2) - } - (*out.E2).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptionsWithExceptionsFunc1(out *jwriter.Writer, in WithExceptions_Func1_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - if in.E1 != nil { - const prefix string = ",\"e1\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.E1).MarshalEasyJSON(out) - } - if in.E2 != nil { - const prefix string = ",\"e2\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.E2).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v WithExceptions_Func1_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptionsWithExceptionsFunc1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v WithExceptions_Func1_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptionsWithExceptionsFunc1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *WithExceptions_Func1_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptionsWithExceptionsFunc1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *WithExceptions_Func1_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptionsWithExceptionsFunc1(l, v) -} -func easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptionsWithExceptionsFunc11(in *jlexer.Lexer, out *WithExceptions_Func1_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptionsWithExceptionsFunc11(out *jwriter.Writer, in WithExceptions_Func1_Args) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v WithExceptions_Func1_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptionsWithExceptionsFunc11(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v WithExceptions_Func1_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptionsWithExceptionsFunc11(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *WithExceptions_Func1_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptionsWithExceptionsFunc11(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *WithExceptions_Func1_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptionsWithExceptionsFunc11(l, v) -} -func easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptions(in *jlexer.Lexer, out *Response) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptions(out *jwriter.Writer, in Response) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Response) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptions(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Response) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptions(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Response) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptions(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Response) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptions(l, v) -} -func easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptions1(in *jlexer.Lexer, out *ExceptionType2) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var Message2Set bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "message2": - out.Message2 = string(in.String()) - Message2Set = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !Message2Set { - in.AddError(fmt.Errorf("key 'message2' is required")) - } -} -func easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptions1(out *jwriter.Writer, in ExceptionType2) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"message2\":" - out.RawString(prefix[1:]) - out.String(string(in.Message2)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ExceptionType2) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptions1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ExceptionType2) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptions1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ExceptionType2) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptions1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ExceptionType2) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptions1(l, v) -} -func easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptions2(in *jlexer.Lexer, out *ExceptionType1) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var Message1Set bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "message1": - out.Message1 = string(in.String()) - Message1Set = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !Message1Set { - in.AddError(fmt.Errorf("key 'message1' is required")) - } -} -func easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptions2(out *jwriter.Writer, in ExceptionType1) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"message1\":" - out.RawString(prefix[1:]) - out.String(string(in.Message1)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ExceptionType1) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptions2(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ExceptionType1) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptions2(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ExceptionType1) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptions2(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ExceptionType1) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeClientsWithexceptionsWithexceptions2(l, v) -} diff --git a/examples/example-gateway/build/gen-code/endpoints/bar/bar/bar_easyjson.go b/examples/example-gateway/build/gen-code/endpoints/bar/bar/bar_easyjson.go deleted file mode 100644 index 055ef9e8c..000000000 --- a/examples/example-gateway/build/gen-code/endpoints/bar/bar/bar_easyjson.go +++ /dev/null @@ -1,4499 +0,0 @@ -// Code generated by zanzibar -// @generated -// Checksum : UK3bcyfdtB6hpWGc/Vvdxw== -// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. - -package bar - -import ( - json "encoding/json" - fmt "fmt" - - easyjson "github.com/mailru/easyjson" - jlexer "github.com/mailru/easyjson/jlexer" - jwriter "github.com/mailru/easyjson/jwriter" - base "github.com/uber/zanzibar/examples/example-gateway/build/gen-code/endpoints/foo/base/base" - foo "github.com/uber/zanzibar/examples/example-gateway/build/gen-code/endpoints/foo/foo" -) - -// suppress unused package warning -var ( - _ *json.RawMessage - _ *jlexer.Lexer - _ *jwriter.Writer - _ easyjson.Marshaler -) - -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar(in *jlexer.Lexer, out *RequestWithDuplicateType) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "request1": - if in.IsNull() { - in.Skip() - out.Request1 = nil - } else { - if out.Request1 == nil { - out.Request1 = new(BarRequest) - } - (*out.Request1).UnmarshalEasyJSON(in) - } - case "request2": - if in.IsNull() { - in.Skip() - out.Request2 = nil - } else { - if out.Request2 == nil { - out.Request2 = new(BarRequest) - } - (*out.Request2).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar(out *jwriter.Writer, in RequestWithDuplicateType) { - out.RawByte('{') - first := true - _ = first - if in.Request1 != nil { - const prefix string = ",\"request1\":" - first = false - out.RawString(prefix[1:]) - (*in.Request1).MarshalEasyJSON(out) - } - if in.Request2 != nil { - const prefix string = ",\"request2\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.Request2).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v RequestWithDuplicateType) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v RequestWithDuplicateType) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *RequestWithDuplicateType) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *RequestWithDuplicateType) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar1(in *jlexer.Lexer, out *QueryParamsStruct) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var NameSet bool - var FooSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "name": - out.Name = string(in.String()) - NameSet = true - case "userUUID": - if in.IsNull() { - in.Skip() - out.UserUUID = nil - } else { - if out.UserUUID == nil { - out.UserUUID = new(string) - } - *out.UserUUID = string(in.String()) - } - case "authUUID": - if in.IsNull() { - in.Skip() - out.AuthUUID = nil - } else { - if out.AuthUUID == nil { - out.AuthUUID = new(string) - } - *out.AuthUUID = string(in.String()) - } - case "authUUID2": - if in.IsNull() { - in.Skip() - out.AuthUUID2 = nil - } else { - if out.AuthUUID2 == nil { - out.AuthUUID2 = new(string) - } - *out.AuthUUID2 = string(in.String()) - } - case "foo": - if in.IsNull() { - in.Skip() - out.Foo = nil - } else { - in.Delim('[') - if out.Foo == nil { - if !in.IsDelim(']') { - out.Foo = make([]string, 0, 4) - } else { - out.Foo = []string{} - } - } else { - out.Foo = (out.Foo)[:0] - } - for !in.IsDelim(']') { - var v1 string - v1 = string(in.String()) - out.Foo = append(out.Foo, v1) - in.WantComma() - } - in.Delim(']') - } - FooSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !NameSet { - in.AddError(fmt.Errorf("key 'name' is required")) - } - if !FooSet { - in.AddError(fmt.Errorf("key 'foo' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar1(out *jwriter.Writer, in QueryParamsStruct) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"name\":" - out.RawString(prefix[1:]) - out.String(string(in.Name)) - } - if in.UserUUID != nil { - const prefix string = ",\"userUUID\":" - out.RawString(prefix) - out.String(string(*in.UserUUID)) - } - if in.AuthUUID != nil { - const prefix string = ",\"authUUID\":" - out.RawString(prefix) - out.String(string(*in.AuthUUID)) - } - if in.AuthUUID2 != nil { - const prefix string = ",\"authUUID2\":" - out.RawString(prefix) - out.String(string(*in.AuthUUID2)) - } - { - const prefix string = ",\"foo\":" - out.RawString(prefix) - if in.Foo == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v2, v3 := range in.Foo { - if v2 > 0 { - out.RawByte(',') - } - out.String(string(v3)) - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v QueryParamsStruct) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v QueryParamsStruct) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *QueryParamsStruct) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *QueryParamsStruct) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar2(in *jlexer.Lexer, out *QueryParamsOptsStruct) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var NameSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "name": - out.Name = string(in.String()) - NameSet = true - case "userUUID": - if in.IsNull() { - in.Skip() - out.UserUUID = nil - } else { - if out.UserUUID == nil { - out.UserUUID = new(string) - } - *out.UserUUID = string(in.String()) - } - case "authUUID": - if in.IsNull() { - in.Skip() - out.AuthUUID = nil - } else { - if out.AuthUUID == nil { - out.AuthUUID = new(string) - } - *out.AuthUUID = string(in.String()) - } - case "authUUID2": - if in.IsNull() { - in.Skip() - out.AuthUUID2 = nil - } else { - if out.AuthUUID2 == nil { - out.AuthUUID2 = new(string) - } - *out.AuthUUID2 = string(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !NameSet { - in.AddError(fmt.Errorf("key 'name' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar2(out *jwriter.Writer, in QueryParamsOptsStruct) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"name\":" - out.RawString(prefix[1:]) - out.String(string(in.Name)) - } - if in.UserUUID != nil { - const prefix string = ",\"userUUID\":" - out.RawString(prefix) - out.String(string(*in.UserUUID)) - } - if in.AuthUUID != nil { - const prefix string = ",\"authUUID\":" - out.RawString(prefix) - out.String(string(*in.AuthUUID)) - } - if in.AuthUUID2 != nil { - const prefix string = ",\"authUUID2\":" - out.RawString(prefix) - out.String(string(*in.AuthUUID2)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v QueryParamsOptsStruct) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar2(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v QueryParamsOptsStruct) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar2(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *QueryParamsOptsStruct) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar2(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *QueryParamsOptsStruct) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar2(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar3(in *jlexer.Lexer, out *ParamsStruct) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar3(out *jwriter.Writer, in ParamsStruct) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ParamsStruct) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar3(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ParamsStruct) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar3(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ParamsStruct) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar3(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ParamsStruct) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar3(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarTooManyArgs(in *jlexer.Lexer, out *Bar_TooManyArgs_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(BarResponse) - } - (*out.Success).UnmarshalEasyJSON(in) - } - case "barException": - if in.IsNull() { - in.Skip() - out.BarException = nil - } else { - if out.BarException == nil { - out.BarException = new(BarException) - } - (*out.BarException).UnmarshalEasyJSON(in) - } - case "fooException": - if in.IsNull() { - in.Skip() - out.FooException = nil - } else { - if out.FooException == nil { - out.FooException = new(foo.FooException) - } - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooFoo(in, out.FooException) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarTooManyArgs(out *jwriter.Writer, in Bar_TooManyArgs_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - if in.BarException != nil { - const prefix string = ",\"barException\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.BarException).MarshalEasyJSON(out) - } - if in.FooException != nil { - const prefix string = ",\"fooException\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooFoo(out, *in.FooException) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_TooManyArgs_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarTooManyArgs(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_TooManyArgs_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarTooManyArgs(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_TooManyArgs_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarTooManyArgs(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_TooManyArgs_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarTooManyArgs(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooFoo(in *jlexer.Lexer, out *foo.FooException) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var TeapotSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "teapot": - out.Teapot = string(in.String()) - TeapotSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !TeapotSet { - in.AddError(fmt.Errorf("key 'teapot' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooFoo(out *jwriter.Writer, in foo.FooException) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"teapot\":" - out.RawString(prefix[1:]) - out.String(string(in.Teapot)) - } - out.RawByte('}') -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarTooManyArgs1(in *jlexer.Lexer, out *Bar_TooManyArgs_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var RequestSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "request": - if in.IsNull() { - in.Skip() - out.Request = nil - } else { - if out.Request == nil { - out.Request = new(BarRequest) - } - (*out.Request).UnmarshalEasyJSON(in) - } - RequestSet = true - case "foo": - if in.IsNull() { - in.Skip() - out.Foo = nil - } else { - if out.Foo == nil { - out.Foo = new(foo.FooStruct) - } - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooFoo1(in, out.Foo) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !RequestSet { - in.AddError(fmt.Errorf("key 'request' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarTooManyArgs1(out *jwriter.Writer, in Bar_TooManyArgs_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"request\":" - out.RawString(prefix[1:]) - if in.Request == nil { - out.RawString("null") - } else { - (*in.Request).MarshalEasyJSON(out) - } - } - if in.Foo != nil { - const prefix string = ",\"foo\":" - out.RawString(prefix) - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooFoo1(out, *in.Foo) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_TooManyArgs_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarTooManyArgs1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_TooManyArgs_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarTooManyArgs1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_TooManyArgs_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarTooManyArgs1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_TooManyArgs_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarTooManyArgs1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooFoo1(in *jlexer.Lexer, out *foo.FooStruct) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var FooStringSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "fooString": - out.FooString = string(in.String()) - FooStringSet = true - case "fooI32": - if in.IsNull() { - in.Skip() - out.FooI32 = nil - } else { - if out.FooI32 == nil { - out.FooI32 = new(int32) - } - *out.FooI32 = int32(in.Int32()) - } - case "fooI16": - if in.IsNull() { - in.Skip() - out.FooI16 = nil - } else { - if out.FooI16 == nil { - out.FooI16 = new(int16) - } - *out.FooI16 = int16(in.Int16()) - } - case "fooDouble": - if in.IsNull() { - in.Skip() - out.FooDouble = nil - } else { - if out.FooDouble == nil { - out.FooDouble = new(float64) - } - *out.FooDouble = float64(in.Float64()) - } - case "fooBool": - if in.IsNull() { - in.Skip() - out.FooBool = nil - } else { - if out.FooBool == nil { - out.FooBool = new(bool) - } - *out.FooBool = bool(in.Bool()) - } - case "fooMap": - if in.IsNull() { - in.Skip() - } else { - in.Delim('{') - if !in.IsDelim('}') { - out.FooMap = make(map[string]string) - } else { - out.FooMap = nil - } - for !in.IsDelim('}') { - key := string(in.String()) - in.WantColon() - var v4 string - v4 = string(in.String()) - (out.FooMap)[key] = v4 - in.WantComma() - } - in.Delim('}') - } - case "message": - if in.IsNull() { - in.Skip() - out.Message = nil - } else { - if out.Message == nil { - out.Message = new(base.Message) - } - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooBaseBase(in, out.Message) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !FooStringSet { - in.AddError(fmt.Errorf("key 'fooString' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooFoo1(out *jwriter.Writer, in foo.FooStruct) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"fooString\":" - out.RawString(prefix[1:]) - out.String(string(in.FooString)) - } - if in.FooI32 != nil { - const prefix string = ",\"fooI32\":" - out.RawString(prefix) - out.Int32(int32(*in.FooI32)) - } - if in.FooI16 != nil { - const prefix string = ",\"fooI16\":" - out.RawString(prefix) - out.Int16(int16(*in.FooI16)) - } - if in.FooDouble != nil { - const prefix string = ",\"fooDouble\":" - out.RawString(prefix) - out.Float64(float64(*in.FooDouble)) - } - if in.FooBool != nil { - const prefix string = ",\"fooBool\":" - out.RawString(prefix) - out.Bool(bool(*in.FooBool)) - } - if len(in.FooMap) != 0 { - const prefix string = ",\"fooMap\":" - out.RawString(prefix) - { - out.RawByte('{') - v5First := true - for v5Name, v5Value := range in.FooMap { - if v5First { - v5First = false - } else { - out.RawByte(',') - } - out.String(string(v5Name)) - out.RawByte(':') - out.String(string(v5Value)) - } - out.RawByte('}') - } - } - if in.Message != nil { - const prefix string = ",\"message\":" - out.RawString(prefix) - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooBaseBase(out, *in.Message) - } - out.RawByte('}') -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooBaseBase(in *jlexer.Lexer, out *base.Message) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var BodySet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "body": - out.Body = string(in.String()) - BodySet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !BodySet { - in.AddError(fmt.Errorf("key 'body' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooBaseBase(out *jwriter.Writer, in base.Message) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"body\":" - out.RawString(prefix[1:]) - out.String(string(in.Body)) - } - out.RawByte('}') -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarNormal(in *jlexer.Lexer, out *Bar_Normal_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(BarResponse) - } - (*out.Success).UnmarshalEasyJSON(in) - } - case "barException": - if in.IsNull() { - in.Skip() - out.BarException = nil - } else { - if out.BarException == nil { - out.BarException = new(BarException) - } - (*out.BarException).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarNormal(out *jwriter.Writer, in Bar_Normal_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - if in.BarException != nil { - const prefix string = ",\"barException\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.BarException).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_Normal_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarNormal(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_Normal_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarNormal(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_Normal_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarNormal(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_Normal_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarNormal(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarNormal1(in *jlexer.Lexer, out *Bar_Normal_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var RequestSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "request": - if in.IsNull() { - in.Skip() - out.Request = nil - } else { - if out.Request == nil { - out.Request = new(BarRequest) - } - (*out.Request).UnmarshalEasyJSON(in) - } - RequestSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !RequestSet { - in.AddError(fmt.Errorf("key 'request' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarNormal1(out *jwriter.Writer, in Bar_Normal_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"request\":" - out.RawString(prefix[1:]) - if in.Request == nil { - out.RawString("null") - } else { - (*in.Request).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_Normal_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarNormal1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_Normal_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarNormal1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_Normal_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarNormal1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_Normal_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarNormal1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarNoRequest(in *jlexer.Lexer, out *Bar_NoRequest_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(BarResponse) - } - (*out.Success).UnmarshalEasyJSON(in) - } - case "barException": - if in.IsNull() { - in.Skip() - out.BarException = nil - } else { - if out.BarException == nil { - out.BarException = new(BarException) - } - (*out.BarException).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarNoRequest(out *jwriter.Writer, in Bar_NoRequest_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - if in.BarException != nil { - const prefix string = ",\"barException\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.BarException).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_NoRequest_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarNoRequest(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_NoRequest_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarNoRequest(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_NoRequest_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarNoRequest(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_NoRequest_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarNoRequest(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarNoRequest1(in *jlexer.Lexer, out *Bar_NoRequest_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarNoRequest1(out *jwriter.Writer, in Bar_NoRequest_Args) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_NoRequest_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarNoRequest1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_NoRequest_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarNoRequest1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_NoRequest_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarNoRequest1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_NoRequest_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarNoRequest1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarMissingArg(in *jlexer.Lexer, out *Bar_MissingArg_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(BarResponse) - } - (*out.Success).UnmarshalEasyJSON(in) - } - case "barException": - if in.IsNull() { - in.Skip() - out.BarException = nil - } else { - if out.BarException == nil { - out.BarException = new(BarException) - } - (*out.BarException).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarMissingArg(out *jwriter.Writer, in Bar_MissingArg_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - if in.BarException != nil { - const prefix string = ",\"barException\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.BarException).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_MissingArg_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarMissingArg(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_MissingArg_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarMissingArg(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_MissingArg_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarMissingArg(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_MissingArg_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarMissingArg(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarMissingArg1(in *jlexer.Lexer, out *Bar_MissingArg_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarMissingArg1(out *jwriter.Writer, in Bar_MissingArg_Args) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_MissingArg_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarMissingArg1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_MissingArg_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarMissingArg1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_MissingArg_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarMissingArg1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_MissingArg_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarMissingArg1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarListAndEnum(in *jlexer.Lexer, out *Bar_ListAndEnum_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(string) - } - *out.Success = string(in.String()) - } - case "barException": - if in.IsNull() { - in.Skip() - out.BarException = nil - } else { - if out.BarException == nil { - out.BarException = new(BarException) - } - (*out.BarException).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarListAndEnum(out *jwriter.Writer, in Bar_ListAndEnum_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - out.String(string(*in.Success)) - } - if in.BarException != nil { - const prefix string = ",\"barException\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.BarException).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ListAndEnum_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarListAndEnum(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ListAndEnum_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarListAndEnum(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ListAndEnum_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarListAndEnum(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ListAndEnum_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarListAndEnum(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarListAndEnum1(in *jlexer.Lexer, out *Bar_ListAndEnum_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var DemoIdsSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "demoIds": - if in.IsNull() { - in.Skip() - out.DemoIds = nil - } else { - in.Delim('[') - if out.DemoIds == nil { - if !in.IsDelim(']') { - out.DemoIds = make([]string, 0, 4) - } else { - out.DemoIds = []string{} - } - } else { - out.DemoIds = (out.DemoIds)[:0] - } - for !in.IsDelim(']') { - var v6 string - v6 = string(in.String()) - out.DemoIds = append(out.DemoIds, v6) - in.WantComma() - } - in.Delim(']') - } - DemoIdsSet = true - case "demoType": - if in.IsNull() { - in.Skip() - out.DemoType = nil - } else { - if out.DemoType == nil { - out.DemoType = new(DemoType) - } - if data := in.Raw(); in.Ok() { - in.AddError((*out.DemoType).UnmarshalJSON(data)) - } - } - case "demos": - if in.IsNull() { - in.Skip() - out.Demos = nil - } else { - in.Delim('[') - if out.Demos == nil { - if !in.IsDelim(']') { - out.Demos = make([]DemoType, 0, 16) - } else { - out.Demos = []DemoType{} - } - } else { - out.Demos = (out.Demos)[:0] - } - for !in.IsDelim(']') { - var v7 DemoType - if data := in.Raw(); in.Ok() { - in.AddError((v7).UnmarshalJSON(data)) - } - out.Demos = append(out.Demos, v7) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !DemoIdsSet { - in.AddError(fmt.Errorf("key 'demoIds' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarListAndEnum1(out *jwriter.Writer, in Bar_ListAndEnum_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"demoIds\":" - out.RawString(prefix[1:]) - if in.DemoIds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v8, v9 := range in.DemoIds { - if v8 > 0 { - out.RawByte(',') - } - out.String(string(v9)) - } - out.RawByte(']') - } - } - if in.DemoType != nil { - const prefix string = ",\"demoType\":" - out.RawString(prefix) - out.Raw((*in.DemoType).MarshalJSON()) - } - if len(in.Demos) != 0 { - const prefix string = ",\"demos\":" - out.RawString(prefix) - { - out.RawByte('[') - for v10, v11 := range in.Demos { - if v10 > 0 { - out.RawByte(',') - } - out.Raw((v11).MarshalJSON()) - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ListAndEnum_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarListAndEnum1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ListAndEnum_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarListAndEnum1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ListAndEnum_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarListAndEnum1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ListAndEnum_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarListAndEnum1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarHelloWorld(in *jlexer.Lexer, out *Bar_HelloWorld_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(string) - } - *out.Success = string(in.String()) - } - case "barException": - if in.IsNull() { - in.Skip() - out.BarException = nil - } else { - if out.BarException == nil { - out.BarException = new(BarException) - } - (*out.BarException).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarHelloWorld(out *jwriter.Writer, in Bar_HelloWorld_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - out.String(string(*in.Success)) - } - if in.BarException != nil { - const prefix string = ",\"barException\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.BarException).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_HelloWorld_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarHelloWorld(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_HelloWorld_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarHelloWorld(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_HelloWorld_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarHelloWorld(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_HelloWorld_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarHelloWorld(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarHelloWorld1(in *jlexer.Lexer, out *Bar_HelloWorld_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarHelloWorld1(out *jwriter.Writer, in Bar_HelloWorld_Args) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_HelloWorld_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarHelloWorld1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_HelloWorld_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarHelloWorld1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_HelloWorld_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarHelloWorld1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_HelloWorld_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarHelloWorld1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarDeleteWithQueryParams(in *jlexer.Lexer, out *Bar_DeleteWithQueryParams_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarDeleteWithQueryParams(out *jwriter.Writer, in Bar_DeleteWithQueryParams_Result) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_DeleteWithQueryParams_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarDeleteWithQueryParams(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_DeleteWithQueryParams_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarDeleteWithQueryParams(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_DeleteWithQueryParams_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarDeleteWithQueryParams(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_DeleteWithQueryParams_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarDeleteWithQueryParams(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarDeleteWithQueryParams1(in *jlexer.Lexer, out *Bar_DeleteWithQueryParams_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var FilterSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "filter": - out.Filter = string(in.String()) - FilterSet = true - case "count": - if in.IsNull() { - in.Skip() - out.Count = nil - } else { - if out.Count == nil { - out.Count = new(int32) - } - *out.Count = int32(in.Int32()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !FilterSet { - in.AddError(fmt.Errorf("key 'filter' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarDeleteWithQueryParams1(out *jwriter.Writer, in Bar_DeleteWithQueryParams_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"filter\":" - out.RawString(prefix[1:]) - out.String(string(in.Filter)) - } - if in.Count != nil { - const prefix string = ",\"count\":" - out.RawString(prefix) - out.Int32(int32(*in.Count)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_DeleteWithQueryParams_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarDeleteWithQueryParams1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_DeleteWithQueryParams_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarDeleteWithQueryParams1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_DeleteWithQueryParams_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarDeleteWithQueryParams1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_DeleteWithQueryParams_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarDeleteWithQueryParams1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithQueryParams(in *jlexer.Lexer, out *Bar_ArgWithQueryParams_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(BarResponse) - } - (*out.Success).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithQueryParams(out *jwriter.Writer, in Bar_ArgWithQueryParams_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithQueryParams_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithQueryParams(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithQueryParams_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithQueryParams(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithQueryParams_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithQueryParams(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithQueryParams_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithQueryParams(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithQueryParams1(in *jlexer.Lexer, out *Bar_ArgWithQueryParams_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var NameSet bool - var BarSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "name": - out.Name = string(in.String()) - NameSet = true - case "userUUID": - if in.IsNull() { - in.Skip() - out.UserUUID = nil - } else { - if out.UserUUID == nil { - out.UserUUID = new(string) - } - *out.UserUUID = string(in.String()) - } - case "foo": - if in.IsNull() { - in.Skip() - out.Foo = nil - } else { - in.Delim('[') - if out.Foo == nil { - if !in.IsDelim(']') { - out.Foo = make([]string, 0, 4) - } else { - out.Foo = []string{} - } - } else { - out.Foo = (out.Foo)[:0] - } - for !in.IsDelim(']') { - var v12 string - v12 = string(in.String()) - out.Foo = append(out.Foo, v12) - in.WantComma() - } - in.Delim(']') - } - case "bar": - if in.IsNull() { - in.Skip() - out.Bar = nil - } else { - in.Delim('[') - if out.Bar == nil { - if !in.IsDelim(']') { - out.Bar = make([]int8, 0, 64) - } else { - out.Bar = []int8{} - } - } else { - out.Bar = (out.Bar)[:0] - } - for !in.IsDelim(']') { - var v13 int8 - v13 = int8(in.Int8()) - out.Bar = append(out.Bar, v13) - in.WantComma() - } - in.Delim(']') - } - BarSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !NameSet { - in.AddError(fmt.Errorf("key 'name' is required")) - } - if !BarSet { - in.AddError(fmt.Errorf("key 'bar' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithQueryParams1(out *jwriter.Writer, in Bar_ArgWithQueryParams_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"name\":" - out.RawString(prefix[1:]) - out.String(string(in.Name)) - } - if in.UserUUID != nil { - const prefix string = ",\"userUUID\":" - out.RawString(prefix) - out.String(string(*in.UserUUID)) - } - if len(in.Foo) != 0 { - const prefix string = ",\"foo\":" - out.RawString(prefix) - { - out.RawByte('[') - for v14, v15 := range in.Foo { - if v14 > 0 { - out.RawByte(',') - } - out.String(string(v15)) - } - out.RawByte(']') - } - } - { - const prefix string = ",\"bar\":" - out.RawString(prefix) - if in.Bar == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v16, v17 := range in.Bar { - if v16 > 0 { - out.RawByte(',') - } - out.Int8(int8(v17)) - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithQueryParams_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithQueryParams1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithQueryParams_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithQueryParams1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithQueryParams_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithQueryParams1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithQueryParams_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithQueryParams1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithQueryHeader(in *jlexer.Lexer, out *Bar_ArgWithQueryHeader_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(BarResponse) - } - (*out.Success).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithQueryHeader(out *jwriter.Writer, in Bar_ArgWithQueryHeader_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithQueryHeader_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithQueryHeader(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithQueryHeader_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithQueryHeader(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithQueryHeader_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithQueryHeader(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithQueryHeader_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithQueryHeader(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithQueryHeader1(in *jlexer.Lexer, out *Bar_ArgWithQueryHeader_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "userUUID": - if in.IsNull() { - in.Skip() - out.UserUUID = nil - } else { - if out.UserUUID == nil { - out.UserUUID = new(string) - } - *out.UserUUID = string(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithQueryHeader1(out *jwriter.Writer, in Bar_ArgWithQueryHeader_Args) { - out.RawByte('{') - first := true - _ = first - if in.UserUUID != nil { - const prefix string = ",\"userUUID\":" - first = false - out.RawString(prefix[1:]) - out.String(string(*in.UserUUID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithQueryHeader_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithQueryHeader1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithQueryHeader_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithQueryHeader1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithQueryHeader_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithQueryHeader1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithQueryHeader_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithQueryHeader1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithParams(in *jlexer.Lexer, out *Bar_ArgWithParams_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(BarResponse) - } - (*out.Success).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithParams(out *jwriter.Writer, in Bar_ArgWithParams_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithParams_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithParams(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithParams_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithParams(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithParams_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithParams(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithParams_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithParams(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithParams1(in *jlexer.Lexer, out *Bar_ArgWithParams_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "params": - if in.IsNull() { - in.Skip() - out.Params = nil - } else { - if out.Params == nil { - out.Params = new(ParamsStruct) - } - (*out.Params).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithParams1(out *jwriter.Writer, in Bar_ArgWithParams_Args) { - out.RawByte('{') - first := true - _ = first - if in.Params != nil { - const prefix string = ",\"params\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.Params).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithParams_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithParams1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithParams_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithParams1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithParams_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithParams1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithParams_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithParams1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithParamsAndDuplicateFields(in *jlexer.Lexer, out *Bar_ArgWithParamsAndDuplicateFields_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(BarResponse) - } - (*out.Success).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithParamsAndDuplicateFields(out *jwriter.Writer, in Bar_ArgWithParamsAndDuplicateFields_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithParamsAndDuplicateFields_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithParamsAndDuplicateFields(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithParamsAndDuplicateFields_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithParamsAndDuplicateFields(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithParamsAndDuplicateFields_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithParamsAndDuplicateFields(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithParamsAndDuplicateFields_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithParamsAndDuplicateFields(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithParamsAndDuplicateFields1(in *jlexer.Lexer, out *Bar_ArgWithParamsAndDuplicateFields_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var RequestSet bool - var EntityUUIDSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "request": - if in.IsNull() { - in.Skip() - out.Request = nil - } else { - if out.Request == nil { - out.Request = new(RequestWithDuplicateType) - } - (*out.Request).UnmarshalEasyJSON(in) - } - RequestSet = true - case "entityUUID": - out.EntityUUID = string(in.String()) - EntityUUIDSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !RequestSet { - in.AddError(fmt.Errorf("key 'request' is required")) - } - if !EntityUUIDSet { - in.AddError(fmt.Errorf("key 'entityUUID' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithParamsAndDuplicateFields1(out *jwriter.Writer, in Bar_ArgWithParamsAndDuplicateFields_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"request\":" - out.RawString(prefix[1:]) - if in.Request == nil { - out.RawString("null") - } else { - (*in.Request).MarshalEasyJSON(out) - } - } - { - const prefix string = ",\"entityUUID\":" - out.RawString(prefix) - out.String(string(in.EntityUUID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithParamsAndDuplicateFields_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithParamsAndDuplicateFields1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithParamsAndDuplicateFields_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithParamsAndDuplicateFields1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithParamsAndDuplicateFields_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithParamsAndDuplicateFields1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithParamsAndDuplicateFields_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithParamsAndDuplicateFields1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithNestedQueryParams(in *jlexer.Lexer, out *Bar_ArgWithNestedQueryParams_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(BarResponse) - } - (*out.Success).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithNestedQueryParams(out *jwriter.Writer, in Bar_ArgWithNestedQueryParams_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithNestedQueryParams_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithNestedQueryParams(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithNestedQueryParams_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithNestedQueryParams(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithNestedQueryParams_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithNestedQueryParams(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithNestedQueryParams_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithNestedQueryParams(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithNestedQueryParams1(in *jlexer.Lexer, out *Bar_ArgWithNestedQueryParams_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var RequestSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "request": - if in.IsNull() { - in.Skip() - out.Request = nil - } else { - if out.Request == nil { - out.Request = new(QueryParamsStruct) - } - (*out.Request).UnmarshalEasyJSON(in) - } - RequestSet = true - case "opt": - if in.IsNull() { - in.Skip() - out.Opt = nil - } else { - if out.Opt == nil { - out.Opt = new(QueryParamsOptsStruct) - } - (*out.Opt).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !RequestSet { - in.AddError(fmt.Errorf("key 'request' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithNestedQueryParams1(out *jwriter.Writer, in Bar_ArgWithNestedQueryParams_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"request\":" - out.RawString(prefix[1:]) - if in.Request == nil { - out.RawString("null") - } else { - (*in.Request).MarshalEasyJSON(out) - } - } - if in.Opt != nil { - const prefix string = ",\"opt\":" - out.RawString(prefix) - (*in.Opt).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithNestedQueryParams_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithNestedQueryParams1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithNestedQueryParams_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithNestedQueryParams1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithNestedQueryParams_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithNestedQueryParams1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithNestedQueryParams_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithNestedQueryParams1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithNearDupQueryParams(in *jlexer.Lexer, out *Bar_ArgWithNearDupQueryParams_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(BarResponse) - } - (*out.Success).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithNearDupQueryParams(out *jwriter.Writer, in Bar_ArgWithNearDupQueryParams_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithNearDupQueryParams_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithNearDupQueryParams(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithNearDupQueryParams_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithNearDupQueryParams(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithNearDupQueryParams_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithNearDupQueryParams(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithNearDupQueryParams_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithNearDupQueryParams(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithNearDupQueryParams1(in *jlexer.Lexer, out *Bar_ArgWithNearDupQueryParams_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var OneSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "one": - out.One = string(in.String()) - OneSet = true - case "two": - if in.IsNull() { - in.Skip() - out.Two = nil - } else { - if out.Two == nil { - out.Two = new(int32) - } - *out.Two = int32(in.Int32()) - } - case "three": - if in.IsNull() { - in.Skip() - out.Three = nil - } else { - if out.Three == nil { - out.Three = new(string) - } - *out.Three = string(in.String()) - } - case "four": - if in.IsNull() { - in.Skip() - out.Four = nil - } else { - if out.Four == nil { - out.Four = new(string) - } - *out.Four = string(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !OneSet { - in.AddError(fmt.Errorf("key 'one' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithNearDupQueryParams1(out *jwriter.Writer, in Bar_ArgWithNearDupQueryParams_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"one\":" - out.RawString(prefix[1:]) - out.String(string(in.One)) - } - if in.Two != nil { - const prefix string = ",\"two\":" - out.RawString(prefix) - out.Int32(int32(*in.Two)) - } - if in.Three != nil { - const prefix string = ",\"three\":" - out.RawString(prefix) - out.String(string(*in.Three)) - } - if in.Four != nil { - const prefix string = ",\"four\":" - out.RawString(prefix) - out.String(string(*in.Four)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithNearDupQueryParams_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithNearDupQueryParams1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithNearDupQueryParams_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithNearDupQueryParams1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithNearDupQueryParams_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithNearDupQueryParams1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithNearDupQueryParams_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithNearDupQueryParams1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithManyQueryParams(in *jlexer.Lexer, out *Bar_ArgWithManyQueryParams_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(BarResponse) - } - (*out.Success).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithManyQueryParams(out *jwriter.Writer, in Bar_ArgWithManyQueryParams_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithManyQueryParams_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithManyQueryParams(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithManyQueryParams_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithManyQueryParams(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithManyQueryParams_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithManyQueryParams(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithManyQueryParams_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithManyQueryParams(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithManyQueryParams1(in *jlexer.Lexer, out *Bar_ArgWithManyQueryParams_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var AStrSet bool - var ABoolSet bool - var AInt8Set bool - var AInt16Set bool - var AInt32Set bool - var AInt64Set bool - var AFloat64Set bool - var AUUIDSet bool - var AListUUIDSet bool - var AStringListSet bool - var AUUIDListSet bool - var ATsSet bool - var AReqDemoSet bool - var AReqFruitsSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "aStr": - out.AStr = string(in.String()) - AStrSet = true - case "anOptStr": - if in.IsNull() { - in.Skip() - out.AnOptStr = nil - } else { - if out.AnOptStr == nil { - out.AnOptStr = new(string) - } - *out.AnOptStr = string(in.String()) - } - case "aBool": - out.ABool = bool(in.Bool()) - ABoolSet = true - case "anOptBool": - if in.IsNull() { - in.Skip() - out.AnOptBool = nil - } else { - if out.AnOptBool == nil { - out.AnOptBool = new(bool) - } - *out.AnOptBool = bool(in.Bool()) - } - case "aInt8": - out.AInt8 = int8(in.Int8()) - AInt8Set = true - case "anOptInt8": - if in.IsNull() { - in.Skip() - out.AnOptInt8 = nil - } else { - if out.AnOptInt8 == nil { - out.AnOptInt8 = new(int8) - } - *out.AnOptInt8 = int8(in.Int8()) - } - case "aInt16": - out.AInt16 = int16(in.Int16()) - AInt16Set = true - case "anOptInt16": - if in.IsNull() { - in.Skip() - out.AnOptInt16 = nil - } else { - if out.AnOptInt16 == nil { - out.AnOptInt16 = new(int16) - } - *out.AnOptInt16 = int16(in.Int16()) - } - case "aInt32": - out.AInt32 = int32(in.Int32()) - AInt32Set = true - case "anOptInt32": - if in.IsNull() { - in.Skip() - out.AnOptInt32 = nil - } else { - if out.AnOptInt32 == nil { - out.AnOptInt32 = new(int32) - } - *out.AnOptInt32 = int32(in.Int32()) - } - case "aInt64": - out.AInt64 = int64(in.Int64()) - AInt64Set = true - case "anOptInt64": - if in.IsNull() { - in.Skip() - out.AnOptInt64 = nil - } else { - if out.AnOptInt64 == nil { - out.AnOptInt64 = new(int64) - } - *out.AnOptInt64 = int64(in.Int64()) - } - case "aFloat64": - out.AFloat64 = float64(in.Float64()) - AFloat64Set = true - case "anOptFloat64": - if in.IsNull() { - in.Skip() - out.AnOptFloat64 = nil - } else { - if out.AnOptFloat64 == nil { - out.AnOptFloat64 = new(float64) - } - *out.AnOptFloat64 = float64(in.Float64()) - } - case "aUUID": - out.AUUID = UUID(in.String()) - AUUIDSet = true - case "anOptUUID": - if in.IsNull() { - in.Skip() - out.AnOptUUID = nil - } else { - if out.AnOptUUID == nil { - out.AnOptUUID = new(UUID) - } - *out.AnOptUUID = UUID(in.String()) - } - case "aListUUID": - if in.IsNull() { - in.Skip() - out.AListUUID = nil - } else { - in.Delim('[') - if out.AListUUID == nil { - if !in.IsDelim(']') { - out.AListUUID = make([]UUID, 0, 4) - } else { - out.AListUUID = []UUID{} - } - } else { - out.AListUUID = (out.AListUUID)[:0] - } - for !in.IsDelim(']') { - var v18 UUID - v18 = UUID(in.String()) - out.AListUUID = append(out.AListUUID, v18) - in.WantComma() - } - in.Delim(']') - } - AListUUIDSet = true - case "anOptListUUID": - if in.IsNull() { - in.Skip() - out.AnOptListUUID = nil - } else { - in.Delim('[') - if out.AnOptListUUID == nil { - if !in.IsDelim(']') { - out.AnOptListUUID = make([]UUID, 0, 4) - } else { - out.AnOptListUUID = []UUID{} - } - } else { - out.AnOptListUUID = (out.AnOptListUUID)[:0] - } - for !in.IsDelim(']') { - var v19 UUID - v19 = UUID(in.String()) - out.AnOptListUUID = append(out.AnOptListUUID, v19) - in.WantComma() - } - in.Delim(']') - } - case "aStringList": - if in.IsNull() { - in.Skip() - out.AStringList = nil - } else { - in.Delim('[') - if out.AStringList == nil { - if !in.IsDelim(']') { - out.AStringList = make(StringList, 0, 4) - } else { - out.AStringList = StringList{} - } - } else { - out.AStringList = (out.AStringList)[:0] - } - for !in.IsDelim(']') { - var v20 string - v20 = string(in.String()) - out.AStringList = append(out.AStringList, v20) - in.WantComma() - } - in.Delim(']') - } - AStringListSet = true - case "anOptStringList": - if in.IsNull() { - in.Skip() - out.AnOptStringList = nil - } else { - in.Delim('[') - if out.AnOptStringList == nil { - if !in.IsDelim(']') { - out.AnOptStringList = make(StringList, 0, 4) - } else { - out.AnOptStringList = StringList{} - } - } else { - out.AnOptStringList = (out.AnOptStringList)[:0] - } - for !in.IsDelim(']') { - var v21 string - v21 = string(in.String()) - out.AnOptStringList = append(out.AnOptStringList, v21) - in.WantComma() - } - in.Delim(']') - } - case "aUUIDList": - if in.IsNull() { - in.Skip() - out.AUUIDList = nil - } else { - in.Delim('[') - if out.AUUIDList == nil { - if !in.IsDelim(']') { - out.AUUIDList = make(UUIDList, 0, 4) - } else { - out.AUUIDList = UUIDList{} - } - } else { - out.AUUIDList = (out.AUUIDList)[:0] - } - for !in.IsDelim(']') { - var v22 UUID - v22 = UUID(in.String()) - out.AUUIDList = append(out.AUUIDList, v22) - in.WantComma() - } - in.Delim(']') - } - AUUIDListSet = true - case "anOptUUIDList": - if in.IsNull() { - in.Skip() - out.AnOptUUIDList = nil - } else { - in.Delim('[') - if out.AnOptUUIDList == nil { - if !in.IsDelim(']') { - out.AnOptUUIDList = make(UUIDList, 0, 4) - } else { - out.AnOptUUIDList = UUIDList{} - } - } else { - out.AnOptUUIDList = (out.AnOptUUIDList)[:0] - } - for !in.IsDelim(']') { - var v23 UUID - v23 = UUID(in.String()) - out.AnOptUUIDList = append(out.AnOptUUIDList, v23) - in.WantComma() - } - in.Delim(']') - } - case "aTs": - if data := in.Raw(); in.Ok() { - in.AddError((out.ATs).UnmarshalJSON(data)) - } - ATsSet = true - case "anOptTs": - if in.IsNull() { - in.Skip() - out.AnOptTs = nil - } else { - if out.AnOptTs == nil { - out.AnOptTs = new(Timestamp) - } - if data := in.Raw(); in.Ok() { - in.AddError((*out.AnOptTs).UnmarshalJSON(data)) - } - } - case "aReqDemo": - if data := in.Raw(); in.Ok() { - in.AddError((out.AReqDemo).UnmarshalJSON(data)) - } - AReqDemoSet = true - case "anOptFruit": - if in.IsNull() { - in.Skip() - out.AnOptFruit = nil - } else { - if out.AnOptFruit == nil { - out.AnOptFruit = new(Fruit) - } - if data := in.Raw(); in.Ok() { - in.AddError((*out.AnOptFruit).UnmarshalJSON(data)) - } - } - case "aReqFruits": - if in.IsNull() { - in.Skip() - out.AReqFruits = nil - } else { - in.Delim('[') - if out.AReqFruits == nil { - if !in.IsDelim(']') { - out.AReqFruits = make([]Fruit, 0, 16) - } else { - out.AReqFruits = []Fruit{} - } - } else { - out.AReqFruits = (out.AReqFruits)[:0] - } - for !in.IsDelim(']') { - var v24 Fruit - if data := in.Raw(); in.Ok() { - in.AddError((v24).UnmarshalJSON(data)) - } - out.AReqFruits = append(out.AReqFruits, v24) - in.WantComma() - } - in.Delim(']') - } - AReqFruitsSet = true - case "anOptDemos": - if in.IsNull() { - in.Skip() - out.AnOptDemos = nil - } else { - in.Delim('[') - if out.AnOptDemos == nil { - if !in.IsDelim(']') { - out.AnOptDemos = make([]DemoType, 0, 16) - } else { - out.AnOptDemos = []DemoType{} - } - } else { - out.AnOptDemos = (out.AnOptDemos)[:0] - } - for !in.IsDelim(']') { - var v25 DemoType - if data := in.Raw(); in.Ok() { - in.AddError((v25).UnmarshalJSON(data)) - } - out.AnOptDemos = append(out.AnOptDemos, v25) - in.WantComma() - } - in.Delim(']') - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !AStrSet { - in.AddError(fmt.Errorf("key 'aStr' is required")) - } - if !ABoolSet { - in.AddError(fmt.Errorf("key 'aBool' is required")) - } - if !AInt8Set { - in.AddError(fmt.Errorf("key 'aInt8' is required")) - } - if !AInt16Set { - in.AddError(fmt.Errorf("key 'aInt16' is required")) - } - if !AInt32Set { - in.AddError(fmt.Errorf("key 'aInt32' is required")) - } - if !AInt64Set { - in.AddError(fmt.Errorf("key 'aInt64' is required")) - } - if !AFloat64Set { - in.AddError(fmt.Errorf("key 'aFloat64' is required")) - } - if !AUUIDSet { - in.AddError(fmt.Errorf("key 'aUUID' is required")) - } - if !AListUUIDSet { - in.AddError(fmt.Errorf("key 'aListUUID' is required")) - } - if !AStringListSet { - in.AddError(fmt.Errorf("key 'aStringList' is required")) - } - if !AUUIDListSet { - in.AddError(fmt.Errorf("key 'aUUIDList' is required")) - } - if !ATsSet { - in.AddError(fmt.Errorf("key 'aTs' is required")) - } - if !AReqDemoSet { - in.AddError(fmt.Errorf("key 'aReqDemo' is required")) - } - if !AReqFruitsSet { - in.AddError(fmt.Errorf("key 'aReqFruits' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithManyQueryParams1(out *jwriter.Writer, in Bar_ArgWithManyQueryParams_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"aStr\":" - out.RawString(prefix[1:]) - out.String(string(in.AStr)) - } - if in.AnOptStr != nil { - const prefix string = ",\"anOptStr\":" - out.RawString(prefix) - out.String(string(*in.AnOptStr)) - } - { - const prefix string = ",\"aBool\":" - out.RawString(prefix) - out.Bool(bool(in.ABool)) - } - if in.AnOptBool != nil { - const prefix string = ",\"anOptBool\":" - out.RawString(prefix) - out.Bool(bool(*in.AnOptBool)) - } - { - const prefix string = ",\"aInt8\":" - out.RawString(prefix) - out.Int8(int8(in.AInt8)) - } - if in.AnOptInt8 != nil { - const prefix string = ",\"anOptInt8\":" - out.RawString(prefix) - out.Int8(int8(*in.AnOptInt8)) - } - { - const prefix string = ",\"aInt16\":" - out.RawString(prefix) - out.Int16(int16(in.AInt16)) - } - if in.AnOptInt16 != nil { - const prefix string = ",\"anOptInt16\":" - out.RawString(prefix) - out.Int16(int16(*in.AnOptInt16)) - } - { - const prefix string = ",\"aInt32\":" - out.RawString(prefix) - out.Int32(int32(in.AInt32)) - } - if in.AnOptInt32 != nil { - const prefix string = ",\"anOptInt32\":" - out.RawString(prefix) - out.Int32(int32(*in.AnOptInt32)) - } - { - const prefix string = ",\"aInt64\":" - out.RawString(prefix) - out.Int64(int64(in.AInt64)) - } - if in.AnOptInt64 != nil { - const prefix string = ",\"anOptInt64\":" - out.RawString(prefix) - out.Int64(int64(*in.AnOptInt64)) - } - { - const prefix string = ",\"aFloat64\":" - out.RawString(prefix) - out.Float64(float64(in.AFloat64)) - } - if in.AnOptFloat64 != nil { - const prefix string = ",\"anOptFloat64\":" - out.RawString(prefix) - out.Float64(float64(*in.AnOptFloat64)) - } - { - const prefix string = ",\"aUUID\":" - out.RawString(prefix) - out.String(string(in.AUUID)) - } - if in.AnOptUUID != nil { - const prefix string = ",\"anOptUUID\":" - out.RawString(prefix) - out.String(string(*in.AnOptUUID)) - } - { - const prefix string = ",\"aListUUID\":" - out.RawString(prefix) - if in.AListUUID == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v26, v27 := range in.AListUUID { - if v26 > 0 { - out.RawByte(',') - } - out.String(string(v27)) - } - out.RawByte(']') - } - } - if len(in.AnOptListUUID) != 0 { - const prefix string = ",\"anOptListUUID\":" - out.RawString(prefix) - { - out.RawByte('[') - for v28, v29 := range in.AnOptListUUID { - if v28 > 0 { - out.RawByte(',') - } - out.String(string(v29)) - } - out.RawByte(']') - } - } - { - const prefix string = ",\"aStringList\":" - out.RawString(prefix) - if in.AStringList == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v30, v31 := range in.AStringList { - if v30 > 0 { - out.RawByte(',') - } - out.String(string(v31)) - } - out.RawByte(']') - } - } - if len(in.AnOptStringList) != 0 { - const prefix string = ",\"anOptStringList\":" - out.RawString(prefix) - { - out.RawByte('[') - for v32, v33 := range in.AnOptStringList { - if v32 > 0 { - out.RawByte(',') - } - out.String(string(v33)) - } - out.RawByte(']') - } - } - { - const prefix string = ",\"aUUIDList\":" - out.RawString(prefix) - if in.AUUIDList == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v34, v35 := range in.AUUIDList { - if v34 > 0 { - out.RawByte(',') - } - out.String(string(v35)) - } - out.RawByte(']') - } - } - if len(in.AnOptUUIDList) != 0 { - const prefix string = ",\"anOptUUIDList\":" - out.RawString(prefix) - { - out.RawByte('[') - for v36, v37 := range in.AnOptUUIDList { - if v36 > 0 { - out.RawByte(',') - } - out.String(string(v37)) - } - out.RawByte(']') - } - } - { - const prefix string = ",\"aTs\":" - out.RawString(prefix) - out.Raw((in.ATs).MarshalJSON()) - } - if in.AnOptTs != nil { - const prefix string = ",\"anOptTs\":" - out.RawString(prefix) - out.Raw((*in.AnOptTs).MarshalJSON()) - } - { - const prefix string = ",\"aReqDemo\":" - out.RawString(prefix) - out.Raw((in.AReqDemo).MarshalJSON()) - } - if in.AnOptFruit != nil { - const prefix string = ",\"anOptFruit\":" - out.RawString(prefix) - out.Raw((*in.AnOptFruit).MarshalJSON()) - } - { - const prefix string = ",\"aReqFruits\":" - out.RawString(prefix) - if in.AReqFruits == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v38, v39 := range in.AReqFruits { - if v38 > 0 { - out.RawByte(',') - } - out.Raw((v39).MarshalJSON()) - } - out.RawByte(']') - } - } - if len(in.AnOptDemos) != 0 { - const prefix string = ",\"anOptDemos\":" - out.RawString(prefix) - { - out.RawByte('[') - for v40, v41 := range in.AnOptDemos { - if v40 > 0 { - out.RawByte(',') - } - out.Raw((v41).MarshalJSON()) - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithManyQueryParams_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithManyQueryParams1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithManyQueryParams_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithManyQueryParams1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithManyQueryParams_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithManyQueryParams1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithManyQueryParams_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithManyQueryParams1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithHeaders(in *jlexer.Lexer, out *Bar_ArgWithHeaders_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(BarResponse) - } - (*out.Success).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithHeaders(out *jwriter.Writer, in Bar_ArgWithHeaders_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithHeaders_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithHeaders(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithHeaders_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithHeaders(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithHeaders_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithHeaders(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithHeaders_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithHeaders(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithHeaders1(in *jlexer.Lexer, out *Bar_ArgWithHeaders_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var NameSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "name": - out.Name = string(in.String()) - NameSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !NameSet { - in.AddError(fmt.Errorf("key 'name' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithHeaders1(out *jwriter.Writer, in Bar_ArgWithHeaders_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"name\":" - out.RawString(prefix[1:]) - out.String(string(in.Name)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgWithHeaders_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithHeaders1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgWithHeaders_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithHeaders1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgWithHeaders_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithHeaders1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgWithHeaders_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgWithHeaders1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgNotStruct(in *jlexer.Lexer, out *Bar_ArgNotStruct_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "barException": - if in.IsNull() { - in.Skip() - out.BarException = nil - } else { - if out.BarException == nil { - out.BarException = new(BarException) - } - (*out.BarException).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgNotStruct(out *jwriter.Writer, in Bar_ArgNotStruct_Result) { - out.RawByte('{') - first := true - _ = first - if in.BarException != nil { - const prefix string = ",\"barException\":" - first = false - out.RawString(prefix[1:]) - (*in.BarException).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgNotStruct_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgNotStruct(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgNotStruct_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgNotStruct(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgNotStruct_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgNotStruct(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgNotStruct_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgNotStruct(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgNotStruct1(in *jlexer.Lexer, out *Bar_ArgNotStruct_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var RequestSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "request": - out.Request = string(in.String()) - RequestSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !RequestSet { - in.AddError(fmt.Errorf("key 'request' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgNotStruct1(out *jwriter.Writer, in Bar_ArgNotStruct_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"request\":" - out.RawString(prefix[1:]) - out.String(string(in.Request)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Bar_ArgNotStruct_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgNotStruct1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Bar_ArgNotStruct_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgNotStruct1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Bar_ArgNotStruct_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgNotStruct1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Bar_ArgNotStruct_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBarBarArgNotStruct1(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar4(in *jlexer.Lexer, out *BarResponse) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var StringFieldSet bool - var IntWithRangeSet bool - var IntWithoutRangeSet bool - var MapIntWithRangeSet bool - var MapIntWithoutRangeSet bool - var BinaryFieldSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "stringField": - out.StringField = string(in.String()) - StringFieldSet = true - case "intWithRange": - out.IntWithRange = int32(in.Int32()) - IntWithRangeSet = true - case "intWithoutRange": - out.IntWithoutRange = int32(in.Int32()) - IntWithoutRangeSet = true - case "mapIntWithRange": - if in.IsNull() { - in.Skip() - } else { - in.Delim('{') - out.MapIntWithRange = make(map[UUID]int32) - for !in.IsDelim('}') { - key := UUID(in.String()) - in.WantColon() - var v42 int32 - v42 = int32(in.Int32()) - (out.MapIntWithRange)[key] = v42 - in.WantComma() - } - in.Delim('}') - } - MapIntWithRangeSet = true - case "mapIntWithoutRange": - if in.IsNull() { - in.Skip() - } else { - in.Delim('{') - out.MapIntWithoutRange = make(map[string]int32) - for !in.IsDelim('}') { - key := string(in.String()) - in.WantColon() - var v43 int32 - v43 = int32(in.Int32()) - (out.MapIntWithoutRange)[key] = v43 - in.WantComma() - } - in.Delim('}') - } - MapIntWithoutRangeSet = true - case "binaryField": - if in.IsNull() { - in.Skip() - out.BinaryField = nil - } else { - out.BinaryField = in.Bytes() - } - BinaryFieldSet = true - case "nextResponse": - if in.IsNull() { - in.Skip() - out.NextResponse = nil - } else { - if out.NextResponse == nil { - out.NextResponse = new(BarResponse) - } - (*out.NextResponse).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !StringFieldSet { - in.AddError(fmt.Errorf("key 'stringField' is required")) - } - if !IntWithRangeSet { - in.AddError(fmt.Errorf("key 'intWithRange' is required")) - } - if !IntWithoutRangeSet { - in.AddError(fmt.Errorf("key 'intWithoutRange' is required")) - } - if !MapIntWithRangeSet { - in.AddError(fmt.Errorf("key 'mapIntWithRange' is required")) - } - if !MapIntWithoutRangeSet { - in.AddError(fmt.Errorf("key 'mapIntWithoutRange' is required")) - } - if !BinaryFieldSet { - in.AddError(fmt.Errorf("key 'binaryField' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar4(out *jwriter.Writer, in BarResponse) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"stringField\":" - out.RawString(prefix[1:]) - out.String(string(in.StringField)) - } - { - const prefix string = ",\"intWithRange\":" - out.RawString(prefix) - out.Int32(int32(in.IntWithRange)) - } - { - const prefix string = ",\"intWithoutRange\":" - out.RawString(prefix) - out.Int32(int32(in.IntWithoutRange)) - } - { - const prefix string = ",\"mapIntWithRange\":" - out.RawString(prefix) - if in.MapIntWithRange == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 { - out.RawString(`null`) - } else { - out.RawByte('{') - v45First := true - for v45Name, v45Value := range in.MapIntWithRange { - if v45First { - v45First = false - } else { - out.RawByte(',') - } - out.String(string(v45Name)) - out.RawByte(':') - out.Int32(int32(v45Value)) - } - out.RawByte('}') - } - } - { - const prefix string = ",\"mapIntWithoutRange\":" - out.RawString(prefix) - if in.MapIntWithoutRange == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 { - out.RawString(`null`) - } else { - out.RawByte('{') - v46First := true - for v46Name, v46Value := range in.MapIntWithoutRange { - if v46First { - v46First = false - } else { - out.RawByte(',') - } - out.String(string(v46Name)) - out.RawByte(':') - out.Int32(int32(v46Value)) - } - out.RawByte('}') - } - } - { - const prefix string = ",\"binaryField\":" - out.RawString(prefix) - out.Base64Bytes(in.BinaryField) - } - if in.NextResponse != nil { - const prefix string = ",\"nextResponse\":" - out.RawString(prefix) - (*in.NextResponse).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v BarResponse) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar4(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v BarResponse) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar4(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *BarResponse) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar4(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *BarResponse) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar4(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar5(in *jlexer.Lexer, out *BarRequest) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var StringFieldSet bool - var BoolFieldSet bool - var BinaryFieldSet bool - var TimestampSet bool - var EnumFieldSet bool - var LongFieldSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "stringField": - out.StringField = string(in.String()) - StringFieldSet = true - case "boolField": - out.BoolField = bool(in.Bool()) - BoolFieldSet = true - case "binaryField": - if in.IsNull() { - in.Skip() - out.BinaryField = nil - } else { - out.BinaryField = in.Bytes() - } - BinaryFieldSet = true - case "timestamp": - if data := in.Raw(); in.Ok() { - in.AddError((out.Timestamp).UnmarshalJSON(data)) - } - TimestampSet = true - case "enumField": - if data := in.Raw(); in.Ok() { - in.AddError((out.EnumField).UnmarshalJSON(data)) - } - EnumFieldSet = true - case "longField": - if data := in.Raw(); in.Ok() { - in.AddError((out.LongField).UnmarshalJSON(data)) - } - LongFieldSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !StringFieldSet { - in.AddError(fmt.Errorf("key 'stringField' is required")) - } - if !BoolFieldSet { - in.AddError(fmt.Errorf("key 'boolField' is required")) - } - if !BinaryFieldSet { - in.AddError(fmt.Errorf("key 'binaryField' is required")) - } - if !TimestampSet { - in.AddError(fmt.Errorf("key 'timestamp' is required")) - } - if !EnumFieldSet { - in.AddError(fmt.Errorf("key 'enumField' is required")) - } - if !LongFieldSet { - in.AddError(fmt.Errorf("key 'longField' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar5(out *jwriter.Writer, in BarRequest) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"stringField\":" - out.RawString(prefix[1:]) - out.String(string(in.StringField)) - } - { - const prefix string = ",\"boolField\":" - out.RawString(prefix) - out.Bool(bool(in.BoolField)) - } - { - const prefix string = ",\"binaryField\":" - out.RawString(prefix) - out.Base64Bytes(in.BinaryField) - } - { - const prefix string = ",\"timestamp\":" - out.RawString(prefix) - out.Raw((in.Timestamp).MarshalJSON()) - } - { - const prefix string = ",\"enumField\":" - out.RawString(prefix) - out.Raw((in.EnumField).MarshalJSON()) - } - { - const prefix string = ",\"longField\":" - out.RawString(prefix) - out.Raw((in.LongField).MarshalJSON()) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v BarRequest) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar5(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v BarRequest) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar5(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *BarRequest) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar5(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *BarRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar5(l, v) -} -func easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar6(in *jlexer.Lexer, out *BarException) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var StringFieldSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "stringField": - out.StringField = string(in.String()) - StringFieldSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !StringFieldSet { - in.AddError(fmt.Errorf("key 'stringField' is required")) - } -} -func easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar6(out *jwriter.Writer, in BarException) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"stringField\":" - out.RawString(prefix[1:]) - out.String(string(in.StringField)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v BarException) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar6(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v BarException) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4347b5c1EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar6(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *BarException) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar6(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *BarException) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4347b5c1DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBarBar6(l, v) -} diff --git a/examples/example-gateway/build/gen-code/endpoints/bar/bar/types_i64_easyjson.go b/examples/example-gateway/build/gen-code/endpoints/bar/bar/types_i64_easyjson.go deleted file mode 100644 index dd77aa1b6..000000000 --- a/examples/example-gateway/build/gen-code/endpoints/bar/bar/types_i64_easyjson.go +++ /dev/null @@ -1,22 +0,0 @@ -// Code generated by zanzibar -// @generated -// Checksum : gYV3V5yK9HSWyPqj8tv9iA== -// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. - -package bar - -import ( - json "encoding/json" - - easyjson "github.com/mailru/easyjson" - jlexer "github.com/mailru/easyjson/jlexer" - jwriter "github.com/mailru/easyjson/jwriter" -) - -// suppress unused package warning -var ( - _ *json.RawMessage - _ *jlexer.Lexer - _ *jwriter.Writer - _ easyjson.Marshaler -) diff --git a/examples/example-gateway/build/gen-code/endpoints/baz/baz/baz_easyjson.go b/examples/example-gateway/build/gen-code/endpoints/baz/baz/baz_easyjson.go deleted file mode 100644 index 56d71ad62..000000000 --- a/examples/example-gateway/build/gen-code/endpoints/baz/baz/baz_easyjson.go +++ /dev/null @@ -1,3538 +0,0 @@ -// Code generated by zanzibar -// @generated -// Checksum : 0sHopu+qnWuNrO4qbhfPZQ== -// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. - -package baz - -import ( - json "encoding/json" - fmt "fmt" - - easyjson "github.com/mailru/easyjson" - jlexer "github.com/mailru/easyjson/jlexer" - jwriter "github.com/mailru/easyjson/jwriter" -) - -// suppress unused package warning -var ( - _ *json.RawMessage - _ *jlexer.Lexer - _ *jwriter.Writer - _ easyjson.Marshaler -) - -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz(in *jlexer.Lexer, out *TransStruct) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var MessageSet bool - var RiderSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "message": - out.Message = string(in.String()) - MessageSet = true - case "driver": - if in.IsNull() { - in.Skip() - out.Driver = nil - } else { - if out.Driver == nil { - out.Driver = new(NestedStruct) - } - (*out.Driver).UnmarshalEasyJSON(in) - } - case "rider": - if in.IsNull() { - in.Skip() - out.Rider = nil - } else { - if out.Rider == nil { - out.Rider = new(NestedStruct) - } - (*out.Rider).UnmarshalEasyJSON(in) - } - RiderSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !MessageSet { - in.AddError(fmt.Errorf("key 'message' is required")) - } - if !RiderSet { - in.AddError(fmt.Errorf("key 'rider' is required")) - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz(out *jwriter.Writer, in TransStruct) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"message\":" - out.RawString(prefix[1:]) - out.String(string(in.Message)) - } - if in.Driver != nil { - const prefix string = ",\"driver\":" - out.RawString(prefix) - (*in.Driver).MarshalEasyJSON(out) - } - { - const prefix string = ",\"rider\":" - out.RawString(prefix) - if in.Rider == nil { - out.RawString("null") - } else { - (*in.Rider).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v TransStruct) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v TransStruct) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *TransStruct) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *TransStruct) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz1(in *jlexer.Lexer, out *TransHeader) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz1(out *jwriter.Writer, in TransHeader) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v TransHeader) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v TransHeader) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *TransHeader) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *TransHeader) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz1(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceUrlTest(in *jlexer.Lexer, out *SimpleService_UrlTest_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceUrlTest(out *jwriter.Writer, in SimpleService_UrlTest_Result) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SimpleService_UrlTest_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceUrlTest(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SimpleService_UrlTest_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceUrlTest(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SimpleService_UrlTest_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceUrlTest(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SimpleService_UrlTest_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceUrlTest(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceUrlTest1(in *jlexer.Lexer, out *SimpleService_UrlTest_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceUrlTest1(out *jwriter.Writer, in SimpleService_UrlTest_Args) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SimpleService_UrlTest_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceUrlTest1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SimpleService_UrlTest_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceUrlTest1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SimpleService_UrlTest_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceUrlTest1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SimpleService_UrlTest_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceUrlTest1(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTrans(in *jlexer.Lexer, out *SimpleService_Trans_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(TransStruct) - } - (*out.Success).UnmarshalEasyJSON(in) - } - case "authErr": - if in.IsNull() { - in.Skip() - out.AuthErr = nil - } else { - if out.AuthErr == nil { - out.AuthErr = new(AuthErr) - } - (*out.AuthErr).UnmarshalEasyJSON(in) - } - case "otherAuthErr": - if in.IsNull() { - in.Skip() - out.OtherAuthErr = nil - } else { - if out.OtherAuthErr == nil { - out.OtherAuthErr = new(OtherAuthErr) - } - (*out.OtherAuthErr).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTrans(out *jwriter.Writer, in SimpleService_Trans_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - if in.AuthErr != nil { - const prefix string = ",\"authErr\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.AuthErr).MarshalEasyJSON(out) - } - if in.OtherAuthErr != nil { - const prefix string = ",\"otherAuthErr\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.OtherAuthErr).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SimpleService_Trans_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTrans(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SimpleService_Trans_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTrans(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SimpleService_Trans_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTrans(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SimpleService_Trans_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTrans(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTrans1(in *jlexer.Lexer, out *SimpleService_Trans_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var Arg1Set bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "arg1": - if in.IsNull() { - in.Skip() - out.Arg1 = nil - } else { - if out.Arg1 == nil { - out.Arg1 = new(TransStruct) - } - (*out.Arg1).UnmarshalEasyJSON(in) - } - Arg1Set = true - case "arg2": - if in.IsNull() { - in.Skip() - out.Arg2 = nil - } else { - if out.Arg2 == nil { - out.Arg2 = new(TransStruct) - } - (*out.Arg2).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !Arg1Set { - in.AddError(fmt.Errorf("key 'arg1' is required")) - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTrans1(out *jwriter.Writer, in SimpleService_Trans_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"arg1\":" - out.RawString(prefix[1:]) - if in.Arg1 == nil { - out.RawString("null") - } else { - (*in.Arg1).MarshalEasyJSON(out) - } - } - if in.Arg2 != nil { - const prefix string = ",\"arg2\":" - out.RawString(prefix) - (*in.Arg2).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SimpleService_Trans_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTrans1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SimpleService_Trans_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTrans1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SimpleService_Trans_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTrans1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SimpleService_Trans_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTrans1(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeaders(in *jlexer.Lexer, out *SimpleService_TransHeaders_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(TransHeader) - } - (*out.Success).UnmarshalEasyJSON(in) - } - case "authErr": - if in.IsNull() { - in.Skip() - out.AuthErr = nil - } else { - if out.AuthErr == nil { - out.AuthErr = new(AuthErr) - } - (*out.AuthErr).UnmarshalEasyJSON(in) - } - case "otherAuthErr": - if in.IsNull() { - in.Skip() - out.OtherAuthErr = nil - } else { - if out.OtherAuthErr == nil { - out.OtherAuthErr = new(OtherAuthErr) - } - (*out.OtherAuthErr).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeaders(out *jwriter.Writer, in SimpleService_TransHeaders_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - if in.AuthErr != nil { - const prefix string = ",\"authErr\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.AuthErr).MarshalEasyJSON(out) - } - if in.OtherAuthErr != nil { - const prefix string = ",\"otherAuthErr\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.OtherAuthErr).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SimpleService_TransHeaders_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeaders(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SimpleService_TransHeaders_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeaders(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SimpleService_TransHeaders_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeaders(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SimpleService_TransHeaders_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeaders(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeaders1(in *jlexer.Lexer, out *SimpleService_TransHeaders_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var ReqSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "req": - if in.IsNull() { - in.Skip() - out.Req = nil - } else { - if out.Req == nil { - out.Req = new(TransHeader) - } - (*out.Req).UnmarshalEasyJSON(in) - } - ReqSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !ReqSet { - in.AddError(fmt.Errorf("key 'req' is required")) - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeaders1(out *jwriter.Writer, in SimpleService_TransHeaders_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"req\":" - out.RawString(prefix[1:]) - if in.Req == nil { - out.RawString("null") - } else { - (*in.Req).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SimpleService_TransHeaders_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeaders1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SimpleService_TransHeaders_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeaders1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SimpleService_TransHeaders_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeaders1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SimpleService_TransHeaders_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeaders1(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeadersType(in *jlexer.Lexer, out *SimpleService_TransHeadersType_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(TransHeader) - } - (*out.Success).UnmarshalEasyJSON(in) - } - case "authErr": - if in.IsNull() { - in.Skip() - out.AuthErr = nil - } else { - if out.AuthErr == nil { - out.AuthErr = new(AuthErr) - } - (*out.AuthErr).UnmarshalEasyJSON(in) - } - case "otherAuthErr": - if in.IsNull() { - in.Skip() - out.OtherAuthErr = nil - } else { - if out.OtherAuthErr == nil { - out.OtherAuthErr = new(OtherAuthErr) - } - (*out.OtherAuthErr).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeadersType(out *jwriter.Writer, in SimpleService_TransHeadersType_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - if in.AuthErr != nil { - const prefix string = ",\"authErr\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.AuthErr).MarshalEasyJSON(out) - } - if in.OtherAuthErr != nil { - const prefix string = ",\"otherAuthErr\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.OtherAuthErr).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SimpleService_TransHeadersType_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeadersType(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SimpleService_TransHeadersType_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeadersType(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SimpleService_TransHeadersType_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeadersType(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SimpleService_TransHeadersType_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeadersType(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeadersType1(in *jlexer.Lexer, out *SimpleService_TransHeadersType_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var ReqSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "req": - if in.IsNull() { - in.Skip() - out.Req = nil - } else { - if out.Req == nil { - out.Req = new(TransHeader) - } - (*out.Req).UnmarshalEasyJSON(in) - } - ReqSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !ReqSet { - in.AddError(fmt.Errorf("key 'req' is required")) - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeadersType1(out *jwriter.Writer, in SimpleService_TransHeadersType_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"req\":" - out.RawString(prefix[1:]) - if in.Req == nil { - out.RawString("null") - } else { - (*in.Req).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SimpleService_TransHeadersType_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeadersType1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SimpleService_TransHeadersType_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeadersType1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SimpleService_TransHeadersType_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeadersType1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SimpleService_TransHeadersType_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeadersType1(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeadersNoReq(in *jlexer.Lexer, out *SimpleService_TransHeadersNoReq_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(TransHeader) - } - (*out.Success).UnmarshalEasyJSON(in) - } - case "authErr": - if in.IsNull() { - in.Skip() - out.AuthErr = nil - } else { - if out.AuthErr == nil { - out.AuthErr = new(AuthErr) - } - (*out.AuthErr).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeadersNoReq(out *jwriter.Writer, in SimpleService_TransHeadersNoReq_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - if in.AuthErr != nil { - const prefix string = ",\"authErr\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.AuthErr).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SimpleService_TransHeadersNoReq_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeadersNoReq(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SimpleService_TransHeadersNoReq_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeadersNoReq(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SimpleService_TransHeadersNoReq_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeadersNoReq(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SimpleService_TransHeadersNoReq_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeadersNoReq(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeadersNoReq1(in *jlexer.Lexer, out *SimpleService_TransHeadersNoReq_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeadersNoReq1(out *jwriter.Writer, in SimpleService_TransHeadersNoReq_Args) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SimpleService_TransHeadersNoReq_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeadersNoReq1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SimpleService_TransHeadersNoReq_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeadersNoReq1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SimpleService_TransHeadersNoReq_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeadersNoReq1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SimpleService_TransHeadersNoReq_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTransHeadersNoReq1(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTestUuid(in *jlexer.Lexer, out *SimpleService_TestUuid_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTestUuid(out *jwriter.Writer, in SimpleService_TestUuid_Result) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SimpleService_TestUuid_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTestUuid(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SimpleService_TestUuid_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTestUuid(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SimpleService_TestUuid_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTestUuid(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SimpleService_TestUuid_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTestUuid(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTestUuid1(in *jlexer.Lexer, out *SimpleService_TestUuid_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTestUuid1(out *jwriter.Writer, in SimpleService_TestUuid_Args) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SimpleService_TestUuid_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTestUuid1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SimpleService_TestUuid_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTestUuid1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SimpleService_TestUuid_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTestUuid1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SimpleService_TestUuid_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceTestUuid1(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceSillyNoop(in *jlexer.Lexer, out *SimpleService_SillyNoop_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "authErr": - if in.IsNull() { - in.Skip() - out.AuthErr = nil - } else { - if out.AuthErr == nil { - out.AuthErr = new(AuthErr) - } - (*out.AuthErr).UnmarshalEasyJSON(in) - } - case "serverErr": - if in.IsNull() { - in.Skip() - out.ServerErr = nil - } else { - if out.ServerErr == nil { - out.ServerErr = new(ServerErr) - } - (*out.ServerErr).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceSillyNoop(out *jwriter.Writer, in SimpleService_SillyNoop_Result) { - out.RawByte('{') - first := true - _ = first - if in.AuthErr != nil { - const prefix string = ",\"authErr\":" - first = false - out.RawString(prefix[1:]) - (*in.AuthErr).MarshalEasyJSON(out) - } - if in.ServerErr != nil { - const prefix string = ",\"serverErr\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.ServerErr).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SimpleService_SillyNoop_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceSillyNoop(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SimpleService_SillyNoop_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceSillyNoop(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SimpleService_SillyNoop_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceSillyNoop(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SimpleService_SillyNoop_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceSillyNoop(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceSillyNoop1(in *jlexer.Lexer, out *SimpleService_SillyNoop_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceSillyNoop1(out *jwriter.Writer, in SimpleService_SillyNoop_Args) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SimpleService_SillyNoop_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceSillyNoop1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SimpleService_SillyNoop_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceSillyNoop1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SimpleService_SillyNoop_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceSillyNoop1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SimpleService_SillyNoop_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceSillyNoop1(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServicePing(in *jlexer.Lexer, out *SimpleService_Ping_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(BazResponse) - } - (*out.Success).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServicePing(out *jwriter.Writer, in SimpleService_Ping_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SimpleService_Ping_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServicePing(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SimpleService_Ping_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServicePing(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SimpleService_Ping_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServicePing(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SimpleService_Ping_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServicePing(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServicePing1(in *jlexer.Lexer, out *SimpleService_Ping_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServicePing1(out *jwriter.Writer, in SimpleService_Ping_Args) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SimpleService_Ping_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServicePing1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SimpleService_Ping_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServicePing1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SimpleService_Ping_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServicePing1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SimpleService_Ping_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServicePing1(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceHeaderSchema(in *jlexer.Lexer, out *SimpleService_HeaderSchema_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(HeaderSchema) - } - (*out.Success).UnmarshalEasyJSON(in) - } - case "authErr": - if in.IsNull() { - in.Skip() - out.AuthErr = nil - } else { - if out.AuthErr == nil { - out.AuthErr = new(AuthErr) - } - (*out.AuthErr).UnmarshalEasyJSON(in) - } - case "otherAuthErr": - if in.IsNull() { - in.Skip() - out.OtherAuthErr = nil - } else { - if out.OtherAuthErr == nil { - out.OtherAuthErr = new(OtherAuthErr) - } - (*out.OtherAuthErr).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceHeaderSchema(out *jwriter.Writer, in SimpleService_HeaderSchema_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - if in.AuthErr != nil { - const prefix string = ",\"authErr\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.AuthErr).MarshalEasyJSON(out) - } - if in.OtherAuthErr != nil { - const prefix string = ",\"otherAuthErr\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.OtherAuthErr).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SimpleService_HeaderSchema_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceHeaderSchema(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SimpleService_HeaderSchema_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceHeaderSchema(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SimpleService_HeaderSchema_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceHeaderSchema(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SimpleService_HeaderSchema_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceHeaderSchema(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceHeaderSchema1(in *jlexer.Lexer, out *SimpleService_HeaderSchema_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var ReqSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "req": - if in.IsNull() { - in.Skip() - out.Req = nil - } else { - if out.Req == nil { - out.Req = new(HeaderSchema) - } - (*out.Req).UnmarshalEasyJSON(in) - } - ReqSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !ReqSet { - in.AddError(fmt.Errorf("key 'req' is required")) - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceHeaderSchema1(out *jwriter.Writer, in SimpleService_HeaderSchema_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"req\":" - out.RawString(prefix[1:]) - if in.Req == nil { - out.RawString("null") - } else { - (*in.Req).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SimpleService_HeaderSchema_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceHeaderSchema1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SimpleService_HeaderSchema_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceHeaderSchema1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SimpleService_HeaderSchema_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceHeaderSchema1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SimpleService_HeaderSchema_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceHeaderSchema1(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceGetProfile(in *jlexer.Lexer, out *SimpleService_GetProfile_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(GetProfileResponse) - } - (*out.Success).UnmarshalEasyJSON(in) - } - case "authErr": - if in.IsNull() { - in.Skip() - out.AuthErr = nil - } else { - if out.AuthErr == nil { - out.AuthErr = new(AuthErr) - } - (*out.AuthErr).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceGetProfile(out *jwriter.Writer, in SimpleService_GetProfile_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - if in.AuthErr != nil { - const prefix string = ",\"authErr\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.AuthErr).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SimpleService_GetProfile_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceGetProfile(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SimpleService_GetProfile_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceGetProfile(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SimpleService_GetProfile_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceGetProfile(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SimpleService_GetProfile_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceGetProfile(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceGetProfile1(in *jlexer.Lexer, out *SimpleService_GetProfile_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var RequestSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "request": - if in.IsNull() { - in.Skip() - out.Request = nil - } else { - if out.Request == nil { - out.Request = new(GetProfileRequest) - } - (*out.Request).UnmarshalEasyJSON(in) - } - RequestSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !RequestSet { - in.AddError(fmt.Errorf("key 'request' is required")) - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceGetProfile1(out *jwriter.Writer, in SimpleService_GetProfile_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"request\":" - out.RawString(prefix[1:]) - if in.Request == nil { - out.RawString("null") - } else { - (*in.Request).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SimpleService_GetProfile_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceGetProfile1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SimpleService_GetProfile_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceGetProfile1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SimpleService_GetProfile_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceGetProfile1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SimpleService_GetProfile_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceGetProfile1(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceCompare(in *jlexer.Lexer, out *SimpleService_Compare_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(BazResponse) - } - (*out.Success).UnmarshalEasyJSON(in) - } - case "authErr": - if in.IsNull() { - in.Skip() - out.AuthErr = nil - } else { - if out.AuthErr == nil { - out.AuthErr = new(AuthErr) - } - (*out.AuthErr).UnmarshalEasyJSON(in) - } - case "otherAuthErr": - if in.IsNull() { - in.Skip() - out.OtherAuthErr = nil - } else { - if out.OtherAuthErr == nil { - out.OtherAuthErr = new(OtherAuthErr) - } - (*out.OtherAuthErr).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceCompare(out *jwriter.Writer, in SimpleService_Compare_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - if in.AuthErr != nil { - const prefix string = ",\"authErr\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.AuthErr).MarshalEasyJSON(out) - } - if in.OtherAuthErr != nil { - const prefix string = ",\"otherAuthErr\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.OtherAuthErr).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SimpleService_Compare_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceCompare(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SimpleService_Compare_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceCompare(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SimpleService_Compare_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceCompare(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SimpleService_Compare_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceCompare(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceCompare1(in *jlexer.Lexer, out *SimpleService_Compare_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var Arg1Set bool - var Arg2Set bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "arg1": - if in.IsNull() { - in.Skip() - out.Arg1 = nil - } else { - if out.Arg1 == nil { - out.Arg1 = new(BazRequest) - } - (*out.Arg1).UnmarshalEasyJSON(in) - } - Arg1Set = true - case "arg2": - if in.IsNull() { - in.Skip() - out.Arg2 = nil - } else { - if out.Arg2 == nil { - out.Arg2 = new(BazRequest) - } - (*out.Arg2).UnmarshalEasyJSON(in) - } - Arg2Set = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !Arg1Set { - in.AddError(fmt.Errorf("key 'arg1' is required")) - } - if !Arg2Set { - in.AddError(fmt.Errorf("key 'arg2' is required")) - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceCompare1(out *jwriter.Writer, in SimpleService_Compare_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"arg1\":" - out.RawString(prefix[1:]) - if in.Arg1 == nil { - out.RawString("null") - } else { - (*in.Arg1).MarshalEasyJSON(out) - } - } - { - const prefix string = ",\"arg2\":" - out.RawString(prefix) - if in.Arg2 == nil { - out.RawString("null") - } else { - (*in.Arg2).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SimpleService_Compare_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceCompare1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SimpleService_Compare_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceCompare1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SimpleService_Compare_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceCompare1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SimpleService_Compare_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceCompare1(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceCall(in *jlexer.Lexer, out *SimpleService_Call_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "authErr": - if in.IsNull() { - in.Skip() - out.AuthErr = nil - } else { - if out.AuthErr == nil { - out.AuthErr = new(AuthErr) - } - (*out.AuthErr).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceCall(out *jwriter.Writer, in SimpleService_Call_Result) { - out.RawByte('{') - first := true - _ = first - if in.AuthErr != nil { - const prefix string = ",\"authErr\":" - first = false - out.RawString(prefix[1:]) - (*in.AuthErr).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SimpleService_Call_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceCall(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SimpleService_Call_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceCall(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SimpleService_Call_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceCall(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SimpleService_Call_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceCall(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceCall1(in *jlexer.Lexer, out *SimpleService_Call_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var ArgSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "arg": - if in.IsNull() { - in.Skip() - out.Arg = nil - } else { - if out.Arg == nil { - out.Arg = new(BazRequest) - } - (*out.Arg).UnmarshalEasyJSON(in) - } - ArgSet = true - case "i64Optional": - if in.IsNull() { - in.Skip() - out.I64Optional = nil - } else { - if out.I64Optional == nil { - out.I64Optional = new(int64) - } - *out.I64Optional = int64(in.Int64()) - } - case "testUUID": - if in.IsNull() { - in.Skip() - out.TestUUID = nil - } else { - if out.TestUUID == nil { - out.TestUUID = new(UUID) - } - *out.TestUUID = UUID(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !ArgSet { - in.AddError(fmt.Errorf("key 'arg' is required")) - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceCall1(out *jwriter.Writer, in SimpleService_Call_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"arg\":" - out.RawString(prefix[1:]) - if in.Arg == nil { - out.RawString("null") - } else { - (*in.Arg).MarshalEasyJSON(out) - } - } - if in.I64Optional != nil { - const prefix string = ",\"i64Optional\":" - out.RawString(prefix) - out.Int64(int64(*in.I64Optional)) - } - if in.TestUUID != nil { - const prefix string = ",\"testUUID\":" - out.RawString(prefix) - out.String(string(*in.TestUUID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SimpleService_Call_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceCall1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SimpleService_Call_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceCall1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SimpleService_Call_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceCall1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SimpleService_Call_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceCall1(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceAnotherCall(in *jlexer.Lexer, out *SimpleService_AnotherCall_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "authErr": - if in.IsNull() { - in.Skip() - out.AuthErr = nil - } else { - if out.AuthErr == nil { - out.AuthErr = new(AuthErr) - } - (*out.AuthErr).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceAnotherCall(out *jwriter.Writer, in SimpleService_AnotherCall_Result) { - out.RawByte('{') - first := true - _ = first - if in.AuthErr != nil { - const prefix string = ",\"authErr\":" - first = false - out.RawString(prefix[1:]) - (*in.AuthErr).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SimpleService_AnotherCall_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceAnotherCall(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SimpleService_AnotherCall_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceAnotherCall(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SimpleService_AnotherCall_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceAnotherCall(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SimpleService_AnotherCall_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceAnotherCall(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceAnotherCall1(in *jlexer.Lexer, out *SimpleService_AnotherCall_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var ArgSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "arg": - if in.IsNull() { - in.Skip() - out.Arg = nil - } else { - if out.Arg == nil { - out.Arg = new(BazRequest) - } - (*out.Arg).UnmarshalEasyJSON(in) - } - ArgSet = true - case "i64Optional": - if in.IsNull() { - in.Skip() - out.I64Optional = nil - } else { - if out.I64Optional == nil { - out.I64Optional = new(int64) - } - *out.I64Optional = int64(in.Int64()) - } - case "testUUID": - if in.IsNull() { - in.Skip() - out.TestUUID = nil - } else { - if out.TestUUID == nil { - out.TestUUID = new(UUID) - } - *out.TestUUID = UUID(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !ArgSet { - in.AddError(fmt.Errorf("key 'arg' is required")) - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceAnotherCall1(out *jwriter.Writer, in SimpleService_AnotherCall_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"arg\":" - out.RawString(prefix[1:]) - if in.Arg == nil { - out.RawString("null") - } else { - (*in.Arg).MarshalEasyJSON(out) - } - } - if in.I64Optional != nil { - const prefix string = ",\"i64Optional\":" - out.RawString(prefix) - out.Int64(int64(*in.I64Optional)) - } - if in.TestUUID != nil { - const prefix string = ",\"testUUID\":" - out.RawString(prefix) - out.String(string(*in.TestUUID)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SimpleService_AnotherCall_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceAnotherCall1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SimpleService_AnotherCall_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceAnotherCall1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SimpleService_AnotherCall_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceAnotherCall1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SimpleService_AnotherCall_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBazSimpleServiceAnotherCall1(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz2(in *jlexer.Lexer, out *ServerErr) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var MessageSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "message": - out.Message = string(in.String()) - MessageSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !MessageSet { - in.AddError(fmt.Errorf("key 'message' is required")) - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz2(out *jwriter.Writer, in ServerErr) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"message\":" - out.RawString(prefix[1:]) - out.String(string(in.Message)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ServerErr) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz2(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ServerErr) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz2(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ServerErr) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz2(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ServerErr) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz2(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz3(in *jlexer.Lexer, out *Recur3) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var Field31Set bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "field31": - out.Field31 = UUID(in.String()) - Field31Set = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !Field31Set { - in.AddError(fmt.Errorf("key 'field31' is required")) - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz3(out *jwriter.Writer, in Recur3) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"field31\":" - out.RawString(prefix[1:]) - out.String(string(in.Field31)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Recur3) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz3(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Recur3) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz3(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Recur3) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz3(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Recur3) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz3(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz4(in *jlexer.Lexer, out *Recur2) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var Field21Set bool - var Field22Set bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "field21": - if in.IsNull() { - in.Skip() - out.Field21 = nil - } else { - if out.Field21 == nil { - out.Field21 = new(Recur3) - } - (*out.Field21).UnmarshalEasyJSON(in) - } - Field21Set = true - case "field22": - if in.IsNull() { - in.Skip() - out.Field22 = nil - } else { - if out.Field22 == nil { - out.Field22 = new(Recur3) - } - (*out.Field22).UnmarshalEasyJSON(in) - } - Field22Set = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !Field21Set { - in.AddError(fmt.Errorf("key 'field21' is required")) - } - if !Field22Set { - in.AddError(fmt.Errorf("key 'field22' is required")) - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz4(out *jwriter.Writer, in Recur2) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"field21\":" - out.RawString(prefix[1:]) - if in.Field21 == nil { - out.RawString("null") - } else { - (*in.Field21).MarshalEasyJSON(out) - } - } - { - const prefix string = ",\"field22\":" - out.RawString(prefix) - if in.Field22 == nil { - out.RawString("null") - } else { - (*in.Field22).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Recur2) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz4(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Recur2) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz4(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Recur2) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz4(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Recur2) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz4(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz5(in *jlexer.Lexer, out *Recur1) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var Field1Set bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "field1": - if in.IsNull() { - in.Skip() - } else { - in.Delim('{') - out.Field1 = make(map[UUID]*Recur2) - for !in.IsDelim('}') { - key := UUID(in.String()) - in.WantColon() - var v1 *Recur2 - if in.IsNull() { - in.Skip() - v1 = nil - } else { - if v1 == nil { - v1 = new(Recur2) - } - (*v1).UnmarshalEasyJSON(in) - } - (out.Field1)[key] = v1 - in.WantComma() - } - in.Delim('}') - } - Field1Set = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !Field1Set { - in.AddError(fmt.Errorf("key 'field1' is required")) - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz5(out *jwriter.Writer, in Recur1) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"field1\":" - out.RawString(prefix[1:]) - if in.Field1 == nil && (out.Flags&jwriter.NilMapAsEmpty) == 0 { - out.RawString(`null`) - } else { - out.RawByte('{') - v2First := true - for v2Name, v2Value := range in.Field1 { - if v2First { - v2First = false - } else { - out.RawByte(',') - } - out.String(string(v2Name)) - out.RawByte(':') - if v2Value == nil { - out.RawString("null") - } else { - (*v2Value).MarshalEasyJSON(out) - } - } - out.RawByte('}') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Recur1) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz5(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Recur1) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz5(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Recur1) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz5(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Recur1) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz5(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz6(in *jlexer.Lexer, out *Profile) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var Recur1Set bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "recur1": - if in.IsNull() { - in.Skip() - out.Recur1 = nil - } else { - if out.Recur1 == nil { - out.Recur1 = new(Recur1) - } - (*out.Recur1).UnmarshalEasyJSON(in) - } - Recur1Set = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !Recur1Set { - in.AddError(fmt.Errorf("key 'recur1' is required")) - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz6(out *jwriter.Writer, in Profile) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"recur1\":" - out.RawString(prefix[1:]) - if in.Recur1 == nil { - out.RawString("null") - } else { - (*in.Recur1).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Profile) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz6(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Profile) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz6(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Profile) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz6(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Profile) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz6(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz7(in *jlexer.Lexer, out *OtherAuthErr) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var MessageSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "message": - out.Message = string(in.String()) - MessageSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !MessageSet { - in.AddError(fmt.Errorf("key 'message' is required")) - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz7(out *jwriter.Writer, in OtherAuthErr) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"message\":" - out.RawString(prefix[1:]) - out.String(string(in.Message)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v OtherAuthErr) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz7(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v OtherAuthErr) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz7(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *OtherAuthErr) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz7(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *OtherAuthErr) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz7(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz8(in *jlexer.Lexer, out *NestedStruct) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var MsgSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "msg": - out.Msg = string(in.String()) - MsgSet = true - case "check": - if in.IsNull() { - in.Skip() - out.Check = nil - } else { - if out.Check == nil { - out.Check = new(int32) - } - *out.Check = int32(in.Int32()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !MsgSet { - in.AddError(fmt.Errorf("key 'msg' is required")) - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz8(out *jwriter.Writer, in NestedStruct) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"msg\":" - out.RawString(prefix[1:]) - out.String(string(in.Msg)) - } - if in.Check != nil { - const prefix string = ",\"check\":" - out.RawString(prefix) - out.Int32(int32(*in.Check)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v NestedStruct) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz8(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v NestedStruct) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz8(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *NestedStruct) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz8(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *NestedStruct) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz8(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz9(in *jlexer.Lexer, out *HeaderSchema) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz9(out *jwriter.Writer, in HeaderSchema) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v HeaderSchema) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz9(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v HeaderSchema) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz9(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *HeaderSchema) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz9(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *HeaderSchema) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz9(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz10(in *jlexer.Lexer, out *GetProfileResponse) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var PayloadsSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "payloads": - if in.IsNull() { - in.Skip() - out.Payloads = nil - } else { - in.Delim('[') - if out.Payloads == nil { - if !in.IsDelim(']') { - out.Payloads = make([]*Profile, 0, 8) - } else { - out.Payloads = []*Profile{} - } - } else { - out.Payloads = (out.Payloads)[:0] - } - for !in.IsDelim(']') { - var v3 *Profile - if in.IsNull() { - in.Skip() - v3 = nil - } else { - if v3 == nil { - v3 = new(Profile) - } - (*v3).UnmarshalEasyJSON(in) - } - out.Payloads = append(out.Payloads, v3) - in.WantComma() - } - in.Delim(']') - } - PayloadsSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !PayloadsSet { - in.AddError(fmt.Errorf("key 'payloads' is required")) - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz10(out *jwriter.Writer, in GetProfileResponse) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"payloads\":" - out.RawString(prefix[1:]) - if in.Payloads == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v4, v5 := range in.Payloads { - if v4 > 0 { - out.RawByte(',') - } - if v5 == nil { - out.RawString("null") - } else { - (*v5).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetProfileResponse) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz10(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetProfileResponse) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz10(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetProfileResponse) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz10(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetProfileResponse) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz10(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz11(in *jlexer.Lexer, out *GetProfileRequest) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var TargetSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "target": - out.Target = UUID(in.String()) - TargetSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !TargetSet { - in.AddError(fmt.Errorf("key 'target' is required")) - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz11(out *jwriter.Writer, in GetProfileRequest) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"target\":" - out.RawString(prefix[1:]) - out.String(string(in.Target)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GetProfileRequest) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz11(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GetProfileRequest) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz11(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GetProfileRequest) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz11(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GetProfileRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz11(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz12(in *jlexer.Lexer, out *BazResponse) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var MessageSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "message": - out.Message = string(in.String()) - MessageSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !MessageSet { - in.AddError(fmt.Errorf("key 'message' is required")) - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz12(out *jwriter.Writer, in BazResponse) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"message\":" - out.RawString(prefix[1:]) - out.String(string(in.Message)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v BazResponse) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz12(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v BazResponse) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz12(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *BazResponse) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz12(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *BazResponse) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz12(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz13(in *jlexer.Lexer, out *BazRequest) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var B1Set bool - var S2Set bool - var I3Set bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "b1": - out.B1 = bool(in.Bool()) - B1Set = true - case "s2": - out.S2 = string(in.String()) - S2Set = true - case "i3": - out.I3 = int32(in.Int32()) - I3Set = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !B1Set { - in.AddError(fmt.Errorf("key 'b1' is required")) - } - if !S2Set { - in.AddError(fmt.Errorf("key 's2' is required")) - } - if !I3Set { - in.AddError(fmt.Errorf("key 'i3' is required")) - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz13(out *jwriter.Writer, in BazRequest) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"b1\":" - out.RawString(prefix[1:]) - out.Bool(bool(in.B1)) - } - { - const prefix string = ",\"s2\":" - out.RawString(prefix) - out.String(string(in.S2)) - } - { - const prefix string = ",\"i3\":" - out.RawString(prefix) - out.Int32(int32(in.I3)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v BazRequest) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz13(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v BazRequest) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz13(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *BazRequest) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz13(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *BazRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz13(l, v) -} -func easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz14(in *jlexer.Lexer, out *AuthErr) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var MessageSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "message": - out.Message = string(in.String()) - MessageSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !MessageSet { - in.AddError(fmt.Errorf("key 'message' is required")) - } -} -func easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz14(out *jwriter.Writer, in AuthErr) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"message\":" - out.RawString(prefix[1:]) - out.String(string(in.Message)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v AuthErr) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz14(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v AuthErr) MarshalEasyJSON(w *jwriter.Writer) { - easyjson1bcb5839EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz14(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *AuthErr) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz14(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *AuthErr) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson1bcb5839DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsBazBaz14(l, v) -} diff --git a/examples/example-gateway/build/gen-code/endpoints/clientless/clientless/clientless_easyjson.go b/examples/example-gateway/build/gen-code/endpoints/clientless/clientless/clientless_easyjson.go deleted file mode 100644 index 6d50489de..000000000 --- a/examples/example-gateway/build/gen-code/endpoints/clientless/clientless/clientless_easyjson.go +++ /dev/null @@ -1,651 +0,0 @@ -// Code generated by zanzibar -// @generated -// Checksum : F8c9StU8o29/kFQb9UbyLg== -// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. - -package clientless - -import ( - json "encoding/json" - - easyjson "github.com/mailru/easyjson" - jlexer "github.com/mailru/easyjson/jlexer" - jwriter "github.com/mailru/easyjson/jwriter" -) - -// suppress unused package warning -var ( - _ *json.RawMessage - _ *jlexer.Lexer - _ *jwriter.Writer - _ easyjson.Marshaler -) - -func easyjsonD422dfeaDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientless(in *jlexer.Lexer, out *Response) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "firstName": - if in.IsNull() { - in.Skip() - out.FirstName = nil - } else { - if out.FirstName == nil { - out.FirstName = new(string) - } - *out.FirstName = string(in.String()) - } - case "lastName1": - if in.IsNull() { - in.Skip() - out.LastName1 = nil - } else { - if out.LastName1 == nil { - out.LastName1 = new(string) - } - *out.LastName1 = string(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonD422dfeaEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientless(out *jwriter.Writer, in Response) { - out.RawByte('{') - first := true - _ = first - if in.FirstName != nil { - const prefix string = ",\"firstName\":" - first = false - out.RawString(prefix[1:]) - out.String(string(*in.FirstName)) - } - if in.LastName1 != nil { - const prefix string = ",\"lastName1\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.String(string(*in.LastName1)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Response) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonD422dfeaEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientless(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Response) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonD422dfeaEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientless(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Response) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonD422dfeaDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientless(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Response) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonD422dfeaDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientless(l, v) -} -func easyjsonD422dfeaDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientless1(in *jlexer.Lexer, out *Request) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "firstName": - if in.IsNull() { - in.Skip() - out.FirstName = nil - } else { - if out.FirstName == nil { - out.FirstName = new(string) - } - *out.FirstName = string(in.String()) - } - case "lastName": - if in.IsNull() { - in.Skip() - out.LastName = nil - } else { - if out.LastName == nil { - out.LastName = new(string) - } - *out.LastName = string(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonD422dfeaEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientless1(out *jwriter.Writer, in Request) { - out.RawByte('{') - first := true - _ = first - if in.FirstName != nil { - const prefix string = ",\"firstName\":" - first = false - out.RawString(prefix[1:]) - out.String(string(*in.FirstName)) - } - if in.LastName != nil { - const prefix string = ",\"lastName\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.String(string(*in.LastName)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Request) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonD422dfeaEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientless1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Request) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonD422dfeaEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientless1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Request) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonD422dfeaDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientless1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Request) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonD422dfeaDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientless1(l, v) -} -func easyjsonD422dfeaDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessEmptyclientlessRequest(in *jlexer.Lexer, out *Clientless_EmptyclientlessRequest_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonD422dfeaEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessEmptyclientlessRequest(out *jwriter.Writer, in Clientless_EmptyclientlessRequest_Result) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Clientless_EmptyclientlessRequest_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonD422dfeaEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessEmptyclientlessRequest(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Clientless_EmptyclientlessRequest_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonD422dfeaEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessEmptyclientlessRequest(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Clientless_EmptyclientlessRequest_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonD422dfeaDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessEmptyclientlessRequest(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Clientless_EmptyclientlessRequest_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonD422dfeaDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessEmptyclientlessRequest(l, v) -} -func easyjsonD422dfeaDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessEmptyclientlessRequest1(in *jlexer.Lexer, out *Clientless_EmptyclientlessRequest_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "testString": - if in.IsNull() { - in.Skip() - out.TestString = nil - } else { - if out.TestString == nil { - out.TestString = new(string) - } - *out.TestString = string(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonD422dfeaEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessEmptyclientlessRequest1(out *jwriter.Writer, in Clientless_EmptyclientlessRequest_Args) { - out.RawByte('{') - first := true - _ = first - if in.TestString != nil { - const prefix string = ",\"testString\":" - first = false - out.RawString(prefix[1:]) - out.String(string(*in.TestString)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Clientless_EmptyclientlessRequest_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonD422dfeaEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessEmptyclientlessRequest1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Clientless_EmptyclientlessRequest_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonD422dfeaEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessEmptyclientlessRequest1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Clientless_EmptyclientlessRequest_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonD422dfeaDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessEmptyclientlessRequest1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Clientless_EmptyclientlessRequest_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonD422dfeaDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessEmptyclientlessRequest1(l, v) -} -func easyjsonD422dfeaDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessClientlessArgWithHeaders(in *jlexer.Lexer, out *Clientless_ClientlessArgWithHeaders_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(Response) - } - (*out.Success).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonD422dfeaEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessClientlessArgWithHeaders(out *jwriter.Writer, in Clientless_ClientlessArgWithHeaders_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Clientless_ClientlessArgWithHeaders_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonD422dfeaEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessClientlessArgWithHeaders(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Clientless_ClientlessArgWithHeaders_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonD422dfeaEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessClientlessArgWithHeaders(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Clientless_ClientlessArgWithHeaders_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonD422dfeaDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessClientlessArgWithHeaders(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Clientless_ClientlessArgWithHeaders_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonD422dfeaDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessClientlessArgWithHeaders(l, v) -} -func easyjsonD422dfeaDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessClientlessArgWithHeaders1(in *jlexer.Lexer, out *Clientless_ClientlessArgWithHeaders_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonD422dfeaEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessClientlessArgWithHeaders1(out *jwriter.Writer, in Clientless_ClientlessArgWithHeaders_Args) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Clientless_ClientlessArgWithHeaders_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonD422dfeaEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessClientlessArgWithHeaders1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Clientless_ClientlessArgWithHeaders_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonD422dfeaEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessClientlessArgWithHeaders1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Clientless_ClientlessArgWithHeaders_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonD422dfeaDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessClientlessArgWithHeaders1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Clientless_ClientlessArgWithHeaders_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonD422dfeaDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessClientlessArgWithHeaders1(l, v) -} -func easyjsonD422dfeaDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessBeta(in *jlexer.Lexer, out *Clientless_Beta_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(Response) - } - (*out.Success).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonD422dfeaEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessBeta(out *jwriter.Writer, in Clientless_Beta_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Clientless_Beta_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonD422dfeaEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessBeta(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Clientless_Beta_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonD422dfeaEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessBeta(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Clientless_Beta_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonD422dfeaDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessBeta(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Clientless_Beta_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonD422dfeaDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessBeta(l, v) -} -func easyjsonD422dfeaDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessBeta1(in *jlexer.Lexer, out *Clientless_Beta_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "request": - if in.IsNull() { - in.Skip() - out.Request = nil - } else { - if out.Request == nil { - out.Request = new(Request) - } - (*out.Request).UnmarshalEasyJSON(in) - } - case "alpha": - if in.IsNull() { - in.Skip() - out.Alpha = nil - } else { - if out.Alpha == nil { - out.Alpha = new(string) - } - *out.Alpha = string(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonD422dfeaEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessBeta1(out *jwriter.Writer, in Clientless_Beta_Args) { - out.RawByte('{') - first := true - _ = first - if in.Request != nil { - const prefix string = ",\"request\":" - first = false - out.RawString(prefix[1:]) - (*in.Request).MarshalEasyJSON(out) - } - if in.Alpha != nil { - const prefix string = ",\"alpha\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.String(string(*in.Alpha)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Clientless_Beta_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonD422dfeaEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessBeta1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Clientless_Beta_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonD422dfeaEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessBeta1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Clientless_Beta_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonD422dfeaDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessBeta1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Clientless_Beta_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonD422dfeaDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsClientlessClientlessClientlessBeta1(l, v) -} diff --git a/examples/example-gateway/build/gen-code/endpoints/contacts/contacts/contacts_easyjson.go b/examples/example-gateway/build/gen-code/endpoints/contacts/contacts/contacts_easyjson.go deleted file mode 100644 index e3e4145a0..000000000 --- a/examples/example-gateway/build/gen-code/endpoints/contacts/contacts/contacts_easyjson.go +++ /dev/null @@ -1,1199 +0,0 @@ -// Code generated by zanzibar -// @generated -// Checksum : fWaKyzheIAOyGfs4PYcEEA== -// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. - -package contacts - -import ( - json "encoding/json" - fmt "fmt" - - easyjson "github.com/mailru/easyjson" - jlexer "github.com/mailru/easyjson/jlexer" - jwriter "github.com/mailru/easyjson/jwriter" -) - -// suppress unused package warning -var ( - _ *json.RawMessage - _ *jlexer.Lexer - _ *jwriter.Writer - _ easyjson.Marshaler -) - -func easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts(in *jlexer.Lexer, out *SaveContactsResponse) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts(out *jwriter.Writer, in SaveContactsResponse) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SaveContactsResponse) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SaveContactsResponse) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SaveContactsResponse) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SaveContactsResponse) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts(l, v) -} -func easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts1(in *jlexer.Lexer, out *SaveContactsRequest) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var UserUUIDSet bool - var ContactsSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "userUUID": - out.UserUUID = string(in.String()) - UserUUIDSet = true - case "contacts": - if in.IsNull() { - in.Skip() - out.Contacts = nil - } else { - in.Delim('[') - if out.Contacts == nil { - if !in.IsDelim(']') { - out.Contacts = make([]*Contact, 0, 8) - } else { - out.Contacts = []*Contact{} - } - } else { - out.Contacts = (out.Contacts)[:0] - } - for !in.IsDelim(']') { - var v1 *Contact - if in.IsNull() { - in.Skip() - v1 = nil - } else { - if v1 == nil { - v1 = new(Contact) - } - (*v1).UnmarshalEasyJSON(in) - } - out.Contacts = append(out.Contacts, v1) - in.WantComma() - } - in.Delim(']') - } - ContactsSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !UserUUIDSet { - in.AddError(fmt.Errorf("key 'userUUID' is required")) - } - if !ContactsSet { - in.AddError(fmt.Errorf("key 'contacts' is required")) - } -} -func easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts1(out *jwriter.Writer, in SaveContactsRequest) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"userUUID\":" - out.RawString(prefix[1:]) - out.String(string(in.UserUUID)) - } - { - const prefix string = ",\"contacts\":" - out.RawString(prefix) - if in.Contacts == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 { - out.RawString("null") - } else { - out.RawByte('[') - for v2, v3 := range in.Contacts { - if v2 > 0 { - out.RawByte(',') - } - if v3 == nil { - out.RawString("null") - } else { - (*v3).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v SaveContactsRequest) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v SaveContactsRequest) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *SaveContactsRequest) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *SaveContactsRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts1(l, v) -} -func easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts2(in *jlexer.Lexer, out *NotFound) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts2(out *jwriter.Writer, in NotFound) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v NotFound) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts2(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v NotFound) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts2(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *NotFound) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts2(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *NotFound) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts2(l, v) -} -func easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContactsContactsTestUrlUrl(in *jlexer.Lexer, out *Contacts_TestUrlUrl_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(string) - } - *out.Success = string(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContactsContactsTestUrlUrl(out *jwriter.Writer, in Contacts_TestUrlUrl_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - out.String(string(*in.Success)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Contacts_TestUrlUrl_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContactsContactsTestUrlUrl(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Contacts_TestUrlUrl_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContactsContactsTestUrlUrl(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Contacts_TestUrlUrl_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContactsContactsTestUrlUrl(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Contacts_TestUrlUrl_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContactsContactsTestUrlUrl(l, v) -} -func easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContactsContactsTestUrlUrl1(in *jlexer.Lexer, out *Contacts_TestUrlUrl_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContactsContactsTestUrlUrl1(out *jwriter.Writer, in Contacts_TestUrlUrl_Args) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Contacts_TestUrlUrl_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContactsContactsTestUrlUrl1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Contacts_TestUrlUrl_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContactsContactsTestUrlUrl1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Contacts_TestUrlUrl_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContactsContactsTestUrlUrl1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Contacts_TestUrlUrl_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContactsContactsTestUrlUrl1(l, v) -} -func easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContactsContactsSaveContacts(in *jlexer.Lexer, out *Contacts_SaveContacts_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(SaveContactsResponse) - } - (*out.Success).UnmarshalEasyJSON(in) - } - case "badRequest": - if in.IsNull() { - in.Skip() - out.BadRequest = nil - } else { - if out.BadRequest == nil { - out.BadRequest = new(BadRequest) - } - (*out.BadRequest).UnmarshalEasyJSON(in) - } - case "notFound": - if in.IsNull() { - in.Skip() - out.NotFound = nil - } else { - if out.NotFound == nil { - out.NotFound = new(NotFound) - } - (*out.NotFound).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContactsContactsSaveContacts(out *jwriter.Writer, in Contacts_SaveContacts_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - if in.BadRequest != nil { - const prefix string = ",\"badRequest\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.BadRequest).MarshalEasyJSON(out) - } - if in.NotFound != nil { - const prefix string = ",\"notFound\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.NotFound).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Contacts_SaveContacts_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContactsContactsSaveContacts(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Contacts_SaveContacts_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContactsContactsSaveContacts(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Contacts_SaveContacts_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContactsContactsSaveContacts(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Contacts_SaveContacts_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContactsContactsSaveContacts(l, v) -} -func easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContactsContactsSaveContacts1(in *jlexer.Lexer, out *Contacts_SaveContacts_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var SaveContactsRequestSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "saveContactsRequest": - if in.IsNull() { - in.Skip() - out.SaveContactsRequest = nil - } else { - if out.SaveContactsRequest == nil { - out.SaveContactsRequest = new(SaveContactsRequest) - } - (*out.SaveContactsRequest).UnmarshalEasyJSON(in) - } - SaveContactsRequestSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !SaveContactsRequestSet { - in.AddError(fmt.Errorf("key 'saveContactsRequest' is required")) - } -} -func easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContactsContactsSaveContacts1(out *jwriter.Writer, in Contacts_SaveContacts_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"saveContactsRequest\":" - out.RawString(prefix[1:]) - if in.SaveContactsRequest == nil { - out.RawString("null") - } else { - (*in.SaveContactsRequest).MarshalEasyJSON(out) - } - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Contacts_SaveContacts_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContactsContactsSaveContacts1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Contacts_SaveContacts_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContactsContactsSaveContacts1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Contacts_SaveContacts_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContactsContactsSaveContacts1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Contacts_SaveContacts_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContactsContactsSaveContacts1(l, v) -} -func easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts3(in *jlexer.Lexer, out *ContactFragment) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "type": - if in.IsNull() { - in.Skip() - out.Type = nil - } else { - if out.Type == nil { - out.Type = new(ContactFragmentType) - } - *out.Type = ContactFragmentType(in.String()) - } - case "text": - if in.IsNull() { - in.Skip() - out.Text = nil - } else { - if out.Text == nil { - out.Text = new(string) - } - *out.Text = string(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts3(out *jwriter.Writer, in ContactFragment) { - out.RawByte('{') - first := true - _ = first - if in.Type != nil { - const prefix string = ",\"type\":" - first = false - out.RawString(prefix[1:]) - out.String(string(*in.Type)) - } - if in.Text != nil { - const prefix string = ",\"text\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.String(string(*in.Text)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ContactFragment) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts3(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ContactFragment) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts3(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ContactFragment) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts3(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ContactFragment) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts3(l, v) -} -func easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts4(in *jlexer.Lexer, out *ContactAttributes) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "firstName": - if in.IsNull() { - in.Skip() - out.FirstName = nil - } else { - if out.FirstName == nil { - out.FirstName = new(string) - } - *out.FirstName = string(in.String()) - } - case "lastName": - if in.IsNull() { - in.Skip() - out.LastName = nil - } else { - if out.LastName == nil { - out.LastName = new(string) - } - *out.LastName = string(in.String()) - } - case "nickname": - if in.IsNull() { - in.Skip() - out.Nickname = nil - } else { - if out.Nickname == nil { - out.Nickname = new(string) - } - *out.Nickname = string(in.String()) - } - case "hasPhoto": - if in.IsNull() { - in.Skip() - out.HasPhoto = nil - } else { - if out.HasPhoto == nil { - out.HasPhoto = new(bool) - } - *out.HasPhoto = bool(in.Bool()) - } - case "numFields": - if in.IsNull() { - in.Skip() - out.NumFields = nil - } else { - if out.NumFields == nil { - out.NumFields = new(int32) - } - *out.NumFields = int32(in.Int32()) - } - case "timesContacted": - if in.IsNull() { - in.Skip() - out.TimesContacted = nil - } else { - if out.TimesContacted == nil { - out.TimesContacted = new(int32) - } - *out.TimesContacted = int32(in.Int32()) - } - case "lastTimeContacted": - if in.IsNull() { - in.Skip() - out.LastTimeContacted = nil - } else { - if out.LastTimeContacted == nil { - out.LastTimeContacted = new(int32) - } - *out.LastTimeContacted = int32(in.Int32()) - } - case "isStarred": - if in.IsNull() { - in.Skip() - out.IsStarred = nil - } else { - if out.IsStarred == nil { - out.IsStarred = new(bool) - } - *out.IsStarred = bool(in.Bool()) - } - case "hasCustomRingtone": - if in.IsNull() { - in.Skip() - out.HasCustomRingtone = nil - } else { - if out.HasCustomRingtone == nil { - out.HasCustomRingtone = new(bool) - } - *out.HasCustomRingtone = bool(in.Bool()) - } - case "isSendToVoicemail": - if in.IsNull() { - in.Skip() - out.IsSendToVoicemail = nil - } else { - if out.IsSendToVoicemail == nil { - out.IsSendToVoicemail = new(bool) - } - *out.IsSendToVoicemail = bool(in.Bool()) - } - case "hasThumbnail": - if in.IsNull() { - in.Skip() - out.HasThumbnail = nil - } else { - if out.HasThumbnail == nil { - out.HasThumbnail = new(bool) - } - *out.HasThumbnail = bool(in.Bool()) - } - case "namePrefix": - if in.IsNull() { - in.Skip() - out.NamePrefix = nil - } else { - if out.NamePrefix == nil { - out.NamePrefix = new(string) - } - *out.NamePrefix = string(in.String()) - } - case "nameSuffix": - if in.IsNull() { - in.Skip() - out.NameSuffix = nil - } else { - if out.NameSuffix == nil { - out.NameSuffix = new(string) - } - *out.NameSuffix = string(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts4(out *jwriter.Writer, in ContactAttributes) { - out.RawByte('{') - first := true - _ = first - if in.FirstName != nil { - const prefix string = ",\"firstName\":" - first = false - out.RawString(prefix[1:]) - out.String(string(*in.FirstName)) - } - if in.LastName != nil { - const prefix string = ",\"lastName\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.String(string(*in.LastName)) - } - if in.Nickname != nil { - const prefix string = ",\"nickname\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.String(string(*in.Nickname)) - } - if in.HasPhoto != nil { - const prefix string = ",\"hasPhoto\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.Bool(bool(*in.HasPhoto)) - } - if in.NumFields != nil { - const prefix string = ",\"numFields\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.Int32(int32(*in.NumFields)) - } - if in.TimesContacted != nil { - const prefix string = ",\"timesContacted\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.Int32(int32(*in.TimesContacted)) - } - if in.LastTimeContacted != nil { - const prefix string = ",\"lastTimeContacted\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.Int32(int32(*in.LastTimeContacted)) - } - if in.IsStarred != nil { - const prefix string = ",\"isStarred\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.Bool(bool(*in.IsStarred)) - } - if in.HasCustomRingtone != nil { - const prefix string = ",\"hasCustomRingtone\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.Bool(bool(*in.HasCustomRingtone)) - } - if in.IsSendToVoicemail != nil { - const prefix string = ",\"isSendToVoicemail\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.Bool(bool(*in.IsSendToVoicemail)) - } - if in.HasThumbnail != nil { - const prefix string = ",\"hasThumbnail\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.Bool(bool(*in.HasThumbnail)) - } - if in.NamePrefix != nil { - const prefix string = ",\"namePrefix\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.String(string(*in.NamePrefix)) - } - if in.NameSuffix != nil { - const prefix string = ",\"nameSuffix\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - out.String(string(*in.NameSuffix)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ContactAttributes) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts4(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ContactAttributes) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts4(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ContactAttributes) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts4(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ContactAttributes) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts4(l, v) -} -func easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts5(in *jlexer.Lexer, out *Contact) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "fragments": - if in.IsNull() { - in.Skip() - out.Fragments = nil - } else { - in.Delim('[') - if out.Fragments == nil { - if !in.IsDelim(']') { - out.Fragments = make([]*ContactFragment, 0, 8) - } else { - out.Fragments = []*ContactFragment{} - } - } else { - out.Fragments = (out.Fragments)[:0] - } - for !in.IsDelim(']') { - var v4 *ContactFragment - if in.IsNull() { - in.Skip() - v4 = nil - } else { - if v4 == nil { - v4 = new(ContactFragment) - } - (*v4).UnmarshalEasyJSON(in) - } - out.Fragments = append(out.Fragments, v4) - in.WantComma() - } - in.Delim(']') - } - case "attributes": - if in.IsNull() { - in.Skip() - out.Attributes = nil - } else { - if out.Attributes == nil { - out.Attributes = new(ContactAttributes) - } - (*out.Attributes).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts5(out *jwriter.Writer, in Contact) { - out.RawByte('{') - first := true - _ = first - if len(in.Fragments) != 0 { - const prefix string = ",\"fragments\":" - first = false - out.RawString(prefix[1:]) - { - out.RawByte('[') - for v5, v6 := range in.Fragments { - if v5 > 0 { - out.RawByte(',') - } - if v6 == nil { - out.RawString("null") - } else { - (*v6).MarshalEasyJSON(out) - } - } - out.RawByte(']') - } - } - if in.Attributes != nil { - const prefix string = ",\"attributes\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.Attributes).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Contact) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts5(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Contact) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts5(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Contact) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts5(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Contact) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts5(l, v) -} -func easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts6(in *jlexer.Lexer, out *BadRequest) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts6(out *jwriter.Writer, in BadRequest) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v BadRequest) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts6(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v BadRequest) MarshalEasyJSON(w *jwriter.Writer) { - easyjson4ee781cfEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts6(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *BadRequest) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts6(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *BadRequest) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson4ee781cfDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsContactsContacts6(l, v) -} diff --git a/examples/example-gateway/build/gen-code/endpoints/foo/base/base/base_easyjson.go b/examples/example-gateway/build/gen-code/endpoints/foo/base/base/base_easyjson.go deleted file mode 100644 index 49b411d3e..000000000 --- a/examples/example-gateway/build/gen-code/endpoints/foo/base/base/base_easyjson.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by zanzibar -// @generated -// Checksum : kOr5FE+JQZqCoXhqQKQSwA== -// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. - -package base - -import ( - json "encoding/json" - fmt "fmt" - - easyjson "github.com/mailru/easyjson" - jlexer "github.com/mailru/easyjson/jlexer" - jwriter "github.com/mailru/easyjson/jwriter" -) - -// suppress unused package warning -var ( - _ *json.RawMessage - _ *jlexer.Lexer - _ *jwriter.Writer - _ easyjson.Marshaler -) - -func easyjson25720c23DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooBaseBase(in *jlexer.Lexer, out *Message) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var BodySet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "body": - out.Body = string(in.String()) - BodySet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !BodySet { - in.AddError(fmt.Errorf("key 'body' is required")) - } -} -func easyjson25720c23EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooBaseBase(out *jwriter.Writer, in Message) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"body\":" - out.RawString(prefix[1:]) - out.String(string(in.Body)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Message) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson25720c23EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooBaseBase(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Message) MarshalEasyJSON(w *jwriter.Writer) { - easyjson25720c23EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooBaseBase(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Message) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson25720c23DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooBaseBase(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Message) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson25720c23DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooBaseBase(l, v) -} diff --git a/examples/example-gateway/build/gen-code/endpoints/foo/foo/foo_easyjson.go b/examples/example-gateway/build/gen-code/endpoints/foo/foo/foo_easyjson.go deleted file mode 100644 index ecb6f0344..000000000 --- a/examples/example-gateway/build/gen-code/endpoints/foo/foo/foo_easyjson.go +++ /dev/null @@ -1,356 +0,0 @@ -// Code generated by zanzibar -// @generated -// Checksum : K9xPh92lZGiQiHuQ2tOnfw== -// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. - -package foo - -import ( - json "encoding/json" - fmt "fmt" - - easyjson "github.com/mailru/easyjson" - jlexer "github.com/mailru/easyjson/jlexer" - jwriter "github.com/mailru/easyjson/jwriter" - base "github.com/uber/zanzibar/examples/example-gateway/build/gen-code/endpoints/foo/base/base" -) - -// suppress unused package warning -var ( - _ *json.RawMessage - _ *jlexer.Lexer - _ *jwriter.Writer - _ easyjson.Marshaler -) - -func easyjsonE4de407aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooFoo(in *jlexer.Lexer, out *FooStruct) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var FooStringSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "fooString": - out.FooString = string(in.String()) - FooStringSet = true - case "fooI32": - if in.IsNull() { - in.Skip() - out.FooI32 = nil - } else { - if out.FooI32 == nil { - out.FooI32 = new(int32) - } - *out.FooI32 = int32(in.Int32()) - } - case "fooI16": - if in.IsNull() { - in.Skip() - out.FooI16 = nil - } else { - if out.FooI16 == nil { - out.FooI16 = new(int16) - } - *out.FooI16 = int16(in.Int16()) - } - case "fooDouble": - if in.IsNull() { - in.Skip() - out.FooDouble = nil - } else { - if out.FooDouble == nil { - out.FooDouble = new(float64) - } - *out.FooDouble = float64(in.Float64()) - } - case "fooBool": - if in.IsNull() { - in.Skip() - out.FooBool = nil - } else { - if out.FooBool == nil { - out.FooBool = new(bool) - } - *out.FooBool = bool(in.Bool()) - } - case "fooMap": - if in.IsNull() { - in.Skip() - } else { - in.Delim('{') - if !in.IsDelim('}') { - out.FooMap = make(map[string]string) - } else { - out.FooMap = nil - } - for !in.IsDelim('}') { - key := string(in.String()) - in.WantColon() - var v1 string - v1 = string(in.String()) - (out.FooMap)[key] = v1 - in.WantComma() - } - in.Delim('}') - } - case "message": - if in.IsNull() { - in.Skip() - out.Message = nil - } else { - if out.Message == nil { - out.Message = new(base.Message) - } - (*out.Message).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !FooStringSet { - in.AddError(fmt.Errorf("key 'fooString' is required")) - } -} -func easyjsonE4de407aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooFoo(out *jwriter.Writer, in FooStruct) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"fooString\":" - out.RawString(prefix[1:]) - out.String(string(in.FooString)) - } - if in.FooI32 != nil { - const prefix string = ",\"fooI32\":" - out.RawString(prefix) - out.Int32(int32(*in.FooI32)) - } - if in.FooI16 != nil { - const prefix string = ",\"fooI16\":" - out.RawString(prefix) - out.Int16(int16(*in.FooI16)) - } - if in.FooDouble != nil { - const prefix string = ",\"fooDouble\":" - out.RawString(prefix) - out.Float64(float64(*in.FooDouble)) - } - if in.FooBool != nil { - const prefix string = ",\"fooBool\":" - out.RawString(prefix) - out.Bool(bool(*in.FooBool)) - } - if len(in.FooMap) != 0 { - const prefix string = ",\"fooMap\":" - out.RawString(prefix) - { - out.RawByte('{') - v2First := true - for v2Name, v2Value := range in.FooMap { - if v2First { - v2First = false - } else { - out.RawByte(',') - } - out.String(string(v2Name)) - out.RawByte(':') - out.String(string(v2Value)) - } - out.RawByte('}') - } - } - if in.Message != nil { - const prefix string = ",\"message\":" - out.RawString(prefix) - (*in.Message).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v FooStruct) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonE4de407aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooFoo(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v FooStruct) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonE4de407aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooFoo(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *FooStruct) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonE4de407aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooFoo(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *FooStruct) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonE4de407aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooFoo(l, v) -} -func easyjsonE4de407aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooFoo1(in *jlexer.Lexer, out *FooName) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "name": - if in.IsNull() { - in.Skip() - out.Name = nil - } else { - if out.Name == nil { - out.Name = new(string) - } - *out.Name = string(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonE4de407aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooFoo1(out *jwriter.Writer, in FooName) { - out.RawByte('{') - first := true - _ = first - if in.Name != nil { - const prefix string = ",\"name\":" - first = false - out.RawString(prefix[1:]) - out.String(string(*in.Name)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v FooName) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonE4de407aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooFoo1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v FooName) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonE4de407aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooFoo1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *FooName) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonE4de407aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooFoo1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *FooName) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonE4de407aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooFoo1(l, v) -} -func easyjsonE4de407aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooFoo2(in *jlexer.Lexer, out *FooException) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var TeapotSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "teapot": - out.Teapot = string(in.String()) - TeapotSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !TeapotSet { - in.AddError(fmt.Errorf("key 'teapot' is required")) - } -} -func easyjsonE4de407aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooFoo2(out *jwriter.Writer, in FooException) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"teapot\":" - out.RawString(prefix[1:]) - out.String(string(in.Teapot)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v FooException) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonE4de407aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooFoo2(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v FooException) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonE4de407aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooFoo2(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *FooException) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonE4de407aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooFoo2(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *FooException) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonE4de407aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsFooFoo2(l, v) -} diff --git a/examples/example-gateway/build/gen-code/endpoints/googlenow/googlenow/googlenow_easyjson.go b/examples/example-gateway/build/gen-code/endpoints/googlenow/googlenow/googlenow_easyjson.go deleted file mode 100644 index 8e5fd6f62..000000000 --- a/examples/example-gateway/build/gen-code/endpoints/googlenow/googlenow/googlenow_easyjson.go +++ /dev/null @@ -1,272 +0,0 @@ -// Code generated by zanzibar -// @generated -// Checksum : BMMMPFmSVSoxxCNxIw+C+A== -// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. - -package googlenow - -import ( - json "encoding/json" - fmt "fmt" - - easyjson "github.com/mailru/easyjson" - jlexer "github.com/mailru/easyjson/jlexer" - jwriter "github.com/mailru/easyjson/jwriter" -) - -// suppress unused package warning -var ( - _ *json.RawMessage - _ *jlexer.Lexer - _ *jwriter.Writer - _ easyjson.Marshaler -) - -func easyjson25b7f9c9DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsGooglenowGooglenowGoogleNowCheckCredentials(in *jlexer.Lexer, out *GoogleNow_CheckCredentials_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson25b7f9c9EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsGooglenowGooglenowGoogleNowCheckCredentials(out *jwriter.Writer, in GoogleNow_CheckCredentials_Result) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GoogleNow_CheckCredentials_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson25b7f9c9EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsGooglenowGooglenowGoogleNowCheckCredentials(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GoogleNow_CheckCredentials_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson25b7f9c9EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsGooglenowGooglenowGoogleNowCheckCredentials(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GoogleNow_CheckCredentials_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson25b7f9c9DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsGooglenowGooglenowGoogleNowCheckCredentials(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GoogleNow_CheckCredentials_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson25b7f9c9DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsGooglenowGooglenowGoogleNowCheckCredentials(l, v) -} -func easyjson25b7f9c9DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsGooglenowGooglenowGoogleNowCheckCredentials1(in *jlexer.Lexer, out *GoogleNow_CheckCredentials_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson25b7f9c9EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsGooglenowGooglenowGoogleNowCheckCredentials1(out *jwriter.Writer, in GoogleNow_CheckCredentials_Args) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GoogleNow_CheckCredentials_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson25b7f9c9EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsGooglenowGooglenowGoogleNowCheckCredentials1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GoogleNow_CheckCredentials_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson25b7f9c9EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsGooglenowGooglenowGoogleNowCheckCredentials1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GoogleNow_CheckCredentials_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson25b7f9c9DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsGooglenowGooglenowGoogleNowCheckCredentials1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GoogleNow_CheckCredentials_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson25b7f9c9DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsGooglenowGooglenowGoogleNowCheckCredentials1(l, v) -} -func easyjson25b7f9c9DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsGooglenowGooglenowGoogleNowAddCredentials(in *jlexer.Lexer, out *GoogleNow_AddCredentials_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson25b7f9c9EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsGooglenowGooglenowGoogleNowAddCredentials(out *jwriter.Writer, in GoogleNow_AddCredentials_Result) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GoogleNow_AddCredentials_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson25b7f9c9EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsGooglenowGooglenowGoogleNowAddCredentials(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GoogleNow_AddCredentials_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson25b7f9c9EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsGooglenowGooglenowGoogleNowAddCredentials(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GoogleNow_AddCredentials_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson25b7f9c9DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsGooglenowGooglenowGoogleNowAddCredentials(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GoogleNow_AddCredentials_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson25b7f9c9DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsGooglenowGooglenowGoogleNowAddCredentials(l, v) -} -func easyjson25b7f9c9DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsGooglenowGooglenowGoogleNowAddCredentials1(in *jlexer.Lexer, out *GoogleNow_AddCredentials_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var AuthCodeSet bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "authCode": - out.AuthCode = string(in.String()) - AuthCodeSet = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !AuthCodeSet { - in.AddError(fmt.Errorf("key 'authCode' is required")) - } -} -func easyjson25b7f9c9EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsGooglenowGooglenowGoogleNowAddCredentials1(out *jwriter.Writer, in GoogleNow_AddCredentials_Args) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"authCode\":" - out.RawString(prefix[1:]) - out.String(string(in.AuthCode)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v GoogleNow_AddCredentials_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson25b7f9c9EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsGooglenowGooglenowGoogleNowAddCredentials1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v GoogleNow_AddCredentials_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson25b7f9c9EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsGooglenowGooglenowGoogleNowAddCredentials1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *GoogleNow_AddCredentials_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson25b7f9c9DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsGooglenowGooglenowGoogleNowAddCredentials1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *GoogleNow_AddCredentials_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson25b7f9c9DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsGooglenowGooglenowGoogleNowAddCredentials1(l, v) -} diff --git a/examples/example-gateway/build/gen-code/endpoints/multi/multi/multi_easyjson.go b/examples/example-gateway/build/gen-code/endpoints/multi/multi/multi_easyjson.go deleted file mode 100644 index 8ae8b8c82..000000000 --- a/examples/example-gateway/build/gen-code/endpoints/multi/multi/multi_easyjson.go +++ /dev/null @@ -1,425 +0,0 @@ -// Code generated by zanzibar -// @generated -// Checksum : pmTCG1Dq7lD4AXp+UflKTQ== -// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. - -package multi - -import ( - json "encoding/json" - - easyjson "github.com/mailru/easyjson" - jlexer "github.com/mailru/easyjson/jlexer" - jwriter "github.com/mailru/easyjson/jwriter" -) - -// suppress unused package warning -var ( - _ *json.RawMessage - _ *jlexer.Lexer - _ *jwriter.Writer - _ easyjson.Marshaler -) - -func easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceCFrontHello(in *jlexer.Lexer, out *ServiceCFront_Hello_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(string) - } - *out.Success = string(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceCFrontHello(out *jwriter.Writer, in ServiceCFront_Hello_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - out.String(string(*in.Success)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ServiceCFront_Hello_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceCFrontHello(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ServiceCFront_Hello_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceCFrontHello(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ServiceCFront_Hello_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceCFrontHello(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ServiceCFront_Hello_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceCFrontHello(l, v) -} -func easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceCFrontHello1(in *jlexer.Lexer, out *ServiceCFront_Hello_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceCFrontHello1(out *jwriter.Writer, in ServiceCFront_Hello_Args) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ServiceCFront_Hello_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceCFrontHello1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ServiceCFront_Hello_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceCFrontHello1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ServiceCFront_Hello_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceCFrontHello1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ServiceCFront_Hello_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceCFrontHello1(l, v) -} -func easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceBFrontHello(in *jlexer.Lexer, out *ServiceBFront_Hello_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(string) - } - *out.Success = string(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceBFrontHello(out *jwriter.Writer, in ServiceBFront_Hello_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - out.String(string(*in.Success)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ServiceBFront_Hello_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceBFrontHello(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ServiceBFront_Hello_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceBFrontHello(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ServiceBFront_Hello_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceBFrontHello(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ServiceBFront_Hello_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceBFrontHello(l, v) -} -func easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceBFrontHello1(in *jlexer.Lexer, out *ServiceBFront_Hello_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceBFrontHello1(out *jwriter.Writer, in ServiceBFront_Hello_Args) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ServiceBFront_Hello_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceBFrontHello1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ServiceBFront_Hello_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceBFrontHello1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ServiceBFront_Hello_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceBFrontHello1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ServiceBFront_Hello_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceBFrontHello1(l, v) -} -func easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceAFrontHello(in *jlexer.Lexer, out *ServiceAFront_Hello_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(string) - } - *out.Success = string(in.String()) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceAFrontHello(out *jwriter.Writer, in ServiceAFront_Hello_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - out.String(string(*in.Success)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ServiceAFront_Hello_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceAFrontHello(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ServiceAFront_Hello_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceAFrontHello(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ServiceAFront_Hello_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceAFrontHello(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ServiceAFront_Hello_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceAFrontHello(l, v) -} -func easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceAFrontHello1(in *jlexer.Lexer, out *ServiceAFront_Hello_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceAFrontHello1(out *jwriter.Writer, in ServiceAFront_Hello_Args) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v ServiceAFront_Hello_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceAFrontHello1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v ServiceAFront_Hello_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjson536f2a59EncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceAFrontHello1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *ServiceAFront_Hello_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceAFrontHello1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *ServiceAFront_Hello_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjson536f2a59DecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsMultiMultiServiceAFrontHello1(l, v) -} diff --git a/examples/example-gateway/build/gen-code/endpoints/withexceptions/withexceptions/withexceptions_easyjson.go b/examples/example-gateway/build/gen-code/endpoints/withexceptions/withexceptions/withexceptions_easyjson.go deleted file mode 100644 index 350caf08f..000000000 --- a/examples/example-gateway/build/gen-code/endpoints/withexceptions/withexceptions/withexceptions_easyjson.go +++ /dev/null @@ -1,399 +0,0 @@ -// Code generated by zanzibar -// @generated -// Checksum : HeeTwmpypP9hgeNn2NZ60g== -// Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT. - -package withexceptions - -import ( - json "encoding/json" - fmt "fmt" - - easyjson "github.com/mailru/easyjson" - jlexer "github.com/mailru/easyjson/jlexer" - jwriter "github.com/mailru/easyjson/jwriter" -) - -// suppress unused package warning -var ( - _ *json.RawMessage - _ *jlexer.Lexer - _ *jwriter.Writer - _ easyjson.Marshaler -) - -func easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptionsWithExceptionsFunc1(in *jlexer.Lexer, out *WithExceptions_Func1_Result) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "success": - if in.IsNull() { - in.Skip() - out.Success = nil - } else { - if out.Success == nil { - out.Success = new(Response) - } - (*out.Success).UnmarshalEasyJSON(in) - } - case "e1": - if in.IsNull() { - in.Skip() - out.E1 = nil - } else { - if out.E1 == nil { - out.E1 = new(EndpointExceptionType1) - } - (*out.E1).UnmarshalEasyJSON(in) - } - case "e2": - if in.IsNull() { - in.Skip() - out.E2 = nil - } else { - if out.E2 == nil { - out.E2 = new(EndpointExceptionType2) - } - (*out.E2).UnmarshalEasyJSON(in) - } - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptionsWithExceptionsFunc1(out *jwriter.Writer, in WithExceptions_Func1_Result) { - out.RawByte('{') - first := true - _ = first - if in.Success != nil { - const prefix string = ",\"success\":" - first = false - out.RawString(prefix[1:]) - (*in.Success).MarshalEasyJSON(out) - } - if in.E1 != nil { - const prefix string = ",\"e1\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.E1).MarshalEasyJSON(out) - } - if in.E2 != nil { - const prefix string = ",\"e2\":" - if first { - first = false - out.RawString(prefix[1:]) - } else { - out.RawString(prefix) - } - (*in.E2).MarshalEasyJSON(out) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v WithExceptions_Func1_Result) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptionsWithExceptionsFunc1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v WithExceptions_Func1_Result) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptionsWithExceptionsFunc1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *WithExceptions_Func1_Result) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptionsWithExceptionsFunc1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *WithExceptions_Func1_Result) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptionsWithExceptionsFunc1(l, v) -} -func easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptionsWithExceptionsFunc11(in *jlexer.Lexer, out *WithExceptions_Func1_Args) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptionsWithExceptionsFunc11(out *jwriter.Writer, in WithExceptions_Func1_Args) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v WithExceptions_Func1_Args) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptionsWithExceptionsFunc11(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v WithExceptions_Func1_Args) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptionsWithExceptionsFunc11(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *WithExceptions_Func1_Args) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptionsWithExceptionsFunc11(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *WithExceptions_Func1_Args) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptionsWithExceptionsFunc11(l, v) -} -func easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptions(in *jlexer.Lexer, out *Response) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } -} -func easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptions(out *jwriter.Writer, in Response) { - out.RawByte('{') - first := true - _ = first - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v Response) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptions(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v Response) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptions(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *Response) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptions(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *Response) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptions(l, v) -} -func easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptions1(in *jlexer.Lexer, out *EndpointExceptionType2) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var Message2Set bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "message2": - out.Message2 = string(in.String()) - Message2Set = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !Message2Set { - in.AddError(fmt.Errorf("key 'message2' is required")) - } -} -func easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptions1(out *jwriter.Writer, in EndpointExceptionType2) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"message2\":" - out.RawString(prefix[1:]) - out.String(string(in.Message2)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EndpointExceptionType2) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptions1(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EndpointExceptionType2) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptions1(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EndpointExceptionType2) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptions1(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EndpointExceptionType2) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptions1(l, v) -} -func easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptions2(in *jlexer.Lexer, out *EndpointExceptionType1) { - isTopLevel := in.IsStart() - if in.IsNull() { - if isTopLevel { - in.Consumed() - } - in.Skip() - return - } - var Message1Set bool - in.Delim('{') - for !in.IsDelim('}') { - key := in.UnsafeString() - in.WantColon() - if in.IsNull() { - in.Skip() - in.WantComma() - continue - } - switch key { - case "message1": - out.Message1 = string(in.String()) - Message1Set = true - default: - in.SkipRecursive() - } - in.WantComma() - } - in.Delim('}') - if isTopLevel { - in.Consumed() - } - if !Message1Set { - in.AddError(fmt.Errorf("key 'message1' is required")) - } -} -func easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptions2(out *jwriter.Writer, in EndpointExceptionType1) { - out.RawByte('{') - first := true - _ = first - { - const prefix string = ",\"message1\":" - out.RawString(prefix[1:]) - out.String(string(in.Message1)) - } - out.RawByte('}') -} - -// MarshalJSON supports json.Marshaler interface -func (v EndpointExceptionType1) MarshalJSON() ([]byte, error) { - w := jwriter.Writer{} - easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptions2(&w, v) - return w.Buffer.BuildBytes(), w.Error -} - -// MarshalEasyJSON supports easyjson.Marshaler interface -func (v EndpointExceptionType1) MarshalEasyJSON(w *jwriter.Writer) { - easyjsonD396a41aEncodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptions2(w, v) -} - -// UnmarshalJSON supports json.Unmarshaler interface -func (v *EndpointExceptionType1) UnmarshalJSON(data []byte) error { - r := jlexer.Lexer{Data: data} - easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptions2(&r, v) - return r.Error() -} - -// UnmarshalEasyJSON supports easyjson.Unmarshaler interface -func (v *EndpointExceptionType1) UnmarshalEasyJSON(l *jlexer.Lexer) { - easyjsonD396a41aDecodeGithubComUberZanzibarExamplesExampleGatewayBuildGenCodeEndpointsWithexceptionsWithexceptions2(l, v) -} diff --git a/examples/example-gateway/endpoints/clientless/clientless_test.go b/examples/example-gateway/endpoints/clientless/clientless_test.go index bdeb3da96..fdbf7284a 100644 --- a/examples/example-gateway/endpoints/clientless/clientless_test.go +++ b/examples/example-gateway/endpoints/clientless/clientless_test.go @@ -2,6 +2,7 @@ package clientless_test import ( "bytes" + "encoding/json" "io/ioutil" "testing" @@ -24,7 +25,7 @@ func TestClientlessEndpointCall(t *testing.T) { LastName: &ln, }, } - rawBody, _ := endpointRequest.MarshalJSON() + rawBody, _ := json.Marshal(endpointRequest) res, err := ms.MakeHTTPRequest( "POST", "/clientless/post-request", nil, bytes.NewReader(rawBody), ) diff --git a/examples/example-gateway/endpoints/contacts/save_contacts_test.go b/examples/example-gateway/endpoints/contacts/save_contacts_test.go index 12f7c1864..caebd1f34 100644 --- a/examples/example-gateway/endpoints/contacts/save_contacts_test.go +++ b/examples/example-gateway/endpoints/contacts/save_contacts_test.go @@ -3,6 +3,7 @@ package contacts_test import ( "bytes" "context" + "encoding/json" "testing" "github.com/stretchr/testify/assert" @@ -24,7 +25,7 @@ func TestSaveContactsCall(t *testing.T) { Contacts: []*endpointContacts.Contact{}, }, } - rawBody, _ := endpointRequest.MarshalJSON() + rawBody, _ := json.Marshal(endpointRequest) res, err := ms.MakeHTTPRequest( "POST", "/contacts/foo/contacts", nil, bytes.NewReader(rawBody), diff --git a/glide.yaml b/glide.yaml index c5ffaf6ad..a1836353b 100644 --- a/glide.yaml +++ b/glide.yaml @@ -20,7 +20,7 @@ import: - package: github.com/kardianos/osext version: master - package: go.uber.org/thriftrw - version: ^v1.16.0 + version: ^v1.23.0 - package: github.com/uber/tchannel-go version: ^1.5.0 - package: github.com/opentracing/opentracing-go diff --git a/runtime/server_http_request.go b/runtime/server_http_request.go index c66184461..9e3c1d84a 100644 --- a/runtime/server_http_request.go +++ b/runtime/server_http_request.go @@ -717,7 +717,7 @@ func (req *ServerHTTPRequest) HasQueryValue(key string) bool { // ReadAndUnmarshalBody will try to unmarshal into struct or fail func (req *ServerHTTPRequest) ReadAndUnmarshalBody( - body json.Unmarshaler, + body interface{}, ) bool { rawBody, success := req.ReadAll() if !success { @@ -751,9 +751,10 @@ func (req *ServerHTTPRequest) ReadAll() ([]byte, bool) { // UnmarshalBody helper to unmarshal body into struct func (req *ServerHTTPRequest) UnmarshalBody( - body json.Unmarshaler, rawBody []byte, + body interface{}, rawBody []byte, ) bool { - err := body.UnmarshalJSON(rawBody) + + err := json.Unmarshal(rawBody, body) if err != nil { req.logger.Warn("Could not parse json", zap.Error(err)) if !req.parseFailed { diff --git a/runtime/server_http_response.go b/runtime/server_http_response.go index 352d3fb73..0da85c358 100644 --- a/runtime/server_http_response.go +++ b/runtime/server_http_response.go @@ -205,7 +205,7 @@ func (res *ServerHTTPResponse) WriteJSONBytes( // WriteJSON writes a json serializable struct to Response func (res *ServerHTTPResponse) WriteJSON( - statusCode int, headers Header, body json.Marshaler, + statusCode int, headers Header, body interface{}, ) { if body == nil { res.SendError(500, "Could not serialize json response", errors.New("No Body JSON")) @@ -213,7 +213,7 @@ func (res *ServerHTTPResponse) WriteJSON( return } - bytes, err := body.MarshalJSON() + bytes, err := json.Marshal(body) if err != nil { res.SendError(500, "Could not serialize json response", err) res.logger.Error("Could not serialize json response", zap.Error(err)) diff --git a/runtime/server_http_response_test.go b/runtime/server_http_response_test.go index 66c17a62a..445357b83 100644 --- a/runtime/server_http_response_test.go +++ b/runtime/server_http_response_test.go @@ -220,7 +220,7 @@ func TestCallWriteJSONWithBadJSON(t *testing.T) { lineStruct := logLines[0] errorText := lineStruct["error"].(string) - assert.Equal(t, "cannot serialize", errorText) + assert.Equal(t, "json: error calling MarshalJSON for type zanzibar_test.failingJsonObj: cannot serialize", errorText) } //easyjson:json diff --git a/test/endpoints/baz/baz_simpleservice_method_compare_test.go b/test/endpoints/baz/baz_simpleservice_method_compare_test.go index 0ef58e6e9..4f5dc7a4f 100644 --- a/test/endpoints/baz/baz_simpleservice_method_compare_test.go +++ b/test/endpoints/baz/baz_simpleservice_method_compare_test.go @@ -196,5 +196,5 @@ func TestCompareInvalidArgs(t *testing.T) { ) assert.Nil(t, err) - assert.Equal(t, 400, res.StatusCode) + assert.Equal(t, 500, res.StatusCode) } diff --git a/test/endpoints/clientless/clientless_test.go b/test/endpoints/clientless/clientless_test.go index 7f6e3991d..2251ee5e7 100644 --- a/test/endpoints/clientless/clientless_test.go +++ b/test/endpoints/clientless/clientless_test.go @@ -22,6 +22,7 @@ package clientless_test import ( "bytes" + "encoding/json" "io/ioutil" "testing" @@ -52,7 +53,7 @@ func TestClientlessEndpointCall(t *testing.T) { }, } - rawBody, _ := endpointRequest.MarshalJSON() + rawBody, _ := json.Marshal(endpointRequest) res, err := gateway.MakeRequest( "POST", "/clientless/post-request", nil, bytes.NewReader(rawBody), ) diff --git a/test/endpoints/contacts/save_contacts_test.go b/test/endpoints/contacts/save_contacts_test.go index c781d037a..d8f5407c9 100644 --- a/test/endpoints/contacts/save_contacts_test.go +++ b/test/endpoints/contacts/save_contacts_test.go @@ -22,6 +22,7 @@ package save_contacts_test import ( "bytes" + "encoding/json" "io/ioutil" "net/http" "testing" @@ -118,7 +119,7 @@ func TestSaveContactsCall(t *testing.T) { Contacts: []*endpointContacts.Contact{}, }, } - rawBody, _ := saveContacts.MarshalJSON() + rawBody, _ := json.Marshal(saveContacts) res, err := gateway.MakeRequest( "POST", "/contacts/foo/contacts", nil, bytes.NewReader(rawBody), diff --git a/test/endpoints/googlenow/googlenow_test.go b/test/endpoints/googlenow/googlenow_test.go index 6a3bf49a0..26d7480f0 100644 --- a/test/endpoints/googlenow/googlenow_test.go +++ b/test/endpoints/googlenow/googlenow_test.go @@ -30,6 +30,7 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/assert" + benchGateway "github.com/uber/zanzibar/test/lib/bench_gateway" testGateway "github.com/uber/zanzibar/test/lib/test_gateway" "github.com/uber/zanzibar/test/lib/util" @@ -256,8 +257,8 @@ func TestGoogleNowFailJSONParsing(t *testing.T) { } assert.Equal(t, - "{\"error\":\"Could not parse json: parse error: "+ - "syntax error near offset 0 of 'bad bytes'\"}", + "{\"error\":\"Could not parse json: "+ + "invalid character 'b' looking for beginning of value\"}", string(respBytes), ) } @@ -311,8 +312,8 @@ func TestAddCredentialsMissingAuthCode(t *testing.T) { return } - assert.Equal(t, "400 Bad Request", res.Status) - assert.Equal(t, 0, counter) + assert.Equal(t, "500 Internal Server Error", res.Status) + assert.Equal(t, 1, counter) res2, err2 := gateway.MakeRequest( "POST", "/googlenow/add-credentials", headers, @@ -323,7 +324,7 @@ func TestAddCredentialsMissingAuthCode(t *testing.T) { } assert.Equal(t, "202 Accepted", res2.Status) - assert.Equal(t, 1, counter) + assert.Equal(t, 2, counter) } func TestAddCredentialsBackendDown(t *testing.T) {