diff --git a/CHANGELOG.md b/CHANGELOG.md index 26ecaceffeb8..1e52621cc53f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,15 @@ Ref: https://keepachangelog.com/en/1.0.0/ * (x/staking) [\#7499](https://github.com/cosmos/cosmos-sdk/pull/7499) `BondStatus` is now a protobuf `enum` instead of an `int32`, and JSON serialized using its protobuf name, so expect names like `BOND_STATUS_UNBONDING` as opposed to `Unbonding`. +### API Breaking + +* (AppModule) [\#7518](https://github.com/cosmos/cosmos-sdk/pull/7518) Rename `AppModule.RegisterQueryServices` to `AppModule.RegisterServices`, as this method now registers multiple services (the gRPC query service and the protobuf Msg service). A `Configurator` struct is used to hold the different services. + +### Features + +* (codec) [\#7519](https://github.com/cosmos/cosmos-sdk/pull/7519) `InterfaceRegistry` now inherits `jsonpb.AnyResolver`, and has a `RegisterCustomTypeURL` method to support ADR 031 packing of `Any`s. `AnyResolver` is now a required parameter to `RejectUnknownFields`. +* (baseapp) [\#7519](https://github.com/cosmos/cosmos-sdk/pull/7519) Add `ServiceMsgRouter` to BaseApp to handle routing of protobuf service `Msg`s. The two new types defined in ADR 031, `sdk.ServiceMsg` and `sdk.MsgRequest` are introduced with this router. + ### Bug Fixes * (kvstore) [\#7415](https://github.com/cosmos/cosmos-sdk/pull/7415) Allow new stores to be registered during on-chain upgrades. diff --git a/baseapp/abci.go b/baseapp/abci.go index e3a07d620406..07c6be72b253 100644 --- a/baseapp/abci.go +++ b/baseapp/abci.go @@ -688,7 +688,7 @@ func handleQueryApp(app *BaseApp, path []string, req abci.RequestQuery) abci.Res Result: res, } - bz, err := codec.ProtoMarshalJSON(simRes) + bz, err := codec.ProtoMarshalJSON(simRes, app.interfaceRegistry) if err != nil { return sdkerrors.QueryResult(sdkerrors.Wrap(err, "failed to JSON encode simulation response")) } diff --git a/baseapp/baseapp.go b/baseapp/baseapp.go index 23a9d1dd8d56..f215868654df 100644 --- a/baseapp/baseapp.go +++ b/baseapp/baseapp.go @@ -13,6 +13,7 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" + "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/snapshots" "github.com/cosmos/cosmos-sdk/store" "github.com/cosmos/cosmos-sdk/store/rootmulti" @@ -45,15 +46,17 @@ type ( // BaseApp reflects the ABCI application implementation. type BaseApp struct { // nolint: maligned // initialized on creation - logger log.Logger - name string // application name from abci.Info - db dbm.DB // common DB backend - cms sdk.CommitMultiStore // Main (uncached) state - storeLoader StoreLoader // function to handle store loading, may be overridden with SetStoreLoader() - router sdk.Router // handle any kind of message - queryRouter sdk.QueryRouter // router for redirecting query calls - grpcQueryRouter *GRPCQueryRouter // router for redirecting gRPC query calls - txDecoder sdk.TxDecoder // unmarshal []byte into sdk.Tx + logger log.Logger + name string // application name from abci.Info + db dbm.DB // common DB backend + cms sdk.CommitMultiStore // Main (uncached) state + storeLoader StoreLoader // function to handle store loading, may be overridden with SetStoreLoader() + router sdk.Router // handle any kind of message + queryRouter sdk.QueryRouter // router for redirecting query calls + grpcQueryRouter *GRPCQueryRouter // router for redirecting gRPC query calls + msgServiceRouter *MsgServiceRouter // router for redirecting Msg service messages + interfaceRegistry types.InterfaceRegistry + txDecoder sdk.TxDecoder // unmarshal []byte into sdk.Tx anteHandler sdk.AnteHandler // ante handler for fee and auth initChainer sdk.InitChainer // initialize state with validators and state blob @@ -136,16 +139,17 @@ func NewBaseApp( name string, logger log.Logger, db dbm.DB, txDecoder sdk.TxDecoder, options ...func(*BaseApp), ) *BaseApp { app := &BaseApp{ - logger: logger, - name: name, - db: db, - cms: store.NewCommitMultiStore(db), - storeLoader: DefaultStoreLoader, - router: NewRouter(), - queryRouter: NewQueryRouter(), - grpcQueryRouter: NewGRPCQueryRouter(), - txDecoder: txDecoder, - fauxMerkleMode: false, + logger: logger, + name: name, + db: db, + cms: store.NewCommitMultiStore(db), + storeLoader: DefaultStoreLoader, + router: NewRouter(), + queryRouter: NewQueryRouter(), + grpcQueryRouter: NewGRPCQueryRouter(), + msgServiceRouter: NewMsgServiceRouter(), + txDecoder: txDecoder, + fauxMerkleMode: false, } for _, option := range options { @@ -176,6 +180,9 @@ func (app *BaseApp) Logger() log.Logger { return app.logger } +// MsgServiceRouter returns the MsgServiceRouter of a BaseApp. +func (app *BaseApp) MsgServiceRouter() *MsgServiceRouter { return app.msgServiceRouter } + // MountStores mounts all IAVL or DB stores to the provided keys in the BaseApp // multistore. func (app *BaseApp) MountStores(keys ...sdk.StoreKey) { @@ -682,20 +689,38 @@ func (app *BaseApp) runMsgs(ctx sdk.Context, msgs []sdk.Msg, mode runTxMode) (*s break } - msgRoute := msg.Route() - handler := app.router.Route(ctx, msgRoute) + var ( + msgEvents sdk.Events + msgResult *sdk.Result + msgFqName string + err error + ) + + if svcMsg, ok := msg.(sdk.ServiceMsg); ok { + msgFqName = svcMsg.MethodName + handler := app.msgServiceRouter.Handler(msgFqName) + if handler == nil { + return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized message service method: %s; message index: %d", msgFqName, i) + } + msgResult, err = handler(ctx, svcMsg.Request) + } else { + // legacy sdk.Msg routing + msgRoute := msg.Route() + msgFqName = msg.Type() + handler := app.router.Route(ctx, msgRoute) + if handler == nil { + return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized message route: %s; message index: %d", msgRoute, i) + } - if handler == nil { - return nil, sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized message route: %s; message index: %d", msgRoute, i) + msgResult, err = handler(ctx, msg) } - msgResult, err := handler(ctx, msg) if err != nil { return nil, sdkerrors.Wrapf(err, "failed to execute message; message index: %d", i) } - msgEvents := sdk.Events{ - sdk.NewEvent(sdk.EventTypeMessage, sdk.NewAttribute(sdk.AttributeKeyAction, msg.Type())), + msgEvents = sdk.Events{ + sdk.NewEvent(sdk.EventTypeMessage, sdk.NewAttribute(sdk.AttributeKeyAction, msgFqName)), } msgEvents = msgEvents.AppendEvents(msgResult.GetEvents()) diff --git a/baseapp/baseapp_test.go b/baseapp/baseapp_test.go index 233fbabc4212..32c1ce239558 100644 --- a/baseapp/baseapp_test.go +++ b/baseapp/baseapp_test.go @@ -1692,9 +1692,9 @@ func TestQuery(t *testing.T) { func TestGRPCQuery(t *testing.T) { grpcQueryOpt := func(bapp *BaseApp) { - testdata.RegisterTestServiceServer( + testdata.RegisterQueryServer( bapp.GRPCQueryRouter(), - testdata.TestServiceImpl{}, + testdata.QueryImpl{}, ) } @@ -1711,7 +1711,7 @@ func TestGRPCQuery(t *testing.T) { reqQuery := abci.RequestQuery{ Data: reqBz, - Path: "/testdata.TestService/SayHello", + Path: "/testdata.Query/SayHello", } resQuery := app.Query(reqQuery) diff --git a/baseapp/grpcrouter_helpers.go b/baseapp/grpcrouter_helpers.go index 5d4048e0ed1f..bd7d498e7aee 100644 --- a/baseapp/grpcrouter_helpers.go +++ b/baseapp/grpcrouter_helpers.go @@ -4,12 +4,11 @@ import ( gocontext "context" "fmt" - "github.com/cosmos/cosmos-sdk/codec/types" - gogogrpc "github.com/gogo/protobuf/grpc" abci "github.com/tendermint/tendermint/abci/types" "google.golang.org/grpc" + "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -22,6 +21,11 @@ type QueryServiceTestHelper struct { ctx sdk.Context } +var ( + _ gogogrpc.Server = &QueryServiceTestHelper{} + _ gogogrpc.ClientConn = &QueryServiceTestHelper{} +) + // NewQueryServerTestHelper creates a new QueryServiceTestHelper that wraps // the provided sdk.Context func NewQueryServerTestHelper(ctx sdk.Context, interfaceRegistry types.InterfaceRegistry) *QueryServiceTestHelper { @@ -62,6 +66,3 @@ func (q *QueryServiceTestHelper) Invoke(_ gocontext.Context, method string, args func (q *QueryServiceTestHelper) NewStream(gocontext.Context, *grpc.StreamDesc, string, ...grpc.CallOption) (grpc.ClientStream, error) { return nil, fmt.Errorf("not supported") } - -var _ gogogrpc.Server = &QueryServiceTestHelper{} -var _ gogogrpc.ClientConn = &QueryServiceTestHelper{} diff --git a/baseapp/grpcrouter_test.go b/baseapp/grpcrouter_test.go index 8761780f9f8a..d2051a113239 100644 --- a/baseapp/grpcrouter_test.go +++ b/baseapp/grpcrouter_test.go @@ -15,12 +15,12 @@ func TestGRPCRouter(t *testing.T) { qr := NewGRPCQueryRouter() interfaceRegistry := testdata.NewTestInterfaceRegistry() qr.SetInterfaceRegistry(interfaceRegistry) - testdata.RegisterTestServiceServer(qr, testdata.TestServiceImpl{}) + testdata.RegisterQueryServer(qr, testdata.QueryImpl{}) helper := &QueryServiceTestHelper{ GRPCQueryRouter: qr, ctx: sdk.Context{}.WithContext(context.Background()), } - client := testdata.NewTestServiceClient(helper) + client := testdata.NewQueryClient(helper) res, err := client.Echo(context.Background(), &testdata.EchoRequest{Message: "hello"}) require.Nil(t, err) diff --git a/baseapp/msg_service_router.go b/baseapp/msg_service_router.go new file mode 100644 index 000000000000..efc108881bda --- /dev/null +++ b/baseapp/msg_service_router.go @@ -0,0 +1,94 @@ +package baseapp + +import ( + "context" + "fmt" + + "github.com/gogo/protobuf/proto" + + gogogrpc "github.com/gogo/protobuf/grpc" + "google.golang.org/grpc" + + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// MsgServiceRouter routes fully-qualified Msg service methods to their handler. +type MsgServiceRouter struct { + interfaceRegistry codectypes.InterfaceRegistry + routes map[string]MsgServiceHandler +} + +var _ gogogrpc.Server = &MsgServiceRouter{} + +// NewMsgServiceRouter creates a new MsgServiceRouter. +func NewMsgServiceRouter() *MsgServiceRouter { + return &MsgServiceRouter{ + routes: map[string]MsgServiceHandler{}, + } +} + +// MsgServiceHandler defines a function type which handles Msg service message. +type MsgServiceHandler = func(ctx sdk.Context, req sdk.MsgRequest) (*sdk.Result, error) + +// Handler returns the MsgServiceHandler for a given query route path or nil +// if not found. +func (msr *MsgServiceRouter) Handler(methodName string) MsgServiceHandler { + return msr.routes[methodName] +} + +// RegisterService implements the gRPC Server.RegisterService method. sd is a gRPC +// service description, handler is an object which implements that gRPC service. +func (msr *MsgServiceRouter) RegisterService(sd *grpc.ServiceDesc, handler interface{}) { + // Adds a top-level query handler based on the gRPC service name. + for _, method := range sd.Methods { + fqMethod := fmt.Sprintf("/%s/%s", sd.ServiceName, method.MethodName) + methodHandler := method.Handler + + // NOTE: This is how we pull the concrete request type for each handler for registering in the InterfaceRegistry. + // This approach is maybe a bit hacky, but less hacky than reflecting on the handler object itself. + // We use a no-op interceptor to avoid actually calling into the handler itself. + _, _ = methodHandler(nil, context.Background(), func(i interface{}) error { + msg, ok := i.(proto.Message) + if !ok { + // We panic here because there is no other alternative and the app cannot be initialized correctly + // this should only happen if there is a problem with code generation in which case the app won't + // work correctly anyway. + panic(fmt.Errorf("can't register request type %T for service method %s", i, fqMethod)) + } + + msr.interfaceRegistry.RegisterCustomTypeURL((*sdk.MsgRequest)(nil), fqMethod, msg) + return nil + }, func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) { + return nil, nil + }) + + msr.routes[fqMethod] = func(ctx sdk.Context, req sdk.MsgRequest) (*sdk.Result, error) { + ctx = ctx.WithEventManager(sdk.NewEventManager()) + + // Call the method handler from the service description with the handler object. + res, err := methodHandler(handler, sdk.WrapSDKContext(ctx), func(_ interface{}) error { + // We don't do any decoding here because the decoding was already done. + return nil + }, func(goCtx context.Context, _ interface{}, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { + goCtx = context.WithValue(goCtx, sdk.SdkContextKey, ctx) + return handler(goCtx, req) + }) + if err != nil { + return nil, err + } + + resMsg, ok := res.(proto.Message) + if !ok { + return nil, fmt.Errorf("can't proto encode %T", resMsg) + } + + return sdk.WrapServiceResult(ctx, resMsg, err) + } + } +} + +// SetInterfaceRegistry sets the interface registry for the router. +func (msr *MsgServiceRouter) SetInterfaceRegistry(interfaceRegistry codectypes.InterfaceRegistry) { + msr.interfaceRegistry = interfaceRegistry +} diff --git a/baseapp/msg_service_router_test.go b/baseapp/msg_service_router_test.go new file mode 100644 index 000000000000..f0f9be57b43f --- /dev/null +++ b/baseapp/msg_service_router_test.go @@ -0,0 +1,74 @@ +package baseapp_test + +import ( + "os" + "testing" + + "github.com/cosmos/cosmos-sdk/baseapp" + + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + + "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" + dbm "github.com/tendermint/tm-db" + + "github.com/cosmos/cosmos-sdk/client/tx" + "github.com/cosmos/cosmos-sdk/simapp" + "github.com/cosmos/cosmos-sdk/testutil/testdata" + "github.com/cosmos/cosmos-sdk/types/tx/signing" + authsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" +) + +func TestMsgService(t *testing.T) { + priv, _, _ := testdata.KeyTestPubAddr() + encCfg := simapp.MakeEncodingConfig() + db := dbm.NewMemDB() + app := baseapp.NewBaseApp("test", log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, encCfg.TxConfig.TxDecoder()) + app.SetInterfaceRegistry(encCfg.InterfaceRegistry) + testdata.RegisterMsgServer( + app.MsgServiceRouter(), + testdata.MsgServerImpl{}, + ) + _ = app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: 1}}) + + msg := testdata.NewServiceMsgCreateDog(&testdata.MsgCreateDog{Dog: &testdata.Dog{Name: "Spot"}}) + txBuilder := encCfg.TxConfig.NewTxBuilder() + txBuilder.SetFeeAmount(testdata.NewTestFeeAmount()) + txBuilder.SetGasLimit(testdata.NewTestGasLimit()) + err := txBuilder.SetMsgs(msg) + require.NoError(t, err) + + // First round: we gather all the signer infos. We use the "set empty + // signature" hack to do that. + sigV2 := signing.SignatureV2{ + PubKey: priv.PubKey(), + Data: &signing.SingleSignatureData{ + SignMode: encCfg.TxConfig.SignModeHandler().DefaultMode(), + Signature: nil, + }, + Sequence: 0, + } + + err = txBuilder.SetSignatures(sigV2) + require.NoError(t, err) + + // Second round: all signer infos are set, so each signer can sign. + signerData := authsigning.SignerData{ + ChainID: "test", + AccountNumber: 0, + Sequence: 0, + } + sigV2, err = tx.SignWithPrivKey( + encCfg.TxConfig.SignModeHandler().DefaultMode(), signerData, + txBuilder, priv, encCfg.TxConfig, 0) + require.NoError(t, err) + err = txBuilder.SetSignatures(sigV2) + require.NoError(t, err) + + // Send the tx to the app + txBytes, err := encCfg.TxConfig.TxEncoder()(txBuilder.GetTx()) + require.NoError(t, err) + res := app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) + require.Equal(t, abci.CodeTypeOK, res.Code, "res=%+v", res) +} diff --git a/baseapp/options.go b/baseapp/options.go index 026433ae5bed..008af9a18535 100644 --- a/baseapp/options.go +++ b/baseapp/options.go @@ -6,6 +6,7 @@ import ( dbm "github.com/tendermint/tm-db" + "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/snapshots" "github.com/cosmos/cosmos-sdk/store" sdk "github.com/cosmos/cosmos-sdk/types" @@ -221,3 +222,10 @@ func (app *BaseApp) SetSnapshotKeepRecent(snapshotKeepRecent uint32) { } app.snapshotKeepRecent = snapshotKeepRecent } + +// SetInterfaceRegistry sets the InterfaceRegistry. +func (app *BaseApp) SetInterfaceRegistry(registry types.InterfaceRegistry) { + app.interfaceRegistry = registry + app.grpcQueryRouter.SetInterfaceRegistry(registry) + app.msgServiceRouter.SetInterfaceRegistry(registry) +} diff --git a/client/context_test.go b/client/context_test.go index 79f6de5d0dfe..c4628d0ef2d7 100644 --- a/client/context_test.go +++ b/client/context_test.go @@ -108,7 +108,7 @@ func TestCLIQueryConn(t *testing.T) { n := network.New(t, cfg) defer n.Cleanup() - testClient := testdata.NewTestServiceClient(n.Validators[0].ClientCtx) + testClient := testdata.NewQueryClient(n.Validators[0].ClientCtx) res, err := testClient.Echo(context.Background(), &testdata.EchoRequest{Message: "hello"}) require.NoError(t, err) require.Equal(t, "hello", res.Message) diff --git a/client/grpc_query_test.go b/client/grpc_query_test.go index d98a73fbf2e5..c4d2f024a07b 100644 --- a/client/grpc_query_test.go +++ b/client/grpc_query_test.go @@ -43,7 +43,7 @@ func (s *IntegrationTestSuite) TestGRPCQuery() { val0 := s.network.Validators[0] // gRPC query to test service should work - testClient := testdata.NewTestServiceClient(val0.ClientCtx) + testClient := testdata.NewQueryClient(val0.ClientCtx) testRes, err := testClient.Echo(context.Background(), &testdata.EchoRequest{Message: "hello"}) s.Require().NoError(err) s.Require().Equal("hello", testRes.Message) diff --git a/codec/json.go b/codec/json.go index 044a6ae2b87e..db77365e0356 100644 --- a/codec/json.go +++ b/codec/json.go @@ -11,10 +11,10 @@ import ( // ProtoMarshalJSON provides an auxiliary function to return Proto3 JSON encoded // bytes of a message. -func ProtoMarshalJSON(msg proto.Message) ([]byte, error) { +func ProtoMarshalJSON(msg proto.Message, resolver jsonpb.AnyResolver) ([]byte, error) { // We use the OrigName because camel casing fields just doesn't make sense. // EmitDefaults is also often the more expected behavior for CLI users - jm := &jsonpb.Marshaler{OrigName: true, EmitDefaults: true} + jm := &jsonpb.Marshaler{OrigName: true, EmitDefaults: true, AnyResolver: resolver} err := types.UnpackInterfaces(msg, types.ProtoJSONPacker{JSONPBMarshaler: jm}) if err != nil { return nil, err diff --git a/codec/proto_codec.go b/codec/proto_codec.go index 02677af3627c..c9123f5d754c 100644 --- a/codec/proto_codec.go +++ b/codec/proto_codec.go @@ -14,14 +14,14 @@ import ( // ProtoCodec defines a codec that utilizes Protobuf for both binary and JSON // encoding. type ProtoCodec struct { - anyUnpacker types.AnyUnpacker + interfaceRegistry types.InterfaceRegistry } var _ Marshaler = &ProtoCodec{} // NewProtoCodec returns a reference to a new ProtoCodec -func NewProtoCodec(anyUnpacker types.AnyUnpacker) *ProtoCodec { - return &ProtoCodec{anyUnpacker: anyUnpacker} +func NewProtoCodec(interfaceRegistry types.InterfaceRegistry) *ProtoCodec { + return &ProtoCodec{interfaceRegistry: interfaceRegistry} } // MarshalBinaryBare implements BinaryMarshaler.MarshalBinaryBare method. @@ -67,7 +67,7 @@ func (pc *ProtoCodec) UnmarshalBinaryBare(bz []byte, ptr ProtoMarshaler) error { if err != nil { return err } - err = types.UnpackInterfaces(ptr, pc.anyUnpacker) + err = types.UnpackInterfaces(ptr, pc.interfaceRegistry) if err != nil { return err } @@ -113,7 +113,7 @@ func (pc *ProtoCodec) MarshalJSON(o proto.Message) ([]byte, error) { return nil, fmt.Errorf("cannot protobuf JSON encode unsupported type: %T", o) } - return ProtoMarshalJSON(m) + return ProtoMarshalJSON(m, pc.interfaceRegistry) } // MustMarshalJSON implements JSONMarshaler.MustMarshalJSON method, @@ -135,12 +135,13 @@ func (pc *ProtoCodec) UnmarshalJSON(bz []byte, ptr proto.Message) error { return fmt.Errorf("cannot protobuf JSON decode unsupported type: %T", ptr) } - err := jsonpb.Unmarshal(strings.NewReader(string(bz)), m) + unmarshaler := jsonpb.Unmarshaler{AnyResolver: pc.interfaceRegistry} + err := unmarshaler.Unmarshal(strings.NewReader(string(bz)), m) if err != nil { return err } - return types.UnpackInterfaces(ptr, pc.anyUnpacker) + return types.UnpackInterfaces(ptr, pc.interfaceRegistry) } // MustUnmarshalJSON implements JSONMarshaler.MustUnmarshalJSON method, @@ -155,5 +156,9 @@ func (pc *ProtoCodec) MustUnmarshalJSON(bz []byte, ptr proto.Message) { // it unpacks the value in any to the interface pointer passed in as // iface. func (pc *ProtoCodec) UnpackAny(any *types.Any, iface interface{}) error { - return pc.anyUnpacker.UnpackAny(any, iface) + return pc.interfaceRegistry.UnpackAny(any, iface) +} + +func (pc *ProtoCodec) InterfaceRegistry() types.InterfaceRegistry { + return pc.interfaceRegistry } diff --git a/codec/types/interface_registry.go b/codec/types/interface_registry.go index 8bdb8168f5d5..966e935692b4 100644 --- a/codec/types/interface_registry.go +++ b/codec/types/interface_registry.go @@ -4,6 +4,8 @@ import ( "fmt" "reflect" + "github.com/gogo/protobuf/jsonpb" + "github.com/gogo/protobuf/proto" ) @@ -24,6 +26,7 @@ type AnyUnpacker interface { // implementations that can be safely unpacked from Any type InterfaceRegistry interface { AnyUnpacker + jsonpb.AnyResolver // RegisterInterface associates protoName as the public name for the // interface passed in as iface. This is to be used primarily to create @@ -43,6 +46,17 @@ type InterfaceRegistry interface { // registry.RegisterImplementations((*sdk.Msg)(nil), &MsgSend{}, &MsgMultiSend{}) RegisterImplementations(iface interface{}, impls ...proto.Message) + // RegisterCustomTypeURL allows a protobuf message to be registered as a + // google.protobuf.Any with a custom typeURL (besides its own canonical + // typeURL). iface should be an interface as type, as in RegisterInterface + // and RegisterImplementations. + // + // Ex: + // This will allow us to pack service methods in Any's using the full method name + // as the type URL and the request body as the value, and allow us to unpack + // such packed methods using the normal UnpackAny method for the interface iface. + RegisterCustomTypeURL(iface interface{}, typeURL string, impl proto.Message) + // ListAllInterfaces list the type URLs of all registered interfaces. ListAllInterfaces() []string @@ -78,6 +92,7 @@ type UnpackInterfacesMessage interface { type interfaceRegistry struct { interfaceNames map[string]reflect.Type interfaceImpls map[reflect.Type]interfaceMap + typeURLMap map[string]reflect.Type } type interfaceMap = map[string]reflect.Type @@ -87,6 +102,7 @@ func NewInterfaceRegistry() InterfaceRegistry { return &interfaceRegistry{ interfaceNames: map[string]reflect.Type{}, interfaceImpls: map[reflect.Type]interfaceMap{}, + typeURLMap: map[string]reflect.Type{}, } } @@ -100,21 +116,31 @@ func (registry *interfaceRegistry) RegisterInterface(protoName string, iface int } func (registry *interfaceRegistry) RegisterImplementations(iface interface{}, impls ...proto.Message) { + for _, impl := range impls { + typeURL := "/" + proto.MessageName(impl) + registry.registerImpl(iface, typeURL, impl) + } +} + +func (registry *interfaceRegistry) RegisterCustomTypeURL(iface interface{}, typeURL string, impl proto.Message) { + registry.registerImpl(iface, typeURL, impl) +} + +func (registry *interfaceRegistry) registerImpl(iface interface{}, typeURL string, impl proto.Message) { ityp := reflect.TypeOf(iface).Elem() imap, found := registry.interfaceImpls[ityp] if !found { imap = map[string]reflect.Type{} } - for _, impl := range impls { - implType := reflect.TypeOf(impl) - if !implType.AssignableTo(ityp) { - panic(fmt.Errorf("type %T doesn't actually implement interface %+v", impl, ityp)) - } - - imap["/"+proto.MessageName(impl)] = implType + implType := reflect.TypeOf(impl) + if !implType.AssignableTo(ityp) { + panic(fmt.Errorf("type %T doesn't actually implement interface %+v", impl, ityp)) } + imap[typeURL] = implType + registry.typeURLMap[typeURL] = implType + registry.interfaceImpls[ityp] = imap } @@ -198,6 +224,23 @@ func (registry *interfaceRegistry) UnpackAny(any *Any, iface interface{}) error return nil } +// Resolve returns the proto message given its typeURL. It works with types +// registered with RegisterInterface/RegisterImplementations, as well as those +// registered with RegisterWithCustomTypeURL. +func (registry *interfaceRegistry) Resolve(typeURL string) (proto.Message, error) { + typ, found := registry.typeURLMap[typeURL] + if !found { + return nil, fmt.Errorf("unable to resolve type URL %s", typeURL) + } + + msg, ok := reflect.New(typ.Elem()).Interface().(proto.Message) + if !ok { + return nil, fmt.Errorf("can't resolve type URL %s", typeURL) + } + + return msg, nil +} + // UnpackInterfaces is a convenience function that calls UnpackInterfaces // on x if x implements UnpackInterfacesMessage func UnpackInterfaces(x interface{}, unpacker AnyUnpacker) error { diff --git a/codec/types/types_test.go b/codec/types/types_test.go index 0a14ed3e619f..5e2a0f7f77ee 100644 --- a/codec/types/types_test.go +++ b/codec/types/types_test.go @@ -1,15 +1,20 @@ package types_test import ( + "context" + "fmt" "strings" "testing" + "github.com/gogo/protobuf/grpc" "github.com/gogo/protobuf/jsonpb" - - "github.com/cosmos/cosmos-sdk/codec/types" + "github.com/gogo/protobuf/proto" + grpc2 "google.golang.org/grpc" "github.com/stretchr/testify/require" + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" ) @@ -153,3 +158,60 @@ func TestAny_ProtoJSON(t *testing.T) { require.NoError(t, err) require.Equal(t, spot, ha2.Animal.GetCachedValue()) } + +// this instance of grpc.ClientConn is used to test packing service method +// requests into Any's +type testAnyPackClient struct { + any types.Any + interfaceRegistry types.InterfaceRegistry +} + +var _ grpc.ClientConn = &testAnyPackClient{} + +func (t *testAnyPackClient) Invoke(_ context.Context, method string, args, _ interface{}, _ ...grpc2.CallOption) error { + reqMsg, ok := args.(proto.Message) + if !ok { + return fmt.Errorf("can't proto marshal %T", args) + } + + // registry the method request type with the interface registry + t.interfaceRegistry.RegisterCustomTypeURL((*interface{})(nil), method, reqMsg) + + bz, err := proto.Marshal(reqMsg) + if err != nil { + return err + } + + t.any.TypeUrl = method + t.any.Value = bz + + return nil +} + +func (t *testAnyPackClient) NewStream(context.Context, *grpc2.StreamDesc, string, ...grpc2.CallOption) (grpc2.ClientStream, error) { + return nil, fmt.Errorf("not supported") +} + +func TestAny_ServiceRequestProtoJSON(t *testing.T) { + interfaceRegistry := types.NewInterfaceRegistry() + anyPacker := &testAnyPackClient{interfaceRegistry: interfaceRegistry} + dogMsgClient := testdata.NewMsgClient(anyPacker) + _, err := dogMsgClient.CreateDog(context.Background(), &testdata.MsgCreateDog{Dog: &testdata.Dog{ + Name: "spot", + }}) + require.NoError(t, err) + + // marshal JSON + cdc := codec.NewProtoCodec(interfaceRegistry) + bz, err := cdc.MarshalJSON(&anyPacker.any) + require.NoError(t, err) + require.Equal(t, + `{"@type":"/testdata.Msg/CreateDog","dog":{"size":"","name":"spot"}}`, + string(bz)) + + // unmarshal JSON + var any2 types.Any + err = cdc.UnmarshalJSON(bz, &any2) + require.NoError(t, err) + require.Equal(t, anyPacker.any, any2) +} diff --git a/codec/unknownproto/benchmarks_test.go b/codec/unknownproto/benchmarks_test.go index e2c4b2c19655..373dda7acfd5 100644 --- a/codec/unknownproto/benchmarks_test.go +++ b/codec/unknownproto/benchmarks_test.go @@ -56,7 +56,7 @@ func benchmarkRejectUnknownFields(b *testing.B, parallel bool) { b.ResetTimer() for i := 0; i < b.N; i++ { n1A := new(testdata.Nested1A) - if err := unknownproto.RejectUnknownFieldsStrict(n1BBlob, n1A); err == nil { + if err := unknownproto.RejectUnknownFieldsStrict(n1BBlob, n1A, unknownproto.DefaultAnyResolver{}); err == nil { b.Fatal("expected an error") } b.SetBytes(int64(len(n1BBlob))) @@ -68,7 +68,7 @@ func benchmarkRejectUnknownFields(b *testing.B, parallel bool) { for pb.Next() { // To simulate the conditions of multiple transactions being processed in parallel. n1A := new(testdata.Nested1A) - if err := unknownproto.RejectUnknownFieldsStrict(n1BBlob, n1A); err == nil { + if err := unknownproto.RejectUnknownFieldsStrict(n1BBlob, n1A, unknownproto.DefaultAnyResolver{}); err == nil { b.Fatal("expected an error") } mu.Lock() diff --git a/codec/unknownproto/unknown_fields.go b/codec/unknownproto/unknown_fields.go index 4faaca0b858e..b2e7a0e0693b 100644 --- a/codec/unknownproto/unknown_fields.go +++ b/codec/unknownproto/unknown_fields.go @@ -7,8 +7,10 @@ import ( "fmt" "io/ioutil" "reflect" + "strings" "sync" + "github.com/gogo/protobuf/jsonpb" "github.com/gogo/protobuf/proto" "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" "google.golang.org/protobuf/encoding/protowire" @@ -24,8 +26,9 @@ type descriptorIface interface { // RejectUnknownFieldsStrict rejects any bytes bz with an error that has unknown fields for the provided proto.Message type. // This function traverses inside of messages nested via google.protobuf.Any. It does not do any deserialization of the proto.Message. -func RejectUnknownFieldsStrict(bz []byte, msg proto.Message) error { - _, err := RejectUnknownFields(bz, msg, false) +// An AnyResolver must be provided for traversing inside google.protobuf.Any's. +func RejectUnknownFieldsStrict(bz []byte, msg proto.Message, resolver jsonpb.AnyResolver) error { + _, err := RejectUnknownFields(bz, msg, false, resolver) return err } @@ -34,7 +37,8 @@ func RejectUnknownFieldsStrict(bz []byte, msg proto.Message) error { // hasUnknownNonCriticals will be set to true if non-critical fields were encountered during traversal. This flag can be // used to treat a message with non-critical field different in different security contexts (such as transaction signing). // This function traverses inside of messages nested via google.protobuf.Any. It does not do any deserialization of the proto.Message. -func RejectUnknownFields(bz []byte, msg proto.Message, allowUnknownNonCriticals bool) (hasUnknownNonCriticals bool, err error) { +// An AnyResolver must be provided for traversing inside google.protobuf.Any's. +func RejectUnknownFields(bz []byte, msg proto.Message, allowUnknownNonCriticals bool, resolver jsonpb.AnyResolver) (hasUnknownNonCriticals bool, err error) { if len(bz) == 0 { return hasUnknownNonCriticals, nil } @@ -115,9 +119,12 @@ func RejectUnknownFields(bz []byte, msg proto.Message, allowUnknownNonCriticals _, o := protowire.ConsumeVarint(fieldBytes) fieldBytes = fieldBytes[o:] + var msg proto.Message + var err error + if protoMessageName == ".google.protobuf.Any" { // Firstly typecheck types.Any to ensure nothing snuck in. - hasUnknownNonCriticalsChild, err := RejectUnknownFields(fieldBytes, (*types.Any)(nil), allowUnknownNonCriticals) + hasUnknownNonCriticalsChild, err := RejectUnknownFields(fieldBytes, (*types.Any)(nil), allowUnknownNonCriticals, resolver) hasUnknownNonCriticals = hasUnknownNonCriticals || hasUnknownNonCriticalsChild if err != nil { return hasUnknownNonCriticals, err @@ -129,14 +136,18 @@ func RejectUnknownFields(bz []byte, msg proto.Message, allowUnknownNonCriticals } protoMessageName = any.TypeUrl fieldBytes = any.Value + msg, err = resolver.Resolve(protoMessageName) + if err != nil { + return hasUnknownNonCriticals, err + } + } else { + msg, err = protoMessageForTypeName(protoMessageName[1:]) + if err != nil { + return hasUnknownNonCriticals, err + } } - msg, err := protoMessageForTypeName(protoMessageName[1:]) - if err != nil { - return hasUnknownNonCriticals, err - } - - hasUnknownNonCriticalsChild, err := RejectUnknownFields(fieldBytes, msg, allowUnknownNonCriticals) + hasUnknownNonCriticalsChild, err := RejectUnknownFields(fieldBytes, msg, allowUnknownNonCriticals, resolver) hasUnknownNonCriticals = hasUnknownNonCriticals || hasUnknownNonCriticalsChild if err != nil { return hasUnknownNonCriticals, err @@ -401,3 +412,23 @@ func getDescriptorInfo(desc descriptorIface, msg proto.Message) (map[int32]*desc return tagNumToTypeIndex, md, nil } + +// DefaultAnyResolver is a default implementation of AnyResolver which uses +// the default encoding of type URLs as specified by the protobuf specification. +type DefaultAnyResolver struct{} + +var _ jsonpb.AnyResolver = DefaultAnyResolver{} + +// Resolve is the AnyResolver.Resolve method. +func (d DefaultAnyResolver) Resolve(typeURL string) (proto.Message, error) { + // Only the part of typeURL after the last slash is relevant. + mname := typeURL + if slash := strings.LastIndex(mname, "/"); slash >= 0 { + mname = mname[slash+1:] + } + mt := proto.MessageType(mname) + if mt == nil { + return nil, fmt.Errorf("unknown message type %q", mname) + } + return reflect.New(mt.Elem()).Interface().(proto.Message), nil +} diff --git a/codec/unknownproto/unknown_fields_test.go b/codec/unknownproto/unknown_fields_test.go index 937e8654d5a2..ad3926cedb55 100644 --- a/codec/unknownproto/unknown_fields_test.go +++ b/codec/unknownproto/unknown_fields_test.go @@ -230,7 +230,7 @@ func TestRejectUnknownFieldsRepeated(t *testing.T) { if err != nil { t.Fatal(err) } - hasUnknownNonCriticals, gotErr := RejectUnknownFields(protoBlob, tt.recv, tt.allowUnknownNonCriticals) + hasUnknownNonCriticals, gotErr := RejectUnknownFields(protoBlob, tt.recv, tt.allowUnknownNonCriticals, DefaultAnyResolver{}) require.Equal(t, tt.wantErr, gotErr) require.Equal(t, tt.hasUnknownNonCriticals, hasUnknownNonCriticals) }) @@ -289,7 +289,7 @@ func TestRejectUnknownFields_allowUnknownNonCriticals(t *testing.T) { } c1 := new(testdata.Customer1) - _, gotErr := RejectUnknownFields(blob, c1, tt.allowUnknownNonCriticals) + _, gotErr := RejectUnknownFields(blob, c1, tt.allowUnknownNonCriticals, DefaultAnyResolver{}) if !reflect.DeepEqual(gotErr, tt.wantErr) { t.Fatalf("Error mismatch\nGot:\n%s\n\nWant:\n%s", gotErr, tt.wantErr) } @@ -490,7 +490,7 @@ func TestRejectUnknownFieldsNested(t *testing.T) { if err != nil { t.Fatal(err) } - gotErr := RejectUnknownFieldsStrict(protoBlob, tt.recv) + gotErr := RejectUnknownFieldsStrict(protoBlob, tt.recv, DefaultAnyResolver{}) if !reflect.DeepEqual(gotErr, tt.wantErr) { t.Fatalf("Error mismatch\nGot:\n%s\n\nWant:\n%s", gotErr, tt.wantErr) } @@ -643,7 +643,7 @@ func TestRejectUnknownFieldsFlat(t *testing.T) { } c1 := new(testdata.Customer1) - gotErr := RejectUnknownFieldsStrict(blob, c1) + gotErr := RejectUnknownFieldsStrict(blob, c1, DefaultAnyResolver{}) if !reflect.DeepEqual(gotErr, tt.wantErr) { t.Fatalf("Error mismatch\nGot:\n%s\n\nWant:\n%s", gotErr, tt.wantErr) } @@ -660,7 +660,7 @@ func TestPackedEncoding(t *testing.T) { require.NoError(t, err) unmarshalled := &testdata.TestRepeatedUints{} - _, err = RejectUnknownFields(marshalled, unmarshalled, false) + _, err = RejectUnknownFields(marshalled, unmarshalled, false, DefaultAnyResolver{}) require.NoError(t, err) } diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index 74447d849774..e1592aa780b6 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -22,7 +22,7 @@ done # generate codec/testdata proto code protoc -I "proto" -I "third_party/proto" -I "testutil/testdata" --gocosmos_out=plugins=interfacetype+grpc,\ -Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. ./testutil/testdata/proto.proto +Mgoogle/protobuf/any.proto=github.com/cosmos/cosmos-sdk/codec/types:. ./testutil/testdata/*.proto # move proto files to the right places cp -r github.com/cosmos/cosmos-sdk/* ./ diff --git a/server/grpc/server_test.go b/server/grpc/server_test.go index 19cac38acfdb..f5db3c7fc208 100644 --- a/server/grpc/server_test.go +++ b/server/grpc/server_test.go @@ -50,7 +50,7 @@ func (s *IntegrationTestSuite) TestGRPCServer() { s.Require().NoError(err) // gRPC query to test service should work - testClient := testdata.NewTestServiceClient(conn) + testClient := testdata.NewQueryClient(conn) testRes, err := testClient.Echo(context.Background(), &testdata.EchoRequest{Message: "hello"}) s.Require().NoError(err) s.Require().Equal("hello", testRes.Message) diff --git a/simapp/app.go b/simapp/app.go index d209aafb7bbb..aa1375ea7a74 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -114,6 +114,7 @@ var ( upgrade.AppModuleBasic{}, evidence.AppModuleBasic{}, transfer.AppModuleBasic{}, + vesting.AppModuleBasic{}, ) // module account permissions @@ -202,7 +203,7 @@ func NewSimApp( bApp := baseapp.NewBaseApp(appName, logger, db, encodingConfig.TxConfig.TxDecoder(), baseAppOptions...) bApp.SetCommitMultiStoreTracer(traceStore) bApp.SetAppVersion(version.Version) - bApp.GRPCQueryRouter().SetInterfaceRegistry(interfaceRegistry) + bApp.SetInterfaceRegistry(interfaceRegistry) bApp.GRPCQueryRouter().RegisterSimulateService(bApp.Simulate, interfaceRegistry) keys := sdk.NewKVStoreKeys( @@ -362,7 +363,7 @@ func NewSimApp( app.mm.RegisterServices(module.NewConfigurator(app.GRPCQueryRouter())) // add test gRPC service for testing gRPC queries in isolation - testdata.RegisterTestServiceServer(app.GRPCQueryRouter(), testdata.TestServiceImpl{}) + testdata.RegisterQueryServer(app.GRPCQueryRouter(), testdata.QueryImpl{}) // create the simulation manager and define the order of the modules for deterministic simulations // diff --git a/std/codec.go b/std/codec.go index 7cd633b41231..7310d75a25fd 100644 --- a/std/codec.go +++ b/std/codec.go @@ -6,14 +6,12 @@ import ( cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" sdk "github.com/cosmos/cosmos-sdk/types" txtypes "github.com/cosmos/cosmos-sdk/types/tx" - vesting "github.com/cosmos/cosmos-sdk/x/auth/vesting/types" ) // RegisterLegacyAminoCodec registers types with the Amino codec. func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { sdk.RegisterLegacyAminoCodec(cdc) cryptocodec.RegisterCrypto(cdc) - vesting.RegisterLegacyAminoCodec(cdc) } // RegisterInterfaces registers Interfaces from sdk/types, vesting, crypto, tx. @@ -21,5 +19,4 @@ func RegisterInterfaces(interfaceRegistry types.InterfaceRegistry) { sdk.RegisterInterfaces(interfaceRegistry) txtypes.RegisterInterfaces(interfaceRegistry) cryptocodec.RegisterInterfaces(interfaceRegistry) - vesting.RegisterInterfaces(interfaceRegistry) } diff --git a/testutil/testdata/test_helper.go b/testutil/testdata/codec.go similarity index 83% rename from testutil/testdata/test_helper.go rename to testutil/testdata/codec.go index 8952ebbe07b6..54f63d03c2bc 100644 --- a/testutil/testdata/test_helper.go +++ b/testutil/testdata/codec.go @@ -4,10 +4,18 @@ import ( amino "github.com/tendermint/go-amino" "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" ) func NewTestInterfaceRegistry() types.InterfaceRegistry { registry := types.NewInterfaceRegistry() + RegisterInterfaces(registry) + return registry +} + +func RegisterInterfaces(registry types.InterfaceRegistry) { + registry.RegisterImplementations((*sdk.Msg)(nil), &TestMsg{}) + registry.RegisterInterface("Animal", (*Animal)(nil)) registry.RegisterImplementations( (*Animal)(nil), @@ -22,7 +30,6 @@ func NewTestInterfaceRegistry() types.InterfaceRegistry { (*HasHasAnimalI)(nil), &HasHasAnimal{}, ) - return registry } func NewTestAmino() *amino.Codec { diff --git a/testutil/testdata/test_service.go b/testutil/testdata/grpc_query.go similarity index 72% rename from testutil/testdata/test_service.go rename to testutil/testdata/grpc_query.go index 5311c160b820..6e2b64152995 100644 --- a/testutil/testdata/test_service.go +++ b/testutil/testdata/grpc_query.go @@ -9,9 +9,11 @@ import ( "github.com/cosmos/cosmos-sdk/codec/types" ) -type TestServiceImpl struct{} +type QueryImpl struct{} -func (e TestServiceImpl) TestAny(_ context.Context, request *TestAnyRequest) (*TestAnyResponse, error) { +var _ QueryServer = QueryImpl{} + +func (e QueryImpl) TestAny(_ context.Context, request *TestAnyRequest) (*TestAnyResponse, error) { animal, ok := request.AnyAnimal.GetCachedValue().(Animal) if !ok { return nil, fmt.Errorf("expected Animal") @@ -28,17 +30,15 @@ func (e TestServiceImpl) TestAny(_ context.Context, request *TestAnyRequest) (*T }}, nil } -func (e TestServiceImpl) Echo(_ context.Context, req *EchoRequest) (*EchoResponse, error) { +func (e QueryImpl) Echo(_ context.Context, req *EchoRequest) (*EchoResponse, error) { return &EchoResponse{Message: req.Message}, nil } -func (e TestServiceImpl) SayHello(_ context.Context, request *SayHelloRequest) (*SayHelloResponse, error) { +func (e QueryImpl) SayHello(_ context.Context, request *SayHelloRequest) (*SayHelloResponse, error) { greeting := fmt.Sprintf("Hello %s!", request.Name) return &SayHelloResponse{Greeting: greeting}, nil } -var _ TestServiceServer = TestServiceImpl{} - var _ types.UnpackInterfacesMessage = &TestAnyRequest{} func (m *TestAnyRequest) UnpackInterfaces(unpacker types.AnyUnpacker) error { diff --git a/testutil/testdata/msg_server.go b/testutil/testdata/msg_server.go new file mode 100644 index 000000000000..3b434c68c86c --- /dev/null +++ b/testutil/testdata/msg_server.go @@ -0,0 +1,16 @@ +package testdata + +import ( + "context" +) + +type MsgServerImpl struct{} + +var _ MsgServer = MsgServerImpl{} + +// CreateDog implements the MsgServer interface. +func (m MsgServerImpl) CreateDog(_ context.Context, msg *MsgCreateDog) (*MsgCreateDogResponse, error) { + return &MsgCreateDogResponse{ + Name: msg.Dog.Name, + }, nil +} diff --git a/testutil/testdata/query.pb.go b/testutil/testdata/query.pb.go new file mode 100644 index 000000000000..fc5f7af7cbae --- /dev/null +++ b/testutil/testdata/query.pb.go @@ -0,0 +1,1371 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: query.proto + +package testdata + +import ( + context "context" + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/codec/types" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type EchoRequest struct { + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (m *EchoRequest) Reset() { *m = EchoRequest{} } +func (m *EchoRequest) String() string { return proto.CompactTextString(m) } +func (*EchoRequest) ProtoMessage() {} +func (*EchoRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5c6ac9b241082464, []int{0} +} +func (m *EchoRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EchoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EchoRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EchoRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_EchoRequest.Merge(m, src) +} +func (m *EchoRequest) XXX_Size() int { + return m.Size() +} +func (m *EchoRequest) XXX_DiscardUnknown() { + xxx_messageInfo_EchoRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_EchoRequest proto.InternalMessageInfo + +func (m *EchoRequest) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + +type EchoResponse struct { + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +} + +func (m *EchoResponse) Reset() { *m = EchoResponse{} } +func (m *EchoResponse) String() string { return proto.CompactTextString(m) } +func (*EchoResponse) ProtoMessage() {} +func (*EchoResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5c6ac9b241082464, []int{1} +} +func (m *EchoResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *EchoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_EchoResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *EchoResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_EchoResponse.Merge(m, src) +} +func (m *EchoResponse) XXX_Size() int { + return m.Size() +} +func (m *EchoResponse) XXX_DiscardUnknown() { + xxx_messageInfo_EchoResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_EchoResponse proto.InternalMessageInfo + +func (m *EchoResponse) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + +type SayHelloRequest struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (m *SayHelloRequest) Reset() { *m = SayHelloRequest{} } +func (m *SayHelloRequest) String() string { return proto.CompactTextString(m) } +func (*SayHelloRequest) ProtoMessage() {} +func (*SayHelloRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5c6ac9b241082464, []int{2} +} +func (m *SayHelloRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SayHelloRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SayHelloRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SayHelloRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SayHelloRequest.Merge(m, src) +} +func (m *SayHelloRequest) XXX_Size() int { + return m.Size() +} +func (m *SayHelloRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SayHelloRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SayHelloRequest proto.InternalMessageInfo + +func (m *SayHelloRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +type SayHelloResponse struct { + Greeting string `protobuf:"bytes,1,opt,name=greeting,proto3" json:"greeting,omitempty"` +} + +func (m *SayHelloResponse) Reset() { *m = SayHelloResponse{} } +func (m *SayHelloResponse) String() string { return proto.CompactTextString(m) } +func (*SayHelloResponse) ProtoMessage() {} +func (*SayHelloResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5c6ac9b241082464, []int{3} +} +func (m *SayHelloResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SayHelloResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SayHelloResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SayHelloResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SayHelloResponse.Merge(m, src) +} +func (m *SayHelloResponse) XXX_Size() int { + return m.Size() +} +func (m *SayHelloResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SayHelloResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SayHelloResponse proto.InternalMessageInfo + +func (m *SayHelloResponse) GetGreeting() string { + if m != nil { + return m.Greeting + } + return "" +} + +type TestAnyRequest struct { + AnyAnimal *types.Any `protobuf:"bytes,1,opt,name=any_animal,json=anyAnimal,proto3" json:"any_animal,omitempty"` +} + +func (m *TestAnyRequest) Reset() { *m = TestAnyRequest{} } +func (m *TestAnyRequest) String() string { return proto.CompactTextString(m) } +func (*TestAnyRequest) ProtoMessage() {} +func (*TestAnyRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_5c6ac9b241082464, []int{4} +} +func (m *TestAnyRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TestAnyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TestAnyRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TestAnyRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestAnyRequest.Merge(m, src) +} +func (m *TestAnyRequest) XXX_Size() int { + return m.Size() +} +func (m *TestAnyRequest) XXX_DiscardUnknown() { + xxx_messageInfo_TestAnyRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_TestAnyRequest proto.InternalMessageInfo + +func (m *TestAnyRequest) GetAnyAnimal() *types.Any { + if m != nil { + return m.AnyAnimal + } + return nil +} + +type TestAnyResponse struct { + HasAnimal *HasAnimal `protobuf:"bytes,1,opt,name=has_animal,json=hasAnimal,proto3" json:"has_animal,omitempty"` +} + +func (m *TestAnyResponse) Reset() { *m = TestAnyResponse{} } +func (m *TestAnyResponse) String() string { return proto.CompactTextString(m) } +func (*TestAnyResponse) ProtoMessage() {} +func (*TestAnyResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_5c6ac9b241082464, []int{5} +} +func (m *TestAnyResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TestAnyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TestAnyResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TestAnyResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestAnyResponse.Merge(m, src) +} +func (m *TestAnyResponse) XXX_Size() int { + return m.Size() +} +func (m *TestAnyResponse) XXX_DiscardUnknown() { + xxx_messageInfo_TestAnyResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_TestAnyResponse proto.InternalMessageInfo + +func (m *TestAnyResponse) GetHasAnimal() *HasAnimal { + if m != nil { + return m.HasAnimal + } + return nil +} + +func init() { + proto.RegisterType((*EchoRequest)(nil), "testdata.EchoRequest") + proto.RegisterType((*EchoResponse)(nil), "testdata.EchoResponse") + proto.RegisterType((*SayHelloRequest)(nil), "testdata.SayHelloRequest") + proto.RegisterType((*SayHelloResponse)(nil), "testdata.SayHelloResponse") + proto.RegisterType((*TestAnyRequest)(nil), "testdata.TestAnyRequest") + proto.RegisterType((*TestAnyResponse)(nil), "testdata.TestAnyResponse") +} + +func init() { proto.RegisterFile("query.proto", fileDescriptor_5c6ac9b241082464) } + +var fileDescriptor_5c6ac9b241082464 = []byte{ + // 359 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xcf, 0x4f, 0xc2, 0x30, + 0x14, 0xc7, 0x59, 0x82, 0x02, 0x0f, 0x03, 0xa6, 0xfe, 0x08, 0xf4, 0xb0, 0x98, 0x25, 0x46, 0x2e, + 0x76, 0x09, 0xc4, 0xab, 0x09, 0x26, 0x24, 0x5c, 0x45, 0x4f, 0x5e, 0x4c, 0x81, 0xba, 0x2d, 0x6e, + 0x2d, 0xd0, 0xee, 0xb0, 0xff, 0xc2, 0x7f, 0xc9, 0x9b, 0x47, 0x8e, 0x1e, 0x0d, 0xfc, 0x23, 0x66, + 0x5b, 0xbb, 0x09, 0x21, 0x9e, 0xda, 0xd7, 0x7e, 0xde, 0xe7, 0xe5, 0x7d, 0xa1, 0xb9, 0x8c, 0xd9, + 0x2a, 0x21, 0x8b, 0x95, 0x50, 0x02, 0xd5, 0x15, 0x93, 0x6a, 0x4e, 0x15, 0xc5, 0x5d, 0x4f, 0x08, + 0x2f, 0x64, 0x6e, 0xf6, 0x3e, 0x8d, 0xdf, 0x5c, 0xca, 0x35, 0x84, 0x5b, 0x06, 0xca, 0x6b, 0xe7, + 0x06, 0x9a, 0xa3, 0x99, 0x2f, 0x26, 0x6c, 0x19, 0x33, 0xa9, 0x50, 0x07, 0x6a, 0x11, 0x93, 0x92, + 0x7a, 0xac, 0x63, 0x5d, 0x59, 0xbd, 0xc6, 0xc4, 0x94, 0x4e, 0x0f, 0x4e, 0x72, 0x50, 0x2e, 0x04, + 0x97, 0xec, 0x1f, 0xf2, 0x1a, 0xda, 0x4f, 0x34, 0x19, 0xb3, 0x30, 0x2c, 0xb4, 0x08, 0xaa, 0x9c, + 0x46, 0x86, 0xcc, 0xee, 0x0e, 0x81, 0xd3, 0x12, 0xd3, 0x52, 0x0c, 0x75, 0x6f, 0xc5, 0x98, 0x0a, + 0xb8, 0xa7, 0xd9, 0xa2, 0x76, 0x46, 0xd0, 0x7a, 0x66, 0x52, 0x0d, 0x79, 0x62, 0xac, 0x03, 0x00, + 0xca, 0x93, 0x57, 0xca, 0x83, 0x88, 0x86, 0x19, 0xdf, 0xec, 0x9f, 0x93, 0x7c, 0x77, 0x62, 0x76, + 0x27, 0x69, 0x43, 0x83, 0xf2, 0x64, 0x98, 0x61, 0xce, 0x08, 0xda, 0x85, 0x46, 0x4f, 0xed, 0x03, + 0xf8, 0x54, 0xee, 0x7a, 0xce, 0x48, 0x11, 0xd4, 0x98, 0xca, 0xbc, 0x77, 0xd2, 0xf0, 0xcd, 0xb5, + 0xff, 0x69, 0xc1, 0xd1, 0x63, 0x1a, 0x3e, 0xba, 0x83, 0x6a, 0x1a, 0x0c, 0xba, 0x28, 0x3b, 0xfe, + 0x24, 0x8a, 0x2f, 0xf7, 0x9f, 0xf5, 0xd0, 0x21, 0xd4, 0xcd, 0xfa, 0xa8, 0x5b, 0x32, 0x7b, 0xc9, + 0x61, 0x7c, 0xe8, 0x4b, 0x2b, 0xee, 0xa1, 0xa6, 0x57, 0x41, 0x9d, 0x12, 0xdb, 0x0d, 0x09, 0x77, + 0x0f, 0xfc, 0xe4, 0xfd, 0x0f, 0xe3, 0xaf, 0x8d, 0x6d, 0xad, 0x37, 0xb6, 0xf5, 0xb3, 0xb1, 0xad, + 0x8f, 0xad, 0x5d, 0x59, 0x6f, 0xed, 0xca, 0xf7, 0xd6, 0xae, 0xbc, 0x10, 0x2f, 0x50, 0x7e, 0x3c, + 0x25, 0x33, 0x11, 0xb9, 0x33, 0x21, 0x23, 0x21, 0xf5, 0x71, 0x2b, 0xe7, 0xef, 0x6e, 0x2a, 0x8c, + 0x55, 0x10, 0xba, 0xc6, 0x3c, 0x3d, 0xce, 0xd2, 0x1e, 0xfc, 0x06, 0x00, 0x00, 0xff, 0xff, 0xe8, + 0xb4, 0x42, 0x4e, 0x90, 0x02, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) + SayHello(ctx context.Context, in *SayHelloRequest, opts ...grpc.CallOption) (*SayHelloResponse, error) + TestAny(ctx context.Context, in *TestAnyRequest, opts ...grpc.CallOption) (*TestAnyResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) { + out := new(EchoResponse) + err := c.cc.Invoke(ctx, "/testdata.Query/Echo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) SayHello(ctx context.Context, in *SayHelloRequest, opts ...grpc.CallOption) (*SayHelloResponse, error) { + out := new(SayHelloResponse) + err := c.cc.Invoke(ctx, "/testdata.Query/SayHello", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) TestAny(ctx context.Context, in *TestAnyRequest, opts ...grpc.CallOption) (*TestAnyResponse, error) { + out := new(TestAnyResponse) + err := c.cc.Invoke(ctx, "/testdata.Query/TestAny", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + Echo(context.Context, *EchoRequest) (*EchoResponse, error) + SayHello(context.Context, *SayHelloRequest) (*SayHelloResponse, error) + TestAny(context.Context, *TestAnyRequest) (*TestAnyResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Echo(ctx context.Context, req *EchoRequest) (*EchoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Echo not implemented") +} +func (*UnimplementedQueryServer) SayHello(ctx context.Context, req *SayHelloRequest) (*SayHelloResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SayHello not implemented") +} +func (*UnimplementedQueryServer) TestAny(ctx context.Context, req *TestAnyRequest) (*TestAnyResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TestAny not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EchoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Echo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/testdata.Query/Echo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Echo(ctx, req.(*EchoRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_SayHello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SayHelloRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SayHello(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/testdata.Query/SayHello", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SayHello(ctx, req.(*SayHelloRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_TestAny_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TestAnyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).TestAny(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/testdata.Query/TestAny", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).TestAny(ctx, req.(*TestAnyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "testdata.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Echo", + Handler: _Query_Echo_Handler, + }, + { + MethodName: "SayHello", + Handler: _Query_SayHello_Handler, + }, + { + MethodName: "TestAny", + Handler: _Query_TestAny_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "query.proto", +} + +func (m *EchoRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EchoRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EchoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *EchoResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *EchoResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *EchoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SayHelloRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SayHelloRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SayHelloRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SayHelloResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SayHelloResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SayHelloResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Greeting) > 0 { + i -= len(m.Greeting) + copy(dAtA[i:], m.Greeting) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Greeting))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TestAnyRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TestAnyRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TestAnyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.AnyAnimal != nil { + { + size, err := m.AnyAnimal.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TestAnyResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TestAnyResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TestAnyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.HasAnimal != nil { + { + size, err := m.HasAnimal.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *EchoRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Message) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *EchoResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Message) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *SayHelloRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *SayHelloResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Greeting) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *TestAnyRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.AnyAnimal != nil { + l = m.AnyAnimal.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *TestAnyResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.HasAnimal != nil { + l = m.HasAnimal.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *EchoRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EchoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EchoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *EchoResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: EchoResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: EchoResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SayHelloRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SayHelloRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SayHelloRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SayHelloResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SayHelloResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SayHelloResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Greeting", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Greeting = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TestAnyRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TestAnyRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TestAnyRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AnyAnimal", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AnyAnimal == nil { + m.AnyAnimal = &types.Any{} + } + if err := m.AnyAnimal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TestAnyResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TestAnyResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TestAnyResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HasAnimal", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.HasAnimal == nil { + m.HasAnimal = &HasAnimal{} + } + if err := m.HasAnimal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/testutil/testdata/query.proto b/testutil/testdata/query.proto new file mode 100644 index 000000000000..0090b4fca856 --- /dev/null +++ b/testutil/testdata/query.proto @@ -0,0 +1,39 @@ +syntax = "proto3"; +package testdata; + +import "google/protobuf/any.proto"; +import "testdata.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/testutil/testdata"; + +// Query tests the protobuf Query service as defined in +// https://github.com/cosmos/cosmos-sdk/issues/5921. +service Query { + rpc Echo(EchoRequest) returns (EchoResponse); + rpc SayHello(SayHelloRequest) returns (SayHelloResponse); + rpc TestAny(TestAnyRequest) returns (TestAnyResponse); +} + +message EchoRequest { + string message = 1; +} + +message EchoResponse { + string message = 1; +} + +message SayHelloRequest { + string name = 1; +} + +message SayHelloResponse { + string greeting = 1; +} + +message TestAnyRequest { + google.protobuf.Any any_animal = 1; +} + +message TestAnyResponse { + testdata.HasAnimal has_animal = 1; +} diff --git a/testutil/testdata/testdata.pb.go b/testutil/testdata/testdata.pb.go new file mode 100644 index 000000000000..3c5b44e7a464 --- /dev/null +++ b/testutil/testdata/testdata.pb.go @@ -0,0 +1,1412 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: testdata.proto + +package testdata + +import ( + fmt "fmt" + types "github.com/cosmos/cosmos-sdk/codec/types" + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/gogo/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type Dog struct { + Size_ string `protobuf:"bytes,1,opt,name=size,proto3" json:"size,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (m *Dog) Reset() { *m = Dog{} } +func (m *Dog) String() string { return proto.CompactTextString(m) } +func (*Dog) ProtoMessage() {} +func (*Dog) Descriptor() ([]byte, []int) { + return fileDescriptor_40c4782d007dfce9, []int{0} +} +func (m *Dog) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Dog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Dog.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Dog) XXX_Merge(src proto.Message) { + xxx_messageInfo_Dog.Merge(m, src) +} +func (m *Dog) XXX_Size() int { + return m.Size() +} +func (m *Dog) XXX_DiscardUnknown() { + xxx_messageInfo_Dog.DiscardUnknown(m) +} + +var xxx_messageInfo_Dog proto.InternalMessageInfo + +func (m *Dog) GetSize_() string { + if m != nil { + return m.Size_ + } + return "" +} + +func (m *Dog) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +type Cat struct { + Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker,omitempty"` + Lives int32 `protobuf:"varint,2,opt,name=lives,proto3" json:"lives,omitempty"` +} + +func (m *Cat) Reset() { *m = Cat{} } +func (m *Cat) String() string { return proto.CompactTextString(m) } +func (*Cat) ProtoMessage() {} +func (*Cat) Descriptor() ([]byte, []int) { + return fileDescriptor_40c4782d007dfce9, []int{1} +} +func (m *Cat) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Cat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Cat.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Cat) XXX_Merge(src proto.Message) { + xxx_messageInfo_Cat.Merge(m, src) +} +func (m *Cat) XXX_Size() int { + return m.Size() +} +func (m *Cat) XXX_DiscardUnknown() { + xxx_messageInfo_Cat.DiscardUnknown(m) +} + +var xxx_messageInfo_Cat proto.InternalMessageInfo + +func (m *Cat) GetMoniker() string { + if m != nil { + return m.Moniker + } + return "" +} + +func (m *Cat) GetLives() int32 { + if m != nil { + return m.Lives + } + return 0 +} + +type HasAnimal struct { + Animal *types.Any `protobuf:"bytes,1,opt,name=animal,proto3" json:"animal,omitempty"` + X int64 `protobuf:"varint,2,opt,name=x,proto3" json:"x,omitempty"` +} + +func (m *HasAnimal) Reset() { *m = HasAnimal{} } +func (m *HasAnimal) String() string { return proto.CompactTextString(m) } +func (*HasAnimal) ProtoMessage() {} +func (*HasAnimal) Descriptor() ([]byte, []int) { + return fileDescriptor_40c4782d007dfce9, []int{2} +} +func (m *HasAnimal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HasAnimal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HasAnimal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *HasAnimal) XXX_Merge(src proto.Message) { + xxx_messageInfo_HasAnimal.Merge(m, src) +} +func (m *HasAnimal) XXX_Size() int { + return m.Size() +} +func (m *HasAnimal) XXX_DiscardUnknown() { + xxx_messageInfo_HasAnimal.DiscardUnknown(m) +} + +var xxx_messageInfo_HasAnimal proto.InternalMessageInfo + +func (m *HasAnimal) GetAnimal() *types.Any { + if m != nil { + return m.Animal + } + return nil +} + +func (m *HasAnimal) GetX() int64 { + if m != nil { + return m.X + } + return 0 +} + +type HasHasAnimal struct { + HasAnimal *types.Any `protobuf:"bytes,1,opt,name=has_animal,json=hasAnimal,proto3" json:"has_animal,omitempty"` +} + +func (m *HasHasAnimal) Reset() { *m = HasHasAnimal{} } +func (m *HasHasAnimal) String() string { return proto.CompactTextString(m) } +func (*HasHasAnimal) ProtoMessage() {} +func (*HasHasAnimal) Descriptor() ([]byte, []int) { + return fileDescriptor_40c4782d007dfce9, []int{3} +} +func (m *HasHasAnimal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HasHasAnimal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HasHasAnimal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *HasHasAnimal) XXX_Merge(src proto.Message) { + xxx_messageInfo_HasHasAnimal.Merge(m, src) +} +func (m *HasHasAnimal) XXX_Size() int { + return m.Size() +} +func (m *HasHasAnimal) XXX_DiscardUnknown() { + xxx_messageInfo_HasHasAnimal.DiscardUnknown(m) +} + +var xxx_messageInfo_HasHasAnimal proto.InternalMessageInfo + +func (m *HasHasAnimal) GetHasAnimal() *types.Any { + if m != nil { + return m.HasAnimal + } + return nil +} + +type HasHasHasAnimal struct { + HasHasAnimal *types.Any `protobuf:"bytes,1,opt,name=has_has_animal,json=hasHasAnimal,proto3" json:"has_has_animal,omitempty"` +} + +func (m *HasHasHasAnimal) Reset() { *m = HasHasHasAnimal{} } +func (m *HasHasHasAnimal) String() string { return proto.CompactTextString(m) } +func (*HasHasHasAnimal) ProtoMessage() {} +func (*HasHasHasAnimal) Descriptor() ([]byte, []int) { + return fileDescriptor_40c4782d007dfce9, []int{4} +} +func (m *HasHasHasAnimal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *HasHasHasAnimal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_HasHasHasAnimal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *HasHasHasAnimal) XXX_Merge(src proto.Message) { + xxx_messageInfo_HasHasHasAnimal.Merge(m, src) +} +func (m *HasHasHasAnimal) XXX_Size() int { + return m.Size() +} +func (m *HasHasHasAnimal) XXX_DiscardUnknown() { + xxx_messageInfo_HasHasHasAnimal.DiscardUnknown(m) +} + +var xxx_messageInfo_HasHasHasAnimal proto.InternalMessageInfo + +func (m *HasHasHasAnimal) GetHasHasAnimal() *types.Any { + if m != nil { + return m.HasHasAnimal + } + return nil +} + +// bad MultiSignature with extra fields +type BadMultiSignature struct { + Signatures [][]byte `protobuf:"bytes,1,rep,name=signatures,proto3" json:"signatures,omitempty"` + MaliciousField []byte `protobuf:"bytes,5,opt,name=malicious_field,json=maliciousField,proto3" json:"malicious_field,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *BadMultiSignature) Reset() { *m = BadMultiSignature{} } +func (m *BadMultiSignature) String() string { return proto.CompactTextString(m) } +func (*BadMultiSignature) ProtoMessage() {} +func (*BadMultiSignature) Descriptor() ([]byte, []int) { + return fileDescriptor_40c4782d007dfce9, []int{5} +} +func (m *BadMultiSignature) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *BadMultiSignature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_BadMultiSignature.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *BadMultiSignature) XXX_Merge(src proto.Message) { + xxx_messageInfo_BadMultiSignature.Merge(m, src) +} +func (m *BadMultiSignature) XXX_Size() int { + return m.Size() +} +func (m *BadMultiSignature) XXX_DiscardUnknown() { + xxx_messageInfo_BadMultiSignature.DiscardUnknown(m) +} + +var xxx_messageInfo_BadMultiSignature proto.InternalMessageInfo + +func (m *BadMultiSignature) GetSignatures() [][]byte { + if m != nil { + return m.Signatures + } + return nil +} + +func (m *BadMultiSignature) GetMaliciousField() []byte { + if m != nil { + return m.MaliciousField + } + return nil +} + +func init() { + proto.RegisterType((*Dog)(nil), "testdata.Dog") + proto.RegisterType((*Cat)(nil), "testdata.Cat") + proto.RegisterType((*HasAnimal)(nil), "testdata.HasAnimal") + proto.RegisterType((*HasHasAnimal)(nil), "testdata.HasHasAnimal") + proto.RegisterType((*HasHasHasAnimal)(nil), "testdata.HasHasHasAnimal") + proto.RegisterType((*BadMultiSignature)(nil), "testdata.BadMultiSignature") +} + +func init() { proto.RegisterFile("testdata.proto", fileDescriptor_40c4782d007dfce9) } + +var fileDescriptor_40c4782d007dfce9 = []byte{ + // 365 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x31, 0x4f, 0xc2, 0x40, + 0x18, 0x86, 0x39, 0x0b, 0x28, 0x9f, 0x0d, 0xc4, 0x0b, 0x43, 0x65, 0xa8, 0xa4, 0x8b, 0x0c, 0xd2, + 0x26, 0x12, 0x17, 0x36, 0xc0, 0x28, 0x0b, 0x4b, 0xdd, 0x5c, 0xc8, 0x95, 0x1e, 0xed, 0x85, 0xb6, + 0x67, 0xb8, 0xab, 0x01, 0x7f, 0x85, 0x7f, 0xc1, 0x7f, 0xe3, 0xc8, 0xe8, 0x68, 0xe0, 0x8f, 0x98, + 0x5e, 0xa9, 0x30, 0x32, 0xf5, 0x7d, 0xdf, 0xaf, 0xef, 0x93, 0xef, 0x92, 0x0f, 0xea, 0x92, 0x0a, + 0xe9, 0x13, 0x49, 0xec, 0xb7, 0x25, 0x97, 0x1c, 0x5f, 0x14, 0xbe, 0xd5, 0x0c, 0x78, 0xc0, 0x55, + 0xe8, 0x64, 0x2a, 0x9f, 0xb7, 0xae, 0x03, 0xce, 0x83, 0x88, 0x3a, 0xca, 0x79, 0xe9, 0xdc, 0x21, + 0xc9, 0x3a, 0x1f, 0x59, 0x5d, 0xd0, 0x1e, 0x79, 0x80, 0x31, 0x94, 0x05, 0xfb, 0xa0, 0x06, 0x6a, + 0xa3, 0x4e, 0xcd, 0x55, 0x3a, 0xcb, 0x12, 0x12, 0x53, 0xe3, 0x2c, 0xcf, 0x32, 0x6d, 0x3d, 0x80, + 0x36, 0x22, 0x12, 0x1b, 0x70, 0x1e, 0xf3, 0x84, 0x2d, 0xe8, 0x72, 0xdf, 0x28, 0x2c, 0x6e, 0x42, + 0x25, 0x62, 0xef, 0x54, 0xa8, 0x56, 0xc5, 0xcd, 0x8d, 0xf5, 0x0c, 0xb5, 0x31, 0x11, 0x83, 0x84, + 0xc5, 0x24, 0xc2, 0x77, 0x50, 0x25, 0x4a, 0xa9, 0xee, 0xe5, 0x7d, 0xd3, 0xce, 0xd7, 0xb3, 0x8b, + 0xf5, 0xec, 0x41, 0xb2, 0x76, 0xf7, 0xff, 0x60, 0x1d, 0xd0, 0x4a, 0xc1, 0x34, 0x17, 0xad, 0xac, + 0x11, 0xe8, 0x63, 0x22, 0x0e, 0xac, 0x1e, 0x40, 0x48, 0xc4, 0xf4, 0x04, 0x5e, 0x2d, 0x2c, 0x4a, + 0xd6, 0x04, 0x1a, 0x39, 0xe4, 0xc0, 0xe9, 0x43, 0x3d, 0xe3, 0x9c, 0xc8, 0xd2, 0xc3, 0xa3, 0xae, + 0xe5, 0xc1, 0xd5, 0x90, 0xf8, 0x93, 0x34, 0x92, 0xec, 0x85, 0x05, 0x09, 0x91, 0xe9, 0x92, 0x62, + 0x13, 0x40, 0x14, 0x46, 0x18, 0xa8, 0xad, 0x75, 0x74, 0xf7, 0x28, 0xc1, 0xb7, 0xd0, 0x88, 0x49, + 0xc4, 0x66, 0x8c, 0xa7, 0x62, 0x3a, 0x67, 0x34, 0xf2, 0x8d, 0x4a, 0x1b, 0x75, 0x74, 0xb7, 0xfe, + 0x1f, 0x3f, 0x65, 0x69, 0xbf, 0xbc, 0xf9, 0xba, 0x41, 0xc3, 0xf1, 0xf7, 0xd6, 0x44, 0x9b, 0xad, + 0x89, 0x7e, 0xb7, 0x26, 0xfa, 0xdc, 0x99, 0xa5, 0xcd, 0xce, 0x2c, 0xfd, 0xec, 0xcc, 0xd2, 0xab, + 0x1d, 0x30, 0x19, 0xa6, 0x9e, 0x3d, 0xe3, 0xb1, 0x33, 0xe3, 0x22, 0xe6, 0x62, 0xff, 0xe9, 0x0a, + 0x7f, 0xe1, 0x64, 0x87, 0x91, 0x4a, 0x16, 0x39, 0xc5, 0x85, 0x78, 0x55, 0xf5, 0x92, 0xde, 0x5f, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x51, 0x62, 0x40, 0x44, 0x02, 0x00, 0x00, +} + +func (m *Dog) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Dog) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Dog) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintTestdata(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.Size_) > 0 { + i -= len(m.Size_) + copy(dAtA[i:], m.Size_) + i = encodeVarintTestdata(dAtA, i, uint64(len(m.Size_))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Cat) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Cat) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Cat) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Lives != 0 { + i = encodeVarintTestdata(dAtA, i, uint64(m.Lives)) + i-- + dAtA[i] = 0x10 + } + if len(m.Moniker) > 0 { + i -= len(m.Moniker) + copy(dAtA[i:], m.Moniker) + i = encodeVarintTestdata(dAtA, i, uint64(len(m.Moniker))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *HasAnimal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HasAnimal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HasAnimal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.X != 0 { + i = encodeVarintTestdata(dAtA, i, uint64(m.X)) + i-- + dAtA[i] = 0x10 + } + if m.Animal != nil { + { + size, err := m.Animal.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTestdata(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *HasHasAnimal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HasHasAnimal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HasHasAnimal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.HasAnimal != nil { + { + size, err := m.HasAnimal.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTestdata(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *HasHasHasAnimal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HasHasHasAnimal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *HasHasHasAnimal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.HasHasAnimal != nil { + { + size, err := m.HasHasAnimal.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTestdata(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *BadMultiSignature) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *BadMultiSignature) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *BadMultiSignature) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.MaliciousField) > 0 { + i -= len(m.MaliciousField) + copy(dAtA[i:], m.MaliciousField) + i = encodeVarintTestdata(dAtA, i, uint64(len(m.MaliciousField))) + i-- + dAtA[i] = 0x2a + } + if len(m.Signatures) > 0 { + for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signatures[iNdEx]) + copy(dAtA[i:], m.Signatures[iNdEx]) + i = encodeVarintTestdata(dAtA, i, uint64(len(m.Signatures[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintTestdata(dAtA []byte, offset int, v uint64) int { + offset -= sovTestdata(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *Dog) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Size_) + if l > 0 { + n += 1 + l + sovTestdata(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTestdata(uint64(l)) + } + return n +} + +func (m *Cat) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Moniker) + if l > 0 { + n += 1 + l + sovTestdata(uint64(l)) + } + if m.Lives != 0 { + n += 1 + sovTestdata(uint64(m.Lives)) + } + return n +} + +func (m *HasAnimal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Animal != nil { + l = m.Animal.Size() + n += 1 + l + sovTestdata(uint64(l)) + } + if m.X != 0 { + n += 1 + sovTestdata(uint64(m.X)) + } + return n +} + +func (m *HasHasAnimal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.HasAnimal != nil { + l = m.HasAnimal.Size() + n += 1 + l + sovTestdata(uint64(l)) + } + return n +} + +func (m *HasHasHasAnimal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.HasHasAnimal != nil { + l = m.HasHasAnimal.Size() + n += 1 + l + sovTestdata(uint64(l)) + } + return n +} + +func (m *BadMultiSignature) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Signatures) > 0 { + for _, b := range m.Signatures { + l = len(b) + n += 1 + l + sovTestdata(uint64(l)) + } + } + l = len(m.MaliciousField) + if l > 0 { + n += 1 + l + sovTestdata(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovTestdata(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTestdata(x uint64) (n int) { + return sovTestdata(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *Dog) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTestdata + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Dog: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Dog: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTestdata + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTestdata + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTestdata + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Size_ = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTestdata + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTestdata + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTestdata + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTestdata(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTestdata + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTestdata + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Cat) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTestdata + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Cat: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Cat: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Moniker", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTestdata + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTestdata + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTestdata + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Moniker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Lives", wireType) + } + m.Lives = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTestdata + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Lives |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTestdata(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTestdata + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTestdata + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HasAnimal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTestdata + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HasAnimal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HasAnimal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Animal", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTestdata + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTestdata + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTestdata + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Animal == nil { + m.Animal = &types.Any{} + } + if err := m.Animal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field X", wireType) + } + m.X = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTestdata + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.X |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTestdata(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTestdata + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTestdata + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HasHasAnimal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTestdata + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HasHasAnimal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HasHasAnimal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HasAnimal", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTestdata + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTestdata + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTestdata + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.HasAnimal == nil { + m.HasAnimal = &types.Any{} + } + if err := m.HasAnimal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTestdata(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTestdata + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTestdata + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HasHasHasAnimal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTestdata + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HasHasHasAnimal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HasHasHasAnimal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HasHasAnimal", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTestdata + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTestdata + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTestdata + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.HasHasAnimal == nil { + m.HasHasAnimal = &types.Any{} + } + if err := m.HasHasAnimal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTestdata(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTestdata + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTestdata + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *BadMultiSignature) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTestdata + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: BadMultiSignature: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: BadMultiSignature: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTestdata + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTestdata + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTestdata + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signatures = append(m.Signatures, make([]byte, postIndex-iNdEx)) + copy(m.Signatures[len(m.Signatures)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MaliciousField", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTestdata + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTestdata + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTestdata + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MaliciousField = append(m.MaliciousField[:0], dAtA[iNdEx:postIndex]...) + if m.MaliciousField == nil { + m.MaliciousField = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTestdata(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTestdata + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTestdata + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTestdata(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTestdata + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTestdata + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTestdata + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTestdata + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTestdata + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTestdata + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTestdata = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTestdata = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTestdata = fmt.Errorf("proto: unexpected end of group") +) diff --git a/testutil/testdata/testdata.proto b/testutil/testdata/testdata.proto new file mode 100644 index 000000000000..585c2303c139 --- /dev/null +++ b/testutil/testdata/testdata.proto @@ -0,0 +1,37 @@ +syntax = "proto3"; +package testdata; + +import "gogoproto/gogo.proto"; +import "google/protobuf/any.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/testutil/testdata"; + +message Dog { + string size = 1; + string name = 2; +} + +message Cat { + string moniker = 1; + int32 lives = 2; +} + +message HasAnimal { + google.protobuf.Any animal = 1; + int64 x = 2; +} + +message HasHasAnimal { + google.protobuf.Any has_animal = 1; +} + +message HasHasHasAnimal { + google.protobuf.Any has_has_animal = 1; +} + +// bad MultiSignature with extra fields +message BadMultiSignature { + option (gogoproto.goproto_unrecognized) = true; + repeated bytes signatures = 1; + bytes malicious_field = 5; +} diff --git a/testutil/testdata/test_tx.go b/testutil/testdata/tx.go similarity index 81% rename from testutil/testdata/test_tx.go rename to testutil/testdata/tx.go index 72f8d0f00ac0..09e1e365f1ca 100644 --- a/testutil/testdata/test_tx.go +++ b/testutil/testdata/tx.go @@ -65,3 +65,15 @@ func (msg *TestMsg) GetSigners() []sdk.AccAddress { return addrs } func (msg *TestMsg) ValidateBasic() error { return nil } + +var _ sdk.MsgRequest = &MsgCreateDog{} + +func (msg *MsgCreateDog) GetSigners() []sdk.AccAddress { return []sdk.AccAddress{} } +func (msg *MsgCreateDog) ValidateBasic() error { return nil } + +func NewServiceMsgCreateDog(msg *MsgCreateDog) sdk.Msg { + return sdk.ServiceMsg{ + MethodName: "/testdata.Msg/CreateDog", + Request: msg, + } +} diff --git a/testutil/testdata/tx.pb.go b/testutil/testdata/tx.pb.go new file mode 100644 index 000000000000..3b0530fe4617 --- /dev/null +++ b/testutil/testdata/tx.pb.go @@ -0,0 +1,764 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: tx.proto + +package testdata + +import ( + context "context" + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + grpc1 "github.com/gogo/protobuf/grpc" + proto "github.com/gogo/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +type MsgCreateDog struct { + Dog *Dog `protobuf:"bytes,1,opt,name=dog,proto3" json:"dog,omitempty"` +} + +func (m *MsgCreateDog) Reset() { *m = MsgCreateDog{} } +func (m *MsgCreateDog) String() string { return proto.CompactTextString(m) } +func (*MsgCreateDog) ProtoMessage() {} +func (*MsgCreateDog) Descriptor() ([]byte, []int) { + return fileDescriptor_0fd2153dc07d3b5c, []int{0} +} +func (m *MsgCreateDog) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateDog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateDog.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCreateDog) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateDog.Merge(m, src) +} +func (m *MsgCreateDog) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateDog) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateDog.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateDog proto.InternalMessageInfo + +func (m *MsgCreateDog) GetDog() *Dog { + if m != nil { + return m.Dog + } + return nil +} + +type MsgCreateDogResponse struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (m *MsgCreateDogResponse) Reset() { *m = MsgCreateDogResponse{} } +func (m *MsgCreateDogResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateDogResponse) ProtoMessage() {} +func (*MsgCreateDogResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_0fd2153dc07d3b5c, []int{1} +} +func (m *MsgCreateDogResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateDogResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgCreateDogResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgCreateDogResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateDogResponse.Merge(m, src) +} +func (m *MsgCreateDogResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateDogResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateDogResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateDogResponse proto.InternalMessageInfo + +func (m *MsgCreateDogResponse) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +// TestMsg is msg type for testing protobuf message using any, as defined in +// https://github.com/cosmos/cosmos-sdk/issues/6213. +type TestMsg struct { + Signers []string `protobuf:"bytes,1,rep,name=signers,proto3" json:"signers,omitempty"` +} + +func (m *TestMsg) Reset() { *m = TestMsg{} } +func (m *TestMsg) String() string { return proto.CompactTextString(m) } +func (*TestMsg) ProtoMessage() {} +func (*TestMsg) Descriptor() ([]byte, []int) { + return fileDescriptor_0fd2153dc07d3b5c, []int{2} +} +func (m *TestMsg) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TestMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TestMsg.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *TestMsg) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestMsg.Merge(m, src) +} +func (m *TestMsg) XXX_Size() int { + return m.Size() +} +func (m *TestMsg) XXX_DiscardUnknown() { + xxx_messageInfo_TestMsg.DiscardUnknown(m) +} + +var xxx_messageInfo_TestMsg proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgCreateDog)(nil), "testdata.MsgCreateDog") + proto.RegisterType((*MsgCreateDogResponse)(nil), "testdata.MsgCreateDogResponse") + proto.RegisterType((*TestMsg)(nil), "testdata.TestMsg") +} + +func init() { proto.RegisterFile("tx.proto", fileDescriptor_0fd2153dc07d3b5c) } + +var fileDescriptor_0fd2153dc07d3b5c = []byte{ + // 258 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x28, 0xa9, 0xd0, 0x2b, + 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x28, 0x49, 0x2d, 0x2e, 0x49, 0x49, 0x2c, 0x49, 0x94, 0x12, + 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x0b, 0xea, 0x83, 0x58, 0x10, 0x79, 0x29, 0x3e, 0x98, 0x3c, 0x84, + 0xaf, 0xa4, 0xcf, 0xc5, 0xe3, 0x5b, 0x9c, 0xee, 0x5c, 0x94, 0x9a, 0x58, 0x92, 0xea, 0x92, 0x9f, + 0x2e, 0x24, 0xcf, 0xc5, 0x9c, 0x92, 0x9f, 0x2e, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0xc4, 0xab, + 0x07, 0x57, 0xed, 0x92, 0x9f, 0x1e, 0x04, 0x92, 0x51, 0xd2, 0xe2, 0x12, 0x41, 0xd6, 0x10, 0x94, + 0x5a, 0x5c, 0x90, 0x9f, 0x57, 0x9c, 0x2a, 0x24, 0xc4, 0xc5, 0x92, 0x97, 0x98, 0x9b, 0x0a, 0xd6, + 0xc9, 0x19, 0x04, 0x66, 0x2b, 0x69, 0x72, 0xb1, 0x87, 0xa4, 0x16, 0x97, 0xf8, 0x16, 0xa7, 0x0b, + 0x49, 0x70, 0xb1, 0x17, 0x67, 0xa6, 0xe7, 0xa5, 0x16, 0x15, 0x4b, 0x30, 0x2a, 0x30, 0x6b, 0x70, + 0x06, 0xc1, 0xb8, 0x56, 0x2c, 0x1d, 0x0b, 0xe4, 0x19, 0x8c, 0xbc, 0xb8, 0x98, 0x41, 0xca, 0x9c, + 0xb9, 0x38, 0x11, 0x6e, 0x11, 0x43, 0x58, 0x8f, 0x6c, 0xa5, 0x94, 0x1c, 0x76, 0x71, 0x98, 0x53, + 0x9c, 0x3c, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, + 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, 0x2f, 0x3d, 0xb3, + 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x3f, 0x39, 0xbf, 0x38, 0x37, 0xbf, 0x18, 0x4a, + 0xe9, 0x16, 0xa7, 0x64, 0xeb, 0x83, 0x4c, 0x2d, 0x2d, 0xc9, 0xcc, 0xd1, 0x87, 0x19, 0x9f, 0xc4, + 0x06, 0x0e, 0x24, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x15, 0x63, 0x9a, 0x1b, 0x60, 0x01, + 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + CreateDog(ctx context.Context, in *MsgCreateDog, opts ...grpc.CallOption) (*MsgCreateDogResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) CreateDog(ctx context.Context, in *MsgCreateDog, opts ...grpc.CallOption) (*MsgCreateDogResponse, error) { + out := new(MsgCreateDogResponse) + err := c.cc.Invoke(ctx, "/testdata.Msg/CreateDog", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + CreateDog(context.Context, *MsgCreateDog) (*MsgCreateDogResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) CreateDog(ctx context.Context, req *MsgCreateDog) (*MsgCreateDogResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateDog not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_CreateDog_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateDog) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateDog(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/testdata.Msg/CreateDog", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateDog(ctx, req.(*MsgCreateDog)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "testdata.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "CreateDog", + Handler: _Msg_CreateDog_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "tx.proto", +} + +func (m *MsgCreateDog) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCreateDog) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateDog) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Dog != nil { + { + size, err := m.Dog.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateDogResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgCreateDogResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateDogResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintTx(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TestMsg) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TestMsg) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TestMsg) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Signers) > 0 { + for iNdEx := len(m.Signers) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signers[iNdEx]) + copy(dAtA[i:], m.Signers[iNdEx]) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signers[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgCreateDog) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Dog != nil { + l = m.Dog.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgCreateDogResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *TestMsg) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Signers) > 0 { + for _, s := range m.Signers { + l = len(s) + n += 1 + l + sovTx(uint64(l)) + } + } + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgCreateDog) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateDog: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateDog: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Dog", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Dog == nil { + m.Dog = &Dog{} + } + if err := m.Dog.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgCreateDogResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgCreateDogResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateDogResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TestMsg) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TestMsg: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TestMsg: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signers", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signers = append(m.Signers, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/testutil/testdata/tx.proto b/testutil/testdata/tx.proto new file mode 100644 index 000000000000..8f670fc50ef5 --- /dev/null +++ b/testutil/testdata/tx.proto @@ -0,0 +1,28 @@ +syntax = "proto3"; +package testdata; + +import "gogoproto/gogo.proto"; +import "testdata.proto"; + +option go_package = "github.com/cosmos/cosmos-sdk/testutil/testdata"; + +// Msg tests the Protobuf message service as defined in +// https://github.com/cosmos/cosmos-sdk/issues/7500. +service Msg { + rpc CreateDog(MsgCreateDog) returns (MsgCreateDogResponse); +} + +message MsgCreateDog { + testdata.Dog dog = 1; +} + +message MsgCreateDogResponse { + string name = 1; +} + +// TestMsg is msg type for testing protobuf message using any, as defined in +// https://github.com/cosmos/cosmos-sdk/issues/6213. +message TestMsg { + option (gogoproto.goproto_getters) = false; + repeated string signers = 1; +} diff --git a/testutil/testdata/proto.pb.go b/testutil/testdata/unknonwnproto.pb.go similarity index 70% rename from testutil/testdata/proto.pb.go rename to testutil/testdata/unknonwnproto.pb.go index 929f0d442333..b8a5425e873a 100644 --- a/testutil/testdata/proto.pb.go +++ b/testutil/testdata/unknonwnproto.pb.go @@ -1,20 +1,15 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: proto.proto +// source: unknonwnproto.proto package testdata import ( - context "context" encoding_binary "encoding/binary" fmt "fmt" types "github.com/cosmos/cosmos-sdk/codec/types" tx "github.com/cosmos/cosmos-sdk/types/tx" _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" io "io" math "math" math_bits "math/bits" @@ -62,26 +57,28 @@ func (x Customer2_City) String() string { } func (Customer2_City) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{14, 0} + return fileDescriptor_448ea787339d1228, []int{1, 0} } -type Dog struct { - Size_ string `protobuf:"bytes,1,opt,name=size,proto3" json:"size,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +type Customer1 struct { + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + SubscriptionFee float32 `protobuf:"fixed32,3,opt,name=subscription_fee,json=subscriptionFee,proto3" json:"subscription_fee,omitempty"` + Payment string `protobuf:"bytes,7,opt,name=payment,proto3" json:"payment,omitempty"` } -func (m *Dog) Reset() { *m = Dog{} } -func (m *Dog) String() string { return proto.CompactTextString(m) } -func (*Dog) ProtoMessage() {} -func (*Dog) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{0} +func (m *Customer1) Reset() { *m = Customer1{} } +func (m *Customer1) String() string { return proto.CompactTextString(m) } +func (*Customer1) ProtoMessage() {} +func (*Customer1) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{0} } -func (m *Dog) XXX_Unmarshal(b []byte) error { +func (m *Customer1) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Dog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Customer1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Dog.Marshal(b, m, deterministic) + return xxx_messageInfo_Customer1.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -91,49 +88,68 @@ func (m *Dog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *Dog) XXX_Merge(src proto.Message) { - xxx_messageInfo_Dog.Merge(m, src) +func (m *Customer1) XXX_Merge(src proto.Message) { + xxx_messageInfo_Customer1.Merge(m, src) } -func (m *Dog) XXX_Size() int { +func (m *Customer1) XXX_Size() int { return m.Size() } -func (m *Dog) XXX_DiscardUnknown() { - xxx_messageInfo_Dog.DiscardUnknown(m) +func (m *Customer1) XXX_DiscardUnknown() { + xxx_messageInfo_Customer1.DiscardUnknown(m) } -var xxx_messageInfo_Dog proto.InternalMessageInfo +var xxx_messageInfo_Customer1 proto.InternalMessageInfo -func (m *Dog) GetSize_() string { +func (m *Customer1) GetId() int32 { if m != nil { - return m.Size_ + return m.Id } - return "" + return 0 } -func (m *Dog) GetName() string { +func (m *Customer1) GetName() string { if m != nil { return m.Name } return "" } -type Cat struct { - Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker,omitempty"` - Lives int32 `protobuf:"varint,2,opt,name=lives,proto3" json:"lives,omitempty"` +func (m *Customer1) GetSubscriptionFee() float32 { + if m != nil { + return m.SubscriptionFee + } + return 0 +} + +func (m *Customer1) GetPayment() string { + if m != nil { + return m.Payment + } + return "" +} + +type Customer2 struct { + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Industry int32 `protobuf:"varint,2,opt,name=industry,proto3" json:"industry,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Fewer float32 `protobuf:"fixed32,4,opt,name=fewer,proto3" json:"fewer,omitempty"` + Reserved int64 `protobuf:"varint,1047,opt,name=reserved,proto3" json:"reserved,omitempty"` + City Customer2_City `protobuf:"varint,6,opt,name=city,proto3,enum=testdata.Customer2_City" json:"city,omitempty"` + Miscellaneous *types.Any `protobuf:"bytes,10,opt,name=miscellaneous,proto3" json:"miscellaneous,omitempty"` } -func (m *Cat) Reset() { *m = Cat{} } -func (m *Cat) String() string { return proto.CompactTextString(m) } -func (*Cat) ProtoMessage() {} -func (*Cat) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{1} +func (m *Customer2) Reset() { *m = Customer2{} } +func (m *Customer2) String() string { return proto.CompactTextString(m) } +func (*Customer2) ProtoMessage() {} +func (*Customer2) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{1} } -func (m *Cat) XXX_Unmarshal(b []byte) error { +func (m *Customer2) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Cat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Customer2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Cat.Marshal(b, m, deterministic) + return xxx_messageInfo_Customer2.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -143,100 +159,84 @@ func (m *Cat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *Cat) XXX_Merge(src proto.Message) { - xxx_messageInfo_Cat.Merge(m, src) +func (m *Customer2) XXX_Merge(src proto.Message) { + xxx_messageInfo_Customer2.Merge(m, src) } -func (m *Cat) XXX_Size() int { +func (m *Customer2) XXX_Size() int { return m.Size() } -func (m *Cat) XXX_DiscardUnknown() { - xxx_messageInfo_Cat.DiscardUnknown(m) +func (m *Customer2) XXX_DiscardUnknown() { + xxx_messageInfo_Customer2.DiscardUnknown(m) } -var xxx_messageInfo_Cat proto.InternalMessageInfo +var xxx_messageInfo_Customer2 proto.InternalMessageInfo -func (m *Cat) GetMoniker() string { +func (m *Customer2) GetId() int32 { if m != nil { - return m.Moniker + return m.Id } - return "" + return 0 } -func (m *Cat) GetLives() int32 { +func (m *Customer2) GetIndustry() int32 { if m != nil { - return m.Lives + return m.Industry } return 0 } -type HasAnimal struct { - Animal *types.Any `protobuf:"bytes,1,opt,name=animal,proto3" json:"animal,omitempty"` - X int64 `protobuf:"varint,2,opt,name=x,proto3" json:"x,omitempty"` +func (m *Customer2) GetName() string { + if m != nil { + return m.Name + } + return "" } -func (m *HasAnimal) Reset() { *m = HasAnimal{} } -func (m *HasAnimal) String() string { return proto.CompactTextString(m) } -func (*HasAnimal) ProtoMessage() {} -func (*HasAnimal) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{2} -} -func (m *HasAnimal) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *HasAnimal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_HasAnimal.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (m *Customer2) GetFewer() float32 { + if m != nil { + return m.Fewer } -} -func (m *HasAnimal) XXX_Merge(src proto.Message) { - xxx_messageInfo_HasAnimal.Merge(m, src) -} -func (m *HasAnimal) XXX_Size() int { - return m.Size() -} -func (m *HasAnimal) XXX_DiscardUnknown() { - xxx_messageInfo_HasAnimal.DiscardUnknown(m) + return 0 } -var xxx_messageInfo_HasAnimal proto.InternalMessageInfo +func (m *Customer2) GetReserved() int64 { + if m != nil { + return m.Reserved + } + return 0 +} -func (m *HasAnimal) GetAnimal() *types.Any { +func (m *Customer2) GetCity() Customer2_City { if m != nil { - return m.Animal + return m.City } - return nil + return Customer2_Laos } -func (m *HasAnimal) GetX() int64 { +func (m *Customer2) GetMiscellaneous() *types.Any { if m != nil { - return m.X + return m.Miscellaneous } - return 0 + return nil } -type HasHasAnimal struct { - HasAnimal *types.Any `protobuf:"bytes,1,opt,name=has_animal,json=hasAnimal,proto3" json:"has_animal,omitempty"` +type Nested4A struct { + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` } -func (m *HasHasAnimal) Reset() { *m = HasHasAnimal{} } -func (m *HasHasAnimal) String() string { return proto.CompactTextString(m) } -func (*HasHasAnimal) ProtoMessage() {} -func (*HasHasAnimal) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{3} +func (m *Nested4A) Reset() { *m = Nested4A{} } +func (m *Nested4A) String() string { return proto.CompactTextString(m) } +func (*Nested4A) ProtoMessage() {} +func (*Nested4A) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{2} } -func (m *HasHasAnimal) XXX_Unmarshal(b []byte) error { +func (m *Nested4A) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *HasHasAnimal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Nested4A) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_HasHasAnimal.Marshal(b, m, deterministic) + return xxx_messageInfo_Nested4A.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -246,41 +246,51 @@ func (m *HasHasAnimal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *HasHasAnimal) XXX_Merge(src proto.Message) { - xxx_messageInfo_HasHasAnimal.Merge(m, src) +func (m *Nested4A) XXX_Merge(src proto.Message) { + xxx_messageInfo_Nested4A.Merge(m, src) } -func (m *HasHasAnimal) XXX_Size() int { +func (m *Nested4A) XXX_Size() int { return m.Size() } -func (m *HasHasAnimal) XXX_DiscardUnknown() { - xxx_messageInfo_HasHasAnimal.DiscardUnknown(m) +func (m *Nested4A) XXX_DiscardUnknown() { + xxx_messageInfo_Nested4A.DiscardUnknown(m) } -var xxx_messageInfo_HasHasAnimal proto.InternalMessageInfo +var xxx_messageInfo_Nested4A proto.InternalMessageInfo -func (m *HasHasAnimal) GetHasAnimal() *types.Any { +func (m *Nested4A) GetId() int32 { if m != nil { - return m.HasAnimal + return m.Id } - return nil + return 0 +} + +func (m *Nested4A) GetName() string { + if m != nil { + return m.Name + } + return "" } -type HasHasHasAnimal struct { - HasHasAnimal *types.Any `protobuf:"bytes,1,opt,name=has_has_animal,json=hasHasAnimal,proto3" json:"has_has_animal,omitempty"` +type Nested3A struct { + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + A4 []*Nested4A `protobuf:"bytes,4,rep,name=a4,proto3" json:"a4,omitempty"` + Index map[int64]*Nested4A `protobuf:"bytes,5,rep,name=index,proto3" json:"index,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -func (m *HasHasHasAnimal) Reset() { *m = HasHasHasAnimal{} } -func (m *HasHasHasAnimal) String() string { return proto.CompactTextString(m) } -func (*HasHasHasAnimal) ProtoMessage() {} -func (*HasHasHasAnimal) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{4} +func (m *Nested3A) Reset() { *m = Nested3A{} } +func (m *Nested3A) String() string { return proto.CompactTextString(m) } +func (*Nested3A) ProtoMessage() {} +func (*Nested3A) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{3} } -func (m *HasHasHasAnimal) XXX_Unmarshal(b []byte) error { +func (m *Nested3A) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *HasHasHasAnimal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Nested3A) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_HasHasHasAnimal.Marshal(b, m, deterministic) + return xxx_messageInfo_Nested3A.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -290,85 +300,64 @@ func (m *HasHasHasAnimal) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return b[:n], nil } } -func (m *HasHasHasAnimal) XXX_Merge(src proto.Message) { - xxx_messageInfo_HasHasHasAnimal.Merge(m, src) +func (m *Nested3A) XXX_Merge(src proto.Message) { + xxx_messageInfo_Nested3A.Merge(m, src) } -func (m *HasHasHasAnimal) XXX_Size() int { +func (m *Nested3A) XXX_Size() int { return m.Size() } -func (m *HasHasHasAnimal) XXX_DiscardUnknown() { - xxx_messageInfo_HasHasHasAnimal.DiscardUnknown(m) +func (m *Nested3A) XXX_DiscardUnknown() { + xxx_messageInfo_Nested3A.DiscardUnknown(m) } -var xxx_messageInfo_HasHasHasAnimal proto.InternalMessageInfo +var xxx_messageInfo_Nested3A proto.InternalMessageInfo -func (m *HasHasHasAnimal) GetHasHasAnimal() *types.Any { +func (m *Nested3A) GetId() int32 { if m != nil { - return m.HasHasAnimal + return m.Id } - return nil + return 0 } -type EchoRequest struct { - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +func (m *Nested3A) GetName() string { + if m != nil { + return m.Name + } + return "" } -func (m *EchoRequest) Reset() { *m = EchoRequest{} } -func (m *EchoRequest) String() string { return proto.CompactTextString(m) } -func (*EchoRequest) ProtoMessage() {} -func (*EchoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{5} -} -func (m *EchoRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EchoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_EchoRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (m *Nested3A) GetA4() []*Nested4A { + if m != nil { + return m.A4 } -} -func (m *EchoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_EchoRequest.Merge(m, src) -} -func (m *EchoRequest) XXX_Size() int { - return m.Size() -} -func (m *EchoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_EchoRequest.DiscardUnknown(m) + return nil } -var xxx_messageInfo_EchoRequest proto.InternalMessageInfo - -func (m *EchoRequest) GetMessage() string { +func (m *Nested3A) GetIndex() map[int64]*Nested4A { if m != nil { - return m.Message + return m.Index } - return "" + return nil } -type EchoResponse struct { - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` +type Nested2A struct { + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Nested *Nested3A `protobuf:"bytes,3,opt,name=nested,proto3" json:"nested,omitempty"` } -func (m *EchoResponse) Reset() { *m = EchoResponse{} } -func (m *EchoResponse) String() string { return proto.CompactTextString(m) } -func (*EchoResponse) ProtoMessage() {} -func (*EchoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{6} +func (m *Nested2A) Reset() { *m = Nested2A{} } +func (m *Nested2A) String() string { return proto.CompactTextString(m) } +func (*Nested2A) ProtoMessage() {} +func (*Nested2A) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{4} } -func (m *EchoResponse) XXX_Unmarshal(b []byte) error { +func (m *Nested2A) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *EchoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Nested2A) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_EchoResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_Nested2A.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -378,41 +367,56 @@ func (m *EchoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *EchoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_EchoResponse.Merge(m, src) +func (m *Nested2A) XXX_Merge(src proto.Message) { + xxx_messageInfo_Nested2A.Merge(m, src) } -func (m *EchoResponse) XXX_Size() int { +func (m *Nested2A) XXX_Size() int { return m.Size() } -func (m *EchoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_EchoResponse.DiscardUnknown(m) +func (m *Nested2A) XXX_DiscardUnknown() { + xxx_messageInfo_Nested2A.DiscardUnknown(m) } -var xxx_messageInfo_EchoResponse proto.InternalMessageInfo +var xxx_messageInfo_Nested2A proto.InternalMessageInfo + +func (m *Nested2A) GetId() int32 { + if m != nil { + return m.Id + } + return 0 +} -func (m *EchoResponse) GetMessage() string { +func (m *Nested2A) GetName() string { if m != nil { - return m.Message + return m.Name } return "" } -type SayHelloRequest struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +func (m *Nested2A) GetNested() *Nested3A { + if m != nil { + return m.Nested + } + return nil +} + +type Nested1A struct { + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Nested *Nested2A `protobuf:"bytes,2,opt,name=nested,proto3" json:"nested,omitempty"` } -func (m *SayHelloRequest) Reset() { *m = SayHelloRequest{} } -func (m *SayHelloRequest) String() string { return proto.CompactTextString(m) } -func (*SayHelloRequest) ProtoMessage() {} -func (*SayHelloRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{7} +func (m *Nested1A) Reset() { *m = Nested1A{} } +func (m *Nested1A) String() string { return proto.CompactTextString(m) } +func (*Nested1A) ProtoMessage() {} +func (*Nested1A) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{5} } -func (m *SayHelloRequest) XXX_Unmarshal(b []byte) error { +func (m *Nested1A) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *SayHelloRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Nested1A) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_SayHelloRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_Nested1A.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -422,41 +426,50 @@ func (m *SayHelloRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return b[:n], nil } } -func (m *SayHelloRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SayHelloRequest.Merge(m, src) +func (m *Nested1A) XXX_Merge(src proto.Message) { + xxx_messageInfo_Nested1A.Merge(m, src) } -func (m *SayHelloRequest) XXX_Size() int { +func (m *Nested1A) XXX_Size() int { return m.Size() } -func (m *SayHelloRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SayHelloRequest.DiscardUnknown(m) +func (m *Nested1A) XXX_DiscardUnknown() { + xxx_messageInfo_Nested1A.DiscardUnknown(m) } -var xxx_messageInfo_SayHelloRequest proto.InternalMessageInfo +var xxx_messageInfo_Nested1A proto.InternalMessageInfo -func (m *SayHelloRequest) GetName() string { +func (m *Nested1A) GetId() int32 { if m != nil { - return m.Name + return m.Id } - return "" + return 0 +} + +func (m *Nested1A) GetNested() *Nested2A { + if m != nil { + return m.Nested + } + return nil } -type SayHelloResponse struct { - Greeting string `protobuf:"bytes,1,opt,name=greeting,proto3" json:"greeting,omitempty"` +type Nested4B struct { + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Age int32 `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` } -func (m *SayHelloResponse) Reset() { *m = SayHelloResponse{} } -func (m *SayHelloResponse) String() string { return proto.CompactTextString(m) } -func (*SayHelloResponse) ProtoMessage() {} -func (*SayHelloResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{8} +func (m *Nested4B) Reset() { *m = Nested4B{} } +func (m *Nested4B) String() string { return proto.CompactTextString(m) } +func (*Nested4B) ProtoMessage() {} +func (*Nested4B) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{6} } -func (m *SayHelloResponse) XXX_Unmarshal(b []byte) error { +func (m *Nested4B) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *SayHelloResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Nested4B) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_SayHelloResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_Nested4B.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -466,41 +479,58 @@ func (m *SayHelloResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } -func (m *SayHelloResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SayHelloResponse.Merge(m, src) +func (m *Nested4B) XXX_Merge(src proto.Message) { + xxx_messageInfo_Nested4B.Merge(m, src) } -func (m *SayHelloResponse) XXX_Size() int { +func (m *Nested4B) XXX_Size() int { return m.Size() } -func (m *SayHelloResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SayHelloResponse.DiscardUnknown(m) +func (m *Nested4B) XXX_DiscardUnknown() { + xxx_messageInfo_Nested4B.DiscardUnknown(m) +} + +var xxx_messageInfo_Nested4B proto.InternalMessageInfo + +func (m *Nested4B) GetId() int32 { + if m != nil { + return m.Id + } + return 0 } -var xxx_messageInfo_SayHelloResponse proto.InternalMessageInfo +func (m *Nested4B) GetAge() int32 { + if m != nil { + return m.Age + } + return 0 +} -func (m *SayHelloResponse) GetGreeting() string { +func (m *Nested4B) GetName() string { if m != nil { - return m.Greeting + return m.Name } return "" } -type TestAnyRequest struct { - AnyAnimal *types.Any `protobuf:"bytes,1,opt,name=any_animal,json=anyAnimal,proto3" json:"any_animal,omitempty"` +type Nested3B struct { + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Age int32 `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + B4 []*Nested4B `protobuf:"bytes,4,rep,name=b4,proto3" json:"b4,omitempty"` } -func (m *TestAnyRequest) Reset() { *m = TestAnyRequest{} } -func (m *TestAnyRequest) String() string { return proto.CompactTextString(m) } -func (*TestAnyRequest) ProtoMessage() {} -func (*TestAnyRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{9} +func (m *Nested3B) Reset() { *m = Nested3B{} } +func (m *Nested3B) String() string { return proto.CompactTextString(m) } +func (*Nested3B) ProtoMessage() {} +func (*Nested3B) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{7} } -func (m *TestAnyRequest) XXX_Unmarshal(b []byte) error { +func (m *Nested3B) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TestAnyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Nested3B) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TestAnyRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_Nested3B.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -510,86 +540,65 @@ func (m *TestAnyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return b[:n], nil } } -func (m *TestAnyRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestAnyRequest.Merge(m, src) +func (m *Nested3B) XXX_Merge(src proto.Message) { + xxx_messageInfo_Nested3B.Merge(m, src) } -func (m *TestAnyRequest) XXX_Size() int { +func (m *Nested3B) XXX_Size() int { return m.Size() } -func (m *TestAnyRequest) XXX_DiscardUnknown() { - xxx_messageInfo_TestAnyRequest.DiscardUnknown(m) +func (m *Nested3B) XXX_DiscardUnknown() { + xxx_messageInfo_Nested3B.DiscardUnknown(m) } -var xxx_messageInfo_TestAnyRequest proto.InternalMessageInfo +var xxx_messageInfo_Nested3B proto.InternalMessageInfo -func (m *TestAnyRequest) GetAnyAnimal() *types.Any { +func (m *Nested3B) GetId() int32 { if m != nil { - return m.AnyAnimal + return m.Id } - return nil + return 0 } -type TestAnyResponse struct { - HasAnimal *HasAnimal `protobuf:"bytes,1,opt,name=has_animal,json=hasAnimal,proto3" json:"has_animal,omitempty"` +func (m *Nested3B) GetAge() int32 { + if m != nil { + return m.Age + } + return 0 } -func (m *TestAnyResponse) Reset() { *m = TestAnyResponse{} } -func (m *TestAnyResponse) String() string { return proto.CompactTextString(m) } -func (*TestAnyResponse) ProtoMessage() {} -func (*TestAnyResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{10} -} -func (m *TestAnyResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TestAnyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TestAnyResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (m *Nested3B) GetName() string { + if m != nil { + return m.Name } + return "" } -func (m *TestAnyResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestAnyResponse.Merge(m, src) -} -func (m *TestAnyResponse) XXX_Size() int { - return m.Size() -} -func (m *TestAnyResponse) XXX_DiscardUnknown() { - xxx_messageInfo_TestAnyResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_TestAnyResponse proto.InternalMessageInfo -func (m *TestAnyResponse) GetHasAnimal() *HasAnimal { +func (m *Nested3B) GetB4() []*Nested4B { if m != nil { - return m.HasAnimal + return m.B4 } return nil } -// msg type for testing -type TestMsg struct { - Signers []string `protobuf:"bytes,1,rep,name=signers,proto3" json:"signers,omitempty"` +type Nested2B struct { + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Fee float64 `protobuf:"fixed64,2,opt,name=fee,proto3" json:"fee,omitempty"` + Nested *Nested3B `protobuf:"bytes,3,opt,name=nested,proto3" json:"nested,omitempty"` + Route string `protobuf:"bytes,4,opt,name=route,proto3" json:"route,omitempty"` } -func (m *TestMsg) Reset() { *m = TestMsg{} } -func (m *TestMsg) String() string { return proto.CompactTextString(m) } -func (*TestMsg) ProtoMessage() {} -func (*TestMsg) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{11} +func (m *Nested2B) Reset() { *m = Nested2B{} } +func (m *Nested2B) String() string { return proto.CompactTextString(m) } +func (*Nested2B) ProtoMessage() {} +func (*Nested2B) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{8} } -func (m *TestMsg) XXX_Unmarshal(b []byte) error { +func (m *Nested2B) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TestMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Nested2B) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TestMsg.Marshal(b, m, deterministic) + return xxx_messageInfo_Nested2B.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -599,91 +608,64 @@ func (m *TestMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *TestMsg) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestMsg.Merge(m, src) +func (m *Nested2B) XXX_Merge(src proto.Message) { + xxx_messageInfo_Nested2B.Merge(m, src) } -func (m *TestMsg) XXX_Size() int { +func (m *Nested2B) XXX_Size() int { return m.Size() } -func (m *TestMsg) XXX_DiscardUnknown() { - xxx_messageInfo_TestMsg.DiscardUnknown(m) +func (m *Nested2B) XXX_DiscardUnknown() { + xxx_messageInfo_Nested2B.DiscardUnknown(m) } -var xxx_messageInfo_TestMsg proto.InternalMessageInfo +var xxx_messageInfo_Nested2B proto.InternalMessageInfo -// bad MultiSignature with extra fields -type BadMultiSignature struct { - Signatures [][]byte `protobuf:"bytes,1,rep,name=signatures,proto3" json:"signatures,omitempty"` - MaliciousField []byte `protobuf:"bytes,5,opt,name=malicious_field,json=maliciousField,proto3" json:"malicious_field,omitempty"` - XXX_unrecognized []byte `json:"-"` +func (m *Nested2B) GetId() int32 { + if m != nil { + return m.Id + } + return 0 } -func (m *BadMultiSignature) Reset() { *m = BadMultiSignature{} } -func (m *BadMultiSignature) String() string { return proto.CompactTextString(m) } -func (*BadMultiSignature) ProtoMessage() {} -func (*BadMultiSignature) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{12} -} -func (m *BadMultiSignature) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *BadMultiSignature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_BadMultiSignature.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (m *Nested2B) GetFee() float64 { + if m != nil { + return m.Fee } -} -func (m *BadMultiSignature) XXX_Merge(src proto.Message) { - xxx_messageInfo_BadMultiSignature.Merge(m, src) -} -func (m *BadMultiSignature) XXX_Size() int { - return m.Size() -} -func (m *BadMultiSignature) XXX_DiscardUnknown() { - xxx_messageInfo_BadMultiSignature.DiscardUnknown(m) + return 0 } -var xxx_messageInfo_BadMultiSignature proto.InternalMessageInfo - -func (m *BadMultiSignature) GetSignatures() [][]byte { +func (m *Nested2B) GetNested() *Nested3B { if m != nil { - return m.Signatures + return m.Nested } return nil } -func (m *BadMultiSignature) GetMaliciousField() []byte { +func (m *Nested2B) GetRoute() string { if m != nil { - return m.MaliciousField + return m.Route } - return nil + return "" } -type Customer1 struct { - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - SubscriptionFee float32 `protobuf:"fixed32,3,opt,name=subscription_fee,json=subscriptionFee,proto3" json:"subscription_fee,omitempty"` - Payment string `protobuf:"bytes,7,opt,name=payment,proto3" json:"payment,omitempty"` +type Nested1B struct { + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Nested *Nested2B `protobuf:"bytes,2,opt,name=nested,proto3" json:"nested,omitempty"` + Age int32 `protobuf:"varint,3,opt,name=age,proto3" json:"age,omitempty"` } -func (m *Customer1) Reset() { *m = Customer1{} } -func (m *Customer1) String() string { return proto.CompactTextString(m) } -func (*Customer1) ProtoMessage() {} -func (*Customer1) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{13} +func (m *Nested1B) Reset() { *m = Nested1B{} } +func (m *Nested1B) String() string { return proto.CompactTextString(m) } +func (*Nested1B) ProtoMessage() {} +func (*Nested1B) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{9} } -func (m *Customer1) XXX_Unmarshal(b []byte) error { +func (m *Nested1B) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Customer1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Nested1B) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Customer1.Marshal(b, m, deterministic) + return xxx_messageInfo_Nested1B.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -693,68 +675,64 @@ func (m *Customer1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *Customer1) XXX_Merge(src proto.Message) { - xxx_messageInfo_Customer1.Merge(m, src) +func (m *Nested1B) XXX_Merge(src proto.Message) { + xxx_messageInfo_Nested1B.Merge(m, src) } -func (m *Customer1) XXX_Size() int { +func (m *Nested1B) XXX_Size() int { return m.Size() } -func (m *Customer1) XXX_DiscardUnknown() { - xxx_messageInfo_Customer1.DiscardUnknown(m) +func (m *Nested1B) XXX_DiscardUnknown() { + xxx_messageInfo_Nested1B.DiscardUnknown(m) } -var xxx_messageInfo_Customer1 proto.InternalMessageInfo +var xxx_messageInfo_Nested1B proto.InternalMessageInfo -func (m *Customer1) GetId() int32 { +func (m *Nested1B) GetId() int32 { if m != nil { return m.Id } return 0 } -func (m *Customer1) GetName() string { +func (m *Nested1B) GetNested() *Nested2B { if m != nil { - return m.Name + return m.Nested } - return "" + return nil } -func (m *Customer1) GetSubscriptionFee() float32 { +func (m *Nested1B) GetAge() int32 { if m != nil { - return m.SubscriptionFee + return m.Age } return 0 } -func (m *Customer1) GetPayment() string { - if m != nil { - return m.Payment - } - return "" -} - -type Customer2 struct { - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Industry int32 `protobuf:"varint,2,opt,name=industry,proto3" json:"industry,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Fewer float32 `protobuf:"fixed32,4,opt,name=fewer,proto3" json:"fewer,omitempty"` - Reserved int64 `protobuf:"varint,1047,opt,name=reserved,proto3" json:"reserved,omitempty"` - City Customer2_City `protobuf:"varint,6,opt,name=city,proto3,enum=testdata.Customer2_City" json:"city,omitempty"` - Miscellaneous *types.Any `protobuf:"bytes,10,opt,name=miscellaneous,proto3" json:"miscellaneous,omitempty"` +type Customer3 struct { + Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Sf float32 `protobuf:"fixed32,3,opt,name=sf,proto3" json:"sf,omitempty"` + Surcharge float32 `protobuf:"fixed32,4,opt,name=surcharge,proto3" json:"surcharge,omitempty"` + Destination string `protobuf:"bytes,5,opt,name=destination,proto3" json:"destination,omitempty"` + // Types that are valid to be assigned to Payment: + // *Customer3_CreditCardNo + // *Customer3_ChequeNo + Payment isCustomer3_Payment `protobuf_oneof:"payment"` + Original *Customer1 `protobuf:"bytes,9,opt,name=original,proto3" json:"original,omitempty"` } -func (m *Customer2) Reset() { *m = Customer2{} } -func (m *Customer2) String() string { return proto.CompactTextString(m) } -func (*Customer2) ProtoMessage() {} -func (*Customer2) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{14} +func (m *Customer3) Reset() { *m = Customer3{} } +func (m *Customer3) String() string { return proto.CompactTextString(m) } +func (*Customer3) ProtoMessage() {} +func (*Customer3) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{10} } -func (m *Customer2) XXX_Unmarshal(b []byte) error { +func (m *Customer3) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Customer2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Customer3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Customer2.Marshal(b, m, deterministic) + return xxx_messageInfo_Customer3.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -764,84 +742,134 @@ func (m *Customer2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *Customer2) XXX_Merge(src proto.Message) { - xxx_messageInfo_Customer2.Merge(m, src) +func (m *Customer3) XXX_Merge(src proto.Message) { + xxx_messageInfo_Customer3.Merge(m, src) } -func (m *Customer2) XXX_Size() int { +func (m *Customer3) XXX_Size() int { return m.Size() } -func (m *Customer2) XXX_DiscardUnknown() { - xxx_messageInfo_Customer2.DiscardUnknown(m) +func (m *Customer3) XXX_DiscardUnknown() { + xxx_messageInfo_Customer3.DiscardUnknown(m) } -var xxx_messageInfo_Customer2 proto.InternalMessageInfo +var xxx_messageInfo_Customer3 proto.InternalMessageInfo -func (m *Customer2) GetId() int32 { +type isCustomer3_Payment interface { + isCustomer3_Payment() + MarshalTo([]byte) (int, error) + Size() int +} + +type Customer3_CreditCardNo struct { + CreditCardNo string `protobuf:"bytes,7,opt,name=credit_card_no,json=creditCardNo,proto3,oneof" json:"credit_card_no,omitempty"` +} +type Customer3_ChequeNo struct { + ChequeNo string `protobuf:"bytes,8,opt,name=cheque_no,json=chequeNo,proto3,oneof" json:"cheque_no,omitempty"` +} + +func (*Customer3_CreditCardNo) isCustomer3_Payment() {} +func (*Customer3_ChequeNo) isCustomer3_Payment() {} + +func (m *Customer3) GetPayment() isCustomer3_Payment { if m != nil { - return m.Id + return m.Payment } - return 0 + return nil } -func (m *Customer2) GetIndustry() int32 { +func (m *Customer3) GetId() int32 { if m != nil { - return m.Industry + return m.Id } return 0 } -func (m *Customer2) GetName() string { +func (m *Customer3) GetName() string { if m != nil { return m.Name } return "" } -func (m *Customer2) GetFewer() float32 { +func (m *Customer3) GetSf() float32 { if m != nil { - return m.Fewer + return m.Sf } return 0 } -func (m *Customer2) GetReserved() int64 { +func (m *Customer3) GetSurcharge() float32 { if m != nil { - return m.Reserved + return m.Surcharge } return 0 } -func (m *Customer2) GetCity() Customer2_City { +func (m *Customer3) GetDestination() string { if m != nil { - return m.City + return m.Destination } - return Customer2_Laos + return "" } -func (m *Customer2) GetMiscellaneous() *types.Any { +func (m *Customer3) GetCreditCardNo() string { + if x, ok := m.GetPayment().(*Customer3_CreditCardNo); ok { + return x.CreditCardNo + } + return "" +} + +func (m *Customer3) GetChequeNo() string { + if x, ok := m.GetPayment().(*Customer3_ChequeNo); ok { + return x.ChequeNo + } + return "" +} + +func (m *Customer3) GetOriginal() *Customer1 { if m != nil { - return m.Miscellaneous + return m.Original } return nil } -type Nested4A struct { - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +// XXX_OneofWrappers is for the internal use of the proto package. +func (*Customer3) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*Customer3_CreditCardNo)(nil), + (*Customer3_ChequeNo)(nil), + } } -func (m *Nested4A) Reset() { *m = Nested4A{} } -func (m *Nested4A) String() string { return proto.CompactTextString(m) } -func (*Nested4A) ProtoMessage() {} -func (*Nested4A) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{15} +type TestVersion1 struct { + X int64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` + A *TestVersion1 `protobuf:"bytes,2,opt,name=a,proto3" json:"a,omitempty"` + B *TestVersion1 `protobuf:"bytes,3,opt,name=b,proto3" json:"b,omitempty"` + C []*TestVersion1 `protobuf:"bytes,4,rep,name=c,proto3" json:"c,omitempty"` + D []TestVersion1 `protobuf:"bytes,5,rep,name=d,proto3" json:"d"` + // Types that are valid to be assigned to Sum: + // *TestVersion1_E + // *TestVersion1_F + Sum isTestVersion1_Sum `protobuf_oneof:"sum"` + G *types.Any `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` + H []*TestVersion1 `protobuf:"bytes,9,rep,name=h,proto3" json:"h,omitempty"` + // google.protobuf.Timestamp i = 10; + // google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true]; + *Customer1 `protobuf:"bytes,12,opt,name=k,proto3,embedded=k" json:"k,omitempty"` } -func (m *Nested4A) XXX_Unmarshal(b []byte) error { + +func (m *TestVersion1) Reset() { *m = TestVersion1{} } +func (m *TestVersion1) String() string { return proto.CompactTextString(m) } +func (*TestVersion1) ProtoMessage() {} +func (*TestVersion1) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{11} +} +func (m *TestVersion1) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Nested4A) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *TestVersion1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Nested4A.Marshal(b, m, deterministic) + return xxx_messageInfo_TestVersion1.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -851,118 +879,142 @@ func (m *Nested4A) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *Nested4A) XXX_Merge(src proto.Message) { - xxx_messageInfo_Nested4A.Merge(m, src) +func (m *TestVersion1) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestVersion1.Merge(m, src) } -func (m *Nested4A) XXX_Size() int { +func (m *TestVersion1) XXX_Size() int { return m.Size() } -func (m *Nested4A) XXX_DiscardUnknown() { - xxx_messageInfo_Nested4A.DiscardUnknown(m) +func (m *TestVersion1) XXX_DiscardUnknown() { + xxx_messageInfo_TestVersion1.DiscardUnknown(m) } -var xxx_messageInfo_Nested4A proto.InternalMessageInfo +var xxx_messageInfo_TestVersion1 proto.InternalMessageInfo -func (m *Nested4A) GetId() int32 { +type isTestVersion1_Sum interface { + isTestVersion1_Sum() + MarshalTo([]byte) (int, error) + Size() int +} + +type TestVersion1_E struct { + E int32 `protobuf:"varint,6,opt,name=e,proto3,oneof" json:"e,omitempty"` +} +type TestVersion1_F struct { + F *TestVersion1 `protobuf:"bytes,7,opt,name=f,proto3,oneof" json:"f,omitempty"` +} + +func (*TestVersion1_E) isTestVersion1_Sum() {} +func (*TestVersion1_F) isTestVersion1_Sum() {} + +func (m *TestVersion1) GetSum() isTestVersion1_Sum { if m != nil { - return m.Id + return m.Sum } - return 0 + return nil } -func (m *Nested4A) GetName() string { +func (m *TestVersion1) GetX() int64 { if m != nil { - return m.Name + return m.X } - return "" + return 0 } -type Nested3A struct { - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - A4 []*Nested4A `protobuf:"bytes,4,rep,name=a4,proto3" json:"a4,omitempty"` - Index map[int64]*Nested4A `protobuf:"bytes,5,rep,name=index,proto3" json:"index,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +func (m *TestVersion1) GetA() *TestVersion1 { + if m != nil { + return m.A + } + return nil } -func (m *Nested3A) Reset() { *m = Nested3A{} } -func (m *Nested3A) String() string { return proto.CompactTextString(m) } -func (*Nested3A) ProtoMessage() {} -func (*Nested3A) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{16} -} -func (m *Nested3A) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Nested3A) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Nested3A.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (m *TestVersion1) GetB() *TestVersion1 { + if m != nil { + return m.B } -} -func (m *Nested3A) XXX_Merge(src proto.Message) { - xxx_messageInfo_Nested3A.Merge(m, src) -} -func (m *Nested3A) XXX_Size() int { - return m.Size() -} -func (m *Nested3A) XXX_DiscardUnknown() { - xxx_messageInfo_Nested3A.DiscardUnknown(m) + return nil } -var xxx_messageInfo_Nested3A proto.InternalMessageInfo +func (m *TestVersion1) GetC() []*TestVersion1 { + if m != nil { + return m.C + } + return nil +} -func (m *Nested3A) GetId() int32 { +func (m *TestVersion1) GetD() []TestVersion1 { if m != nil { - return m.Id + return m.D + } + return nil +} + +func (m *TestVersion1) GetE() int32 { + if x, ok := m.GetSum().(*TestVersion1_E); ok { + return x.E } return 0 } -func (m *Nested3A) GetName() string { - if m != nil { - return m.Name +func (m *TestVersion1) GetF() *TestVersion1 { + if x, ok := m.GetSum().(*TestVersion1_F); ok { + return x.F } - return "" + return nil } -func (m *Nested3A) GetA4() []*Nested4A { +func (m *TestVersion1) GetG() *types.Any { if m != nil { - return m.A4 + return m.G } return nil } -func (m *Nested3A) GetIndex() map[int64]*Nested4A { +func (m *TestVersion1) GetH() []*TestVersion1 { if m != nil { - return m.Index + return m.H } return nil } -type Nested2A struct { - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Nested *Nested3A `protobuf:"bytes,3,opt,name=nested,proto3" json:"nested,omitempty"` +// XXX_OneofWrappers is for the internal use of the proto package. +func (*TestVersion1) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*TestVersion1_E)(nil), + (*TestVersion1_F)(nil), + } } -func (m *Nested2A) Reset() { *m = Nested2A{} } -func (m *Nested2A) String() string { return proto.CompactTextString(m) } -func (*Nested2A) ProtoMessage() {} -func (*Nested2A) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{17} +type TestVersion2 struct { + X int64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` + A *TestVersion2 `protobuf:"bytes,2,opt,name=a,proto3" json:"a,omitempty"` + B *TestVersion2 `protobuf:"bytes,3,opt,name=b,proto3" json:"b,omitempty"` + C []*TestVersion2 `protobuf:"bytes,4,rep,name=c,proto3" json:"c,omitempty"` + D []*TestVersion2 `protobuf:"bytes,5,rep,name=d,proto3" json:"d,omitempty"` + // Types that are valid to be assigned to Sum: + // *TestVersion2_E + // *TestVersion2_F + Sum isTestVersion2_Sum `protobuf_oneof:"sum"` + G *types.Any `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` + H []*TestVersion1 `protobuf:"bytes,9,rep,name=h,proto3" json:"h,omitempty"` + // google.protobuf.Timestamp i = 10; + // google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true]; + *Customer1 `protobuf:"bytes,12,opt,name=k,proto3,embedded=k" json:"k,omitempty"` + NewField uint64 `protobuf:"varint,25,opt,name=new_field,json=newField,proto3" json:"new_field,omitempty"` } -func (m *Nested2A) XXX_Unmarshal(b []byte) error { + +func (m *TestVersion2) Reset() { *m = TestVersion2{} } +func (m *TestVersion2) String() string { return proto.CompactTextString(m) } +func (*TestVersion2) ProtoMessage() {} +func (*TestVersion2) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{12} +} +func (m *TestVersion2) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Nested2A) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *TestVersion2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Nested2A.Marshal(b, m, deterministic) + return xxx_messageInfo_TestVersion2.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -972,238 +1024,149 @@ func (m *Nested2A) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *Nested2A) XXX_Merge(src proto.Message) { - xxx_messageInfo_Nested2A.Merge(m, src) +func (m *TestVersion2) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestVersion2.Merge(m, src) } -func (m *Nested2A) XXX_Size() int { +func (m *TestVersion2) XXX_Size() int { return m.Size() } -func (m *Nested2A) XXX_DiscardUnknown() { - xxx_messageInfo_Nested2A.DiscardUnknown(m) +func (m *TestVersion2) XXX_DiscardUnknown() { + xxx_messageInfo_TestVersion2.DiscardUnknown(m) } -var xxx_messageInfo_Nested2A proto.InternalMessageInfo +var xxx_messageInfo_TestVersion2 proto.InternalMessageInfo -func (m *Nested2A) GetId() int32 { - if m != nil { - return m.Id - } - return 0 +type isTestVersion2_Sum interface { + isTestVersion2_Sum() + MarshalTo([]byte) (int, error) + Size() int } -func (m *Nested2A) GetName() string { - if m != nil { - return m.Name - } - return "" +type TestVersion2_E struct { + E int32 `protobuf:"varint,6,opt,name=e,proto3,oneof" json:"e,omitempty"` +} +type TestVersion2_F struct { + F *TestVersion2 `protobuf:"bytes,7,opt,name=f,proto3,oneof" json:"f,omitempty"` } -func (m *Nested2A) GetNested() *Nested3A { +func (*TestVersion2_E) isTestVersion2_Sum() {} +func (*TestVersion2_F) isTestVersion2_Sum() {} + +func (m *TestVersion2) GetSum() isTestVersion2_Sum { if m != nil { - return m.Nested + return m.Sum } return nil } -type Nested1A struct { - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Nested *Nested2A `protobuf:"bytes,2,opt,name=nested,proto3" json:"nested,omitempty"` -} - -func (m *Nested1A) Reset() { *m = Nested1A{} } -func (m *Nested1A) String() string { return proto.CompactTextString(m) } -func (*Nested1A) ProtoMessage() {} -func (*Nested1A) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{18} -} -func (m *Nested1A) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Nested1A) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Nested1A.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Nested1A) XXX_Merge(src proto.Message) { - xxx_messageInfo_Nested1A.Merge(m, src) -} -func (m *Nested1A) XXX_Size() int { - return m.Size() -} -func (m *Nested1A) XXX_DiscardUnknown() { - xxx_messageInfo_Nested1A.DiscardUnknown(m) -} - -var xxx_messageInfo_Nested1A proto.InternalMessageInfo - -func (m *Nested1A) GetId() int32 { +func (m *TestVersion2) GetX() int64 { if m != nil { - return m.Id + return m.X } return 0 } -func (m *Nested1A) GetNested() *Nested2A { +func (m *TestVersion2) GetA() *TestVersion2 { if m != nil { - return m.Nested + return m.A } return nil } -type Nested4B struct { - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Age int32 `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` -} - -func (m *Nested4B) Reset() { *m = Nested4B{} } -func (m *Nested4B) String() string { return proto.CompactTextString(m) } -func (*Nested4B) ProtoMessage() {} -func (*Nested4B) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{19} -} -func (m *Nested4B) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Nested4B) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Nested4B.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Nested4B) XXX_Merge(src proto.Message) { - xxx_messageInfo_Nested4B.Merge(m, src) -} -func (m *Nested4B) XXX_Size() int { - return m.Size() -} -func (m *Nested4B) XXX_DiscardUnknown() { - xxx_messageInfo_Nested4B.DiscardUnknown(m) -} - -var xxx_messageInfo_Nested4B proto.InternalMessageInfo - -func (m *Nested4B) GetId() int32 { +func (m *TestVersion2) GetB() *TestVersion2 { if m != nil { - return m.Id + return m.B } - return 0 + return nil } -func (m *Nested4B) GetAge() int32 { +func (m *TestVersion2) GetC() []*TestVersion2 { if m != nil { - return m.Age + return m.C } - return 0 + return nil } -func (m *Nested4B) GetName() string { +func (m *TestVersion2) GetD() []*TestVersion2 { if m != nil { - return m.Name + return m.D } - return "" + return nil } -type Nested3B struct { - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Age int32 `protobuf:"varint,2,opt,name=age,proto3" json:"age,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - B4 []*Nested4B `protobuf:"bytes,4,rep,name=b4,proto3" json:"b4,omitempty"` +func (m *TestVersion2) GetE() int32 { + if x, ok := m.GetSum().(*TestVersion2_E); ok { + return x.E + } + return 0 } -func (m *Nested3B) Reset() { *m = Nested3B{} } -func (m *Nested3B) String() string { return proto.CompactTextString(m) } -func (*Nested3B) ProtoMessage() {} -func (*Nested3B) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{20} -} -func (m *Nested3B) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Nested3B) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Nested3B.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (m *TestVersion2) GetF() *TestVersion2 { + if x, ok := m.GetSum().(*TestVersion2_F); ok { + return x.F } + return nil } -func (m *Nested3B) XXX_Merge(src proto.Message) { - xxx_messageInfo_Nested3B.Merge(m, src) -} -func (m *Nested3B) XXX_Size() int { - return m.Size() -} -func (m *Nested3B) XXX_DiscardUnknown() { - xxx_messageInfo_Nested3B.DiscardUnknown(m) -} - -var xxx_messageInfo_Nested3B proto.InternalMessageInfo -func (m *Nested3B) GetId() int32 { +func (m *TestVersion2) GetG() *types.Any { if m != nil { - return m.Id + return m.G } - return 0 + return nil } -func (m *Nested3B) GetAge() int32 { +func (m *TestVersion2) GetH() []*TestVersion1 { if m != nil { - return m.Age + return m.H } - return 0 + return nil } -func (m *Nested3B) GetName() string { +func (m *TestVersion2) GetNewField() uint64 { if m != nil { - return m.Name + return m.NewField } - return "" + return 0 } -func (m *Nested3B) GetB4() []*Nested4B { - if m != nil { - return m.B4 +// XXX_OneofWrappers is for the internal use of the proto package. +func (*TestVersion2) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*TestVersion2_E)(nil), + (*TestVersion2_F)(nil), } - return nil } -type Nested2B struct { - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Fee float64 `protobuf:"fixed64,2,opt,name=fee,proto3" json:"fee,omitempty"` - Nested *Nested3B `protobuf:"bytes,3,opt,name=nested,proto3" json:"nested,omitempty"` - Route string `protobuf:"bytes,4,opt,name=route,proto3" json:"route,omitempty"` +type TestVersion3 struct { + X int64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` + A *TestVersion3 `protobuf:"bytes,2,opt,name=a,proto3" json:"a,omitempty"` + B *TestVersion3 `protobuf:"bytes,3,opt,name=b,proto3" json:"b,omitempty"` + C []*TestVersion3 `protobuf:"bytes,4,rep,name=c,proto3" json:"c,omitempty"` + D []*TestVersion3 `protobuf:"bytes,5,rep,name=d,proto3" json:"d,omitempty"` + // Types that are valid to be assigned to Sum: + // *TestVersion3_E + // *TestVersion3_F + Sum isTestVersion3_Sum `protobuf_oneof:"sum"` + G *types.Any `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` + H []*TestVersion1 `protobuf:"bytes,9,rep,name=h,proto3" json:"h,omitempty"` + // google.protobuf.Timestamp i = 10; + // google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true]; + *Customer1 `protobuf:"bytes,12,opt,name=k,proto3,embedded=k" json:"k,omitempty"` + NonCriticalField string `protobuf:"bytes,1031,opt,name=non_critical_field,json=nonCriticalField,proto3" json:"non_critical_field,omitempty"` } -func (m *Nested2B) Reset() { *m = Nested2B{} } -func (m *Nested2B) String() string { return proto.CompactTextString(m) } -func (*Nested2B) ProtoMessage() {} -func (*Nested2B) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{21} +func (m *TestVersion3) Reset() { *m = TestVersion3{} } +func (m *TestVersion3) String() string { return proto.CompactTextString(m) } +func (*TestVersion3) ProtoMessage() {} +func (*TestVersion3) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{13} } -func (m *Nested2B) XXX_Unmarshal(b []byte) error { +func (m *TestVersion3) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Nested2B) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *TestVersion3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Nested2B.Marshal(b, m, deterministic) + return xxx_messageInfo_TestVersion3.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1213,131 +1176,148 @@ func (m *Nested2B) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *Nested2B) XXX_Merge(src proto.Message) { - xxx_messageInfo_Nested2B.Merge(m, src) +func (m *TestVersion3) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestVersion3.Merge(m, src) } -func (m *Nested2B) XXX_Size() int { +func (m *TestVersion3) XXX_Size() int { return m.Size() } -func (m *Nested2B) XXX_DiscardUnknown() { - xxx_messageInfo_Nested2B.DiscardUnknown(m) +func (m *TestVersion3) XXX_DiscardUnknown() { + xxx_messageInfo_TestVersion3.DiscardUnknown(m) } -var xxx_messageInfo_Nested2B proto.InternalMessageInfo +var xxx_messageInfo_TestVersion3 proto.InternalMessageInfo -func (m *Nested2B) GetId() int32 { +type isTestVersion3_Sum interface { + isTestVersion3_Sum() + MarshalTo([]byte) (int, error) + Size() int +} + +type TestVersion3_E struct { + E int32 `protobuf:"varint,6,opt,name=e,proto3,oneof" json:"e,omitempty"` +} +type TestVersion3_F struct { + F *TestVersion3 `protobuf:"bytes,7,opt,name=f,proto3,oneof" json:"f,omitempty"` +} + +func (*TestVersion3_E) isTestVersion3_Sum() {} +func (*TestVersion3_F) isTestVersion3_Sum() {} + +func (m *TestVersion3) GetSum() isTestVersion3_Sum { if m != nil { - return m.Id + return m.Sum } - return 0 + return nil } -func (m *Nested2B) GetFee() float64 { +func (m *TestVersion3) GetX() int64 { if m != nil { - return m.Fee + return m.X } return 0 } -func (m *Nested2B) GetNested() *Nested3B { +func (m *TestVersion3) GetA() *TestVersion3 { if m != nil { - return m.Nested + return m.A } return nil } -func (m *Nested2B) GetRoute() string { +func (m *TestVersion3) GetB() *TestVersion3 { if m != nil { - return m.Route + return m.B } - return "" + return nil } -type Nested1B struct { - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Nested *Nested2B `protobuf:"bytes,2,opt,name=nested,proto3" json:"nested,omitempty"` - Age int32 `protobuf:"varint,3,opt,name=age,proto3" json:"age,omitempty"` +func (m *TestVersion3) GetC() []*TestVersion3 { + if m != nil { + return m.C + } + return nil } -func (m *Nested1B) Reset() { *m = Nested1B{} } -func (m *Nested1B) String() string { return proto.CompactTextString(m) } -func (*Nested1B) ProtoMessage() {} -func (*Nested1B) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{22} -} -func (m *Nested1B) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Nested1B) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Nested1B.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (m *TestVersion3) GetD() []*TestVersion3 { + if m != nil { + return m.D } + return nil } -func (m *Nested1B) XXX_Merge(src proto.Message) { - xxx_messageInfo_Nested1B.Merge(m, src) -} -func (m *Nested1B) XXX_Size() int { - return m.Size() -} -func (m *Nested1B) XXX_DiscardUnknown() { - xxx_messageInfo_Nested1B.DiscardUnknown(m) + +func (m *TestVersion3) GetE() int32 { + if x, ok := m.GetSum().(*TestVersion3_E); ok { + return x.E + } + return 0 } -var xxx_messageInfo_Nested1B proto.InternalMessageInfo +func (m *TestVersion3) GetF() *TestVersion3 { + if x, ok := m.GetSum().(*TestVersion3_F); ok { + return x.F + } + return nil +} -func (m *Nested1B) GetId() int32 { +func (m *TestVersion3) GetG() *types.Any { if m != nil { - return m.Id + return m.G } - return 0 + return nil } -func (m *Nested1B) GetNested() *Nested2B { +func (m *TestVersion3) GetH() []*TestVersion1 { if m != nil { - return m.Nested + return m.H } return nil } -func (m *Nested1B) GetAge() int32 { +func (m *TestVersion3) GetNonCriticalField() string { if m != nil { - return m.Age + return m.NonCriticalField } - return 0 + return "" } -type Customer3 struct { - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Sf float32 `protobuf:"fixed32,3,opt,name=sf,proto3" json:"sf,omitempty"` - Surcharge float32 `protobuf:"fixed32,4,opt,name=surcharge,proto3" json:"surcharge,omitempty"` - Destination string `protobuf:"bytes,5,opt,name=destination,proto3" json:"destination,omitempty"` - // Types that are valid to be assigned to Payment: - // *Customer3_CreditCardNo - // *Customer3_ChequeNo - Payment isCustomer3_Payment `protobuf_oneof:"payment"` - Original *Customer1 `protobuf:"bytes,9,opt,name=original,proto3" json:"original,omitempty"` +// XXX_OneofWrappers is for the internal use of the proto package. +func (*TestVersion3) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*TestVersion3_E)(nil), + (*TestVersion3_F)(nil), + } } -func (m *Customer3) Reset() { *m = Customer3{} } -func (m *Customer3) String() string { return proto.CompactTextString(m) } -func (*Customer3) ProtoMessage() {} -func (*Customer3) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{23} +type TestVersion3LoneOneOfValue struct { + X int64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` + A *TestVersion3 `protobuf:"bytes,2,opt,name=a,proto3" json:"a,omitempty"` + B *TestVersion3 `protobuf:"bytes,3,opt,name=b,proto3" json:"b,omitempty"` + C []*TestVersion3 `protobuf:"bytes,4,rep,name=c,proto3" json:"c,omitempty"` + D []*TestVersion3 `protobuf:"bytes,5,rep,name=d,proto3" json:"d,omitempty"` + // Types that are valid to be assigned to Sum: + // *TestVersion3LoneOneOfValue_E + Sum isTestVersion3LoneOneOfValue_Sum `protobuf_oneof:"sum"` + G *types.Any `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` + H []*TestVersion1 `protobuf:"bytes,9,rep,name=h,proto3" json:"h,omitempty"` + // google.protobuf.Timestamp i = 10; + // google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true]; + *Customer1 `protobuf:"bytes,12,opt,name=k,proto3,embedded=k" json:"k,omitempty"` + NonCriticalField string `protobuf:"bytes,1031,opt,name=non_critical_field,json=nonCriticalField,proto3" json:"non_critical_field,omitempty"` } -func (m *Customer3) XXX_Unmarshal(b []byte) error { + +func (m *TestVersion3LoneOneOfValue) Reset() { *m = TestVersion3LoneOneOfValue{} } +func (m *TestVersion3LoneOneOfValue) String() string { return proto.CompactTextString(m) } +func (*TestVersion3LoneOneOfValue) ProtoMessage() {} +func (*TestVersion3LoneOneOfValue) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{14} +} +func (m *TestVersion3LoneOneOfValue) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Customer3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *TestVersion3LoneOneOfValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Customer3.Marshal(b, m, deterministic) + return xxx_messageInfo_TestVersion3LoneOneOfValue.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1347,134 +1327,138 @@ func (m *Customer3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *Customer3) XXX_Merge(src proto.Message) { - xxx_messageInfo_Customer3.Merge(m, src) +func (m *TestVersion3LoneOneOfValue) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestVersion3LoneOneOfValue.Merge(m, src) } -func (m *Customer3) XXX_Size() int { +func (m *TestVersion3LoneOneOfValue) XXX_Size() int { return m.Size() } -func (m *Customer3) XXX_DiscardUnknown() { - xxx_messageInfo_Customer3.DiscardUnknown(m) +func (m *TestVersion3LoneOneOfValue) XXX_DiscardUnknown() { + xxx_messageInfo_TestVersion3LoneOneOfValue.DiscardUnknown(m) } -var xxx_messageInfo_Customer3 proto.InternalMessageInfo +var xxx_messageInfo_TestVersion3LoneOneOfValue proto.InternalMessageInfo -type isCustomer3_Payment interface { - isCustomer3_Payment() +type isTestVersion3LoneOneOfValue_Sum interface { + isTestVersion3LoneOneOfValue_Sum() MarshalTo([]byte) (int, error) Size() int } -type Customer3_CreditCardNo struct { - CreditCardNo string `protobuf:"bytes,7,opt,name=credit_card_no,json=creditCardNo,proto3,oneof" json:"credit_card_no,omitempty"` -} -type Customer3_ChequeNo struct { - ChequeNo string `protobuf:"bytes,8,opt,name=cheque_no,json=chequeNo,proto3,oneof" json:"cheque_no,omitempty"` +type TestVersion3LoneOneOfValue_E struct { + E int32 `protobuf:"varint,6,opt,name=e,proto3,oneof" json:"e,omitempty"` } -func (*Customer3_CreditCardNo) isCustomer3_Payment() {} -func (*Customer3_ChequeNo) isCustomer3_Payment() {} +func (*TestVersion3LoneOneOfValue_E) isTestVersion3LoneOneOfValue_Sum() {} -func (m *Customer3) GetPayment() isCustomer3_Payment { +func (m *TestVersion3LoneOneOfValue) GetSum() isTestVersion3LoneOneOfValue_Sum { if m != nil { - return m.Payment + return m.Sum } return nil } -func (m *Customer3) GetId() int32 { +func (m *TestVersion3LoneOneOfValue) GetX() int64 { if m != nil { - return m.Id + return m.X } return 0 } -func (m *Customer3) GetName() string { +func (m *TestVersion3LoneOneOfValue) GetA() *TestVersion3 { if m != nil { - return m.Name + return m.A } - return "" + return nil } -func (m *Customer3) GetSf() float32 { +func (m *TestVersion3LoneOneOfValue) GetB() *TestVersion3 { if m != nil { - return m.Sf + return m.B } - return 0 + return nil } -func (m *Customer3) GetSurcharge() float32 { +func (m *TestVersion3LoneOneOfValue) GetC() []*TestVersion3 { if m != nil { - return m.Surcharge + return m.C } - return 0 + return nil } -func (m *Customer3) GetDestination() string { +func (m *TestVersion3LoneOneOfValue) GetD() []*TestVersion3 { if m != nil { - return m.Destination + return m.D } - return "" + return nil } -func (m *Customer3) GetCreditCardNo() string { - if x, ok := m.GetPayment().(*Customer3_CreditCardNo); ok { - return x.CreditCardNo +func (m *TestVersion3LoneOneOfValue) GetE() int32 { + if x, ok := m.GetSum().(*TestVersion3LoneOneOfValue_E); ok { + return x.E } - return "" + return 0 } -func (m *Customer3) GetChequeNo() string { - if x, ok := m.GetPayment().(*Customer3_ChequeNo); ok { - return x.ChequeNo +func (m *TestVersion3LoneOneOfValue) GetG() *types.Any { + if m != nil { + return m.G } - return "" + return nil } -func (m *Customer3) GetOriginal() *Customer1 { +func (m *TestVersion3LoneOneOfValue) GetH() []*TestVersion1 { if m != nil { - return m.Original + return m.H } return nil } +func (m *TestVersion3LoneOneOfValue) GetNonCriticalField() string { + if m != nil { + return m.NonCriticalField + } + return "" +} + // XXX_OneofWrappers is for the internal use of the proto package. -func (*Customer3) XXX_OneofWrappers() []interface{} { +func (*TestVersion3LoneOneOfValue) XXX_OneofWrappers() []interface{} { return []interface{}{ - (*Customer3_CreditCardNo)(nil), - (*Customer3_ChequeNo)(nil), + (*TestVersion3LoneOneOfValue_E)(nil), } } -type TestVersion1 struct { +type TestVersion3LoneNesting struct { X int64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` - A *TestVersion1 `protobuf:"bytes,2,opt,name=a,proto3" json:"a,omitempty"` - B *TestVersion1 `protobuf:"bytes,3,opt,name=b,proto3" json:"b,omitempty"` - C []*TestVersion1 `protobuf:"bytes,4,rep,name=c,proto3" json:"c,omitempty"` - D []TestVersion1 `protobuf:"bytes,5,rep,name=d,proto3" json:"d"` + A *TestVersion3 `protobuf:"bytes,2,opt,name=a,proto3" json:"a,omitempty"` + B *TestVersion3 `protobuf:"bytes,3,opt,name=b,proto3" json:"b,omitempty"` + C []*TestVersion3 `protobuf:"bytes,4,rep,name=c,proto3" json:"c,omitempty"` + D []*TestVersion3 `protobuf:"bytes,5,rep,name=d,proto3" json:"d,omitempty"` // Types that are valid to be assigned to Sum: - // *TestVersion1_E - // *TestVersion1_F - Sum isTestVersion1_Sum `protobuf_oneof:"sum"` - G *types.Any `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` - H []*TestVersion1 `protobuf:"bytes,9,rep,name=h,proto3" json:"h,omitempty"` + // *TestVersion3LoneNesting_F + Sum isTestVersion3LoneNesting_Sum `protobuf_oneof:"sum"` + G *types.Any `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` + H []*TestVersion1 `protobuf:"bytes,9,rep,name=h,proto3" json:"h,omitempty"` // google.protobuf.Timestamp i = 10; // google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true]; - *Customer1 `protobuf:"bytes,12,opt,name=k,proto3,embedded=k" json:"k,omitempty"` + *Customer1 `protobuf:"bytes,12,opt,name=k,proto3,embedded=k" json:"k,omitempty"` + NonCriticalField string `protobuf:"bytes,1031,opt,name=non_critical_field,json=nonCriticalField,proto3" json:"non_critical_field,omitempty"` + Inner1 *TestVersion3LoneNesting_Inner1 `protobuf:"bytes,14,opt,name=inner1,proto3" json:"inner1,omitempty"` + Inner2 *TestVersion3LoneNesting_Inner2 `protobuf:"bytes,15,opt,name=inner2,proto3" json:"inner2,omitempty"` } -func (m *TestVersion1) Reset() { *m = TestVersion1{} } -func (m *TestVersion1) String() string { return proto.CompactTextString(m) } -func (*TestVersion1) ProtoMessage() {} -func (*TestVersion1) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{24} +func (m *TestVersion3LoneNesting) Reset() { *m = TestVersion3LoneNesting{} } +func (m *TestVersion3LoneNesting) String() string { return proto.CompactTextString(m) } +func (*TestVersion3LoneNesting) ProtoMessage() {} +func (*TestVersion3LoneNesting) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{15} } -func (m *TestVersion1) XXX_Unmarshal(b []byte) error { +func (m *TestVersion3LoneNesting) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TestVersion1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *TestVersion3LoneNesting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TestVersion1.Marshal(b, m, deterministic) + return xxx_messageInfo_TestVersion3LoneNesting.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1484,142 +1468,139 @@ func (m *TestVersion1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *TestVersion1) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestVersion1.Merge(m, src) +func (m *TestVersion3LoneNesting) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestVersion3LoneNesting.Merge(m, src) } -func (m *TestVersion1) XXX_Size() int { +func (m *TestVersion3LoneNesting) XXX_Size() int { return m.Size() } -func (m *TestVersion1) XXX_DiscardUnknown() { - xxx_messageInfo_TestVersion1.DiscardUnknown(m) +func (m *TestVersion3LoneNesting) XXX_DiscardUnknown() { + xxx_messageInfo_TestVersion3LoneNesting.DiscardUnknown(m) } -var xxx_messageInfo_TestVersion1 proto.InternalMessageInfo +var xxx_messageInfo_TestVersion3LoneNesting proto.InternalMessageInfo -type isTestVersion1_Sum interface { - isTestVersion1_Sum() +type isTestVersion3LoneNesting_Sum interface { + isTestVersion3LoneNesting_Sum() MarshalTo([]byte) (int, error) Size() int } -type TestVersion1_E struct { - E int32 `protobuf:"varint,6,opt,name=e,proto3,oneof" json:"e,omitempty"` -} -type TestVersion1_F struct { - F *TestVersion1 `protobuf:"bytes,7,opt,name=f,proto3,oneof" json:"f,omitempty"` +type TestVersion3LoneNesting_F struct { + F *TestVersion3LoneNesting `protobuf:"bytes,7,opt,name=f,proto3,oneof" json:"f,omitempty"` } -func (*TestVersion1_E) isTestVersion1_Sum() {} -func (*TestVersion1_F) isTestVersion1_Sum() {} +func (*TestVersion3LoneNesting_F) isTestVersion3LoneNesting_Sum() {} -func (m *TestVersion1) GetSum() isTestVersion1_Sum { +func (m *TestVersion3LoneNesting) GetSum() isTestVersion3LoneNesting_Sum { if m != nil { return m.Sum } return nil } -func (m *TestVersion1) GetX() int64 { +func (m *TestVersion3LoneNesting) GetX() int64 { if m != nil { return m.X } return 0 } -func (m *TestVersion1) GetA() *TestVersion1 { +func (m *TestVersion3LoneNesting) GetA() *TestVersion3 { if m != nil { return m.A } return nil } -func (m *TestVersion1) GetB() *TestVersion1 { +func (m *TestVersion3LoneNesting) GetB() *TestVersion3 { if m != nil { return m.B } return nil } -func (m *TestVersion1) GetC() []*TestVersion1 { +func (m *TestVersion3LoneNesting) GetC() []*TestVersion3 { if m != nil { return m.C } return nil } -func (m *TestVersion1) GetD() []TestVersion1 { +func (m *TestVersion3LoneNesting) GetD() []*TestVersion3 { if m != nil { return m.D } return nil } -func (m *TestVersion1) GetE() int32 { - if x, ok := m.GetSum().(*TestVersion1_E); ok { - return x.E - } - return 0 -} - -func (m *TestVersion1) GetF() *TestVersion1 { - if x, ok := m.GetSum().(*TestVersion1_F); ok { +func (m *TestVersion3LoneNesting) GetF() *TestVersion3LoneNesting { + if x, ok := m.GetSum().(*TestVersion3LoneNesting_F); ok { return x.F } return nil } -func (m *TestVersion1) GetG() *types.Any { +func (m *TestVersion3LoneNesting) GetG() *types.Any { if m != nil { return m.G } return nil } -func (m *TestVersion1) GetH() []*TestVersion1 { +func (m *TestVersion3LoneNesting) GetH() []*TestVersion1 { if m != nil { return m.H } return nil } +func (m *TestVersion3LoneNesting) GetNonCriticalField() string { + if m != nil { + return m.NonCriticalField + } + return "" +} + +func (m *TestVersion3LoneNesting) GetInner1() *TestVersion3LoneNesting_Inner1 { + if m != nil { + return m.Inner1 + } + return nil +} + +func (m *TestVersion3LoneNesting) GetInner2() *TestVersion3LoneNesting_Inner2 { + if m != nil { + return m.Inner2 + } + return nil +} + // XXX_OneofWrappers is for the internal use of the proto package. -func (*TestVersion1) XXX_OneofWrappers() []interface{} { +func (*TestVersion3LoneNesting) XXX_OneofWrappers() []interface{} { return []interface{}{ - (*TestVersion1_E)(nil), - (*TestVersion1_F)(nil), + (*TestVersion3LoneNesting_F)(nil), } } -type TestVersion2 struct { - X int64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` - A *TestVersion2 `protobuf:"bytes,2,opt,name=a,proto3" json:"a,omitempty"` - B *TestVersion2 `protobuf:"bytes,3,opt,name=b,proto3" json:"b,omitempty"` - C []*TestVersion2 `protobuf:"bytes,4,rep,name=c,proto3" json:"c,omitempty"` - D []*TestVersion2 `protobuf:"bytes,5,rep,name=d,proto3" json:"d,omitempty"` - // Types that are valid to be assigned to Sum: - // *TestVersion2_E - // *TestVersion2_F - Sum isTestVersion2_Sum `protobuf_oneof:"sum"` - G *types.Any `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` - H []*TestVersion1 `protobuf:"bytes,9,rep,name=h,proto3" json:"h,omitempty"` - // google.protobuf.Timestamp i = 10; - // google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true]; - *Customer1 `protobuf:"bytes,12,opt,name=k,proto3,embedded=k" json:"k,omitempty"` - NewField uint64 `protobuf:"varint,25,opt,name=new_field,json=newField,proto3" json:"new_field,omitempty"` +type TestVersion3LoneNesting_Inner1 struct { + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Inner *TestVersion3LoneNesting_Inner1_InnerInner `protobuf:"bytes,3,opt,name=inner,proto3" json:"inner,omitempty"` } -func (m *TestVersion2) Reset() { *m = TestVersion2{} } -func (m *TestVersion2) String() string { return proto.CompactTextString(m) } -func (*TestVersion2) ProtoMessage() {} -func (*TestVersion2) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{25} +func (m *TestVersion3LoneNesting_Inner1) Reset() { *m = TestVersion3LoneNesting_Inner1{} } +func (m *TestVersion3LoneNesting_Inner1) String() string { return proto.CompactTextString(m) } +func (*TestVersion3LoneNesting_Inner1) ProtoMessage() {} +func (*TestVersion3LoneNesting_Inner1) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{15, 0} } -func (m *TestVersion2) XXX_Unmarshal(b []byte) error { +func (m *TestVersion3LoneNesting_Inner1) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TestVersion2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *TestVersion3LoneNesting_Inner1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TestVersion2.Marshal(b, m, deterministic) + return xxx_messageInfo_TestVersion3LoneNesting_Inner1.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1629,149 +1610,242 @@ func (m *TestVersion2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *TestVersion2) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestVersion2.Merge(m, src) +func (m *TestVersion3LoneNesting_Inner1) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestVersion3LoneNesting_Inner1.Merge(m, src) } -func (m *TestVersion2) XXX_Size() int { +func (m *TestVersion3LoneNesting_Inner1) XXX_Size() int { return m.Size() } -func (m *TestVersion2) XXX_DiscardUnknown() { - xxx_messageInfo_TestVersion2.DiscardUnknown(m) -} - -var xxx_messageInfo_TestVersion2 proto.InternalMessageInfo - -type isTestVersion2_Sum interface { - isTestVersion2_Sum() - MarshalTo([]byte) (int, error) - Size() int -} - -type TestVersion2_E struct { - E int32 `protobuf:"varint,6,opt,name=e,proto3,oneof" json:"e,omitempty"` -} -type TestVersion2_F struct { - F *TestVersion2 `protobuf:"bytes,7,opt,name=f,proto3,oneof" json:"f,omitempty"` +func (m *TestVersion3LoneNesting_Inner1) XXX_DiscardUnknown() { + xxx_messageInfo_TestVersion3LoneNesting_Inner1.DiscardUnknown(m) } -func (*TestVersion2_E) isTestVersion2_Sum() {} -func (*TestVersion2_F) isTestVersion2_Sum() {} +var xxx_messageInfo_TestVersion3LoneNesting_Inner1 proto.InternalMessageInfo -func (m *TestVersion2) GetSum() isTestVersion2_Sum { +func (m *TestVersion3LoneNesting_Inner1) GetId() int64 { if m != nil { - return m.Sum + return m.Id } - return nil + return 0 } -func (m *TestVersion2) GetX() int64 { +func (m *TestVersion3LoneNesting_Inner1) GetName() string { if m != nil { - return m.X + return m.Name } - return 0 + return "" } -func (m *TestVersion2) GetA() *TestVersion2 { +func (m *TestVersion3LoneNesting_Inner1) GetInner() *TestVersion3LoneNesting_Inner1_InnerInner { if m != nil { - return m.A + return m.Inner } return nil } -func (m *TestVersion2) GetB() *TestVersion2 { - if m != nil { - return m.B +type TestVersion3LoneNesting_Inner1_InnerInner struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + City string `protobuf:"bytes,2,opt,name=city,proto3" json:"city,omitempty"` +} + +func (m *TestVersion3LoneNesting_Inner1_InnerInner) Reset() { + *m = TestVersion3LoneNesting_Inner1_InnerInner{} +} +func (m *TestVersion3LoneNesting_Inner1_InnerInner) String() string { + return proto.CompactTextString(m) +} +func (*TestVersion3LoneNesting_Inner1_InnerInner) ProtoMessage() {} +func (*TestVersion3LoneNesting_Inner1_InnerInner) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{15, 0, 0} +} +func (m *TestVersion3LoneNesting_Inner1_InnerInner) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TestVersion3LoneNesting_Inner1_InnerInner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TestVersion3LoneNesting_Inner1_InnerInner.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return nil +} +func (m *TestVersion3LoneNesting_Inner1_InnerInner) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestVersion3LoneNesting_Inner1_InnerInner.Merge(m, src) +} +func (m *TestVersion3LoneNesting_Inner1_InnerInner) XXX_Size() int { + return m.Size() +} +func (m *TestVersion3LoneNesting_Inner1_InnerInner) XXX_DiscardUnknown() { + xxx_messageInfo_TestVersion3LoneNesting_Inner1_InnerInner.DiscardUnknown(m) } -func (m *TestVersion2) GetC() []*TestVersion2 { +var xxx_messageInfo_TestVersion3LoneNesting_Inner1_InnerInner proto.InternalMessageInfo + +func (m *TestVersion3LoneNesting_Inner1_InnerInner) GetId() string { if m != nil { - return m.C + return m.Id } - return nil + return "" } -func (m *TestVersion2) GetD() []*TestVersion2 { +func (m *TestVersion3LoneNesting_Inner1_InnerInner) GetCity() string { if m != nil { - return m.D + return m.City } - return nil + return "" } -func (m *TestVersion2) GetE() int32 { - if x, ok := m.GetSum().(*TestVersion2_E); ok { - return x.E - } - return 0 +type TestVersion3LoneNesting_Inner2 struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Country string `protobuf:"bytes,2,opt,name=country,proto3" json:"country,omitempty"` + Inner *TestVersion3LoneNesting_Inner2_InnerInner `protobuf:"bytes,3,opt,name=inner,proto3" json:"inner,omitempty"` } -func (m *TestVersion2) GetF() *TestVersion2 { - if x, ok := m.GetSum().(*TestVersion2_F); ok { - return x.F +func (m *TestVersion3LoneNesting_Inner2) Reset() { *m = TestVersion3LoneNesting_Inner2{} } +func (m *TestVersion3LoneNesting_Inner2) String() string { return proto.CompactTextString(m) } +func (*TestVersion3LoneNesting_Inner2) ProtoMessage() {} +func (*TestVersion3LoneNesting_Inner2) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{15, 1} +} +func (m *TestVersion3LoneNesting_Inner2) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TestVersion3LoneNesting_Inner2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TestVersion3LoneNesting_Inner2.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } - return nil +} +func (m *TestVersion3LoneNesting_Inner2) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestVersion3LoneNesting_Inner2.Merge(m, src) +} +func (m *TestVersion3LoneNesting_Inner2) XXX_Size() int { + return m.Size() +} +func (m *TestVersion3LoneNesting_Inner2) XXX_DiscardUnknown() { + xxx_messageInfo_TestVersion3LoneNesting_Inner2.DiscardUnknown(m) } -func (m *TestVersion2) GetG() *types.Any { +var xxx_messageInfo_TestVersion3LoneNesting_Inner2 proto.InternalMessageInfo + +func (m *TestVersion3LoneNesting_Inner2) GetId() string { if m != nil { - return m.G + return m.Id } - return nil + return "" } -func (m *TestVersion2) GetH() []*TestVersion1 { +func (m *TestVersion3LoneNesting_Inner2) GetCountry() string { if m != nil { - return m.H + return m.Country } - return nil + return "" } -func (m *TestVersion2) GetNewField() uint64 { +func (m *TestVersion3LoneNesting_Inner2) GetInner() *TestVersion3LoneNesting_Inner2_InnerInner { if m != nil { - return m.NewField + return m.Inner } - return 0 + return nil } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*TestVersion2) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*TestVersion2_E)(nil), - (*TestVersion2_F)(nil), +type TestVersion3LoneNesting_Inner2_InnerInner struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + City string `protobuf:"bytes,2,opt,name=city,proto3" json:"city,omitempty"` +} + +func (m *TestVersion3LoneNesting_Inner2_InnerInner) Reset() { + *m = TestVersion3LoneNesting_Inner2_InnerInner{} +} +func (m *TestVersion3LoneNesting_Inner2_InnerInner) String() string { + return proto.CompactTextString(m) +} +func (*TestVersion3LoneNesting_Inner2_InnerInner) ProtoMessage() {} +func (*TestVersion3LoneNesting_Inner2_InnerInner) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{15, 1, 0} +} +func (m *TestVersion3LoneNesting_Inner2_InnerInner) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TestVersion3LoneNesting_Inner2_InnerInner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TestVersion3LoneNesting_Inner2_InnerInner.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil } } +func (m *TestVersion3LoneNesting_Inner2_InnerInner) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestVersion3LoneNesting_Inner2_InnerInner.Merge(m, src) +} +func (m *TestVersion3LoneNesting_Inner2_InnerInner) XXX_Size() int { + return m.Size() +} +func (m *TestVersion3LoneNesting_Inner2_InnerInner) XXX_DiscardUnknown() { + xxx_messageInfo_TestVersion3LoneNesting_Inner2_InnerInner.DiscardUnknown(m) +} -type TestVersion3 struct { +var xxx_messageInfo_TestVersion3LoneNesting_Inner2_InnerInner proto.InternalMessageInfo + +func (m *TestVersion3LoneNesting_Inner2_InnerInner) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *TestVersion3LoneNesting_Inner2_InnerInner) GetCity() string { + if m != nil { + return m.City + } + return "" +} + +type TestVersion4LoneNesting struct { X int64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` A *TestVersion3 `protobuf:"bytes,2,opt,name=a,proto3" json:"a,omitempty"` B *TestVersion3 `protobuf:"bytes,3,opt,name=b,proto3" json:"b,omitempty"` C []*TestVersion3 `protobuf:"bytes,4,rep,name=c,proto3" json:"c,omitempty"` D []*TestVersion3 `protobuf:"bytes,5,rep,name=d,proto3" json:"d,omitempty"` // Types that are valid to be assigned to Sum: - // *TestVersion3_E - // *TestVersion3_F - Sum isTestVersion3_Sum `protobuf_oneof:"sum"` - G *types.Any `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` - H []*TestVersion1 `protobuf:"bytes,9,rep,name=h,proto3" json:"h,omitempty"` + // *TestVersion4LoneNesting_F + Sum isTestVersion4LoneNesting_Sum `protobuf_oneof:"sum"` + G *types.Any `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` + H []*TestVersion1 `protobuf:"bytes,9,rep,name=h,proto3" json:"h,omitempty"` // google.protobuf.Timestamp i = 10; // google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true]; *Customer1 `protobuf:"bytes,12,opt,name=k,proto3,embedded=k" json:"k,omitempty"` - NonCriticalField string `protobuf:"bytes,1031,opt,name=non_critical_field,json=nonCriticalField,proto3" json:"non_critical_field,omitempty"` + NonCriticalField string `protobuf:"bytes,1031,opt,name=non_critical_field,json=nonCriticalField,proto3" json:"non_critical_field,omitempty"` + Inner1 *TestVersion4LoneNesting_Inner1 `protobuf:"bytes,14,opt,name=inner1,proto3" json:"inner1,omitempty"` + Inner2 *TestVersion4LoneNesting_Inner2 `protobuf:"bytes,15,opt,name=inner2,proto3" json:"inner2,omitempty"` } -func (m *TestVersion3) Reset() { *m = TestVersion3{} } -func (m *TestVersion3) String() string { return proto.CompactTextString(m) } -func (*TestVersion3) ProtoMessage() {} -func (*TestVersion3) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{26} +func (m *TestVersion4LoneNesting) Reset() { *m = TestVersion4LoneNesting{} } +func (m *TestVersion4LoneNesting) String() string { return proto.CompactTextString(m) } +func (*TestVersion4LoneNesting) ProtoMessage() {} +func (*TestVersion4LoneNesting) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{16} } -func (m *TestVersion3) XXX_Unmarshal(b []byte) error { +func (m *TestVersion4LoneNesting) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TestVersion3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *TestVersion4LoneNesting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TestVersion3.Marshal(b, m, deterministic) + return xxx_messageInfo_TestVersion4LoneNesting.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1781,148 +1855,139 @@ func (m *TestVersion3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *TestVersion3) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestVersion3.Merge(m, src) +func (m *TestVersion4LoneNesting) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestVersion4LoneNesting.Merge(m, src) } -func (m *TestVersion3) XXX_Size() int { +func (m *TestVersion4LoneNesting) XXX_Size() int { return m.Size() } -func (m *TestVersion3) XXX_DiscardUnknown() { - xxx_messageInfo_TestVersion3.DiscardUnknown(m) +func (m *TestVersion4LoneNesting) XXX_DiscardUnknown() { + xxx_messageInfo_TestVersion4LoneNesting.DiscardUnknown(m) } -var xxx_messageInfo_TestVersion3 proto.InternalMessageInfo +var xxx_messageInfo_TestVersion4LoneNesting proto.InternalMessageInfo -type isTestVersion3_Sum interface { - isTestVersion3_Sum() +type isTestVersion4LoneNesting_Sum interface { + isTestVersion4LoneNesting_Sum() MarshalTo([]byte) (int, error) Size() int } -type TestVersion3_E struct { - E int32 `protobuf:"varint,6,opt,name=e,proto3,oneof" json:"e,omitempty"` -} -type TestVersion3_F struct { - F *TestVersion3 `protobuf:"bytes,7,opt,name=f,proto3,oneof" json:"f,omitempty"` +type TestVersion4LoneNesting_F struct { + F *TestVersion3LoneNesting `protobuf:"bytes,7,opt,name=f,proto3,oneof" json:"f,omitempty"` } -func (*TestVersion3_E) isTestVersion3_Sum() {} -func (*TestVersion3_F) isTestVersion3_Sum() {} +func (*TestVersion4LoneNesting_F) isTestVersion4LoneNesting_Sum() {} -func (m *TestVersion3) GetSum() isTestVersion3_Sum { +func (m *TestVersion4LoneNesting) GetSum() isTestVersion4LoneNesting_Sum { if m != nil { return m.Sum } return nil } -func (m *TestVersion3) GetX() int64 { +func (m *TestVersion4LoneNesting) GetX() int64 { if m != nil { return m.X } return 0 } -func (m *TestVersion3) GetA() *TestVersion3 { +func (m *TestVersion4LoneNesting) GetA() *TestVersion3 { if m != nil { return m.A } return nil } -func (m *TestVersion3) GetB() *TestVersion3 { +func (m *TestVersion4LoneNesting) GetB() *TestVersion3 { if m != nil { return m.B } return nil } -func (m *TestVersion3) GetC() []*TestVersion3 { +func (m *TestVersion4LoneNesting) GetC() []*TestVersion3 { if m != nil { return m.C } return nil } -func (m *TestVersion3) GetD() []*TestVersion3 { +func (m *TestVersion4LoneNesting) GetD() []*TestVersion3 { if m != nil { return m.D } return nil } -func (m *TestVersion3) GetE() int32 { - if x, ok := m.GetSum().(*TestVersion3_E); ok { - return x.E - } - return 0 -} - -func (m *TestVersion3) GetF() *TestVersion3 { - if x, ok := m.GetSum().(*TestVersion3_F); ok { +func (m *TestVersion4LoneNesting) GetF() *TestVersion3LoneNesting { + if x, ok := m.GetSum().(*TestVersion4LoneNesting_F); ok { return x.F } return nil } -func (m *TestVersion3) GetG() *types.Any { +func (m *TestVersion4LoneNesting) GetG() *types.Any { if m != nil { return m.G } return nil } -func (m *TestVersion3) GetH() []*TestVersion1 { +func (m *TestVersion4LoneNesting) GetH() []*TestVersion1 { if m != nil { return m.H } return nil } -func (m *TestVersion3) GetNonCriticalField() string { +func (m *TestVersion4LoneNesting) GetNonCriticalField() string { if m != nil { return m.NonCriticalField } return "" } +func (m *TestVersion4LoneNesting) GetInner1() *TestVersion4LoneNesting_Inner1 { + if m != nil { + return m.Inner1 + } + return nil +} + +func (m *TestVersion4LoneNesting) GetInner2() *TestVersion4LoneNesting_Inner2 { + if m != nil { + return m.Inner2 + } + return nil +} + // XXX_OneofWrappers is for the internal use of the proto package. -func (*TestVersion3) XXX_OneofWrappers() []interface{} { +func (*TestVersion4LoneNesting) XXX_OneofWrappers() []interface{} { return []interface{}{ - (*TestVersion3_E)(nil), - (*TestVersion3_F)(nil), + (*TestVersion4LoneNesting_F)(nil), } } -type TestVersion3LoneOneOfValue struct { - X int64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` - A *TestVersion3 `protobuf:"bytes,2,opt,name=a,proto3" json:"a,omitempty"` - B *TestVersion3 `protobuf:"bytes,3,opt,name=b,proto3" json:"b,omitempty"` - C []*TestVersion3 `protobuf:"bytes,4,rep,name=c,proto3" json:"c,omitempty"` - D []*TestVersion3 `protobuf:"bytes,5,rep,name=d,proto3" json:"d,omitempty"` - // Types that are valid to be assigned to Sum: - // *TestVersion3LoneOneOfValue_E - Sum isTestVersion3LoneOneOfValue_Sum `protobuf_oneof:"sum"` - G *types.Any `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` - H []*TestVersion1 `protobuf:"bytes,9,rep,name=h,proto3" json:"h,omitempty"` - // google.protobuf.Timestamp i = 10; - // google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true]; - *Customer1 `protobuf:"bytes,12,opt,name=k,proto3,embedded=k" json:"k,omitempty"` - NonCriticalField string `protobuf:"bytes,1031,opt,name=non_critical_field,json=nonCriticalField,proto3" json:"non_critical_field,omitempty"` +type TestVersion4LoneNesting_Inner1 struct { + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Inner *TestVersion4LoneNesting_Inner1_InnerInner `protobuf:"bytes,3,opt,name=inner,proto3" json:"inner,omitempty"` } -func (m *TestVersion3LoneOneOfValue) Reset() { *m = TestVersion3LoneOneOfValue{} } -func (m *TestVersion3LoneOneOfValue) String() string { return proto.CompactTextString(m) } -func (*TestVersion3LoneOneOfValue) ProtoMessage() {} -func (*TestVersion3LoneOneOfValue) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{27} +func (m *TestVersion4LoneNesting_Inner1) Reset() { *m = TestVersion4LoneNesting_Inner1{} } +func (m *TestVersion4LoneNesting_Inner1) String() string { return proto.CompactTextString(m) } +func (*TestVersion4LoneNesting_Inner1) ProtoMessage() {} +func (*TestVersion4LoneNesting_Inner1) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{16, 0} } -func (m *TestVersion3LoneOneOfValue) XXX_Unmarshal(b []byte) error { +func (m *TestVersion4LoneNesting_Inner1) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TestVersion3LoneOneOfValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *TestVersion4LoneNesting_Inner1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TestVersion3LoneOneOfValue.Marshal(b, m, deterministic) + return xxx_messageInfo_TestVersion4LoneNesting_Inner1.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -1932,138 +1997,60 @@ func (m *TestVersion3LoneOneOfValue) XXX_Marshal(b []byte, deterministic bool) ( return b[:n], nil } } -func (m *TestVersion3LoneOneOfValue) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestVersion3LoneOneOfValue.Merge(m, src) +func (m *TestVersion4LoneNesting_Inner1) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestVersion4LoneNesting_Inner1.Merge(m, src) } -func (m *TestVersion3LoneOneOfValue) XXX_Size() int { +func (m *TestVersion4LoneNesting_Inner1) XXX_Size() int { return m.Size() } -func (m *TestVersion3LoneOneOfValue) XXX_DiscardUnknown() { - xxx_messageInfo_TestVersion3LoneOneOfValue.DiscardUnknown(m) -} - -var xxx_messageInfo_TestVersion3LoneOneOfValue proto.InternalMessageInfo - -type isTestVersion3LoneOneOfValue_Sum interface { - isTestVersion3LoneOneOfValue_Sum() - MarshalTo([]byte) (int, error) - Size() int -} - -type TestVersion3LoneOneOfValue_E struct { - E int32 `protobuf:"varint,6,opt,name=e,proto3,oneof" json:"e,omitempty"` +func (m *TestVersion4LoneNesting_Inner1) XXX_DiscardUnknown() { + xxx_messageInfo_TestVersion4LoneNesting_Inner1.DiscardUnknown(m) } -func (*TestVersion3LoneOneOfValue_E) isTestVersion3LoneOneOfValue_Sum() {} - -func (m *TestVersion3LoneOneOfValue) GetSum() isTestVersion3LoneOneOfValue_Sum { - if m != nil { - return m.Sum - } - return nil -} +var xxx_messageInfo_TestVersion4LoneNesting_Inner1 proto.InternalMessageInfo -func (m *TestVersion3LoneOneOfValue) GetX() int64 { +func (m *TestVersion4LoneNesting_Inner1) GetId() int64 { if m != nil { - return m.X + return m.Id } return 0 } -func (m *TestVersion3LoneOneOfValue) GetA() *TestVersion3 { +func (m *TestVersion4LoneNesting_Inner1) GetName() string { if m != nil { - return m.A + return m.Name } - return nil + return "" } -func (m *TestVersion3LoneOneOfValue) GetB() *TestVersion3 { +func (m *TestVersion4LoneNesting_Inner1) GetInner() *TestVersion4LoneNesting_Inner1_InnerInner { if m != nil { - return m.B + return m.Inner } return nil } -func (m *TestVersion3LoneOneOfValue) GetC() []*TestVersion3 { - if m != nil { - return m.C - } - return nil +type TestVersion4LoneNesting_Inner1_InnerInner struct { + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + City string `protobuf:"bytes,2,opt,name=city,proto3" json:"city,omitempty"` } -func (m *TestVersion3LoneOneOfValue) GetD() []*TestVersion3 { - if m != nil { - return m.D - } - return nil +func (m *TestVersion4LoneNesting_Inner1_InnerInner) Reset() { + *m = TestVersion4LoneNesting_Inner1_InnerInner{} } - -func (m *TestVersion3LoneOneOfValue) GetE() int32 { - if x, ok := m.GetSum().(*TestVersion3LoneOneOfValue_E); ok { - return x.E - } - return 0 -} - -func (m *TestVersion3LoneOneOfValue) GetG() *types.Any { - if m != nil { - return m.G - } - return nil -} - -func (m *TestVersion3LoneOneOfValue) GetH() []*TestVersion1 { - if m != nil { - return m.H - } - return nil -} - -func (m *TestVersion3LoneOneOfValue) GetNonCriticalField() string { - if m != nil { - return m.NonCriticalField - } - return "" -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*TestVersion3LoneOneOfValue) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*TestVersion3LoneOneOfValue_E)(nil), - } -} - -type TestVersion3LoneNesting struct { - X int64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` - A *TestVersion3 `protobuf:"bytes,2,opt,name=a,proto3" json:"a,omitempty"` - B *TestVersion3 `protobuf:"bytes,3,opt,name=b,proto3" json:"b,omitempty"` - C []*TestVersion3 `protobuf:"bytes,4,rep,name=c,proto3" json:"c,omitempty"` - D []*TestVersion3 `protobuf:"bytes,5,rep,name=d,proto3" json:"d,omitempty"` - // Types that are valid to be assigned to Sum: - // *TestVersion3LoneNesting_F - Sum isTestVersion3LoneNesting_Sum `protobuf_oneof:"sum"` - G *types.Any `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` - H []*TestVersion1 `protobuf:"bytes,9,rep,name=h,proto3" json:"h,omitempty"` - // google.protobuf.Timestamp i = 10; - // google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true]; - *Customer1 `protobuf:"bytes,12,opt,name=k,proto3,embedded=k" json:"k,omitempty"` - NonCriticalField string `protobuf:"bytes,1031,opt,name=non_critical_field,json=nonCriticalField,proto3" json:"non_critical_field,omitempty"` - Inner1 *TestVersion3LoneNesting_Inner1 `protobuf:"bytes,14,opt,name=inner1,proto3" json:"inner1,omitempty"` - Inner2 *TestVersion3LoneNesting_Inner2 `protobuf:"bytes,15,opt,name=inner2,proto3" json:"inner2,omitempty"` +func (m *TestVersion4LoneNesting_Inner1_InnerInner) String() string { + return proto.CompactTextString(m) } - -func (m *TestVersion3LoneNesting) Reset() { *m = TestVersion3LoneNesting{} } -func (m *TestVersion3LoneNesting) String() string { return proto.CompactTextString(m) } -func (*TestVersion3LoneNesting) ProtoMessage() {} -func (*TestVersion3LoneNesting) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{28} +func (*TestVersion4LoneNesting_Inner1_InnerInner) ProtoMessage() {} +func (*TestVersion4LoneNesting_Inner1_InnerInner) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{16, 0, 0} } -func (m *TestVersion3LoneNesting) XXX_Unmarshal(b []byte) error { +func (m *TestVersion4LoneNesting_Inner1_InnerInner) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TestVersion3LoneNesting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *TestVersion4LoneNesting_Inner1_InnerInner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TestVersion3LoneNesting.Marshal(b, m, deterministic) + return xxx_messageInfo_TestVersion4LoneNesting_Inner1_InnerInner.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -2073,139 +2060,50 @@ func (m *TestVersion3LoneNesting) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } -func (m *TestVersion3LoneNesting) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestVersion3LoneNesting.Merge(m, src) +func (m *TestVersion4LoneNesting_Inner1_InnerInner) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestVersion4LoneNesting_Inner1_InnerInner.Merge(m, src) } -func (m *TestVersion3LoneNesting) XXX_Size() int { +func (m *TestVersion4LoneNesting_Inner1_InnerInner) XXX_Size() int { return m.Size() } -func (m *TestVersion3LoneNesting) XXX_DiscardUnknown() { - xxx_messageInfo_TestVersion3LoneNesting.DiscardUnknown(m) -} - -var xxx_messageInfo_TestVersion3LoneNesting proto.InternalMessageInfo - -type isTestVersion3LoneNesting_Sum interface { - isTestVersion3LoneNesting_Sum() - MarshalTo([]byte) (int, error) - Size() int -} - -type TestVersion3LoneNesting_F struct { - F *TestVersion3LoneNesting `protobuf:"bytes,7,opt,name=f,proto3,oneof" json:"f,omitempty"` +func (m *TestVersion4LoneNesting_Inner1_InnerInner) XXX_DiscardUnknown() { + xxx_messageInfo_TestVersion4LoneNesting_Inner1_InnerInner.DiscardUnknown(m) } -func (*TestVersion3LoneNesting_F) isTestVersion3LoneNesting_Sum() {} - -func (m *TestVersion3LoneNesting) GetSum() isTestVersion3LoneNesting_Sum { - if m != nil { - return m.Sum - } - return nil -} +var xxx_messageInfo_TestVersion4LoneNesting_Inner1_InnerInner proto.InternalMessageInfo -func (m *TestVersion3LoneNesting) GetX() int64 { +func (m *TestVersion4LoneNesting_Inner1_InnerInner) GetId() int64 { if m != nil { - return m.X + return m.Id } return 0 } -func (m *TestVersion3LoneNesting) GetA() *TestVersion3 { - if m != nil { - return m.A - } - return nil -} - -func (m *TestVersion3LoneNesting) GetB() *TestVersion3 { - if m != nil { - return m.B - } - return nil -} - -func (m *TestVersion3LoneNesting) GetC() []*TestVersion3 { - if m != nil { - return m.C - } - return nil -} - -func (m *TestVersion3LoneNesting) GetD() []*TestVersion3 { - if m != nil { - return m.D - } - return nil -} - -func (m *TestVersion3LoneNesting) GetF() *TestVersion3LoneNesting { - if x, ok := m.GetSum().(*TestVersion3LoneNesting_F); ok { - return x.F - } - return nil -} - -func (m *TestVersion3LoneNesting) GetG() *types.Any { - if m != nil { - return m.G - } - return nil -} - -func (m *TestVersion3LoneNesting) GetH() []*TestVersion1 { - if m != nil { - return m.H - } - return nil -} - -func (m *TestVersion3LoneNesting) GetNonCriticalField() string { +func (m *TestVersion4LoneNesting_Inner1_InnerInner) GetCity() string { if m != nil { - return m.NonCriticalField + return m.City } return "" } -func (m *TestVersion3LoneNesting) GetInner1() *TestVersion3LoneNesting_Inner1 { - if m != nil { - return m.Inner1 - } - return nil -} - -func (m *TestVersion3LoneNesting) GetInner2() *TestVersion3LoneNesting_Inner2 { - if m != nil { - return m.Inner2 - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*TestVersion3LoneNesting) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*TestVersion3LoneNesting_F)(nil), - } -} - -type TestVersion3LoneNesting_Inner1 struct { - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Inner *TestVersion3LoneNesting_Inner1_InnerInner `protobuf:"bytes,3,opt,name=inner,proto3" json:"inner,omitempty"` +type TestVersion4LoneNesting_Inner2 struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Country string `protobuf:"bytes,2,opt,name=country,proto3" json:"country,omitempty"` + Inner *TestVersion4LoneNesting_Inner2_InnerInner `protobuf:"bytes,3,opt,name=inner,proto3" json:"inner,omitempty"` } -func (m *TestVersion3LoneNesting_Inner1) Reset() { *m = TestVersion3LoneNesting_Inner1{} } -func (m *TestVersion3LoneNesting_Inner1) String() string { return proto.CompactTextString(m) } -func (*TestVersion3LoneNesting_Inner1) ProtoMessage() {} -func (*TestVersion3LoneNesting_Inner1) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{28, 0} +func (m *TestVersion4LoneNesting_Inner2) Reset() { *m = TestVersion4LoneNesting_Inner2{} } +func (m *TestVersion4LoneNesting_Inner2) String() string { return proto.CompactTextString(m) } +func (*TestVersion4LoneNesting_Inner2) ProtoMessage() {} +func (*TestVersion4LoneNesting_Inner2) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{16, 1} } -func (m *TestVersion3LoneNesting_Inner1) XXX_Unmarshal(b []byte) error { +func (m *TestVersion4LoneNesting_Inner2) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TestVersion3LoneNesting_Inner1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *TestVersion4LoneNesting_Inner2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TestVersion3LoneNesting_Inner1.Marshal(b, m, deterministic) + return xxx_messageInfo_TestVersion4LoneNesting_Inner2.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -2215,60 +2113,60 @@ func (m *TestVersion3LoneNesting_Inner1) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } -func (m *TestVersion3LoneNesting_Inner1) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestVersion3LoneNesting_Inner1.Merge(m, src) +func (m *TestVersion4LoneNesting_Inner2) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestVersion4LoneNesting_Inner2.Merge(m, src) } -func (m *TestVersion3LoneNesting_Inner1) XXX_Size() int { +func (m *TestVersion4LoneNesting_Inner2) XXX_Size() int { return m.Size() } -func (m *TestVersion3LoneNesting_Inner1) XXX_DiscardUnknown() { - xxx_messageInfo_TestVersion3LoneNesting_Inner1.DiscardUnknown(m) +func (m *TestVersion4LoneNesting_Inner2) XXX_DiscardUnknown() { + xxx_messageInfo_TestVersion4LoneNesting_Inner2.DiscardUnknown(m) } -var xxx_messageInfo_TestVersion3LoneNesting_Inner1 proto.InternalMessageInfo +var xxx_messageInfo_TestVersion4LoneNesting_Inner2 proto.InternalMessageInfo -func (m *TestVersion3LoneNesting_Inner1) GetId() int64 { +func (m *TestVersion4LoneNesting_Inner2) GetId() string { if m != nil { return m.Id } - return 0 + return "" } -func (m *TestVersion3LoneNesting_Inner1) GetName() string { +func (m *TestVersion4LoneNesting_Inner2) GetCountry() string { if m != nil { - return m.Name + return m.Country } return "" } -func (m *TestVersion3LoneNesting_Inner1) GetInner() *TestVersion3LoneNesting_Inner1_InnerInner { +func (m *TestVersion4LoneNesting_Inner2) GetInner() *TestVersion4LoneNesting_Inner2_InnerInner { if m != nil { return m.Inner } return nil } -type TestVersion3LoneNesting_Inner1_InnerInner struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - City string `protobuf:"bytes,2,opt,name=city,proto3" json:"city,omitempty"` +type TestVersion4LoneNesting_Inner2_InnerInner struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` } -func (m *TestVersion3LoneNesting_Inner1_InnerInner) Reset() { - *m = TestVersion3LoneNesting_Inner1_InnerInner{} +func (m *TestVersion4LoneNesting_Inner2_InnerInner) Reset() { + *m = TestVersion4LoneNesting_Inner2_InnerInner{} } -func (m *TestVersion3LoneNesting_Inner1_InnerInner) String() string { +func (m *TestVersion4LoneNesting_Inner2_InnerInner) String() string { return proto.CompactTextString(m) } -func (*TestVersion3LoneNesting_Inner1_InnerInner) ProtoMessage() {} -func (*TestVersion3LoneNesting_Inner1_InnerInner) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{28, 0, 0} +func (*TestVersion4LoneNesting_Inner2_InnerInner) ProtoMessage() {} +func (*TestVersion4LoneNesting_Inner2_InnerInner) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{16, 1, 0} } -func (m *TestVersion3LoneNesting_Inner1_InnerInner) XXX_Unmarshal(b []byte) error { +func (m *TestVersion4LoneNesting_Inner2_InnerInner) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TestVersion3LoneNesting_Inner1_InnerInner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *TestVersion4LoneNesting_Inner2_InnerInner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TestVersion3LoneNesting_Inner1_InnerInner.Marshal(b, m, deterministic) + return xxx_messageInfo_TestVersion4LoneNesting_Inner2_InnerInner.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -2278,50 +2176,55 @@ func (m *TestVersion3LoneNesting_Inner1_InnerInner) XXX_Marshal(b []byte, determ return b[:n], nil } } -func (m *TestVersion3LoneNesting_Inner1_InnerInner) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestVersion3LoneNesting_Inner1_InnerInner.Merge(m, src) +func (m *TestVersion4LoneNesting_Inner2_InnerInner) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestVersion4LoneNesting_Inner2_InnerInner.Merge(m, src) } -func (m *TestVersion3LoneNesting_Inner1_InnerInner) XXX_Size() int { +func (m *TestVersion4LoneNesting_Inner2_InnerInner) XXX_Size() int { return m.Size() } -func (m *TestVersion3LoneNesting_Inner1_InnerInner) XXX_DiscardUnknown() { - xxx_messageInfo_TestVersion3LoneNesting_Inner1_InnerInner.DiscardUnknown(m) +func (m *TestVersion4LoneNesting_Inner2_InnerInner) XXX_DiscardUnknown() { + xxx_messageInfo_TestVersion4LoneNesting_Inner2_InnerInner.DiscardUnknown(m) } -var xxx_messageInfo_TestVersion3LoneNesting_Inner1_InnerInner proto.InternalMessageInfo +var xxx_messageInfo_TestVersion4LoneNesting_Inner2_InnerInner proto.InternalMessageInfo -func (m *TestVersion3LoneNesting_Inner1_InnerInner) GetId() string { +func (m *TestVersion4LoneNesting_Inner2_InnerInner) GetId() string { if m != nil { return m.Id } return "" } -func (m *TestVersion3LoneNesting_Inner1_InnerInner) GetCity() string { +func (m *TestVersion4LoneNesting_Inner2_InnerInner) GetValue() int64 { if m != nil { - return m.City + return m.Value } - return "" + return 0 } -type TestVersion3LoneNesting_Inner2 struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Country string `protobuf:"bytes,2,opt,name=country,proto3" json:"country,omitempty"` - Inner *TestVersion3LoneNesting_Inner2_InnerInner `protobuf:"bytes,3,opt,name=inner,proto3" json:"inner,omitempty"` +type TestVersionFD1 struct { + X int64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` + A *TestVersion1 `protobuf:"bytes,2,opt,name=a,proto3" json:"a,omitempty"` + // Types that are valid to be assigned to Sum: + // *TestVersionFD1_E + // *TestVersionFD1_F + Sum isTestVersionFD1_Sum `protobuf_oneof:"sum"` + G *types.Any `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` + H []*TestVersion1 `protobuf:"bytes,9,rep,name=h,proto3" json:"h,omitempty"` } -func (m *TestVersion3LoneNesting_Inner2) Reset() { *m = TestVersion3LoneNesting_Inner2{} } -func (m *TestVersion3LoneNesting_Inner2) String() string { return proto.CompactTextString(m) } -func (*TestVersion3LoneNesting_Inner2) ProtoMessage() {} -func (*TestVersion3LoneNesting_Inner2) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{28, 1} +func (m *TestVersionFD1) Reset() { *m = TestVersionFD1{} } +func (m *TestVersionFD1) String() string { return proto.CompactTextString(m) } +func (*TestVersionFD1) ProtoMessage() {} +func (*TestVersionFD1) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{17} } -func (m *TestVersion3LoneNesting_Inner2) XXX_Unmarshal(b []byte) error { +func (m *TestVersionFD1) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TestVersion3LoneNesting_Inner2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *TestVersionFD1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TestVersion3LoneNesting_Inner2.Marshal(b, m, deterministic) + return xxx_messageInfo_TestVersionFD1.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -2331,126 +2234,114 @@ func (m *TestVersion3LoneNesting_Inner2) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } -func (m *TestVersion3LoneNesting_Inner2) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestVersion3LoneNesting_Inner2.Merge(m, src) +func (m *TestVersionFD1) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestVersionFD1.Merge(m, src) } -func (m *TestVersion3LoneNesting_Inner2) XXX_Size() int { +func (m *TestVersionFD1) XXX_Size() int { return m.Size() } -func (m *TestVersion3LoneNesting_Inner2) XXX_DiscardUnknown() { - xxx_messageInfo_TestVersion3LoneNesting_Inner2.DiscardUnknown(m) +func (m *TestVersionFD1) XXX_DiscardUnknown() { + xxx_messageInfo_TestVersionFD1.DiscardUnknown(m) } -var xxx_messageInfo_TestVersion3LoneNesting_Inner2 proto.InternalMessageInfo +var xxx_messageInfo_TestVersionFD1 proto.InternalMessageInfo -func (m *TestVersion3LoneNesting_Inner2) GetId() string { +type isTestVersionFD1_Sum interface { + isTestVersionFD1_Sum() + MarshalTo([]byte) (int, error) + Size() int +} + +type TestVersionFD1_E struct { + E int32 `protobuf:"varint,6,opt,name=e,proto3,oneof" json:"e,omitempty"` +} +type TestVersionFD1_F struct { + F *TestVersion1 `protobuf:"bytes,7,opt,name=f,proto3,oneof" json:"f,omitempty"` +} + +func (*TestVersionFD1_E) isTestVersionFD1_Sum() {} +func (*TestVersionFD1_F) isTestVersionFD1_Sum() {} + +func (m *TestVersionFD1) GetSum() isTestVersionFD1_Sum { if m != nil { - return m.Id + return m.Sum } - return "" + return nil } -func (m *TestVersion3LoneNesting_Inner2) GetCountry() string { +func (m *TestVersionFD1) GetX() int64 { if m != nil { - return m.Country + return m.X } - return "" + return 0 } -func (m *TestVersion3LoneNesting_Inner2) GetInner() *TestVersion3LoneNesting_Inner2_InnerInner { +func (m *TestVersionFD1) GetA() *TestVersion1 { if m != nil { - return m.Inner + return m.A } return nil } -type TestVersion3LoneNesting_Inner2_InnerInner struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - City string `protobuf:"bytes,2,opt,name=city,proto3" json:"city,omitempty"` +func (m *TestVersionFD1) GetE() int32 { + if x, ok := m.GetSum().(*TestVersionFD1_E); ok { + return x.E + } + return 0 } -func (m *TestVersion3LoneNesting_Inner2_InnerInner) Reset() { - *m = TestVersion3LoneNesting_Inner2_InnerInner{} -} -func (m *TestVersion3LoneNesting_Inner2_InnerInner) String() string { - return proto.CompactTextString(m) -} -func (*TestVersion3LoneNesting_Inner2_InnerInner) ProtoMessage() {} -func (*TestVersion3LoneNesting_Inner2_InnerInner) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{28, 1, 0} -} -func (m *TestVersion3LoneNesting_Inner2_InnerInner) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TestVersion3LoneNesting_Inner2_InnerInner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TestVersion3LoneNesting_Inner2_InnerInner.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil +func (m *TestVersionFD1) GetF() *TestVersion1 { + if x, ok := m.GetSum().(*TestVersionFD1_F); ok { + return x.F } + return nil } -func (m *TestVersion3LoneNesting_Inner2_InnerInner) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestVersion3LoneNesting_Inner2_InnerInner.Merge(m, src) -} -func (m *TestVersion3LoneNesting_Inner2_InnerInner) XXX_Size() int { - return m.Size() -} -func (m *TestVersion3LoneNesting_Inner2_InnerInner) XXX_DiscardUnknown() { - xxx_messageInfo_TestVersion3LoneNesting_Inner2_InnerInner.DiscardUnknown(m) -} - -var xxx_messageInfo_TestVersion3LoneNesting_Inner2_InnerInner proto.InternalMessageInfo -func (m *TestVersion3LoneNesting_Inner2_InnerInner) GetId() string { +func (m *TestVersionFD1) GetG() *types.Any { if m != nil { - return m.Id + return m.G } - return "" + return nil } -func (m *TestVersion3LoneNesting_Inner2_InnerInner) GetCity() string { +func (m *TestVersionFD1) GetH() []*TestVersion1 { if m != nil { - return m.City + return m.H } - return "" + return nil } -type TestVersion4LoneNesting struct { - X int64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` - A *TestVersion3 `protobuf:"bytes,2,opt,name=a,proto3" json:"a,omitempty"` - B *TestVersion3 `protobuf:"bytes,3,opt,name=b,proto3" json:"b,omitempty"` - C []*TestVersion3 `protobuf:"bytes,4,rep,name=c,proto3" json:"c,omitempty"` - D []*TestVersion3 `protobuf:"bytes,5,rep,name=d,proto3" json:"d,omitempty"` +// XXX_OneofWrappers is for the internal use of the proto package. +func (*TestVersionFD1) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*TestVersionFD1_E)(nil), + (*TestVersionFD1_F)(nil), + } +} + +type TestVersionFD1WithExtraAny struct { + X int64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` + A *TestVersion1 `protobuf:"bytes,2,opt,name=a,proto3" json:"a,omitempty"` // Types that are valid to be assigned to Sum: - // *TestVersion4LoneNesting_F - Sum isTestVersion4LoneNesting_Sum `protobuf_oneof:"sum"` - G *types.Any `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` - H []*TestVersion1 `protobuf:"bytes,9,rep,name=h,proto3" json:"h,omitempty"` - // google.protobuf.Timestamp i = 10; - // google.protobuf.Timestamp j = 11; // [(gogoproto.stdtime) = true]; - *Customer1 `protobuf:"bytes,12,opt,name=k,proto3,embedded=k" json:"k,omitempty"` - NonCriticalField string `protobuf:"bytes,1031,opt,name=non_critical_field,json=nonCriticalField,proto3" json:"non_critical_field,omitempty"` - Inner1 *TestVersion4LoneNesting_Inner1 `protobuf:"bytes,14,opt,name=inner1,proto3" json:"inner1,omitempty"` - Inner2 *TestVersion4LoneNesting_Inner2 `protobuf:"bytes,15,opt,name=inner2,proto3" json:"inner2,omitempty"` + // *TestVersionFD1WithExtraAny_E + // *TestVersionFD1WithExtraAny_F + Sum isTestVersionFD1WithExtraAny_Sum `protobuf_oneof:"sum"` + G *AnyWithExtra `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` + H []*TestVersion1 `protobuf:"bytes,9,rep,name=h,proto3" json:"h,omitempty"` } -func (m *TestVersion4LoneNesting) Reset() { *m = TestVersion4LoneNesting{} } -func (m *TestVersion4LoneNesting) String() string { return proto.CompactTextString(m) } -func (*TestVersion4LoneNesting) ProtoMessage() {} -func (*TestVersion4LoneNesting) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{29} +func (m *TestVersionFD1WithExtraAny) Reset() { *m = TestVersionFD1WithExtraAny{} } +func (m *TestVersionFD1WithExtraAny) String() string { return proto.CompactTextString(m) } +func (*TestVersionFD1WithExtraAny) ProtoMessage() {} +func (*TestVersionFD1WithExtraAny) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{18} } -func (m *TestVersion4LoneNesting) XXX_Unmarshal(b []byte) error { +func (m *TestVersionFD1WithExtraAny) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TestVersion4LoneNesting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *TestVersionFD1WithExtraAny) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TestVersion4LoneNesting.Marshal(b, m, deterministic) + return xxx_messageInfo_TestVersionFD1WithExtraAny.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -2460,139 +2351,109 @@ func (m *TestVersion4LoneNesting) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } -func (m *TestVersion4LoneNesting) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestVersion4LoneNesting.Merge(m, src) +func (m *TestVersionFD1WithExtraAny) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestVersionFD1WithExtraAny.Merge(m, src) } -func (m *TestVersion4LoneNesting) XXX_Size() int { +func (m *TestVersionFD1WithExtraAny) XXX_Size() int { return m.Size() } -func (m *TestVersion4LoneNesting) XXX_DiscardUnknown() { - xxx_messageInfo_TestVersion4LoneNesting.DiscardUnknown(m) +func (m *TestVersionFD1WithExtraAny) XXX_DiscardUnknown() { + xxx_messageInfo_TestVersionFD1WithExtraAny.DiscardUnknown(m) } -var xxx_messageInfo_TestVersion4LoneNesting proto.InternalMessageInfo +var xxx_messageInfo_TestVersionFD1WithExtraAny proto.InternalMessageInfo -type isTestVersion4LoneNesting_Sum interface { - isTestVersion4LoneNesting_Sum() +type isTestVersionFD1WithExtraAny_Sum interface { + isTestVersionFD1WithExtraAny_Sum() MarshalTo([]byte) (int, error) Size() int } -type TestVersion4LoneNesting_F struct { - F *TestVersion3LoneNesting `protobuf:"bytes,7,opt,name=f,proto3,oneof" json:"f,omitempty"` +type TestVersionFD1WithExtraAny_E struct { + E int32 `protobuf:"varint,6,opt,name=e,proto3,oneof" json:"e,omitempty"` +} +type TestVersionFD1WithExtraAny_F struct { + F *TestVersion1 `protobuf:"bytes,7,opt,name=f,proto3,oneof" json:"f,omitempty"` } -func (*TestVersion4LoneNesting_F) isTestVersion4LoneNesting_Sum() {} +func (*TestVersionFD1WithExtraAny_E) isTestVersionFD1WithExtraAny_Sum() {} +func (*TestVersionFD1WithExtraAny_F) isTestVersionFD1WithExtraAny_Sum() {} -func (m *TestVersion4LoneNesting) GetSum() isTestVersion4LoneNesting_Sum { +func (m *TestVersionFD1WithExtraAny) GetSum() isTestVersionFD1WithExtraAny_Sum { if m != nil { return m.Sum } return nil } -func (m *TestVersion4LoneNesting) GetX() int64 { +func (m *TestVersionFD1WithExtraAny) GetX() int64 { if m != nil { return m.X } return 0 } -func (m *TestVersion4LoneNesting) GetA() *TestVersion3 { +func (m *TestVersionFD1WithExtraAny) GetA() *TestVersion1 { if m != nil { return m.A } return nil } -func (m *TestVersion4LoneNesting) GetB() *TestVersion3 { - if m != nil { - return m.B - } - return nil -} - -func (m *TestVersion4LoneNesting) GetC() []*TestVersion3 { - if m != nil { - return m.C - } - return nil -} - -func (m *TestVersion4LoneNesting) GetD() []*TestVersion3 { - if m != nil { - return m.D +func (m *TestVersionFD1WithExtraAny) GetE() int32 { + if x, ok := m.GetSum().(*TestVersionFD1WithExtraAny_E); ok { + return x.E } - return nil + return 0 } -func (m *TestVersion4LoneNesting) GetF() *TestVersion3LoneNesting { - if x, ok := m.GetSum().(*TestVersion4LoneNesting_F); ok { +func (m *TestVersionFD1WithExtraAny) GetF() *TestVersion1 { + if x, ok := m.GetSum().(*TestVersionFD1WithExtraAny_F); ok { return x.F } return nil } -func (m *TestVersion4LoneNesting) GetG() *types.Any { +func (m *TestVersionFD1WithExtraAny) GetG() *AnyWithExtra { if m != nil { return m.G } return nil } -func (m *TestVersion4LoneNesting) GetH() []*TestVersion1 { +func (m *TestVersionFD1WithExtraAny) GetH() []*TestVersion1 { if m != nil { return m.H } return nil } -func (m *TestVersion4LoneNesting) GetNonCriticalField() string { - if m != nil { - return m.NonCriticalField +// XXX_OneofWrappers is for the internal use of the proto package. +func (*TestVersionFD1WithExtraAny) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*TestVersionFD1WithExtraAny_E)(nil), + (*TestVersionFD1WithExtraAny_F)(nil), } - return "" } -func (m *TestVersion4LoneNesting) GetInner1() *TestVersion4LoneNesting_Inner1 { - if m != nil { - return m.Inner1 - } - return nil -} - -func (m *TestVersion4LoneNesting) GetInner2() *TestVersion4LoneNesting_Inner2 { - if m != nil { - return m.Inner2 - } - return nil -} - -// XXX_OneofWrappers is for the internal use of the proto package. -func (*TestVersion4LoneNesting) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*TestVersion4LoneNesting_F)(nil), - } -} - -type TestVersion4LoneNesting_Inner1 struct { - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Inner *TestVersion4LoneNesting_Inner1_InnerInner `protobuf:"bytes,3,opt,name=inner,proto3" json:"inner,omitempty"` +type AnyWithExtra struct { + *types.Any `protobuf:"bytes,1,opt,name=a,proto3,embedded=a" json:"a,omitempty"` + B int64 `protobuf:"varint,3,opt,name=b,proto3" json:"b,omitempty"` + C int64 `protobuf:"varint,4,opt,name=c,proto3" json:"c,omitempty"` } -func (m *TestVersion4LoneNesting_Inner1) Reset() { *m = TestVersion4LoneNesting_Inner1{} } -func (m *TestVersion4LoneNesting_Inner1) String() string { return proto.CompactTextString(m) } -func (*TestVersion4LoneNesting_Inner1) ProtoMessage() {} -func (*TestVersion4LoneNesting_Inner1) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{29, 0} +func (m *AnyWithExtra) Reset() { *m = AnyWithExtra{} } +func (m *AnyWithExtra) String() string { return proto.CompactTextString(m) } +func (*AnyWithExtra) ProtoMessage() {} +func (*AnyWithExtra) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{19} } -func (m *TestVersion4LoneNesting_Inner1) XXX_Unmarshal(b []byte) error { +func (m *AnyWithExtra) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TestVersion4LoneNesting_Inner1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *AnyWithExtra) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TestVersion4LoneNesting_Inner1.Marshal(b, m, deterministic) + return xxx_messageInfo_AnyWithExtra.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -2602,60 +2463,52 @@ func (m *TestVersion4LoneNesting_Inner1) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } -func (m *TestVersion4LoneNesting_Inner1) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestVersion4LoneNesting_Inner1.Merge(m, src) +func (m *AnyWithExtra) XXX_Merge(src proto.Message) { + xxx_messageInfo_AnyWithExtra.Merge(m, src) } -func (m *TestVersion4LoneNesting_Inner1) XXX_Size() int { +func (m *AnyWithExtra) XXX_Size() int { return m.Size() } -func (m *TestVersion4LoneNesting_Inner1) XXX_DiscardUnknown() { - xxx_messageInfo_TestVersion4LoneNesting_Inner1.DiscardUnknown(m) +func (m *AnyWithExtra) XXX_DiscardUnknown() { + xxx_messageInfo_AnyWithExtra.DiscardUnknown(m) } -var xxx_messageInfo_TestVersion4LoneNesting_Inner1 proto.InternalMessageInfo +var xxx_messageInfo_AnyWithExtra proto.InternalMessageInfo -func (m *TestVersion4LoneNesting_Inner1) GetId() int64 { +func (m *AnyWithExtra) GetB() int64 { if m != nil { - return m.Id + return m.B } return 0 } -func (m *TestVersion4LoneNesting_Inner1) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *TestVersion4LoneNesting_Inner1) GetInner() *TestVersion4LoneNesting_Inner1_InnerInner { +func (m *AnyWithExtra) GetC() int64 { if m != nil { - return m.Inner + return m.C } - return nil + return 0 } -type TestVersion4LoneNesting_Inner1_InnerInner struct { - Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - City string `protobuf:"bytes,2,opt,name=city,proto3" json:"city,omitempty"` +type TestUpdatedTxRaw struct { + BodyBytes []byte `protobuf:"bytes,1,opt,name=body_bytes,json=bodyBytes,proto3" json:"body_bytes,omitempty"` + AuthInfoBytes []byte `protobuf:"bytes,2,opt,name=auth_info_bytes,json=authInfoBytes,proto3" json:"auth_info_bytes,omitempty"` + Signatures [][]byte `protobuf:"bytes,3,rep,name=signatures,proto3" json:"signatures,omitempty"` + NewField_5 []byte `protobuf:"bytes,5,opt,name=new_field_5,json=newField5,proto3" json:"new_field_5,omitempty"` + NewField_1024 []byte `protobuf:"bytes,1024,opt,name=new_field_1024,json=newField1024,proto3" json:"new_field_1024,omitempty"` } -func (m *TestVersion4LoneNesting_Inner1_InnerInner) Reset() { - *m = TestVersion4LoneNesting_Inner1_InnerInner{} -} -func (m *TestVersion4LoneNesting_Inner1_InnerInner) String() string { - return proto.CompactTextString(m) -} -func (*TestVersion4LoneNesting_Inner1_InnerInner) ProtoMessage() {} -func (*TestVersion4LoneNesting_Inner1_InnerInner) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{29, 0, 0} +func (m *TestUpdatedTxRaw) Reset() { *m = TestUpdatedTxRaw{} } +func (m *TestUpdatedTxRaw) String() string { return proto.CompactTextString(m) } +func (*TestUpdatedTxRaw) ProtoMessage() {} +func (*TestUpdatedTxRaw) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{20} } -func (m *TestVersion4LoneNesting_Inner1_InnerInner) XXX_Unmarshal(b []byte) error { +func (m *TestUpdatedTxRaw) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TestVersion4LoneNesting_Inner1_InnerInner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *TestUpdatedTxRaw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TestVersion4LoneNesting_Inner1_InnerInner.Marshal(b, m, deterministic) + return xxx_messageInfo_TestUpdatedTxRaw.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -2665,50 +2518,75 @@ func (m *TestVersion4LoneNesting_Inner1_InnerInner) XXX_Marshal(b []byte, determ return b[:n], nil } } -func (m *TestVersion4LoneNesting_Inner1_InnerInner) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestVersion4LoneNesting_Inner1_InnerInner.Merge(m, src) +func (m *TestUpdatedTxRaw) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestUpdatedTxRaw.Merge(m, src) } -func (m *TestVersion4LoneNesting_Inner1_InnerInner) XXX_Size() int { +func (m *TestUpdatedTxRaw) XXX_Size() int { return m.Size() } -func (m *TestVersion4LoneNesting_Inner1_InnerInner) XXX_DiscardUnknown() { - xxx_messageInfo_TestVersion4LoneNesting_Inner1_InnerInner.DiscardUnknown(m) +func (m *TestUpdatedTxRaw) XXX_DiscardUnknown() { + xxx_messageInfo_TestUpdatedTxRaw.DiscardUnknown(m) } -var xxx_messageInfo_TestVersion4LoneNesting_Inner1_InnerInner proto.InternalMessageInfo +var xxx_messageInfo_TestUpdatedTxRaw proto.InternalMessageInfo -func (m *TestVersion4LoneNesting_Inner1_InnerInner) GetId() int64 { +func (m *TestUpdatedTxRaw) GetBodyBytes() []byte { if m != nil { - return m.Id + return m.BodyBytes } - return 0 + return nil } -func (m *TestVersion4LoneNesting_Inner1_InnerInner) GetCity() string { +func (m *TestUpdatedTxRaw) GetAuthInfoBytes() []byte { if m != nil { - return m.City + return m.AuthInfoBytes } - return "" + return nil } -type TestVersion4LoneNesting_Inner2 struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Country string `protobuf:"bytes,2,opt,name=country,proto3" json:"country,omitempty"` - Inner *TestVersion4LoneNesting_Inner2_InnerInner `protobuf:"bytes,3,opt,name=inner,proto3" json:"inner,omitempty"` +func (m *TestUpdatedTxRaw) GetSignatures() [][]byte { + if m != nil { + return m.Signatures + } + return nil } -func (m *TestVersion4LoneNesting_Inner2) Reset() { *m = TestVersion4LoneNesting_Inner2{} } -func (m *TestVersion4LoneNesting_Inner2) String() string { return proto.CompactTextString(m) } -func (*TestVersion4LoneNesting_Inner2) ProtoMessage() {} -func (*TestVersion4LoneNesting_Inner2) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{29, 1} +func (m *TestUpdatedTxRaw) GetNewField_5() []byte { + if m != nil { + return m.NewField_5 + } + return nil } -func (m *TestVersion4LoneNesting_Inner2) XXX_Unmarshal(b []byte) error { + +func (m *TestUpdatedTxRaw) GetNewField_1024() []byte { + if m != nil { + return m.NewField_1024 + } + return nil +} + +type TestUpdatedTxBody struct { + Messages []*types.Any `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` + Memo string `protobuf:"bytes,2,opt,name=memo,proto3" json:"memo,omitempty"` + TimeoutHeight int64 `protobuf:"varint,3,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty"` + SomeNewField uint64 `protobuf:"varint,4,opt,name=some_new_field,json=someNewField,proto3" json:"some_new_field,omitempty"` + SomeNewFieldNonCriticalField string `protobuf:"bytes,1050,opt,name=some_new_field_non_critical_field,json=someNewFieldNonCriticalField,proto3" json:"some_new_field_non_critical_field,omitempty"` + ExtensionOptions []*types.Any `protobuf:"bytes,1023,rep,name=extension_options,json=extensionOptions,proto3" json:"extension_options,omitempty"` + NonCriticalExtensionOptions []*types.Any `protobuf:"bytes,2047,rep,name=non_critical_extension_options,json=nonCriticalExtensionOptions,proto3" json:"non_critical_extension_options,omitempty"` +} + +func (m *TestUpdatedTxBody) Reset() { *m = TestUpdatedTxBody{} } +func (m *TestUpdatedTxBody) String() string { return proto.CompactTextString(m) } +func (*TestUpdatedTxBody) ProtoMessage() {} +func (*TestUpdatedTxBody) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{21} +} +func (m *TestUpdatedTxBody) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TestVersion4LoneNesting_Inner2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *TestUpdatedTxBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TestVersion4LoneNesting_Inner2.Marshal(b, m, deterministic) + return xxx_messageInfo_TestUpdatedTxBody.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -2718,60 +2596,86 @@ func (m *TestVersion4LoneNesting_Inner2) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } -func (m *TestVersion4LoneNesting_Inner2) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestVersion4LoneNesting_Inner2.Merge(m, src) +func (m *TestUpdatedTxBody) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestUpdatedTxBody.Merge(m, src) } -func (m *TestVersion4LoneNesting_Inner2) XXX_Size() int { +func (m *TestUpdatedTxBody) XXX_Size() int { return m.Size() } -func (m *TestVersion4LoneNesting_Inner2) XXX_DiscardUnknown() { - xxx_messageInfo_TestVersion4LoneNesting_Inner2.DiscardUnknown(m) +func (m *TestUpdatedTxBody) XXX_DiscardUnknown() { + xxx_messageInfo_TestUpdatedTxBody.DiscardUnknown(m) } -var xxx_messageInfo_TestVersion4LoneNesting_Inner2 proto.InternalMessageInfo +var xxx_messageInfo_TestUpdatedTxBody proto.InternalMessageInfo -func (m *TestVersion4LoneNesting_Inner2) GetId() string { +func (m *TestUpdatedTxBody) GetMessages() []*types.Any { if m != nil { - return m.Id + return m.Messages + } + return nil +} + +func (m *TestUpdatedTxBody) GetMemo() string { + if m != nil { + return m.Memo } return "" } -func (m *TestVersion4LoneNesting_Inner2) GetCountry() string { +func (m *TestUpdatedTxBody) GetTimeoutHeight() int64 { if m != nil { - return m.Country + return m.TimeoutHeight + } + return 0 +} + +func (m *TestUpdatedTxBody) GetSomeNewField() uint64 { + if m != nil { + return m.SomeNewField + } + return 0 +} + +func (m *TestUpdatedTxBody) GetSomeNewFieldNonCriticalField() string { + if m != nil { + return m.SomeNewFieldNonCriticalField } return "" } -func (m *TestVersion4LoneNesting_Inner2) GetInner() *TestVersion4LoneNesting_Inner2_InnerInner { +func (m *TestUpdatedTxBody) GetExtensionOptions() []*types.Any { if m != nil { - return m.Inner + return m.ExtensionOptions } return nil } -type TestVersion4LoneNesting_Inner2_InnerInner struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Value int64 `protobuf:"varint,2,opt,name=value,proto3" json:"value,omitempty"` +func (m *TestUpdatedTxBody) GetNonCriticalExtensionOptions() []*types.Any { + if m != nil { + return m.NonCriticalExtensionOptions + } + return nil } -func (m *TestVersion4LoneNesting_Inner2_InnerInner) Reset() { - *m = TestVersion4LoneNesting_Inner2_InnerInner{} -} -func (m *TestVersion4LoneNesting_Inner2_InnerInner) String() string { - return proto.CompactTextString(m) +type TestUpdatedAuthInfo struct { + SignerInfos []*tx.SignerInfo `protobuf:"bytes,1,rep,name=signer_infos,json=signerInfos,proto3" json:"signer_infos,omitempty"` + Fee *tx.Fee `protobuf:"bytes,2,opt,name=fee,proto3" json:"fee,omitempty"` + NewField_3 []byte `protobuf:"bytes,3,opt,name=new_field_3,json=newField3,proto3" json:"new_field_3,omitempty"` + NewField_1024 []byte `protobuf:"bytes,1024,opt,name=new_field_1024,json=newField1024,proto3" json:"new_field_1024,omitempty"` } -func (*TestVersion4LoneNesting_Inner2_InnerInner) ProtoMessage() {} -func (*TestVersion4LoneNesting_Inner2_InnerInner) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{29, 1, 0} + +func (m *TestUpdatedAuthInfo) Reset() { *m = TestUpdatedAuthInfo{} } +func (m *TestUpdatedAuthInfo) String() string { return proto.CompactTextString(m) } +func (*TestUpdatedAuthInfo) ProtoMessage() {} +func (*TestUpdatedAuthInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{22} } -func (m *TestVersion4LoneNesting_Inner2_InnerInner) XXX_Unmarshal(b []byte) error { +func (m *TestUpdatedAuthInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TestVersion4LoneNesting_Inner2_InnerInner) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *TestUpdatedAuthInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TestVersion4LoneNesting_Inner2_InnerInner.Marshal(b, m, deterministic) + return xxx_messageInfo_TestUpdatedAuthInfo.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -2781,172 +2685,62 @@ func (m *TestVersion4LoneNesting_Inner2_InnerInner) XXX_Marshal(b []byte, determ return b[:n], nil } } -func (m *TestVersion4LoneNesting_Inner2_InnerInner) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestVersion4LoneNesting_Inner2_InnerInner.Merge(m, src) +func (m *TestUpdatedAuthInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestUpdatedAuthInfo.Merge(m, src) } -func (m *TestVersion4LoneNesting_Inner2_InnerInner) XXX_Size() int { +func (m *TestUpdatedAuthInfo) XXX_Size() int { return m.Size() } -func (m *TestVersion4LoneNesting_Inner2_InnerInner) XXX_DiscardUnknown() { - xxx_messageInfo_TestVersion4LoneNesting_Inner2_InnerInner.DiscardUnknown(m) +func (m *TestUpdatedAuthInfo) XXX_DiscardUnknown() { + xxx_messageInfo_TestUpdatedAuthInfo.DiscardUnknown(m) } -var xxx_messageInfo_TestVersion4LoneNesting_Inner2_InnerInner proto.InternalMessageInfo +var xxx_messageInfo_TestUpdatedAuthInfo proto.InternalMessageInfo -func (m *TestVersion4LoneNesting_Inner2_InnerInner) GetId() string { +func (m *TestUpdatedAuthInfo) GetSignerInfos() []*tx.SignerInfo { if m != nil { - return m.Id - } - return "" -} - -func (m *TestVersion4LoneNesting_Inner2_InnerInner) GetValue() int64 { - if m != nil { - return m.Value - } - return 0 -} - -type TestVersionFD1 struct { - X int64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` - A *TestVersion1 `protobuf:"bytes,2,opt,name=a,proto3" json:"a,omitempty"` - // Types that are valid to be assigned to Sum: - // *TestVersionFD1_E - // *TestVersionFD1_F - Sum isTestVersionFD1_Sum `protobuf_oneof:"sum"` - G *types.Any `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` - H []*TestVersion1 `protobuf:"bytes,9,rep,name=h,proto3" json:"h,omitempty"` -} - -func (m *TestVersionFD1) Reset() { *m = TestVersionFD1{} } -func (m *TestVersionFD1) String() string { return proto.CompactTextString(m) } -func (*TestVersionFD1) ProtoMessage() {} -func (*TestVersionFD1) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{30} -} -func (m *TestVersionFD1) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TestVersionFD1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TestVersionFD1.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TestVersionFD1) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestVersionFD1.Merge(m, src) -} -func (m *TestVersionFD1) XXX_Size() int { - return m.Size() -} -func (m *TestVersionFD1) XXX_DiscardUnknown() { - xxx_messageInfo_TestVersionFD1.DiscardUnknown(m) -} - -var xxx_messageInfo_TestVersionFD1 proto.InternalMessageInfo - -type isTestVersionFD1_Sum interface { - isTestVersionFD1_Sum() - MarshalTo([]byte) (int, error) - Size() int -} - -type TestVersionFD1_E struct { - E int32 `protobuf:"varint,6,opt,name=e,proto3,oneof" json:"e,omitempty"` -} -type TestVersionFD1_F struct { - F *TestVersion1 `protobuf:"bytes,7,opt,name=f,proto3,oneof" json:"f,omitempty"` -} - -func (*TestVersionFD1_E) isTestVersionFD1_Sum() {} -func (*TestVersionFD1_F) isTestVersionFD1_Sum() {} - -func (m *TestVersionFD1) GetSum() isTestVersionFD1_Sum { - if m != nil { - return m.Sum + return m.SignerInfos } return nil } -func (m *TestVersionFD1) GetX() int64 { - if m != nil { - return m.X - } - return 0 -} - -func (m *TestVersionFD1) GetA() *TestVersion1 { +func (m *TestUpdatedAuthInfo) GetFee() *tx.Fee { if m != nil { - return m.A - } - return nil -} - -func (m *TestVersionFD1) GetE() int32 { - if x, ok := m.GetSum().(*TestVersionFD1_E); ok { - return x.E - } - return 0 -} - -func (m *TestVersionFD1) GetF() *TestVersion1 { - if x, ok := m.GetSum().(*TestVersionFD1_F); ok { - return x.F + return m.Fee } return nil } -func (m *TestVersionFD1) GetG() *types.Any { +func (m *TestUpdatedAuthInfo) GetNewField_3() []byte { if m != nil { - return m.G + return m.NewField_3 } return nil } -func (m *TestVersionFD1) GetH() []*TestVersion1 { +func (m *TestUpdatedAuthInfo) GetNewField_1024() []byte { if m != nil { - return m.H + return m.NewField_1024 } return nil } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*TestVersionFD1) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*TestVersionFD1_E)(nil), - (*TestVersionFD1_F)(nil), - } -} - -type TestVersionFD1WithExtraAny struct { - X int64 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` - A *TestVersion1 `protobuf:"bytes,2,opt,name=a,proto3" json:"a,omitempty"` - // Types that are valid to be assigned to Sum: - // *TestVersionFD1WithExtraAny_E - // *TestVersionFD1WithExtraAny_F - Sum isTestVersionFD1WithExtraAny_Sum `protobuf_oneof:"sum"` - G *AnyWithExtra `protobuf:"bytes,8,opt,name=g,proto3" json:"g,omitempty"` - H []*TestVersion1 `protobuf:"bytes,9,rep,name=h,proto3" json:"h,omitempty"` +type TestRepeatedUints struct { + Nums []uint64 `protobuf:"varint,1,rep,packed,name=nums,proto3" json:"nums,omitempty"` } -func (m *TestVersionFD1WithExtraAny) Reset() { *m = TestVersionFD1WithExtraAny{} } -func (m *TestVersionFD1WithExtraAny) String() string { return proto.CompactTextString(m) } -func (*TestVersionFD1WithExtraAny) ProtoMessage() {} -func (*TestVersionFD1WithExtraAny) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{31} +func (m *TestRepeatedUints) Reset() { *m = TestRepeatedUints{} } +func (m *TestRepeatedUints) String() string { return proto.CompactTextString(m) } +func (*TestRepeatedUints) ProtoMessage() {} +func (*TestRepeatedUints) Descriptor() ([]byte, []int) { + return fileDescriptor_448ea787339d1228, []int{23} } -func (m *TestVersionFD1WithExtraAny) XXX_Unmarshal(b []byte) error { +func (m *TestRepeatedUints) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *TestVersionFD1WithExtraAny) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *TestRepeatedUints) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_TestVersionFD1WithExtraAny.Marshal(b, m, deterministic) + return xxx_messageInfo_TestRepeatedUints.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -2956,830 +2750,632 @@ func (m *TestVersionFD1WithExtraAny) XXX_Marshal(b []byte, deterministic bool) ( return b[:n], nil } } -func (m *TestVersionFD1WithExtraAny) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestVersionFD1WithExtraAny.Merge(m, src) +func (m *TestRepeatedUints) XXX_Merge(src proto.Message) { + xxx_messageInfo_TestRepeatedUints.Merge(m, src) } -func (m *TestVersionFD1WithExtraAny) XXX_Size() int { +func (m *TestRepeatedUints) XXX_Size() int { return m.Size() } -func (m *TestVersionFD1WithExtraAny) XXX_DiscardUnknown() { - xxx_messageInfo_TestVersionFD1WithExtraAny.DiscardUnknown(m) -} - -var xxx_messageInfo_TestVersionFD1WithExtraAny proto.InternalMessageInfo - -type isTestVersionFD1WithExtraAny_Sum interface { - isTestVersionFD1WithExtraAny_Sum() - MarshalTo([]byte) (int, error) - Size() int -} - -type TestVersionFD1WithExtraAny_E struct { - E int32 `protobuf:"varint,6,opt,name=e,proto3,oneof" json:"e,omitempty"` -} -type TestVersionFD1WithExtraAny_F struct { - F *TestVersion1 `protobuf:"bytes,7,opt,name=f,proto3,oneof" json:"f,omitempty"` +func (m *TestRepeatedUints) XXX_DiscardUnknown() { + xxx_messageInfo_TestRepeatedUints.DiscardUnknown(m) } -func (*TestVersionFD1WithExtraAny_E) isTestVersionFD1WithExtraAny_Sum() {} -func (*TestVersionFD1WithExtraAny_F) isTestVersionFD1WithExtraAny_Sum() {} +var xxx_messageInfo_TestRepeatedUints proto.InternalMessageInfo -func (m *TestVersionFD1WithExtraAny) GetSum() isTestVersionFD1WithExtraAny_Sum { +func (m *TestRepeatedUints) GetNums() []uint64 { if m != nil { - return m.Sum + return m.Nums } return nil } -func (m *TestVersionFD1WithExtraAny) GetX() int64 { - if m != nil { - return m.X - } - return 0 -} - -func (m *TestVersionFD1WithExtraAny) GetA() *TestVersion1 { - if m != nil { - return m.A - } - return nil +func init() { + proto.RegisterEnum("testdata.Customer2_City", Customer2_City_name, Customer2_City_value) + proto.RegisterType((*Customer1)(nil), "testdata.Customer1") + proto.RegisterType((*Customer2)(nil), "testdata.Customer2") + proto.RegisterType((*Nested4A)(nil), "testdata.Nested4A") + proto.RegisterType((*Nested3A)(nil), "testdata.Nested3A") + proto.RegisterMapType((map[int64]*Nested4A)(nil), "testdata.Nested3A.IndexEntry") + proto.RegisterType((*Nested2A)(nil), "testdata.Nested2A") + proto.RegisterType((*Nested1A)(nil), "testdata.Nested1A") + proto.RegisterType((*Nested4B)(nil), "testdata.Nested4B") + proto.RegisterType((*Nested3B)(nil), "testdata.Nested3B") + proto.RegisterType((*Nested2B)(nil), "testdata.Nested2B") + proto.RegisterType((*Nested1B)(nil), "testdata.Nested1B") + proto.RegisterType((*Customer3)(nil), "testdata.Customer3") + proto.RegisterType((*TestVersion1)(nil), "testdata.TestVersion1") + proto.RegisterType((*TestVersion2)(nil), "testdata.TestVersion2") + proto.RegisterType((*TestVersion3)(nil), "testdata.TestVersion3") + proto.RegisterType((*TestVersion3LoneOneOfValue)(nil), "testdata.TestVersion3LoneOneOfValue") + proto.RegisterType((*TestVersion3LoneNesting)(nil), "testdata.TestVersion3LoneNesting") + proto.RegisterType((*TestVersion3LoneNesting_Inner1)(nil), "testdata.TestVersion3LoneNesting.Inner1") + proto.RegisterType((*TestVersion3LoneNesting_Inner1_InnerInner)(nil), "testdata.TestVersion3LoneNesting.Inner1.InnerInner") + proto.RegisterType((*TestVersion3LoneNesting_Inner2)(nil), "testdata.TestVersion3LoneNesting.Inner2") + proto.RegisterType((*TestVersion3LoneNesting_Inner2_InnerInner)(nil), "testdata.TestVersion3LoneNesting.Inner2.InnerInner") + proto.RegisterType((*TestVersion4LoneNesting)(nil), "testdata.TestVersion4LoneNesting") + proto.RegisterType((*TestVersion4LoneNesting_Inner1)(nil), "testdata.TestVersion4LoneNesting.Inner1") + proto.RegisterType((*TestVersion4LoneNesting_Inner1_InnerInner)(nil), "testdata.TestVersion4LoneNesting.Inner1.InnerInner") + proto.RegisterType((*TestVersion4LoneNesting_Inner2)(nil), "testdata.TestVersion4LoneNesting.Inner2") + proto.RegisterType((*TestVersion4LoneNesting_Inner2_InnerInner)(nil), "testdata.TestVersion4LoneNesting.Inner2.InnerInner") + proto.RegisterType((*TestVersionFD1)(nil), "testdata.TestVersionFD1") + proto.RegisterType((*TestVersionFD1WithExtraAny)(nil), "testdata.TestVersionFD1WithExtraAny") + proto.RegisterType((*AnyWithExtra)(nil), "testdata.AnyWithExtra") + proto.RegisterType((*TestUpdatedTxRaw)(nil), "testdata.TestUpdatedTxRaw") + proto.RegisterType((*TestUpdatedTxBody)(nil), "testdata.TestUpdatedTxBody") + proto.RegisterType((*TestUpdatedAuthInfo)(nil), "testdata.TestUpdatedAuthInfo") + proto.RegisterType((*TestRepeatedUints)(nil), "testdata.TestRepeatedUints") } -func (m *TestVersionFD1WithExtraAny) GetE() int32 { - if x, ok := m.GetSum().(*TestVersionFD1WithExtraAny_E); ok { - return x.E - } - return 0 +func init() { proto.RegisterFile("unknonwnproto.proto", fileDescriptor_448ea787339d1228) } + +var fileDescriptor_448ea787339d1228 = []byte{ + // 1644 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0x4f, 0x6f, 0x1b, 0xc7, + 0x15, 0xd7, 0x70, 0x49, 0x89, 0x7c, 0xa2, 0x69, 0x66, 0x6c, 0xb4, 0x1b, 0x3a, 0x66, 0x98, 0x85, + 0xeb, 0xb0, 0x41, 0x43, 0x9a, 0x4b, 0x06, 0x28, 0x72, 0x32, 0xe9, 0x58, 0x95, 0x01, 0x57, 0x2e, + 0xa6, 0x4e, 0x5a, 0xf8, 0x42, 0x2c, 0xb9, 0x43, 0x72, 0x21, 0x72, 0x46, 0xdd, 0x99, 0xb5, 0xc8, + 0x5b, 0xd1, 0x1e, 0x7a, 0xcd, 0xa5, 0x28, 0xd0, 0x6f, 0xd0, 0x53, 0x91, 0x6f, 0xd0, 0xa3, 0x2f, + 0x05, 0x7c, 0x29, 0x50, 0xa0, 0x40, 0x50, 0xd8, 0xd7, 0x7e, 0x83, 0xa2, 0x48, 0x31, 0xb3, 0x7f, + 0xb8, 0x94, 0x44, 0x85, 0x52, 0xda, 0x18, 0x02, 0x72, 0x11, 0x67, 0xde, 0xfe, 0xe6, 0xcd, 0x7b, + 0xbf, 0xf7, 0x67, 0x77, 0x46, 0x70, 0x23, 0x60, 0x87, 0x8c, 0xb3, 0x63, 0x76, 0xe4, 0x73, 0xc9, + 0x1b, 0xfa, 0x2f, 0xce, 0x4b, 0x2a, 0xa4, 0xeb, 0x48, 0xa7, 0x72, 0x73, 0xcc, 0xc7, 0x5c, 0x0b, + 0x9b, 0x6a, 0x14, 0x3e, 0xaf, 0xbc, 0x3d, 0xe6, 0x7c, 0x3c, 0xa5, 0x4d, 0x3d, 0x1b, 0x04, 0xa3, + 0xa6, 0xc3, 0x16, 0xd1, 0xa3, 0xca, 0x90, 0x8b, 0x19, 0x17, 0x4d, 0x39, 0x6f, 0x3e, 0x6f, 0x0d, + 0xa8, 0x74, 0x5a, 0x4d, 0x39, 0x0f, 0x9f, 0x59, 0x12, 0x0a, 0x0f, 0x02, 0x21, 0xf9, 0x8c, 0xfa, + 0x2d, 0x5c, 0x82, 0x8c, 0xe7, 0x9a, 0xa8, 0x86, 0xea, 0x39, 0x92, 0xf1, 0x5c, 0x8c, 0x21, 0xcb, + 0x9c, 0x19, 0x35, 0x33, 0x35, 0x54, 0x2f, 0x10, 0x3d, 0xc6, 0x3f, 0x84, 0xb2, 0x08, 0x06, 0x62, + 0xe8, 0x7b, 0x47, 0xd2, 0xe3, 0xac, 0x3f, 0xa2, 0xd4, 0x34, 0x6a, 0xa8, 0x9e, 0x21, 0xd7, 0xd3, + 0xf2, 0x3d, 0x4a, 0xb1, 0x09, 0x3b, 0x47, 0xce, 0x62, 0x46, 0x99, 0x34, 0x77, 0xb4, 0x86, 0x78, + 0x6a, 0x7d, 0x91, 0x59, 0x6e, 0x6b, 0x9f, 0xda, 0xb6, 0x02, 0x79, 0x8f, 0xb9, 0x81, 0x90, 0xfe, + 0x42, 0x6f, 0x9d, 0x23, 0xc9, 0x3c, 0x31, 0xc9, 0x48, 0x99, 0x74, 0x13, 0x72, 0x23, 0x7a, 0x4c, + 0x7d, 0x33, 0xab, 0xed, 0x08, 0x27, 0xf8, 0x16, 0xe4, 0x7d, 0x2a, 0xa8, 0xff, 0x9c, 0xba, 0xe6, + 0x1f, 0xf2, 0x35, 0x54, 0x37, 0x48, 0x22, 0xc0, 0x3f, 0x82, 0xec, 0xd0, 0x93, 0x0b, 0x73, 0xbb, + 0x86, 0xea, 0x25, 0xdb, 0x6c, 0xc4, 0xe4, 0x36, 0x12, 0xab, 0x1a, 0x0f, 0x3c, 0xb9, 0x20, 0x1a, + 0x85, 0x3f, 0x86, 0x6b, 0x33, 0x4f, 0x0c, 0xe9, 0x74, 0xea, 0x30, 0xca, 0x03, 0x61, 0x42, 0x0d, + 0xd5, 0x77, 0xed, 0x9b, 0x8d, 0x90, 0xf3, 0x46, 0xcc, 0x79, 0xa3, 0xcb, 0x16, 0x64, 0x15, 0x6a, + 0xfd, 0x04, 0xb2, 0x4a, 0x13, 0xce, 0x43, 0xf6, 0xb1, 0xc3, 0x45, 0x79, 0x0b, 0x97, 0x00, 0x1e, + 0x73, 0xd1, 0x65, 0x63, 0x3a, 0xa5, 0xa2, 0x8c, 0x70, 0x11, 0xf2, 0x3f, 0x73, 0xa6, 0xbc, 0x3b, + 0x95, 0xbc, 0x9c, 0xc1, 0x00, 0xdb, 0x3f, 0xe5, 0x62, 0xc8, 0x8f, 0xcb, 0x06, 0xde, 0x85, 0x9d, + 0x03, 0xc7, 0xf3, 0xf9, 0xc0, 0x2b, 0x67, 0xad, 0x06, 0xe4, 0x0f, 0xa8, 0x90, 0xd4, 0xed, 0x74, + 0x37, 0x09, 0x94, 0xf5, 0x37, 0x14, 0x2f, 0x68, 0x6f, 0xb4, 0x00, 0x5b, 0x90, 0x71, 0x3a, 0x66, + 0xb6, 0x66, 0xd4, 0x77, 0x6d, 0xbc, 0x64, 0x24, 0xde, 0x94, 0x64, 0x9c, 0x0e, 0x6e, 0x43, 0xce, + 0x63, 0x2e, 0x9d, 0x9b, 0x39, 0x0d, 0xbb, 0x7d, 0x12, 0xd6, 0xee, 0x36, 0x1e, 0xa9, 0xe7, 0x0f, + 0x99, 0xf4, 0x17, 0x24, 0xc4, 0x56, 0x1e, 0x03, 0x2c, 0x85, 0xb8, 0x0c, 0xc6, 0x21, 0x5d, 0x68, + 0x5b, 0x0c, 0xa2, 0x86, 0xb8, 0x0e, 0xb9, 0xe7, 0xce, 0x34, 0x08, 0xad, 0x39, 0x7b, 0xef, 0x10, + 0xf0, 0x71, 0xe6, 0xc7, 0xc8, 0x7a, 0x16, 0xbb, 0x65, 0x6f, 0xe6, 0xd6, 0x07, 0xb0, 0xcd, 0x34, + 0x5e, 0xe7, 0xcc, 0x19, 0xea, 0xdb, 0x5d, 0x12, 0x21, 0xac, 0xbd, 0x58, 0x77, 0xeb, 0xb4, 0xee, + 0xa5, 0x9e, 0x35, 0x66, 0xda, 0x4b, 0x3d, 0xf7, 0x93, 0x58, 0xf5, 0x4e, 0xe9, 0x29, 0x83, 0xe1, + 0x8c, 0x69, 0x94, 0xd8, 0x6a, 0x78, 0x56, 0x4e, 0x5b, 0x6e, 0x12, 0xbc, 0x4b, 0x6a, 0x50, 0xe1, + 0x1c, 0xac, 0x0f, 0x67, 0x8f, 0x64, 0x06, 0x1d, 0x8b, 0x25, 0x5c, 0x9e, 0xb9, 0x8b, 0xaa, 0x6d, + 0xb5, 0x0b, 0x22, 0x6a, 0xb8, 0x01, 0x93, 0xbd, 0x98, 0x01, 0x55, 0x93, 0x3e, 0x0f, 0x24, 0xd5, + 0x35, 0x59, 0x20, 0xe1, 0xc4, 0xfa, 0x65, 0xc2, 0x6f, 0xef, 0x12, 0xfc, 0x2e, 0xb5, 0x47, 0x0c, + 0x18, 0x09, 0x03, 0xd6, 0x6f, 0x52, 0x1d, 0xa5, 0xbd, 0x51, 0x5e, 0x94, 0x20, 0x23, 0x46, 0x51, + 0xeb, 0xca, 0x88, 0x11, 0x7e, 0x07, 0x0a, 0x22, 0xf0, 0x87, 0x13, 0xc7, 0x1f, 0xd3, 0xa8, 0x93, + 0x2c, 0x05, 0xb8, 0x06, 0xbb, 0x2e, 0x15, 0xd2, 0x63, 0x8e, 0xea, 0x6e, 0x66, 0x4e, 0x2b, 0x4a, + 0x8b, 0xf0, 0x5d, 0x28, 0x0d, 0x7d, 0xea, 0x7a, 0xb2, 0x3f, 0x74, 0x7c, 0xb7, 0xcf, 0x78, 0xd8, + 0xf4, 0xf6, 0xb7, 0x48, 0x31, 0x94, 0x3f, 0x70, 0x7c, 0xf7, 0x80, 0xe3, 0xdb, 0x50, 0x18, 0x4e, + 0xe8, 0xaf, 0x02, 0xaa, 0x20, 0xf9, 0x08, 0x92, 0x0f, 0x45, 0x07, 0x1c, 0x37, 0x21, 0xcf, 0x7d, + 0x6f, 0xec, 0x31, 0x67, 0x6a, 0x16, 0x34, 0x11, 0x37, 0x4e, 0x77, 0xa7, 0x16, 0x49, 0x40, 0xbd, + 0x42, 0xd2, 0x65, 0xad, 0x7f, 0x65, 0xa0, 0xf8, 0x94, 0x0a, 0xf9, 0x19, 0xf5, 0x85, 0xc7, 0x59, + 0x0b, 0x17, 0x01, 0xcd, 0xa3, 0x4a, 0x43, 0x73, 0x7c, 0x07, 0x90, 0x13, 0x91, 0xfb, 0xbd, 0xa5, + 0xce, 0xf4, 0x02, 0x82, 0x1c, 0x85, 0x1a, 0x44, 0x01, 0x5e, 0x8b, 0x1a, 0x28, 0xd4, 0x30, 0x4a, + 0xae, 0xb5, 0xa8, 0x21, 0xfe, 0x00, 0x90, 0x1b, 0xb5, 0x8a, 0x35, 0xa8, 0x5e, 0xf6, 0xc5, 0x97, + 0xef, 0x6e, 0x11, 0xe4, 0xe2, 0x12, 0x20, 0xaa, 0xfb, 0x71, 0x6e, 0x7f, 0x8b, 0x20, 0x8a, 0xef, + 0x02, 0x1a, 0x69, 0x0a, 0xd7, 0xae, 0x55, 0xb8, 0x11, 0xb6, 0x00, 0x8d, 0x35, 0x8f, 0xeb, 0x1a, + 0x32, 0x1a, 0x2b, 0x6b, 0x27, 0x66, 0xe1, 0x7c, 0x6b, 0x27, 0xf8, 0x7d, 0x40, 0x87, 0x66, 0x71, + 0x2d, 0xe7, 0xbd, 0xec, 0xcb, 0x2f, 0xdf, 0x45, 0x04, 0x1d, 0xf6, 0x72, 0x60, 0x88, 0x60, 0x66, + 0xfd, 0xd6, 0x58, 0xa1, 0xdb, 0xbe, 0x28, 0xdd, 0xf6, 0x46, 0x74, 0xdb, 0x1b, 0xd1, 0x6d, 0x2b, + 0xba, 0xef, 0x7c, 0x1d, 0xdd, 0xf6, 0xa5, 0x88, 0xb6, 0xdf, 0x14, 0xd1, 0xf8, 0x16, 0x14, 0x18, + 0x3d, 0xee, 0x8f, 0x3c, 0x3a, 0x75, 0xcd, 0xb7, 0x6b, 0xa8, 0x9e, 0x25, 0x79, 0x46, 0x8f, 0xf7, + 0xd4, 0x3c, 0x8e, 0xc2, 0xef, 0x57, 0xa3, 0xd0, 0xbe, 0x68, 0x14, 0xda, 0x1b, 0x45, 0xa1, 0xbd, + 0x51, 0x14, 0xda, 0x1b, 0x45, 0xa1, 0x7d, 0xa9, 0x28, 0xb4, 0xdf, 0x58, 0x14, 0x3e, 0x04, 0xcc, + 0x38, 0xeb, 0x0f, 0x7d, 0x4f, 0x7a, 0x43, 0x67, 0x1a, 0x85, 0xe3, 0x77, 0xba, 0x77, 0x91, 0x32, + 0xe3, 0xec, 0x41, 0xf4, 0x64, 0x25, 0x2e, 0xff, 0xce, 0x40, 0x25, 0x6d, 0xfe, 0x63, 0xce, 0xe8, + 0x13, 0x46, 0x9f, 0x8c, 0x3e, 0x53, 0xaf, 0xf2, 0x2b, 0x1a, 0xa5, 0x2b, 0xc3, 0xfe, 0x7f, 0xb6, + 0xe1, 0xfb, 0x27, 0xd9, 0x3f, 0xd0, 0x6f, 0xab, 0xf1, 0x15, 0xa1, 0xbe, 0xb5, 0x2c, 0x88, 0xf7, + 0xce, 0x46, 0xa5, 0x7c, 0xba, 0x22, 0xb5, 0x81, 0xef, 0xc3, 0xb6, 0xc7, 0x18, 0xf5, 0x5b, 0x66, + 0x49, 0x2b, 0xaf, 0x7f, 0xad, 0x67, 0x8d, 0x47, 0x1a, 0x4f, 0xa2, 0x75, 0x89, 0x06, 0xdb, 0xbc, + 0x7e, 0x21, 0x0d, 0x76, 0xa4, 0xc1, 0xae, 0xfc, 0x09, 0xc1, 0x76, 0xa8, 0x34, 0xf5, 0x9d, 0x64, + 0xac, 0xfd, 0x4e, 0x7a, 0xa4, 0x3e, 0xf9, 0x19, 0xf5, 0xa3, 0xe8, 0xb7, 0x37, 0xb5, 0x38, 0xfc, + 0xd1, 0x7f, 0x48, 0xa8, 0xa1, 0x72, 0x4f, 0x1d, 0x04, 0x62, 0x61, 0x6a, 0xf3, 0x42, 0xbc, 0xb9, + 0x3e, 0x93, 0x45, 0x9b, 0xab, 0x71, 0xe5, 0xcf, 0xb1, 0xad, 0xf6, 0x29, 0xb8, 0x09, 0x3b, 0x43, + 0x1e, 0xb0, 0xf8, 0x90, 0x58, 0x20, 0xf1, 0xf4, 0xb2, 0x16, 0xdb, 0xff, 0x0b, 0x8b, 0xe3, 0xfa, + 0xfb, 0x6a, 0xb5, 0xfe, 0x3a, 0xdf, 0xd5, 0xdf, 0x15, 0xaa, 0xbf, 0xce, 0x37, 0xae, 0xbf, 0xce, + 0xb7, 0x5c, 0x7f, 0x9d, 0x6f, 0x54, 0x7f, 0xc6, 0xda, 0xfa, 0xfb, 0xe2, 0xff, 0x56, 0x7f, 0x9d, + 0x8d, 0xea, 0xcf, 0x3e, 0xb7, 0xfe, 0x6e, 0xa6, 0x2f, 0x0e, 0x8c, 0xe8, 0x92, 0x20, 0xae, 0xc0, + 0xbf, 0x22, 0x28, 0xa5, 0xf6, 0xdb, 0xfb, 0xe4, 0x72, 0xc7, 0xa1, 0x37, 0x7e, 0x2c, 0x89, 0xfd, + 0xf9, 0x07, 0x5a, 0xf9, 0x9e, 0xda, 0xfb, 0xa4, 0xf5, 0x0b, 0x4f, 0x4e, 0x1e, 0xce, 0xa5, 0xef, + 0x74, 0xd9, 0xe2, 0x5b, 0xf5, 0xed, 0xce, 0xd2, 0xb7, 0x14, 0xae, 0xcb, 0x16, 0x89, 0x45, 0x17, + 0xf6, 0xee, 0x29, 0x14, 0xd3, 0xeb, 0x71, 0x5d, 0x39, 0x80, 0xd6, 0xd3, 0x17, 0x77, 0x00, 0x47, + 0x39, 0x1e, 0x76, 0x46, 0x43, 0x75, 0xc0, 0x62, 0xd8, 0x01, 0xf5, 0x6c, 0x68, 0xfd, 0x05, 0x41, + 0x59, 0x6d, 0xf8, 0xe9, 0x91, 0xeb, 0x48, 0xea, 0x3e, 0x9d, 0x13, 0xe7, 0x18, 0xdf, 0x06, 0x18, + 0x70, 0x77, 0xd1, 0x1f, 0x2c, 0x24, 0x15, 0x7a, 0x8f, 0x22, 0x29, 0x28, 0x49, 0x4f, 0x09, 0xf0, + 0x5d, 0xb8, 0xee, 0x04, 0x72, 0xd2, 0xf7, 0xd8, 0x88, 0x47, 0x98, 0x8c, 0xc6, 0x5c, 0x53, 0xe2, + 0x47, 0x6c, 0xc4, 0x43, 0x5c, 0x15, 0x40, 0x78, 0x63, 0xe6, 0xc8, 0xc0, 0xa7, 0xc2, 0x34, 0x6a, + 0x46, 0xbd, 0x48, 0x52, 0x12, 0x5c, 0x85, 0xdd, 0xe4, 0xec, 0xd2, 0xff, 0x48, 0xdf, 0x18, 0x14, + 0x49, 0x21, 0x3e, 0xbd, 0x7c, 0x84, 0x7f, 0x00, 0xa5, 0xe5, 0xf3, 0xd6, 0x3d, 0xbb, 0x63, 0xfe, + 0x3a, 0xaf, 0x31, 0xc5, 0x18, 0xa3, 0x84, 0xd6, 0xe7, 0x06, 0xbc, 0xb5, 0xe2, 0x42, 0x8f, 0xbb, + 0x0b, 0x7c, 0x0f, 0xf2, 0x33, 0x2a, 0x84, 0x33, 0xd6, 0x1e, 0x18, 0x6b, 0x93, 0x2c, 0x41, 0xa9, + 0xea, 0x9e, 0xd1, 0x19, 0x8f, 0xab, 0x5b, 0x8d, 0x95, 0x09, 0xd2, 0x9b, 0x51, 0x1e, 0xc8, 0xfe, + 0x84, 0x7a, 0xe3, 0x89, 0x8c, 0x78, 0xbc, 0x16, 0x49, 0xf7, 0xb5, 0x10, 0xdf, 0x81, 0x92, 0xe0, + 0x33, 0xda, 0x5f, 0x1e, 0xc5, 0xb2, 0xfa, 0x28, 0x56, 0x54, 0xd2, 0x83, 0xc8, 0x58, 0xbc, 0x0f, + 0xef, 0xad, 0xa2, 0xfa, 0x67, 0x34, 0xe6, 0x3f, 0x86, 0x8d, 0xf9, 0x9d, 0xf4, 0xca, 0x83, 0x93, + 0x4d, 0xba, 0x07, 0x6f, 0xd1, 0xb9, 0xa4, 0x4c, 0xe5, 0x48, 0x9f, 0xeb, 0xeb, 0x64, 0x61, 0x7e, + 0xb5, 0x73, 0x8e, 0x9b, 0xe5, 0x04, 0xff, 0x24, 0x84, 0xe3, 0x67, 0x50, 0x5d, 0xd9, 0xfe, 0x0c, + 0x85, 0xd7, 0xcf, 0x51, 0x78, 0x2b, 0xf5, 0xe6, 0x78, 0x78, 0x42, 0xb7, 0xf5, 0x02, 0xc1, 0x8d, + 0x54, 0x48, 0xba, 0x51, 0x5a, 0xe0, 0xfb, 0x50, 0x54, 0xf1, 0xa7, 0xbe, 0xce, 0x9d, 0x38, 0x30, + 0xb7, 0x1b, 0xe1, 0xf5, 0x7b, 0x43, 0xce, 0x1b, 0xd1, 0xf5, 0x7b, 0xe3, 0xe7, 0x1a, 0xa6, 0x16, + 0x91, 0x5d, 0x91, 0x8c, 0x05, 0xae, 0x2f, 0xef, 0xdc, 0x54, 0xd1, 0x9c, 0x5e, 0xb8, 0x47, 0x69, + 0x78, 0x17, 0xb7, 0x92, 0x5d, 0x6d, 0x1d, 0xb7, 0x54, 0x76, 0xb5, 0x37, 0xcd, 0xae, 0xf7, 0xc3, + 0xe4, 0x22, 0xf4, 0x88, 0x2a, 0x57, 0x3e, 0xf5, 0x98, 0xd4, 0xa9, 0xc2, 0x82, 0x59, 0x68, 0x7f, + 0x96, 0xe8, 0x71, 0x6f, 0xff, 0xc5, 0xab, 0x2a, 0x7a, 0xf9, 0xaa, 0x8a, 0xfe, 0xf9, 0xaa, 0x8a, + 0x3e, 0x7f, 0x5d, 0xdd, 0x7a, 0xf9, 0xba, 0xba, 0xf5, 0xf7, 0xd7, 0xd5, 0xad, 0x67, 0x8d, 0xb1, + 0x27, 0x27, 0xc1, 0xa0, 0x31, 0xe4, 0xb3, 0x66, 0xf4, 0x8f, 0x86, 0xf0, 0xe7, 0x43, 0xe1, 0x1e, + 0x36, 0x55, 0xdd, 0x07, 0xd2, 0x9b, 0x36, 0xe3, 0x06, 0x30, 0xd8, 0xd6, 0x44, 0xb7, 0xff, 0x1b, + 0x00, 0x00, 0xff, 0xff, 0xa6, 0x69, 0x10, 0x33, 0xe6, 0x18, 0x00, 0x00, } -func (m *TestVersionFD1WithExtraAny) GetF() *TestVersion1 { - if x, ok := m.GetSum().(*TestVersionFD1WithExtraAny_F); ok { - return x.F +func (m *Customer1) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - return nil + return dAtA[:n], nil } -func (m *TestVersionFD1WithExtraAny) GetG() *AnyWithExtra { - if m != nil { - return m.G - } - return nil +func (m *Customer1) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TestVersionFD1WithExtraAny) GetH() []*TestVersion1 { - if m != nil { - return m.H +func (m *Customer1) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Payment) > 0 { + i -= len(m.Payment) + copy(dAtA[i:], m.Payment) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.Payment))) + i-- + dAtA[i] = 0x3a } - return nil + if m.SubscriptionFee != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.SubscriptionFee)))) + i-- + dAtA[i] = 0x1d + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } -// XXX_OneofWrappers is for the internal use of the proto package. -func (*TestVersionFD1WithExtraAny) XXX_OneofWrappers() []interface{} { - return []interface{}{ - (*TestVersionFD1WithExtraAny_E)(nil), - (*TestVersionFD1WithExtraAny_F)(nil), +func (m *Customer2) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } + return dAtA[:n], nil } -type AnyWithExtra struct { - *types.Any `protobuf:"bytes,1,opt,name=a,proto3,embedded=a" json:"a,omitempty"` - B int64 `protobuf:"varint,3,opt,name=b,proto3" json:"b,omitempty"` - C int64 `protobuf:"varint,4,opt,name=c,proto3" json:"c,omitempty"` +func (m *Customer2) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *AnyWithExtra) Reset() { *m = AnyWithExtra{} } -func (m *AnyWithExtra) String() string { return proto.CompactTextString(m) } -func (*AnyWithExtra) ProtoMessage() {} -func (*AnyWithExtra) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{32} -} -func (m *AnyWithExtra) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *AnyWithExtra) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AnyWithExtra.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (m *Customer2) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Reserved != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.Reserved)) + i-- + dAtA[i] = 0x41 + i-- + dAtA[i] = 0xb8 + } + if m.Miscellaneous != nil { + { + size, err := m.Miscellaneous.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } - return b[:n], nil + i-- + dAtA[i] = 0x52 } + if m.City != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.City)) + i-- + dAtA[i] = 0x30 + } + if m.Fewer != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Fewer)))) + i-- + dAtA[i] = 0x25 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x1a + } + if m.Industry != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.Industry)) + i-- + dAtA[i] = 0x10 + } + if m.Id != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } -func (m *AnyWithExtra) XXX_Merge(src proto.Message) { - xxx_messageInfo_AnyWithExtra.Merge(m, src) -} -func (m *AnyWithExtra) XXX_Size() int { - return m.Size() -} -func (m *AnyWithExtra) XXX_DiscardUnknown() { - xxx_messageInfo_AnyWithExtra.DiscardUnknown(m) + +func (m *Nested4A) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil } -var xxx_messageInfo_AnyWithExtra proto.InternalMessageInfo +func (m *Nested4A) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} -func (m *AnyWithExtra) GetB() int64 { - if m != nil { - return m.B +func (m *Nested4A) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 } - return 0 + if m.Id != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } -func (m *AnyWithExtra) GetC() int64 { - if m != nil { - return m.C +func (m *Nested3A) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - return 0 + return dAtA[:n], nil } -type TestUpdatedTxRaw struct { - BodyBytes []byte `protobuf:"bytes,1,opt,name=body_bytes,json=bodyBytes,proto3" json:"body_bytes,omitempty"` - AuthInfoBytes []byte `protobuf:"bytes,2,opt,name=auth_info_bytes,json=authInfoBytes,proto3" json:"auth_info_bytes,omitempty"` - Signatures [][]byte `protobuf:"bytes,3,rep,name=signatures,proto3" json:"signatures,omitempty"` - NewField_5 []byte `protobuf:"bytes,5,opt,name=new_field_5,json=newField5,proto3" json:"new_field_5,omitempty"` - NewField_1024 []byte `protobuf:"bytes,1024,opt,name=new_field_1024,json=newField1024,proto3" json:"new_field_1024,omitempty"` +func (m *Nested3A) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TestUpdatedTxRaw) Reset() { *m = TestUpdatedTxRaw{} } -func (m *TestUpdatedTxRaw) String() string { return proto.CompactTextString(m) } -func (*TestUpdatedTxRaw) ProtoMessage() {} -func (*TestUpdatedTxRaw) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{33} -} -func (m *TestUpdatedTxRaw) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TestUpdatedTxRaw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TestUpdatedTxRaw.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (m *Nested3A) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Index) > 0 { + for k := range m.Index { + v := m.Index[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i = encodeVarintUnknonwnproto(dAtA, i, uint64(k)) + i-- + dAtA[i] = 0x8 + i = encodeVarintUnknonwnproto(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x2a } - return b[:n], nil } -} -func (m *TestUpdatedTxRaw) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestUpdatedTxRaw.Merge(m, src) -} -func (m *TestUpdatedTxRaw) XXX_Size() int { - return m.Size() -} -func (m *TestUpdatedTxRaw) XXX_DiscardUnknown() { - xxx_messageInfo_TestUpdatedTxRaw.DiscardUnknown(m) -} - -var xxx_messageInfo_TestUpdatedTxRaw proto.InternalMessageInfo - -func (m *TestUpdatedTxRaw) GetBodyBytes() []byte { - if m != nil { - return m.BodyBytes + if len(m.A4) > 0 { + for iNdEx := len(m.A4) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.A4[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } } - return nil -} - -func (m *TestUpdatedTxRaw) GetAuthInfoBytes() []byte { - if m != nil { - return m.AuthInfoBytes + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 } - return nil + if m.Id != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } -func (m *TestUpdatedTxRaw) GetSignatures() [][]byte { - if m != nil { - return m.Signatures +func (m *Nested2A) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - return nil + return dAtA[:n], nil } -func (m *TestUpdatedTxRaw) GetNewField_5() []byte { - if m != nil { - return m.NewField_5 - } - return nil +func (m *Nested2A) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TestUpdatedTxRaw) GetNewField_1024() []byte { - if m != nil { - return m.NewField_1024 +func (m *Nested2A) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Nested != nil { + { + size, err := m.Nested.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a } - return nil + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } -type TestUpdatedTxBody struct { - Messages []*types.Any `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` - Memo string `protobuf:"bytes,2,opt,name=memo,proto3" json:"memo,omitempty"` - TimeoutHeight int64 `protobuf:"varint,3,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty"` - SomeNewField uint64 `protobuf:"varint,4,opt,name=some_new_field,json=someNewField,proto3" json:"some_new_field,omitempty"` - SomeNewFieldNonCriticalField string `protobuf:"bytes,1050,opt,name=some_new_field_non_critical_field,json=someNewFieldNonCriticalField,proto3" json:"some_new_field_non_critical_field,omitempty"` - ExtensionOptions []*types.Any `protobuf:"bytes,1023,rep,name=extension_options,json=extensionOptions,proto3" json:"extension_options,omitempty"` - NonCriticalExtensionOptions []*types.Any `protobuf:"bytes,2047,rep,name=non_critical_extension_options,json=nonCriticalExtensionOptions,proto3" json:"non_critical_extension_options,omitempty"` +func (m *Nested1A) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil } -func (m *TestUpdatedTxBody) Reset() { *m = TestUpdatedTxBody{} } -func (m *TestUpdatedTxBody) String() string { return proto.CompactTextString(m) } -func (*TestUpdatedTxBody) ProtoMessage() {} -func (*TestUpdatedTxBody) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{34} -} -func (m *TestUpdatedTxBody) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) +func (m *Nested1A) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TestUpdatedTxBody) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TestUpdatedTxBody.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err + +func (m *Nested1A) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Nested != nil { + { + size, err := m.Nested.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } - return b[:n], nil + i-- + dAtA[i] = 0x12 } -} -func (m *TestUpdatedTxBody) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestUpdatedTxBody.Merge(m, src) -} -func (m *TestUpdatedTxBody) XXX_Size() int { - return m.Size() -} -func (m *TestUpdatedTxBody) XXX_DiscardUnknown() { - xxx_messageInfo_TestUpdatedTxBody.DiscardUnknown(m) -} - -var xxx_messageInfo_TestUpdatedTxBody proto.InternalMessageInfo - -func (m *TestUpdatedTxBody) GetMessages() []*types.Any { - if m != nil { - return m.Messages + if m.Id != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 } - return nil + return len(dAtA) - i, nil } -func (m *TestUpdatedTxBody) GetMemo() string { - if m != nil { - return m.Memo +func (m *Nested4B) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - return "" + return dAtA[:n], nil } -func (m *TestUpdatedTxBody) GetTimeoutHeight() int64 { - if m != nil { - return m.TimeoutHeight - } - return 0 +func (m *Nested4B) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TestUpdatedTxBody) GetSomeNewField() uint64 { - if m != nil { - return m.SomeNewField +func (m *Nested4B) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x1a } - return 0 -} - -func (m *TestUpdatedTxBody) GetSomeNewFieldNonCriticalField() string { - if m != nil { - return m.SomeNewFieldNonCriticalField + if m.Age != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.Age)) + i-- + dAtA[i] = 0x10 } - return "" -} - -func (m *TestUpdatedTxBody) GetExtensionOptions() []*types.Any { - if m != nil { - return m.ExtensionOptions + if m.Id != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 } - return nil + return len(dAtA) - i, nil } -func (m *TestUpdatedTxBody) GetNonCriticalExtensionOptions() []*types.Any { - if m != nil { - return m.NonCriticalExtensionOptions +func (m *Nested3B) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - return nil + return dAtA[:n], nil } -type TestUpdatedAuthInfo struct { - SignerInfos []*tx.SignerInfo `protobuf:"bytes,1,rep,name=signer_infos,json=signerInfos,proto3" json:"signer_infos,omitempty"` - Fee *tx.Fee `protobuf:"bytes,2,opt,name=fee,proto3" json:"fee,omitempty"` - NewField_3 []byte `protobuf:"bytes,3,opt,name=new_field_3,json=newField3,proto3" json:"new_field_3,omitempty"` - NewField_1024 []byte `protobuf:"bytes,1024,opt,name=new_field_1024,json=newField1024,proto3" json:"new_field_1024,omitempty"` +func (m *Nested3B) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TestUpdatedAuthInfo) Reset() { *m = TestUpdatedAuthInfo{} } -func (m *TestUpdatedAuthInfo) String() string { return proto.CompactTextString(m) } -func (*TestUpdatedAuthInfo) ProtoMessage() {} -func (*TestUpdatedAuthInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{35} -} -func (m *TestUpdatedAuthInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TestUpdatedAuthInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TestUpdatedAuthInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err +func (m *Nested3B) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.B4) > 0 { + for iNdEx := len(m.B4) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.B4[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 } - return b[:n], nil } -} -func (m *TestUpdatedAuthInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestUpdatedAuthInfo.Merge(m, src) -} -func (m *TestUpdatedAuthInfo) XXX_Size() int { - return m.Size() -} -func (m *TestUpdatedAuthInfo) XXX_DiscardUnknown() { - xxx_messageInfo_TestUpdatedAuthInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_TestUpdatedAuthInfo proto.InternalMessageInfo - -func (m *TestUpdatedAuthInfo) GetSignerInfos() []*tx.SignerInfo { - if m != nil { - return m.SignerInfos + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x1a } - return nil + if m.Age != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.Age)) + i-- + dAtA[i] = 0x10 + } + if m.Id != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil } -func (m *TestUpdatedAuthInfo) GetFee() *tx.Fee { - if m != nil { - return m.Fee +func (m *Nested2B) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - return nil + return dAtA[:n], nil } -func (m *TestUpdatedAuthInfo) GetNewField_3() []byte { - if m != nil { - return m.NewField_3 - } - return nil -} - -func (m *TestUpdatedAuthInfo) GetNewField_1024() []byte { - if m != nil { - return m.NewField_1024 - } - return nil -} - -type TestRepeatedUints struct { - Nums []uint64 `protobuf:"varint,1,rep,packed,name=nums,proto3" json:"nums,omitempty"` -} - -func (m *TestRepeatedUints) Reset() { *m = TestRepeatedUints{} } -func (m *TestRepeatedUints) String() string { return proto.CompactTextString(m) } -func (*TestRepeatedUints) ProtoMessage() {} -func (*TestRepeatedUints) Descriptor() ([]byte, []int) { - return fileDescriptor_2fcc84b9998d60d8, []int{36} -} -func (m *TestRepeatedUints) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TestRepeatedUints) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_TestRepeatedUints.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *TestRepeatedUints) XXX_Merge(src proto.Message) { - xxx_messageInfo_TestRepeatedUints.Merge(m, src) -} -func (m *TestRepeatedUints) XXX_Size() int { - return m.Size() -} -func (m *TestRepeatedUints) XXX_DiscardUnknown() { - xxx_messageInfo_TestRepeatedUints.DiscardUnknown(m) -} - -var xxx_messageInfo_TestRepeatedUints proto.InternalMessageInfo - -func (m *TestRepeatedUints) GetNums() []uint64 { - if m != nil { - return m.Nums - } - return nil -} - -func init() { - proto.RegisterEnum("testdata.Customer2_City", Customer2_City_name, Customer2_City_value) - proto.RegisterType((*Dog)(nil), "testdata.Dog") - proto.RegisterType((*Cat)(nil), "testdata.Cat") - proto.RegisterType((*HasAnimal)(nil), "testdata.HasAnimal") - proto.RegisterType((*HasHasAnimal)(nil), "testdata.HasHasAnimal") - proto.RegisterType((*HasHasHasAnimal)(nil), "testdata.HasHasHasAnimal") - proto.RegisterType((*EchoRequest)(nil), "testdata.EchoRequest") - proto.RegisterType((*EchoResponse)(nil), "testdata.EchoResponse") - proto.RegisterType((*SayHelloRequest)(nil), "testdata.SayHelloRequest") - proto.RegisterType((*SayHelloResponse)(nil), "testdata.SayHelloResponse") - proto.RegisterType((*TestAnyRequest)(nil), "testdata.TestAnyRequest") - proto.RegisterType((*TestAnyResponse)(nil), "testdata.TestAnyResponse") - proto.RegisterType((*TestMsg)(nil), "testdata.TestMsg") - proto.RegisterType((*BadMultiSignature)(nil), "testdata.BadMultiSignature") - proto.RegisterType((*Customer1)(nil), "testdata.Customer1") - proto.RegisterType((*Customer2)(nil), "testdata.Customer2") - proto.RegisterType((*Nested4A)(nil), "testdata.Nested4A") - proto.RegisterType((*Nested3A)(nil), "testdata.Nested3A") - proto.RegisterMapType((map[int64]*Nested4A)(nil), "testdata.Nested3A.IndexEntry") - proto.RegisterType((*Nested2A)(nil), "testdata.Nested2A") - proto.RegisterType((*Nested1A)(nil), "testdata.Nested1A") - proto.RegisterType((*Nested4B)(nil), "testdata.Nested4B") - proto.RegisterType((*Nested3B)(nil), "testdata.Nested3B") - proto.RegisterType((*Nested2B)(nil), "testdata.Nested2B") - proto.RegisterType((*Nested1B)(nil), "testdata.Nested1B") - proto.RegisterType((*Customer3)(nil), "testdata.Customer3") - proto.RegisterType((*TestVersion1)(nil), "testdata.TestVersion1") - proto.RegisterType((*TestVersion2)(nil), "testdata.TestVersion2") - proto.RegisterType((*TestVersion3)(nil), "testdata.TestVersion3") - proto.RegisterType((*TestVersion3LoneOneOfValue)(nil), "testdata.TestVersion3LoneOneOfValue") - proto.RegisterType((*TestVersion3LoneNesting)(nil), "testdata.TestVersion3LoneNesting") - proto.RegisterType((*TestVersion3LoneNesting_Inner1)(nil), "testdata.TestVersion3LoneNesting.Inner1") - proto.RegisterType((*TestVersion3LoneNesting_Inner1_InnerInner)(nil), "testdata.TestVersion3LoneNesting.Inner1.InnerInner") - proto.RegisterType((*TestVersion3LoneNesting_Inner2)(nil), "testdata.TestVersion3LoneNesting.Inner2") - proto.RegisterType((*TestVersion3LoneNesting_Inner2_InnerInner)(nil), "testdata.TestVersion3LoneNesting.Inner2.InnerInner") - proto.RegisterType((*TestVersion4LoneNesting)(nil), "testdata.TestVersion4LoneNesting") - proto.RegisterType((*TestVersion4LoneNesting_Inner1)(nil), "testdata.TestVersion4LoneNesting.Inner1") - proto.RegisterType((*TestVersion4LoneNesting_Inner1_InnerInner)(nil), "testdata.TestVersion4LoneNesting.Inner1.InnerInner") - proto.RegisterType((*TestVersion4LoneNesting_Inner2)(nil), "testdata.TestVersion4LoneNesting.Inner2") - proto.RegisterType((*TestVersion4LoneNesting_Inner2_InnerInner)(nil), "testdata.TestVersion4LoneNesting.Inner2.InnerInner") - proto.RegisterType((*TestVersionFD1)(nil), "testdata.TestVersionFD1") - proto.RegisterType((*TestVersionFD1WithExtraAny)(nil), "testdata.TestVersionFD1WithExtraAny") - proto.RegisterType((*AnyWithExtra)(nil), "testdata.AnyWithExtra") - proto.RegisterType((*TestUpdatedTxRaw)(nil), "testdata.TestUpdatedTxRaw") - proto.RegisterType((*TestUpdatedTxBody)(nil), "testdata.TestUpdatedTxBody") - proto.RegisterType((*TestUpdatedAuthInfo)(nil), "testdata.TestUpdatedAuthInfo") - proto.RegisterType((*TestRepeatedUints)(nil), "testdata.TestRepeatedUints") -} - -func init() { proto.RegisterFile("proto.proto", fileDescriptor_2fcc84b9998d60d8) } - -var fileDescriptor_2fcc84b9998d60d8 = []byte{ - // 1987 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0xcd, 0x6f, 0x1b, 0xc7, - 0x15, 0xd7, 0x72, 0x49, 0x89, 0x7c, 0xa2, 0x29, 0x7a, 0xe2, 0xa6, 0x6b, 0x3a, 0x96, 0x95, 0x85, - 0x63, 0x33, 0x41, 0x4c, 0x5a, 0x4b, 0x1a, 0x28, 0x7c, 0x28, 0x4c, 0xca, 0x52, 0x64, 0xc0, 0x96, - 0x8b, 0xb5, 0x93, 0x16, 0xbe, 0x10, 0xcb, 0xdd, 0x21, 0xb9, 0x30, 0x39, 0xa3, 0xee, 0x2c, 0x25, - 0xb1, 0xa7, 0xa2, 0x3d, 0xb4, 0xc7, 0x5c, 0x8a, 0x02, 0x3d, 0xb5, 0xc7, 0x9e, 0x8a, 0xfc, 0x07, - 0xbd, 0xd5, 0x97, 0x02, 0xbe, 0x14, 0x28, 0x50, 0x20, 0x28, 0xec, 0x6b, 0xff, 0x83, 0xa2, 0x48, - 0x31, 0x1f, 0xfb, 0x41, 0x89, 0x54, 0x68, 0xa5, 0x8d, 0x21, 0x20, 0x17, 0x72, 0xe6, 0xed, 0x6f, - 0x7e, 0xf3, 0xe6, 0x7d, 0xed, 0xce, 0x0c, 0xac, 0xee, 0x07, 0x34, 0xa4, 0x35, 0xf1, 0x8b, 0xf2, - 0x21, 0x66, 0xa1, 0xe7, 0x84, 0x4e, 0xe5, 0x52, 0x9f, 0xf6, 0xa9, 0x10, 0xd6, 0x79, 0x4b, 0x3e, - 0xaf, 0x5c, 0xee, 0x53, 0xda, 0x1f, 0xe2, 0xba, 0xe8, 0x75, 0xc7, 0xbd, 0xba, 0x43, 0x26, 0xea, - 0x51, 0xc5, 0xa5, 0x6c, 0x44, 0x59, 0x3d, 0x3c, 0xaa, 0x1f, 0x6c, 0x76, 0x71, 0xe8, 0x6c, 0xd6, - 0xc3, 0x23, 0xf9, 0xcc, 0xbc, 0x05, 0xfa, 0x7d, 0xda, 0x47, 0x08, 0xb2, 0xcc, 0xff, 0x19, 0x36, - 0xb4, 0x0d, 0xad, 0x5a, 0xb0, 0x45, 0x9b, 0xcb, 0x88, 0x33, 0xc2, 0x46, 0x46, 0xca, 0x78, 0xdb, - 0xbc, 0x03, 0xfa, 0x96, 0x13, 0x22, 0x03, 0x56, 0x46, 0x94, 0xf8, 0xcf, 0x71, 0xa0, 0x46, 0x44, - 0x5d, 0x74, 0x09, 0x72, 0x43, 0xff, 0x00, 0x33, 0x31, 0x2a, 0x67, 0xcb, 0x8e, 0xf9, 0x09, 0x14, - 0x76, 0x1d, 0xd6, 0x22, 0xfe, 0xc8, 0x19, 0xa2, 0x8f, 0x61, 0xd9, 0x11, 0x2d, 0x31, 0x76, 0xd5, - 0xba, 0x54, 0x93, 0xaa, 0xd7, 0x22, 0xd5, 0x6b, 0x2d, 0x32, 0xb1, 0x15, 0x06, 0x15, 0x41, 0x3b, - 0x12, 0x64, 0xba, 0xad, 0x1d, 0x99, 0x5b, 0x50, 0xdc, 0x75, 0x58, 0xc2, 0xd5, 0x00, 0x18, 0x38, - 0xac, 0xb3, 0x00, 0x5f, 0x61, 0x10, 0x0d, 0x32, 0x1f, 0xc1, 0x9a, 0x24, 0x49, 0x78, 0xee, 0x42, - 0x89, 0xf3, 0x2c, 0xc8, 0x55, 0x1c, 0xa4, 0xc6, 0x9a, 0x37, 0x61, 0x75, 0xdb, 0x1d, 0x50, 0x1b, - 0xff, 0x74, 0x8c, 0x99, 0xb4, 0x0d, 0x66, 0xcc, 0xe9, 0xe3, 0xd8, 0x36, 0xb2, 0x6b, 0x56, 0xa1, - 0x28, 0x81, 0x6c, 0x9f, 0x12, 0x86, 0x4f, 0x41, 0x7e, 0x00, 0x6b, 0x4f, 0x9c, 0xc9, 0x2e, 0x1e, - 0x0e, 0x63, 0xda, 0xc8, 0x1b, 0x5a, 0xca, 0x1b, 0x35, 0x28, 0x27, 0x30, 0x45, 0x5a, 0x81, 0x7c, - 0x3f, 0xc0, 0x38, 0xf4, 0x49, 0x5f, 0x61, 0xe3, 0xbe, 0xb9, 0x0d, 0xa5, 0xa7, 0x98, 0x85, 0x7c, - 0x09, 0x8a, 0xb5, 0x01, 0xe0, 0x90, 0xc9, 0x42, 0xf6, 0x73, 0xc8, 0x44, 0x2d, 0x78, 0x1b, 0xd6, - 0x62, 0x1a, 0x35, 0xab, 0x35, 0xc3, 0x0f, 0xef, 0xd4, 0xa2, 0x90, 0xad, 0xc5, 0xc6, 0x4a, 0xbb, - 0xe1, 0x43, 0x58, 0xe1, 0x34, 0x8f, 0x58, 0x9f, 0x5b, 0x82, 0xf9, 0x7d, 0x82, 0x03, 0x66, 0x68, - 0x1b, 0x3a, 0xb7, 0x84, 0xea, 0xde, 0xcd, 0xfe, 0xfa, 0xf7, 0xd7, 0x96, 0xcc, 0x2e, 0x5c, 0x6c, - 0x3b, 0xde, 0xa3, 0xf1, 0x30, 0xf4, 0x9f, 0xf8, 0x7d, 0xe2, 0x84, 0xe3, 0x00, 0xa3, 0x75, 0x00, - 0x16, 0x75, 0xe4, 0xb8, 0xa2, 0x9d, 0x92, 0xa0, 0x9b, 0xb0, 0x36, 0x72, 0x86, 0xbe, 0xeb, 0xd3, - 0x31, 0xeb, 0xf4, 0x7c, 0x3c, 0xf4, 0x8c, 0xdc, 0x86, 0x56, 0x2d, 0xda, 0xa5, 0x58, 0xbc, 0xc3, - 0xa5, 0x77, 0xb3, 0x2f, 0xff, 0x70, 0x4d, 0x33, 0x43, 0x28, 0x6c, 0x8d, 0x59, 0x48, 0x47, 0x38, - 0xd8, 0x44, 0x25, 0xc8, 0xf8, 0x9e, 0x58, 0x47, 0xce, 0xce, 0xf8, 0xde, 0xac, 0x5c, 0x40, 0x1f, - 0x42, 0x99, 0x8d, 0xbb, 0xcc, 0x0d, 0xfc, 0xfd, 0xd0, 0xa7, 0xa4, 0xd3, 0xc3, 0xd8, 0xd0, 0x37, - 0xb4, 0x6a, 0xc6, 0x5e, 0x4b, 0xcb, 0x77, 0xb0, 0xf0, 0xf4, 0xbe, 0x33, 0x19, 0x61, 0x12, 0x1a, - 0x2b, 0xd2, 0xd3, 0xaa, 0x6b, 0x7e, 0x91, 0x49, 0xa6, 0xb5, 0x4e, 0x4c, 0x5b, 0x81, 0xbc, 0x4f, - 0xbc, 0x31, 0x0b, 0x83, 0x89, 0x4a, 0xa8, 0xb8, 0x1f, 0xab, 0xa4, 0xa7, 0x54, 0xba, 0x04, 0xb9, - 0x1e, 0x3e, 0xc4, 0x81, 0x91, 0x15, 0x7a, 0xc8, 0x0e, 0xba, 0x02, 0xf9, 0x00, 0x33, 0x1c, 0x1c, - 0x60, 0xcf, 0xf8, 0x6d, 0x5e, 0xa4, 0x52, 0x2c, 0x40, 0x1f, 0x43, 0xd6, 0xf5, 0xc3, 0x89, 0xb1, - 0xbc, 0xa1, 0x55, 0x4b, 0x96, 0x91, 0xf8, 0x2c, 0xd6, 0xaa, 0xb6, 0xe5, 0x87, 0x13, 0x5b, 0xa0, - 0xd0, 0x5d, 0xb8, 0x30, 0xf2, 0x99, 0x8b, 0x87, 0x43, 0x87, 0x60, 0x3a, 0x66, 0x06, 0x9c, 0x12, - 0x32, 0xd3, 0x50, 0xf3, 0x13, 0xc8, 0x72, 0x26, 0x94, 0x87, 0xec, 0x43, 0x87, 0xb2, 0xf2, 0x12, - 0x2a, 0x01, 0x3c, 0xa4, 0xac, 0x45, 0xfa, 0x78, 0x88, 0x59, 0x59, 0x43, 0x45, 0xc8, 0xff, 0xc8, - 0x19, 0xd2, 0xd6, 0x30, 0xa4, 0xe5, 0x0c, 0x02, 0x58, 0x7e, 0x44, 0x99, 0x4b, 0x0f, 0xcb, 0x3a, - 0x5a, 0x85, 0x95, 0x3d, 0xc7, 0x0f, 0x68, 0xd7, 0x2f, 0x67, 0xcd, 0x1a, 0xe4, 0xf7, 0x30, 0x0b, - 0xb1, 0xd7, 0x6c, 0x2d, 0xe2, 0x28, 0xf3, 0x6f, 0x5a, 0x34, 0xa0, 0xb1, 0xd0, 0x00, 0x64, 0x42, - 0xc6, 0x69, 0x1a, 0xd9, 0x0d, 0xbd, 0xba, 0x6a, 0xa1, 0xc4, 0x22, 0xd1, 0xa4, 0x76, 0xc6, 0x69, - 0xa2, 0x06, 0xe4, 0x7c, 0xe2, 0xe1, 0x23, 0x23, 0x27, 0x60, 0x57, 0x8f, 0xc3, 0x1a, 0xad, 0xda, - 0x03, 0xfe, 0x7c, 0x9b, 0x84, 0xc1, 0xc4, 0x96, 0xd8, 0xca, 0x43, 0x80, 0x44, 0x88, 0xca, 0xa0, - 0x3f, 0xc7, 0x13, 0xa1, 0x8b, 0x6e, 0xf3, 0x26, 0xaa, 0x42, 0xee, 0xc0, 0x19, 0x8e, 0xa5, 0x36, - 0xb3, 0xe7, 0x96, 0x80, 0xbb, 0x99, 0x1f, 0x68, 0xe6, 0xb3, 0x68, 0x59, 0xd6, 0x62, 0xcb, 0xfa, - 0x08, 0x96, 0x89, 0xc0, 0x8b, 0x98, 0x99, 0x41, 0xdf, 0x68, 0xd9, 0x0a, 0x61, 0xee, 0x44, 0xdc, - 0x9b, 0x27, 0xb9, 0x13, 0x9e, 0x39, 0x6a, 0x5a, 0x09, 0xcf, 0xbd, 0xd8, 0x57, 0xed, 0x13, 0x3c, - 0x65, 0xd0, 0x79, 0xed, 0x93, 0x81, 0xcd, 0x9b, 0xb3, 0x62, 0xda, 0xf4, 0x62, 0xe7, 0x9d, 0x91, - 0x81, 0xbb, 0xb3, 0x3b, 0xdf, 0x9d, 0x6d, 0x3b, 0xd3, 0x6d, 0x9a, 0x24, 0xb6, 0xe5, 0xcc, 0x59, - 0x78, 0x6e, 0xf3, 0x59, 0x34, 0x9b, 0x37, 0x17, 0xb0, 0x64, 0x3b, 0xb2, 0x00, 0xcf, 0xc9, 0x80, - 0x8e, 0x43, 0x2c, 0x72, 0xb2, 0x60, 0xcb, 0x8e, 0xf9, 0x93, 0xd8, 0xbe, 0xed, 0x33, 0xd8, 0x37, - 0x61, 0x57, 0x16, 0xd0, 0x63, 0x0b, 0x98, 0xbf, 0x48, 0x55, 0x94, 0xc6, 0x42, 0x71, 0x51, 0x82, - 0x0c, 0xeb, 0xa9, 0xd2, 0x95, 0x61, 0x3d, 0xf4, 0x1e, 0x14, 0xd8, 0x38, 0x70, 0x07, 0x4e, 0xd0, - 0xc7, 0xaa, 0x92, 0x24, 0x02, 0xb4, 0x01, 0xab, 0x1e, 0x66, 0xa1, 0x4f, 0x1c, 0x5e, 0xdd, 0x44, - 0x49, 0x2d, 0xd8, 0x69, 0x11, 0xba, 0x01, 0x25, 0x37, 0xc0, 0x9e, 0x1f, 0x76, 0x5c, 0x27, 0xf0, - 0x3a, 0x84, 0xca, 0xa2, 0xb7, 0xbb, 0x64, 0x17, 0xa5, 0x7c, 0xcb, 0x09, 0xbc, 0x3d, 0x8a, 0xae, - 0x42, 0xc1, 0x1d, 0xf0, 0x17, 0x11, 0x87, 0xe4, 0x15, 0x24, 0x2f, 0x45, 0x7b, 0x14, 0xd5, 0x21, - 0x4f, 0x03, 0xbf, 0xef, 0x13, 0x67, 0x68, 0x14, 0x8e, 0xbf, 0x51, 0xe2, 0x52, 0x6d, 0xc7, 0xa0, - 0x76, 0x21, 0xae, 0xb2, 0xe6, 0xbf, 0x32, 0x50, 0xe4, 0x2f, 0x97, 0xcf, 0x70, 0xc0, 0x7c, 0x4a, - 0x36, 0xe5, 0x67, 0x84, 0xa6, 0x3e, 0x23, 0xd0, 0x75, 0xd0, 0x1c, 0x65, 0xdc, 0x77, 0x13, 0xce, - 0xf4, 0x00, 0x5b, 0x73, 0x38, 0xaa, 0xab, 0x1c, 0x3c, 0x17, 0xd5, 0xe5, 0x28, 0x57, 0x05, 0xd7, - 0x5c, 0x94, 0x8b, 0x3e, 0x02, 0xcd, 0x53, 0xa5, 0x62, 0x0e, 0xaa, 0x9d, 0x7d, 0xf1, 0xe5, 0xb5, - 0x25, 0x5b, 0xf3, 0x50, 0x09, 0x34, 0x2c, 0xea, 0x71, 0x6e, 0x77, 0xc9, 0xd6, 0x30, 0xba, 0x01, - 0x5a, 0x4f, 0x98, 0x70, 0xee, 0x58, 0x8e, 0xeb, 0x21, 0x13, 0xb4, 0xbe, 0xb0, 0xe3, 0xbc, 0x82, - 0xac, 0xf5, 0xb9, 0xb6, 0x03, 0xa3, 0x70, 0xba, 0xb6, 0x03, 0x74, 0x13, 0xb4, 0xe7, 0x46, 0x71, - 0xae, 0xcd, 0xdb, 0xd9, 0x97, 0x5f, 0x5e, 0xd3, 0x6c, 0xed, 0x79, 0x3b, 0x07, 0x3a, 0x1b, 0x8f, - 0xcc, 0x5f, 0xea, 0x53, 0xe6, 0xb6, 0xde, 0xd4, 0xdc, 0xd6, 0x42, 0xe6, 0xb6, 0x16, 0x32, 0xb7, - 0xc5, 0xcd, 0x7d, 0xfd, 0xeb, 0xcc, 0x6d, 0x9d, 0xc9, 0xd0, 0xd6, 0xdb, 0x32, 0x34, 0xba, 0x02, - 0x05, 0x82, 0x0f, 0xd5, 0x67, 0xcc, 0xe5, 0x0d, 0xad, 0x9a, 0xb5, 0xf3, 0x04, 0x1f, 0x8a, 0x0f, - 0x98, 0xc8, 0x0b, 0xbf, 0x99, 0xf6, 0x42, 0xe3, 0x4d, 0xbd, 0xd0, 0x58, 0xc8, 0x0b, 0x8d, 0x85, - 0xbc, 0xd0, 0x58, 0xc8, 0x0b, 0x8d, 0x33, 0x79, 0xa1, 0xf1, 0xd6, 0xbc, 0x70, 0x0b, 0x10, 0xa1, - 0xa4, 0xe3, 0x06, 0x7e, 0xe8, 0xbb, 0xce, 0x50, 0xb9, 0xe3, 0x57, 0xa2, 0x76, 0xd9, 0x65, 0x42, - 0xc9, 0x96, 0x7a, 0x32, 0xe5, 0x97, 0x7f, 0x67, 0xa0, 0x92, 0x56, 0xff, 0x21, 0x25, 0xf8, 0x31, - 0xc1, 0x8f, 0x7b, 0x9f, 0xf1, 0x57, 0xf9, 0x39, 0xf5, 0xd2, 0xb9, 0xb1, 0xfe, 0x7f, 0x96, 0xe1, - 0xfb, 0xc7, 0xad, 0xbf, 0x27, 0xde, 0x56, 0xfd, 0x73, 0x62, 0xfa, 0xcd, 0x24, 0x21, 0xde, 0x9f, - 0x8d, 0x4a, 0xad, 0xe9, 0x9c, 0xe4, 0x06, 0xba, 0x07, 0xcb, 0x3e, 0x21, 0x38, 0xd8, 0x34, 0x4a, - 0x82, 0xbc, 0xfa, 0xb5, 0x2b, 0xab, 0x3d, 0x10, 0x78, 0x5b, 0x8d, 0x8b, 0x19, 0x2c, 0x63, 0xed, - 0x8d, 0x18, 0x2c, 0xc5, 0x60, 0x55, 0xfe, 0xa8, 0xc1, 0xb2, 0x24, 0x4d, 0x7d, 0x27, 0xe9, 0x73, - 0xbf, 0x93, 0x1e, 0xf0, 0x4f, 0x7e, 0x82, 0x03, 0xe5, 0xfd, 0xc6, 0xa2, 0x1a, 0xcb, 0x3f, 0xf1, - 0x63, 0x4b, 0x86, 0xca, 0x6d, 0xbe, 0x11, 0x88, 0x84, 0xa9, 0xc9, 0x0b, 0xd1, 0xe4, 0x62, 0x4f, - 0xa6, 0x26, 0xe7, 0xed, 0xca, 0x9f, 0x22, 0x5d, 0xad, 0x13, 0x70, 0x03, 0x56, 0x5c, 0x3a, 0x26, - 0xd1, 0x26, 0xb1, 0x60, 0x47, 0xdd, 0xb3, 0x6a, 0x6c, 0xfd, 0x2f, 0x34, 0x8e, 0xf2, 0xef, 0xab, - 0xe9, 0xfc, 0x6b, 0x7e, 0x97, 0x7f, 0xe7, 0x28, 0xff, 0x9a, 0xdf, 0x38, 0xff, 0x9a, 0xdf, 0x72, - 0xfe, 0x35, 0xbf, 0x51, 0xfe, 0xe9, 0x73, 0xf3, 0xef, 0x8b, 0xff, 0x5b, 0xfe, 0x35, 0x17, 0xca, - 0x3f, 0xeb, 0xd4, 0xfc, 0xbb, 0x94, 0x3e, 0x38, 0xd0, 0xd5, 0x21, 0x41, 0x94, 0x81, 0x7f, 0xd5, - 0xe4, 0xb9, 0x9f, 0x9a, 0x6f, 0xe7, 0xfe, 0xd9, 0xb6, 0x43, 0x6f, 0x7d, 0x5b, 0x12, 0xad, 0xe7, - 0x1f, 0xda, 0xd4, 0xf7, 0xd4, 0xce, 0xfd, 0xcd, 0x1f, 0xfb, 0xe1, 0x60, 0xfb, 0x28, 0x0c, 0x9c, - 0x16, 0x99, 0x7c, 0xab, 0x6b, 0xbb, 0x9e, 0xac, 0x2d, 0x85, 0x6b, 0x91, 0x49, 0xac, 0xd1, 0x1b, - 0xaf, 0xee, 0x29, 0x14, 0xd3, 0xe3, 0x51, 0x95, 0x2f, 0xe0, 0x94, 0x93, 0xd9, 0xa8, 0x02, 0x38, - 0x7c, 0xe1, 0xb2, 0x32, 0xea, 0xbc, 0x02, 0x16, 0x65, 0x05, 0x14, 0x3d, 0xd7, 0xfc, 0xb3, 0x06, - 0x65, 0x3e, 0xe1, 0xa7, 0xfb, 0x9e, 0x13, 0x62, 0xef, 0xe9, 0x91, 0xed, 0x1c, 0xa2, 0xab, 0x00, - 0x5d, 0xea, 0x4d, 0x3a, 0xdd, 0x49, 0x28, 0x4e, 0x50, 0xb5, 0x6a, 0xd1, 0x2e, 0x70, 0x49, 0x9b, - 0x0b, 0xd0, 0x0d, 0x58, 0x73, 0xc6, 0xe1, 0xa0, 0xe3, 0x93, 0x1e, 0x55, 0x98, 0x8c, 0xc0, 0x5c, - 0xe0, 0xe2, 0x07, 0xa4, 0x47, 0x25, 0x6e, 0xfa, 0x20, 0x56, 0x3f, 0x71, 0x10, 0xbb, 0x0e, 0xab, - 0xf1, 0xde, 0xa5, 0x73, 0x47, 0x1d, 0xc2, 0x16, 0xa2, 0xdd, 0xcb, 0x1d, 0xf4, 0x01, 0x94, 0x92, - 0xe7, 0x9b, 0xb7, 0xad, 0xa6, 0xf1, 0xf3, 0xbc, 0xc0, 0x14, 0x23, 0x0c, 0x17, 0x9a, 0x9f, 0xeb, - 0x70, 0x71, 0x6a, 0x09, 0x6d, 0xea, 0x4d, 0xd0, 0x6d, 0xc8, 0xab, 0x53, 0x73, 0x79, 0x06, 0x3c, - 0x2f, 0xc8, 0x62, 0x14, 0xcf, 0xee, 0x11, 0x1e, 0xd1, 0x28, 0xbb, 0x79, 0x9b, 0xab, 0x10, 0xfa, - 0x23, 0x4c, 0xc7, 0x61, 0x67, 0x80, 0xfd, 0xfe, 0x20, 0x54, 0x76, 0xbc, 0xa0, 0xa4, 0xbb, 0x42, - 0x88, 0xae, 0x43, 0x89, 0xd1, 0x11, 0xee, 0x24, 0x5b, 0xb1, 0xac, 0xd8, 0x8a, 0x15, 0xb9, 0x74, - 0x4f, 0x29, 0x8b, 0x76, 0xe1, 0xfd, 0x69, 0x54, 0x67, 0x46, 0x61, 0xfe, 0x9d, 0x2c, 0xcc, 0xef, - 0xa5, 0x47, 0xee, 0x1d, 0x2f, 0xd2, 0x6d, 0xb8, 0x88, 0x8f, 0x42, 0x4c, 0x78, 0x8c, 0x74, 0xa8, - 0x38, 0x4e, 0x66, 0xc6, 0x57, 0x2b, 0xa7, 0x2c, 0xb3, 0x1c, 0xe3, 0x1f, 0x4b, 0x38, 0x7a, 0x06, - 0xeb, 0x53, 0xd3, 0xcf, 0x20, 0x5c, 0x3b, 0x85, 0xf0, 0x4a, 0xea, 0xcd, 0xb1, 0x7d, 0x8c, 0xdb, - 0x7c, 0xa1, 0xc1, 0x3b, 0x29, 0x97, 0xb4, 0x54, 0x58, 0xa0, 0x7b, 0x50, 0x94, 0x07, 0xf8, 0x22, - 0x76, 0x22, 0xc7, 0x5c, 0xad, 0xc9, 0x8b, 0xa8, 0x5a, 0x78, 0x54, 0x53, 0x17, 0x51, 0xb5, 0x27, - 0x02, 0xc6, 0x07, 0xd9, 0xab, 0x2c, 0x6e, 0x33, 0x54, 0x4d, 0xce, 0xdc, 0x78, 0xd2, 0x9c, 0x1c, - 0xb8, 0x83, 0xb1, 0x3c, 0x8b, 0x9b, 0x8a, 0xae, 0x86, 0xf0, 0x5b, 0x2a, 0xba, 0x1a, 0x8b, 0x46, - 0xd7, 0x4d, 0x19, 0x5c, 0x36, 0xde, 0xc7, 0x7c, 0x29, 0x9f, 0xfa, 0x24, 0x14, 0xa1, 0x42, 0xc6, - 0x23, 0xa9, 0x7f, 0xd6, 0x16, 0x6d, 0xeb, 0x2f, 0x1a, 0xac, 0x72, 0xe4, 0x13, 0x1c, 0x1c, 0xf8, - 0x2e, 0x46, 0x77, 0x20, 0xbb, 0xed, 0x0e, 0x28, 0xfa, 0x5e, 0x92, 0xd9, 0xa9, 0xeb, 0xa0, 0xca, - 0xbb, 0xc7, 0xc5, 0xea, 0xc6, 0xa4, 0x05, 0xf9, 0xe8, 0xee, 0x06, 0x5d, 0x4e, 0x30, 0xc7, 0xae, - 0x7d, 0x2a, 0x95, 0x59, 0x8f, 0x14, 0xc5, 0x0f, 0xe5, 0x05, 0x0a, 0xaf, 0x79, 0xc6, 0x74, 0x59, - 0x49, 0x6e, 0x78, 0x2a, 0x97, 0x67, 0x3c, 0x91, 0xe3, 0xdb, 0xbb, 0x2f, 0x5e, 0xad, 0x6b, 0x2f, - 0x5f, 0xad, 0x6b, 0xff, 0x7c, 0xb5, 0xae, 0x7d, 0xfe, 0x7a, 0x7d, 0xe9, 0xe5, 0xeb, 0xf5, 0xa5, - 0xbf, 0xbf, 0x5e, 0x5f, 0x7a, 0x56, 0xeb, 0xfb, 0xe1, 0x60, 0xdc, 0xad, 0xb9, 0x74, 0x54, 0x57, - 0x97, 0x87, 0xf2, 0xef, 0x16, 0xf3, 0x9e, 0xd7, 0x39, 0xe1, 0x38, 0xf4, 0x87, 0xf5, 0x88, 0xb9, - 0xbb, 0x2c, 0x42, 0xa6, 0xf1, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8b, 0xd7, 0x2e, 0x82, 0xb2, - 0x1c, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// TestServiceClient is the client API for TestService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type TestServiceClient interface { - Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) - SayHello(ctx context.Context, in *SayHelloRequest, opts ...grpc.CallOption) (*SayHelloResponse, error) - TestAny(ctx context.Context, in *TestAnyRequest, opts ...grpc.CallOption) (*TestAnyResponse, error) -} - -type testServiceClient struct { - cc grpc1.ClientConn -} - -func NewTestServiceClient(cc grpc1.ClientConn) TestServiceClient { - return &testServiceClient{cc} -} - -func (c *testServiceClient) Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error) { - out := new(EchoResponse) - err := c.cc.Invoke(ctx, "/testdata.TestService/Echo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *testServiceClient) SayHello(ctx context.Context, in *SayHelloRequest, opts ...grpc.CallOption) (*SayHelloResponse, error) { - out := new(SayHelloResponse) - err := c.cc.Invoke(ctx, "/testdata.TestService/SayHello", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *testServiceClient) TestAny(ctx context.Context, in *TestAnyRequest, opts ...grpc.CallOption) (*TestAnyResponse, error) { - out := new(TestAnyResponse) - err := c.cc.Invoke(ctx, "/testdata.TestService/TestAny", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// TestServiceServer is the server API for TestService service. -type TestServiceServer interface { - Echo(context.Context, *EchoRequest) (*EchoResponse, error) - SayHello(context.Context, *SayHelloRequest) (*SayHelloResponse, error) - TestAny(context.Context, *TestAnyRequest) (*TestAnyResponse, error) -} - -// UnimplementedTestServiceServer can be embedded to have forward compatible implementations. -type UnimplementedTestServiceServer struct { -} - -func (*UnimplementedTestServiceServer) Echo(ctx context.Context, req *EchoRequest) (*EchoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Echo not implemented") -} -func (*UnimplementedTestServiceServer) SayHello(ctx context.Context, req *SayHelloRequest) (*SayHelloResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SayHello not implemented") -} -func (*UnimplementedTestServiceServer) TestAny(ctx context.Context, req *TestAnyRequest) (*TestAnyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method TestAny not implemented") -} - -func RegisterTestServiceServer(s grpc1.Server, srv TestServiceServer) { - s.RegisterService(&_TestService_serviceDesc, srv) -} - -func _TestService_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EchoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TestServiceServer).Echo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/testdata.TestService/Echo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TestServiceServer).Echo(ctx, req.(*EchoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TestService_SayHello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SayHelloRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TestServiceServer).SayHello(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/testdata.TestService/SayHello", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TestServiceServer).SayHello(ctx, req.(*SayHelloRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _TestService_TestAny_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(TestAnyRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(TestServiceServer).TestAny(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/testdata.TestService/TestAny", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(TestServiceServer).TestAny(ctx, req.(*TestAnyRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _TestService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "testdata.TestService", - HandlerType: (*TestServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Echo", - Handler: _TestService_Echo_Handler, - }, - { - MethodName: "SayHello", - Handler: _TestService_SayHello_Handler, - }, - { - MethodName: "TestAny", - Handler: _TestService_TestAny_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "proto.proto", -} - -func (m *Dog) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Dog) MarshalTo(dAtA []byte) (int, error) { +func (m *Nested2B) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Dog) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Nested2B) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintProto(dAtA, i, uint64(len(m.Name))) + if len(m.Route) > 0 { + i -= len(m.Route) + copy(dAtA[i:], m.Route) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.Route))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x22 } - if len(m.Size_) > 0 { - i -= len(m.Size_) - copy(dAtA[i:], m.Size_) - i = encodeVarintProto(dAtA, i, uint64(len(m.Size_))) + if m.Nested != nil { + { + size, err := m.Nested.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Cat) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + dAtA[i] = 0x1a } - return dAtA[:n], nil -} - -func (m *Cat) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Cat) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Lives != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.Lives)) + if m.Fee != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Fee)))) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x11 } - if len(m.Moniker) > 0 { - i -= len(m.Moniker) - copy(dAtA[i:], m.Moniker) - i = encodeVarintProto(dAtA, i, uint64(len(m.Moniker))) + if m.Id != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.Id)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *HasAnimal) Marshal() (dAtA []byte, err error) { +func (m *Nested1B) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3789,37 +3385,42 @@ func (m *HasAnimal) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *HasAnimal) MarshalTo(dAtA []byte) (int, error) { +func (m *Nested1B) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *HasAnimal) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Nested1B) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.X != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.X)) + if m.Age != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.Age)) i-- - dAtA[i] = 0x10 + dAtA[i] = 0x18 } - if m.Animal != nil { + if m.Nested != nil { { - size, err := m.Animal.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Nested.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0xa + dAtA[i] = 0x12 + } + if m.Id != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *HasHasAnimal) Marshal() (dAtA []byte, err error) { +func (m *Customer3) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -3829,187 +3430,100 @@ func (m *HasHasAnimal) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *HasHasAnimal) MarshalTo(dAtA []byte) (int, error) { +func (m *Customer3) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *HasHasAnimal) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Customer3) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.HasAnimal != nil { + if m.Original != nil { { - size, err := m.HasAnimal.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Original.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *HasHasHasAnimal) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + dAtA[i] = 0x4a } - return dAtA[:n], nil -} - -func (m *HasHasHasAnimal) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HasHasHasAnimal) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.HasHasAnimal != nil { + if m.Payment != nil { { - size, err := m.HasHasAnimal.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { + size := m.Payment.Size() + i -= size + if _, err := m.Payment.MarshalTo(dAtA[i:]); err != nil { return 0, err } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) } + } + if len(m.Destination) > 0 { + i -= len(m.Destination) + copy(dAtA[i:], m.Destination) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.Destination))) i-- - dAtA[i] = 0xa + dAtA[i] = 0x2a } - return len(dAtA) - i, nil -} - -func (m *EchoRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if m.Surcharge != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Surcharge)))) + i-- + dAtA[i] = 0x25 } - return dAtA[:n], nil -} - -func (m *EchoRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EchoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintProto(dAtA, i, uint64(len(m.Message))) + if m.Sf != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Sf)))) i-- - dAtA[i] = 0xa + dAtA[i] = 0x1d } - return len(dAtA) - i, nil -} - -func (m *EchoResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 } - return dAtA[:n], nil -} - -func (m *EchoResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EchoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintProto(dAtA, i, uint64(len(m.Message))) + if m.Id != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.Id)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *SayHelloRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SayHelloRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *Customer3_CreditCardNo) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SayHelloRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Customer3_CreditCardNo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintProto(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } + i -= len(m.CreditCardNo) + copy(dAtA[i:], m.CreditCardNo) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.CreditCardNo))) + i-- + dAtA[i] = 0x3a return len(dAtA) - i, nil } - -func (m *SayHelloResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SayHelloResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *Customer3_ChequeNo) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *SayHelloResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Customer3_ChequeNo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Greeting) > 0 { - i -= len(m.Greeting) - copy(dAtA[i:], m.Greeting) - i = encodeVarintProto(dAtA, i, uint64(len(m.Greeting))) - i-- - dAtA[i] = 0xa - } + i -= len(m.ChequeNo) + copy(dAtA[i:], m.ChequeNo) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.ChequeNo))) + i-- + dAtA[i] = 0x42 return len(dAtA) - i, nil } - -func (m *TestAnyRequest) Marshal() (dAtA []byte, err error) { +func (m *TestVersion1) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4019,99 +3533,157 @@ func (m *TestAnyRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TestAnyRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *TestVersion1) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TestAnyRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TestVersion1) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.AnyAnimal != nil { + if m.Customer1 != nil { { - size, err := m.AnyAnimal.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Customer1.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0xa + dAtA[i] = 0x62 } - return len(dAtA) - i, nil -} - -func (m *TestAnyResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if len(m.H) > 0 { + for iNdEx := len(m.H) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.H[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } } - return dAtA[:n], nil -} - -func (m *TestAnyResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TestAnyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.HasAnimal != nil { + if m.G != nil { { - size, err := m.HasAnimal.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.G.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0xa + dAtA[i] = 0x42 + } + if m.Sum != nil { + { + size := m.Sum.Size() + i -= size + if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if len(m.D) > 0 { + for iNdEx := len(m.D) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.D[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if len(m.C) > 0 { + for iNdEx := len(m.C) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.C[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if m.B != nil { + { + size, err := m.B.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.A != nil { + { + size, err := m.A.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.X != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.X)) + i-- + dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *TestMsg) Marshal() (dAtA []byte, err error) { +func (m *TestVersion1_E) MarshalTo(dAtA []byte) (int, error) { size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TestMsg) MarshalTo(dAtA []byte) (int, error) { +func (m *TestVersion1_E) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.E)) + i-- + dAtA[i] = 0x30 + return len(dAtA) - i, nil +} +func (m *TestVersion1_F) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TestMsg) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TestVersion1_F) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Signers) > 0 { - for iNdEx := len(m.Signers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Signers[iNdEx]) - copy(dAtA[i:], m.Signers[iNdEx]) - i = encodeVarintProto(dAtA, i, uint64(len(m.Signers[iNdEx]))) - i-- - dAtA[i] = 0xa + if m.F != nil { + { + size, err := m.F.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x3a } return len(dAtA) - i, nil } - -func (m *BadMultiSignature) Marshal() (dAtA []byte, err error) { +func (m *TestVersion2) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4121,193 +3693,164 @@ func (m *BadMultiSignature) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *BadMultiSignature) MarshalTo(dAtA []byte) (int, error) { +func (m *TestVersion2) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *BadMultiSignature) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TestVersion2) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.MaliciousField) > 0 { - i -= len(m.MaliciousField) - copy(dAtA[i:], m.MaliciousField) - i = encodeVarintProto(dAtA, i, uint64(len(m.MaliciousField))) + if m.NewField != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.NewField)) i-- - dAtA[i] = 0x2a - } - if len(m.Signatures) > 0 { - for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Signatures[iNdEx]) - copy(dAtA[i:], m.Signatures[iNdEx]) - i = encodeVarintProto(dAtA, i, uint64(len(m.Signatures[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Customer1) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Customer1) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Customer1) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Payment) > 0 { - i -= len(m.Payment) - copy(dAtA[i:], m.Payment) - i = encodeVarintProto(dAtA, i, uint64(len(m.Payment))) - i-- - dAtA[i] = 0x3a - } - if m.SubscriptionFee != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.SubscriptionFee)))) - i-- - dAtA[i] = 0x1d - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintProto(dAtA, i, uint64(len(m.Name))) + dAtA[i] = 0x1 i-- - dAtA[i] = 0x12 + dAtA[i] = 0xc8 } - if m.Id != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.Id)) + if m.Customer1 != nil { + { + size, err := m.Customer1.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Customer2) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + dAtA[i] = 0x62 } - return dAtA[:n], nil -} - -func (m *Customer2) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Customer2) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Reserved != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.Reserved)) - i-- - dAtA[i] = 0x41 - i-- - dAtA[i] = 0xb8 + if len(m.H) > 0 { + for iNdEx := len(m.H) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.H[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } } - if m.Miscellaneous != nil { + if m.G != nil { { - size, err := m.Miscellaneous.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.G.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x52 + dAtA[i] = 0x42 } - if m.City != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.City)) - i-- - dAtA[i] = 0x30 + if m.Sum != nil { + { + size := m.Sum.Size() + i -= size + if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } } - if m.Fewer != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Fewer)))) - i-- - dAtA[i] = 0x25 + if len(m.D) > 0 { + for iNdEx := len(m.D) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.D[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintProto(dAtA, i, uint64(len(m.Name))) + if len(m.C) > 0 { + for iNdEx := len(m.C) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.C[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if m.B != nil { + { + size, err := m.B.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x1a } - if m.Industry != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.Industry)) + if m.A != nil { + { + size, err := m.A.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } i-- - dAtA[i] = 0x10 + dAtA[i] = 0x12 } - if m.Id != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.Id)) + if m.X != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.X)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *Nested4A) Marshal() (dAtA []byte, err error) { +func (m *TestVersion2_E) MarshalTo(dAtA []byte) (int, error) { size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Nested4A) MarshalTo(dAtA []byte) (int, error) { +func (m *TestVersion2_E) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.E)) + i-- + dAtA[i] = 0x30 + return len(dAtA) - i, nil +} +func (m *TestVersion2_F) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Nested4A) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TestVersion2_F) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintProto(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if m.Id != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.Id)) + if m.F != nil { + { + size, err := m.F.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } i-- - dAtA[i] = 0x8 + dAtA[i] = 0x3a } return len(dAtA) - i, nil } - -func (m *Nested3A) Marshal() (dAtA []byte, err error) { +func (m *TestVersion3) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4317,157 +3860,166 @@ func (m *Nested3A) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Nested3A) MarshalTo(dAtA []byte) (int, error) { +func (m *TestVersion3) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Nested3A) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TestVersion3) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Index) > 0 { - for k := range m.Index { - v := m.Index[k] - baseI := i - if v != nil { - { - size, err := v.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 + if len(m.NonCriticalField) > 0 { + i -= len(m.NonCriticalField) + copy(dAtA[i:], m.NonCriticalField) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.NonCriticalField))) + i-- + dAtA[i] = 0x40 + i-- + dAtA[i] = 0xba + } + if m.Customer1 != nil { + { + size, err := m.Customer1.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i = encodeVarintProto(dAtA, i, uint64(k)) - i-- - dAtA[i] = 0x8 - i = encodeVarintProto(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2a + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x62 } - if len(m.A4) > 0 { - for iNdEx := len(m.A4) - 1; iNdEx >= 0; iNdEx-- { + if len(m.H) > 0 { + for iNdEx := len(m.H) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.A4[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.H[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 + dAtA[i] = 0x4a } } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintProto(dAtA, i, uint64(len(m.Name))) + if m.G != nil { + { + size, err := m.G.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } i-- - dAtA[i] = 0x12 + dAtA[i] = 0x42 } - if m.Id != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x8 + if m.Sum != nil { + { + size := m.Sum.Size() + i -= size + if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } } - return len(dAtA) - i, nil -} - -func (m *Nested2A) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if len(m.D) > 0 { + for iNdEx := len(m.D) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.D[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } } - return dAtA[:n], nil -} - -func (m *Nested2A) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Nested2A) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Nested != nil { + if len(m.C) > 0 { + for iNdEx := len(m.C) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.C[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if m.B != nil { { - size, err := m.Nested.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.B.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintProto(dAtA, i, uint64(len(m.Name))) + if m.A != nil { + { + size, err := m.A.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x12 } - if m.Id != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.Id)) + if m.X != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.X)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *Nested1A) Marshal() (dAtA []byte, err error) { +func (m *TestVersion3_E) MarshalTo(dAtA []byte) (int, error) { size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Nested1A) MarshalTo(dAtA []byte) (int, error) { +func (m *TestVersion3_E) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.E)) + i-- + dAtA[i] = 0x30 + return len(dAtA) - i, nil +} +func (m *TestVersion3_F) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Nested1A) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TestVersion3_F) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) - _ = i - var l int - _ = l - if m.Nested != nil { + if m.F != nil { { - size, err := m.Nested.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.F.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 - } - if m.Id != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x8 + dAtA[i] = 0x3a } return len(dAtA) - i, nil } - -func (m *Nested4B) Marshal() (dAtA []byte, err error) { +func (m *TestVersion3LoneOneOfValue) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4477,144 +4029,145 @@ func (m *Nested4B) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Nested4B) MarshalTo(dAtA []byte) (int, error) { +func (m *TestVersion3LoneOneOfValue) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Nested4B) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TestVersion3LoneOneOfValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintProto(dAtA, i, uint64(len(m.Name))) + if len(m.NonCriticalField) > 0 { + i -= len(m.NonCriticalField) + copy(dAtA[i:], m.NonCriticalField) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.NonCriticalField))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x40 + i-- + dAtA[i] = 0xba } - if m.Age != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.Age)) + if m.Customer1 != nil { + { + size, err := m.Customer1.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } i-- - dAtA[i] = 0x10 + dAtA[i] = 0x62 } - if m.Id != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.Id)) + if len(m.H) > 0 { + for iNdEx := len(m.H) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.H[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } + if m.G != nil { + { + size, err := m.G.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } i-- - dAtA[i] = 0x8 + dAtA[i] = 0x42 } - return len(dAtA) - i, nil -} - -func (m *Nested3B) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if m.Sum != nil { + { + size := m.Sum.Size() + i -= size + if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } } - return dAtA[:n], nil -} - -func (m *Nested3B) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Nested3B) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.B4) > 0 { - for iNdEx := len(m.B4) - 1; iNdEx >= 0; iNdEx-- { + if len(m.D) > 0 { + for iNdEx := len(m.D) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.B4[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.D[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if len(m.C) > 0 { + for iNdEx := len(m.C) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.C[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x22 } } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintProto(dAtA, i, uint64(len(m.Name))) + if m.B != nil { + { + size, err := m.B.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x1a } - if m.Age != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.Age)) + if m.A != nil { + { + size, err := m.A.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } i-- - dAtA[i] = 0x10 + dAtA[i] = 0x12 } - if m.Id != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.Id)) + if m.X != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.X)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *Nested2B) Marshal() (dAtA []byte, err error) { +func (m *TestVersion3LoneOneOfValue_E) MarshalTo(dAtA []byte) (int, error) { size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Nested2B) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Nested2B) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TestVersion3LoneOneOfValue_E) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Route) > 0 { - i -= len(m.Route) - copy(dAtA[i:], m.Route) - i = encodeVarintProto(dAtA, i, uint64(len(m.Route))) - i-- - dAtA[i] = 0x22 - } - if m.Nested != nil { - { - size, err := m.Nested.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Fee != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Fee)))) - i-- - dAtA[i] = 0x11 - } - if m.Id != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x8 - } + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.E)) + i-- + dAtA[i] = 0x30 return len(dAtA) - i, nil } - -func (m *Nested1B) Marshal() (dAtA []byte, err error) { +func (m *TestVersion3LoneNesting) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4624,164 +4177,49 @@ func (m *Nested1B) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Nested1B) MarshalTo(dAtA []byte) (int, error) { +func (m *TestVersion3LoneNesting) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Nested1B) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TestVersion3LoneNesting) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Age != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.Age)) + if len(m.NonCriticalField) > 0 { + i -= len(m.NonCriticalField) + copy(dAtA[i:], m.NonCriticalField) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.NonCriticalField))) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x40 + i-- + dAtA[i] = 0xba } - if m.Nested != nil { + if m.Inner2 != nil { { - size, err := m.Nested.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Inner2.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 - } - if m.Id != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Customer3) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + dAtA[i] = 0x7a } - return dAtA[:n], nil -} - -func (m *Customer3) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Customer3) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Original != nil { + if m.Inner1 != nil { { - size, err := m.Original.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Inner1.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - if m.Payment != nil { - { - size := m.Payment.Size() - i -= size - if _, err := m.Payment.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } - } - if len(m.Destination) > 0 { - i -= len(m.Destination) - copy(dAtA[i:], m.Destination) - i = encodeVarintProto(dAtA, i, uint64(len(m.Destination))) - i-- - dAtA[i] = 0x2a - } - if m.Surcharge != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Surcharge)))) - i-- - dAtA[i] = 0x25 - } - if m.Sf != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Sf)))) - i-- - dAtA[i] = 0x1d - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintProto(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if m.Id != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.Id)) i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Customer3_CreditCardNo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Customer3_CreditCardNo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.CreditCardNo) - copy(dAtA[i:], m.CreditCardNo) - i = encodeVarintProto(dAtA, i, uint64(len(m.CreditCardNo))) - i-- - dAtA[i] = 0x3a - return len(dAtA) - i, nil -} -func (m *Customer3_ChequeNo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Customer3_ChequeNo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i -= len(m.ChequeNo) - copy(dAtA[i:], m.ChequeNo) - i = encodeVarintProto(dAtA, i, uint64(len(m.ChequeNo))) - i-- - dAtA[i] = 0x42 - return len(dAtA) - i, nil -} -func (m *TestVersion1) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + dAtA[i] = 0x72 } - return dAtA[:n], nil -} - -func (m *TestVersion1) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TestVersion1) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l if m.Customer1 != nil { { size, err := m.Customer1.MarshalToSizedBuffer(dAtA[:i]) @@ -4789,7 +4227,7 @@ func (m *TestVersion1) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x62 @@ -4802,7 +4240,7 @@ func (m *TestVersion1) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x4a @@ -4815,7 +4253,7 @@ func (m *TestVersion1) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x42 @@ -4837,7 +4275,7 @@ func (m *TestVersion1) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x2a @@ -4851,7 +4289,7 @@ func (m *TestVersion1) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x22 @@ -4864,7 +4302,7 @@ func (m *TestVersion1) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a @@ -4876,37 +4314,25 @@ func (m *TestVersion1) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } if m.X != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.X)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.X)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *TestVersion1_E) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TestVersion1_E) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintProto(dAtA, i, uint64(m.E)) - i-- - dAtA[i] = 0x30 - return len(dAtA) - i, nil -} -func (m *TestVersion1_F) MarshalTo(dAtA []byte) (int, error) { +func (m *TestVersion3LoneNesting_F) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TestVersion1_F) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TestVersion3LoneNesting_F) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.F != nil { { @@ -4915,14 +4341,14 @@ func (m *TestVersion1_F) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x3a } return len(dAtA) - i, nil } -func (m *TestVersion2) Marshal() (dAtA []byte, err error) { +func (m *TestVersion3LoneNesting_Inner1) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -4932,164 +4358,167 @@ func (m *TestVersion2) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TestVersion2) MarshalTo(dAtA []byte) (int, error) { +func (m *TestVersion3LoneNesting_Inner1) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TestVersion2) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TestVersion3LoneNesting_Inner1) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.NewField != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.NewField)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xc8 - } - if m.Customer1 != nil { + if m.Inner != nil { { - size, err := m.Customer1.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Inner.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x62 - } - if len(m.H) > 0 { - for iNdEx := len(m.H) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.H[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } + dAtA[i] = 0x1a } - if m.G != nil { - { - size, err := m.G.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.Name))) i-- - dAtA[i] = 0x42 + dAtA[i] = 0x12 } - if m.Sum != nil { - { - size := m.Sum.Size() - i -= size - if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } + if m.Id != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 } - if len(m.D) > 0 { - for iNdEx := len(m.D) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.D[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } + return len(dAtA) - i, nil +} + +func (m *TestVersion3LoneNesting_Inner1_InnerInner) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - if len(m.C) > 0 { - for iNdEx := len(m.C) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.C[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } + return dAtA[:n], nil +} + +func (m *TestVersion3LoneNesting_Inner1_InnerInner) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TestVersion3LoneNesting_Inner1_InnerInner) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.City) > 0 { + i -= len(m.City) + copy(dAtA[i:], m.City) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.City))) + i-- + dAtA[i] = 0x12 } - if m.B != nil { + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TestVersion3LoneNesting_Inner2) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TestVersion3LoneNesting_Inner2) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TestVersion3LoneNesting_Inner2) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Inner != nil { { - size, err := m.B.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Inner.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } - if m.A != nil { - { - size, err := m.A.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } + if len(m.Country) > 0 { + i -= len(m.Country) + copy(dAtA[i:], m.Country) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.Country))) i-- dAtA[i] = 0x12 } - if m.X != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.X)) + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.Id))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *TestVersion2_E) MarshalTo(dAtA []byte) (int, error) { +func (m *TestVersion3LoneNesting_Inner2_InnerInner) Marshal() (dAtA []byte, err error) { size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil } -func (m *TestVersion2_E) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintProto(dAtA, i, uint64(m.E)) - i-- - dAtA[i] = 0x30 - return len(dAtA) - i, nil -} -func (m *TestVersion2_F) MarshalTo(dAtA []byte) (int, error) { +func (m *TestVersion3LoneNesting_Inner2_InnerInner) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TestVersion2_F) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TestVersion3LoneNesting_Inner2_InnerInner) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) - if m.F != nil { - { - size, err := m.F.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } + _ = i + var l int + _ = l + if len(m.City) > 0 { + i -= len(m.City) + copy(dAtA[i:], m.City) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.City))) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *TestVersion3) Marshal() (dAtA []byte, err error) { + +func (m *TestVersion4LoneNesting) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -5099,12 +4528,12 @@ func (m *TestVersion3) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TestVersion3) MarshalTo(dAtA []byte) (int, error) { +func (m *TestVersion4LoneNesting) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TestVersion3) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TestVersion4LoneNesting) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -5112,12 +4541,36 @@ func (m *TestVersion3) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.NonCriticalField) > 0 { i -= len(m.NonCriticalField) copy(dAtA[i:], m.NonCriticalField) - i = encodeVarintProto(dAtA, i, uint64(len(m.NonCriticalField))) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.NonCriticalField))) i-- dAtA[i] = 0x40 i-- dAtA[i] = 0xba } + if m.Inner2 != nil { + { + size, err := m.Inner2.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x7a + } + if m.Inner1 != nil { + { + size, err := m.Inner1.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x72 + } if m.Customer1 != nil { { size, err := m.Customer1.MarshalToSizedBuffer(dAtA[:i]) @@ -5125,7 +4578,7 @@ func (m *TestVersion3) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x62 @@ -5138,7 +4591,7 @@ func (m *TestVersion3) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x4a @@ -5151,7 +4604,7 @@ func (m *TestVersion3) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x42 @@ -5173,7 +4626,7 @@ func (m *TestVersion3) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x2a @@ -5187,7 +4640,7 @@ func (m *TestVersion3) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x22 @@ -5200,7 +4653,7 @@ func (m *TestVersion3) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a @@ -5212,37 +4665,25 @@ func (m *TestVersion3) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } if m.X != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.X)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.X)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *TestVersion3_E) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TestVersion3_E) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintProto(dAtA, i, uint64(m.E)) - i-- - dAtA[i] = 0x30 - return len(dAtA) - i, nil -} -func (m *TestVersion3_F) MarshalTo(dAtA []byte) (int, error) { +func (m *TestVersion4LoneNesting_F) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TestVersion3_F) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TestVersion4LoneNesting_F) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.F != nil { { @@ -5251,14 +4692,14 @@ func (m *TestVersion3_F) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x3a } return len(dAtA) - i, nil } -func (m *TestVersion3LoneOneOfValue) Marshal() (dAtA []byte, err error) { +func (m *TestVersion4LoneNesting_Inner1) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -5268,145 +4709,163 @@ func (m *TestVersion3LoneOneOfValue) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TestVersion3LoneOneOfValue) MarshalTo(dAtA []byte) (int, error) { +func (m *TestVersion4LoneNesting_Inner1) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TestVersion3LoneOneOfValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TestVersion4LoneNesting_Inner1) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.NonCriticalField) > 0 { - i -= len(m.NonCriticalField) - copy(dAtA[i:], m.NonCriticalField) - i = encodeVarintProto(dAtA, i, uint64(len(m.NonCriticalField))) - i-- - dAtA[i] = 0x40 - i-- - dAtA[i] = 0xba - } - if m.Customer1 != nil { + if m.Inner != nil { { - size, err := m.Customer1.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Inner.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x62 + dAtA[i] = 0x1a } - if len(m.H) > 0 { - for iNdEx := len(m.H) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.H[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 } - if m.G != nil { - { - size, err := m.G.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } + if m.Id != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.Id)) i-- - dAtA[i] = 0x42 + dAtA[i] = 0x8 } - if m.Sum != nil { - { - size := m.Sum.Size() - i -= size - if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } + return len(dAtA) - i, nil +} + +func (m *TestVersion4LoneNesting_Inner1_InnerInner) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - if len(m.D) > 0 { - for iNdEx := len(m.D) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.D[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } + return dAtA[:n], nil +} + +func (m *TestVersion4LoneNesting_Inner1_InnerInner) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TestVersion4LoneNesting_Inner1_InnerInner) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.City) > 0 { + i -= len(m.City) + copy(dAtA[i:], m.City) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.City))) + i-- + dAtA[i] = 0x12 } - if len(m.C) > 0 { - for iNdEx := len(m.C) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.C[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } + if m.Id != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 } - if m.B != nil { + return len(dAtA) - i, nil +} + +func (m *TestVersion4LoneNesting_Inner2) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TestVersion4LoneNesting_Inner2) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TestVersion4LoneNesting_Inner2) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Inner != nil { { - size, err := m.B.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Inner.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x1a } - if m.A != nil { - { - size, err := m.A.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } + if len(m.Country) > 0 { + i -= len(m.Country) + copy(dAtA[i:], m.Country) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.Country))) i-- dAtA[i] = 0x12 } - if m.X != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.X)) + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.Id))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *TestVersion3LoneOneOfValue_E) MarshalTo(dAtA []byte) (int, error) { +func (m *TestVersion4LoneNesting_Inner2_InnerInner) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TestVersion4LoneNesting_Inner2_InnerInner) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TestVersion3LoneOneOfValue_E) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TestVersion4LoneNesting_Inner2_InnerInner) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) - i = encodeVarintProto(dAtA, i, uint64(m.E)) - i-- - dAtA[i] = 0x30 + _ = i + var l int + _ = l + if m.Value != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.Value)) + i-- + dAtA[i] = 0x10 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } -func (m *TestVersion3LoneNesting) Marshal() (dAtA []byte, err error) { + +func (m *TestVersionFD1) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -5416,61 +4875,16 @@ func (m *TestVersion3LoneNesting) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TestVersion3LoneNesting) MarshalTo(dAtA []byte) (int, error) { +func (m *TestVersionFD1) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TestVersion3LoneNesting) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TestVersionFD1) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.NonCriticalField) > 0 { - i -= len(m.NonCriticalField) - copy(dAtA[i:], m.NonCriticalField) - i = encodeVarintProto(dAtA, i, uint64(len(m.NonCriticalField))) - i-- - dAtA[i] = 0x40 - i-- - dAtA[i] = 0xba - } - if m.Inner2 != nil { - { - size, err := m.Inner2.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x7a - } - if m.Inner1 != nil { - { - size, err := m.Inner1.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x72 - } - if m.Customer1 != nil { - { - size, err := m.Customer1.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x62 - } if len(m.H) > 0 { for iNdEx := len(m.H) - 1; iNdEx >= 0; iNdEx-- { { @@ -5479,7 +4893,7 @@ func (m *TestVersion3LoneNesting) MarshalToSizedBuffer(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x4a @@ -5492,7 +4906,7 @@ func (m *TestVersion3LoneNesting) MarshalToSizedBuffer(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x42 @@ -5506,46 +4920,6 @@ func (m *TestVersion3LoneNesting) MarshalToSizedBuffer(dAtA []byte) (int, error) } } } - if len(m.D) > 0 { - for iNdEx := len(m.D) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.D[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if len(m.C) > 0 { - for iNdEx := len(m.C) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.C[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if m.B != nil { - { - size, err := m.B.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } if m.A != nil { { size, err := m.A.MarshalToSizedBuffer(dAtA[:i]) @@ -5553,25 +4927,37 @@ func (m *TestVersion3LoneNesting) MarshalToSizedBuffer(dAtA []byte) (int, error) return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 } if m.X != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.X)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.X)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *TestVersion3LoneNesting_F) MarshalTo(dAtA []byte) (int, error) { +func (m *TestVersionFD1_E) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TestVersion3LoneNesting_F) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TestVersionFD1_E) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.E)) + i-- + dAtA[i] = 0x30 + return len(dAtA) - i, nil +} +func (m *TestVersionFD1_F) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TestVersionFD1_F) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) if m.F != nil { { @@ -5580,14 +4966,14 @@ func (m *TestVersion3LoneNesting_F) MarshalToSizedBuffer(dAtA []byte) (int, erro return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x3a } return len(dAtA) - i, nil } -func (m *TestVersion3LoneNesting_Inner1) Marshal() (dAtA []byte, err error) { +func (m *TestVersionFD1WithExtraAny) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -5597,81 +4983,105 @@ func (m *TestVersion3LoneNesting_Inner1) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TestVersion3LoneNesting_Inner1) MarshalTo(dAtA []byte) (int, error) { +func (m *TestVersionFD1WithExtraAny) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TestVersion3LoneNesting_Inner1) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TestVersionFD1WithExtraAny) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Inner != nil { + if len(m.H) > 0 { + for iNdEx := len(m.H) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.H[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } + if m.G != nil { { - size, err := m.Inner.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.G.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x42 } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintProto(dAtA, i, uint64(len(m.Name))) + if m.Sum != nil { + { + size := m.Sum.Size() + i -= size + if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + if m.A != nil { + { + size, err := m.A.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x12 } - if m.Id != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.Id)) + if m.X != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.X)) i-- dAtA[i] = 0x8 } return len(dAtA) - i, nil } -func (m *TestVersion3LoneNesting_Inner1_InnerInner) Marshal() (dAtA []byte, err error) { +func (m *TestVersionFD1WithExtraAny_E) MarshalTo(dAtA []byte) (int, error) { size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TestVersion3LoneNesting_Inner1_InnerInner) MarshalTo(dAtA []byte) (int, error) { +func (m *TestVersionFD1WithExtraAny_E) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.E)) + i-- + dAtA[i] = 0x30 + return len(dAtA) - i, nil +} +func (m *TestVersionFD1WithExtraAny_F) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TestVersion3LoneNesting_Inner1_InnerInner) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TestVersionFD1WithExtraAny_F) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) - _ = i - var l int - _ = l - if len(m.City) > 0 { - i -= len(m.City) - copy(dAtA[i:], m.City) - i = encodeVarintProto(dAtA, i, uint64(len(m.City))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintProto(dAtA, i, uint64(len(m.Id))) + if m.F != nil { + { + size, err := m.F.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } i-- - dAtA[i] = 0xa + dAtA[i] = 0x3a } return len(dAtA) - i, nil } - -func (m *TestVersion3LoneNesting_Inner2) Marshal() (dAtA []byte, err error) { +func (m *AnyWithExtra) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -5681,46 +5091,42 @@ func (m *TestVersion3LoneNesting_Inner2) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TestVersion3LoneNesting_Inner2) MarshalTo(dAtA []byte) (int, error) { +func (m *AnyWithExtra) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TestVersion3LoneNesting_Inner2) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *AnyWithExtra) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Inner != nil { + if m.C != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.C)) + i-- + dAtA[i] = 0x20 + } + if m.B != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.B)) + i-- + dAtA[i] = 0x18 + } + if m.Any != nil { { - size, err := m.Inner.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Any.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a - } - if len(m.Country) > 0 { - i -= len(m.Country) - copy(dAtA[i:], m.Country) - i = encodeVarintProto(dAtA, i, uint64(len(m.Country))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintProto(dAtA, i, uint64(len(m.Id))) - i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *TestVersion3LoneNesting_Inner2_InnerInner) Marshal() (dAtA []byte, err error) { +func (m *TestUpdatedTxRaw) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -5730,34 +5136,59 @@ func (m *TestVersion3LoneNesting_Inner2_InnerInner) Marshal() (dAtA []byte, err return dAtA[:n], nil } -func (m *TestVersion3LoneNesting_Inner2_InnerInner) MarshalTo(dAtA []byte) (int, error) { +func (m *TestUpdatedTxRaw) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TestVersion3LoneNesting_Inner2_InnerInner) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TestUpdatedTxRaw) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.City) > 0 { - i -= len(m.City) - copy(dAtA[i:], m.City) - i = encodeVarintProto(dAtA, i, uint64(len(m.City))) + if len(m.NewField_1024) > 0 { + i -= len(m.NewField_1024) + copy(dAtA[i:], m.NewField_1024) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.NewField_1024))) + i-- + dAtA[i] = 0x40 + i-- + dAtA[i] = 0x82 + } + if len(m.NewField_5) > 0 { + i -= len(m.NewField_5) + copy(dAtA[i:], m.NewField_5) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.NewField_5))) + i-- + dAtA[i] = 0x2a + } + if len(m.Signatures) > 0 { + for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Signatures[iNdEx]) + copy(dAtA[i:], m.Signatures[iNdEx]) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.Signatures[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.AuthInfoBytes) > 0 { + i -= len(m.AuthInfoBytes) + copy(dAtA[i:], m.AuthInfoBytes) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.AuthInfoBytes))) i-- dAtA[i] = 0x12 } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintProto(dAtA, i, uint64(len(m.Id))) + if len(m.BodyBytes) > 0 { + i -= len(m.BodyBytes) + copy(dAtA[i:], m.BodyBytes) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.BodyBytes))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *TestVersion4LoneNesting) Marshal() (dAtA []byte, err error) { +func (m *TestUpdatedTxBody) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -5767,178 +5198,157 @@ func (m *TestVersion4LoneNesting) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TestVersion4LoneNesting) MarshalTo(dAtA []byte) (int, error) { +func (m *TestUpdatedTxBody) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TestVersion4LoneNesting) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TestUpdatedTxBody) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.NonCriticalField) > 0 { - i -= len(m.NonCriticalField) - copy(dAtA[i:], m.NonCriticalField) - i = encodeVarintProto(dAtA, i, uint64(len(m.NonCriticalField))) + if len(m.NonCriticalExtensionOptions) > 0 { + for iNdEx := len(m.NonCriticalExtensionOptions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.NonCriticalExtensionOptions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x7f + i-- + dAtA[i] = 0xfa + } + } + if len(m.SomeNewFieldNonCriticalField) > 0 { + i -= len(m.SomeNewFieldNonCriticalField) + copy(dAtA[i:], m.SomeNewFieldNonCriticalField) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.SomeNewFieldNonCriticalField))) i-- - dAtA[i] = 0x40 + dAtA[i] = 0x41 i-- - dAtA[i] = 0xba + dAtA[i] = 0xd2 } - if m.Inner2 != nil { - { - size, err := m.Inner2.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.ExtensionOptions) > 0 { + for iNdEx := len(m.ExtensionOptions) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ExtensionOptions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x3f + i-- + dAtA[i] = 0xfa } + } + if m.SomeNewField != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.SomeNewField)) i-- - dAtA[i] = 0x7a + dAtA[i] = 0x20 } - if m.Inner1 != nil { - { - size, err := m.Inner1.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } + if m.TimeoutHeight != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.TimeoutHeight)) i-- - dAtA[i] = 0x72 + dAtA[i] = 0x18 } - if m.Customer1 != nil { - { - size, err := m.Customer1.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } + if len(m.Memo) > 0 { + i -= len(m.Memo) + copy(dAtA[i:], m.Memo) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.Memo))) i-- - dAtA[i] = 0x62 + dAtA[i] = 0x12 } - if len(m.H) > 0 { - for iNdEx := len(m.H) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Messages) > 0 { + for iNdEx := len(m.Messages) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.H[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Messages[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x4a + dAtA[i] = 0xa } } - if m.G != nil { + return len(dAtA) - i, nil +} + +func (m *TestUpdatedAuthInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TestUpdatedAuthInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TestUpdatedAuthInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.NewField_1024) > 0 { + i -= len(m.NewField_1024) + copy(dAtA[i:], m.NewField_1024) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.NewField_1024))) + i-- + dAtA[i] = 0x40 + i-- + dAtA[i] = 0x82 + } + if len(m.NewField_3) > 0 { + i -= len(m.NewField_3) + copy(dAtA[i:], m.NewField_3) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.NewField_3))) + i-- + dAtA[i] = 0x1a + } + if m.Fee != nil { { - size, err := m.G.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x42 - } - if m.Sum != nil { - { - size := m.Sum.Size() - i -= size - if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } + dAtA[i] = 0x12 } - if len(m.D) > 0 { - for iNdEx := len(m.D) - 1; iNdEx >= 0; iNdEx-- { + if len(m.SignerInfos) > 0 { + for iNdEx := len(m.SignerInfos) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.D[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.SignerInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x2a + dAtA[i] = 0xa } } - if len(m.C) > 0 { - for iNdEx := len(m.C) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.C[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if m.B != nil { - { - size, err := m.B.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.A != nil { - { - size, err := m.A.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.X != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.X)) - i-- - dAtA[i] = 0x8 - } return len(dAtA) - i, nil } -func (m *TestVersion4LoneNesting_F) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TestVersion4LoneNesting_F) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.F != nil { - { - size, err := m.F.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - return len(dAtA) - i, nil -} -func (m *TestVersion4LoneNesting_Inner1) Marshal() (dAtA []byte, err error) { +func (m *TestRepeatedUints) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -5948,1227 +5358,941 @@ func (m *TestVersion4LoneNesting_Inner1) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *TestVersion4LoneNesting_Inner1) MarshalTo(dAtA []byte) (int, error) { +func (m *TestRepeatedUints) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *TestVersion4LoneNesting_Inner1) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *TestRepeatedUints) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Inner != nil { - { - size, err := m.Inner.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Nums) > 0 { + dAtA54 := make([]byte, len(m.Nums)*10) + var j53 int + for _, num := range m.Nums { + for num >= 1<<7 { + dAtA54[j53] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j53++ } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + dAtA54[j53] = uint8(num) + j53++ } + i -= j53 + copy(dAtA[i:], dAtA54[:j53]) + i = encodeVarintUnknonwnproto(dAtA, i, uint64(j53)) i-- - dAtA[i] = 0x1a - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintProto(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if m.Id != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *TestVersion4LoneNesting_Inner1_InnerInner) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func encodeVarintUnknonwnproto(dAtA []byte, offset int, v uint64) int { + offset -= sovUnknonwnproto(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ } - return dAtA[:n], nil -} - -func (m *TestVersion4LoneNesting_Inner1_InnerInner) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + dAtA[offset] = uint8(v) + return base } - -func (m *TestVersion4LoneNesting_Inner1_InnerInner) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *Customer1) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if len(m.City) > 0 { - i -= len(m.City) - copy(dAtA[i:], m.City) - i = encodeVarintProto(dAtA, i, uint64(len(m.City))) - i-- - dAtA[i] = 0x12 - } if m.Id != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.Id)) - i-- - dAtA[i] = 0x8 + n += 1 + sovUnknonwnproto(uint64(m.Id)) } - return len(dAtA) - i, nil -} - -func (m *TestVersion4LoneNesting_Inner2) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + l = len(m.Name) + if l > 0 { + n += 1 + l + sovUnknonwnproto(uint64(l)) } - return dAtA[:n], nil -} - -func (m *TestVersion4LoneNesting_Inner2) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + if m.SubscriptionFee != 0 { + n += 5 + } + l = len(m.Payment) + if l > 0 { + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + return n } -func (m *TestVersion4LoneNesting_Inner2) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *Customer2) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if m.Inner != nil { - { - size, err := m.Inner.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a + if m.Id != 0 { + n += 1 + sovUnknonwnproto(uint64(m.Id)) } - if len(m.Country) > 0 { - i -= len(m.Country) - copy(dAtA[i:], m.Country) - i = encodeVarintProto(dAtA, i, uint64(len(m.Country))) - i-- - dAtA[i] = 0x12 + if m.Industry != 0 { + n += 1 + sovUnknonwnproto(uint64(m.Industry)) } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintProto(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa + l = len(m.Name) + if l > 0 { + n += 1 + l + sovUnknonwnproto(uint64(l)) } - return len(dAtA) - i, nil -} - -func (m *TestVersion4LoneNesting_Inner2_InnerInner) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + if m.Fewer != 0 { + n += 5 } - return dAtA[:n], nil -} - -func (m *TestVersion4LoneNesting_Inner2_InnerInner) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + if m.City != 0 { + n += 1 + sovUnknonwnproto(uint64(m.City)) + } + if m.Miscellaneous != nil { + l = m.Miscellaneous.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + if m.Reserved != 0 { + n += 2 + sovUnknonwnproto(uint64(m.Reserved)) + } + return n } -func (m *TestVersion4LoneNesting_Inner2_InnerInner) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *Nested4A) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if m.Value != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.Value)) - i-- - dAtA[i] = 0x10 + if m.Id != 0 { + n += 1 + sovUnknonwnproto(uint64(m.Id)) } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintProto(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa + l = len(m.Name) + if l > 0 { + n += 1 + l + sovUnknonwnproto(uint64(l)) } - return len(dAtA) - i, nil + return n } -func (m *TestVersionFD1) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *Nested3A) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil -} - -func (m *TestVersionFD1) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TestVersionFD1) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i var l int _ = l - if len(m.H) > 0 { - for iNdEx := len(m.H) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.H[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } + if m.Id != 0 { + n += 1 + sovUnknonwnproto(uint64(m.Id)) } - if m.G != nil { - { - size, err := m.G.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 + l = len(m.Name) + if l > 0 { + n += 1 + l + sovUnknonwnproto(uint64(l)) } - if m.Sum != nil { - { - size := m.Sum.Size() - i -= size - if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } + if len(m.A4) > 0 { + for _, e := range m.A4 { + l = e.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) } } - if m.A != nil { - { - size, err := m.A.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.Index) > 0 { + for k, v := range m.Index { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovUnknonwnproto(uint64(l)) } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + mapEntrySize := 1 + sovUnknonwnproto(uint64(k)) + l + n += mapEntrySize + 1 + sovUnknonwnproto(uint64(mapEntrySize)) } - i-- - dAtA[i] = 0x12 - } - if m.X != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.X)) - i-- - dAtA[i] = 0x8 } - return len(dAtA) - i, nil -} - -func (m *TestVersionFD1_E) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return n } -func (m *TestVersionFD1_E) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintProto(dAtA, i, uint64(m.E)) - i-- - dAtA[i] = 0x30 - return len(dAtA) - i, nil -} -func (m *TestVersionFD1_F) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *Nested2A) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovUnknonwnproto(uint64(m.Id)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + if m.Nested != nil { + l = m.Nested.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + return n } -func (m *TestVersionFD1_F) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.F != nil { - { - size, err := m.F.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a +func (m *Nested1A) Size() (n int) { + if m == nil { + return 0 } - return len(dAtA) - i, nil -} -func (m *TestVersionFD1WithExtraAny) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err + var l int + _ = l + if m.Id != 0 { + n += 1 + sovUnknonwnproto(uint64(m.Id)) } - return dAtA[:n], nil + if m.Nested != nil { + l = m.Nested.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + return n } -func (m *TestVersionFD1WithExtraAny) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *Nested4B) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovUnknonwnproto(uint64(m.Id)) + } + if m.Age != 0 { + n += 1 + sovUnknonwnproto(uint64(m.Age)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + return n } -func (m *TestVersionFD1WithExtraAny) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *Nested3B) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if len(m.H) > 0 { - for iNdEx := len(m.H) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.H[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } + if m.Id != 0 { + n += 1 + sovUnknonwnproto(uint64(m.Id)) } - if m.G != nil { - { - size, err := m.G.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 + if m.Age != 0 { + n += 1 + sovUnknonwnproto(uint64(m.Age)) } - if m.Sum != nil { - { - size := m.Sum.Size() - i -= size - if _, err := m.Sum.MarshalTo(dAtA[i:]); err != nil { - return 0, err - } - } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovUnknonwnproto(uint64(l)) } - if m.A != nil { - { - size, err := m.A.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + if len(m.B4) > 0 { + for _, e := range m.B4 { + l = e.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) } - i-- - dAtA[i] = 0x12 - } - if m.X != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.X)) - i-- - dAtA[i] = 0x8 } - return len(dAtA) - i, nil -} - -func (m *TestVersionFD1WithExtraAny_E) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TestVersionFD1WithExtraAny_E) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - i = encodeVarintProto(dAtA, i, uint64(m.E)) - i-- - dAtA[i] = 0x30 - return len(dAtA) - i, nil -} -func (m *TestVersionFD1WithExtraAny_F) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + return n } -func (m *TestVersionFD1WithExtraAny_F) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - if m.F != nil { - { - size, err := m.F.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - return len(dAtA) - i, nil -} -func (m *AnyWithExtra) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *Nested2B) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil -} - -func (m *AnyWithExtra) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AnyWithExtra) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i var l int _ = l - if m.C != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.C)) - i-- - dAtA[i] = 0x20 + if m.Id != 0 { + n += 1 + sovUnknonwnproto(uint64(m.Id)) } - if m.B != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.B)) - i-- - dAtA[i] = 0x18 + if m.Fee != 0 { + n += 9 } - if m.Any != nil { - { - size, err := m.Any.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + if m.Nested != nil { + l = m.Nested.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) } - return len(dAtA) - i, nil + l = len(m.Route) + if l > 0 { + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + return n } -func (m *TestUpdatedTxRaw) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *Nested1B) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil -} - -func (m *TestUpdatedTxRaw) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + var l int + _ = l + if m.Id != 0 { + n += 1 + sovUnknonwnproto(uint64(m.Id)) + } + if m.Nested != nil { + l = m.Nested.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + if m.Age != 0 { + n += 1 + sovUnknonwnproto(uint64(m.Age)) + } + return n } -func (m *TestUpdatedTxRaw) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *Customer3) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if len(m.NewField_1024) > 0 { - i -= len(m.NewField_1024) - copy(dAtA[i:], m.NewField_1024) - i = encodeVarintProto(dAtA, i, uint64(len(m.NewField_1024))) - i-- - dAtA[i] = 0x40 - i-- - dAtA[i] = 0x82 + if m.Id != 0 { + n += 1 + sovUnknonwnproto(uint64(m.Id)) } - if len(m.NewField_5) > 0 { - i -= len(m.NewField_5) - copy(dAtA[i:], m.NewField_5) - i = encodeVarintProto(dAtA, i, uint64(len(m.NewField_5))) - i-- - dAtA[i] = 0x2a + l = len(m.Name) + if l > 0 { + n += 1 + l + sovUnknonwnproto(uint64(l)) } - if len(m.Signatures) > 0 { - for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Signatures[iNdEx]) - copy(dAtA[i:], m.Signatures[iNdEx]) - i = encodeVarintProto(dAtA, i, uint64(len(m.Signatures[iNdEx]))) - i-- - dAtA[i] = 0x1a - } + if m.Sf != 0 { + n += 5 } - if len(m.AuthInfoBytes) > 0 { - i -= len(m.AuthInfoBytes) - copy(dAtA[i:], m.AuthInfoBytes) - i = encodeVarintProto(dAtA, i, uint64(len(m.AuthInfoBytes))) - i-- - dAtA[i] = 0x12 + if m.Surcharge != 0 { + n += 5 } - if len(m.BodyBytes) > 0 { - i -= len(m.BodyBytes) - copy(dAtA[i:], m.BodyBytes) - i = encodeVarintProto(dAtA, i, uint64(len(m.BodyBytes))) - i-- - dAtA[i] = 0xa + l = len(m.Destination) + if l > 0 { + n += 1 + l + sovUnknonwnproto(uint64(l)) } - return len(dAtA) - i, nil + if m.Payment != nil { + n += m.Payment.Size() + } + if m.Original != nil { + l = m.Original.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + return n } -func (m *TestUpdatedTxBody) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *Customer3_CreditCardNo) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil + var l int + _ = l + l = len(m.CreditCardNo) + n += 1 + l + sovUnknonwnproto(uint64(l)) + return n } - -func (m *TestUpdatedTxBody) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *Customer3_ChequeNo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ChequeNo) + n += 1 + l + sovUnknonwnproto(uint64(l)) + return n } - -func (m *TestUpdatedTxBody) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *TestVersion1) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if len(m.NonCriticalExtensionOptions) > 0 { - for iNdEx := len(m.NonCriticalExtensionOptions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.NonCriticalExtensionOptions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x7f - i-- - dAtA[i] = 0xfa - } + if m.X != 0 { + n += 1 + sovUnknonwnproto(uint64(m.X)) } - if len(m.SomeNewFieldNonCriticalField) > 0 { - i -= len(m.SomeNewFieldNonCriticalField) - copy(dAtA[i:], m.SomeNewFieldNonCriticalField) - i = encodeVarintProto(dAtA, i, uint64(len(m.SomeNewFieldNonCriticalField))) - i-- - dAtA[i] = 0x41 - i-- - dAtA[i] = 0xd2 + if m.A != nil { + l = m.A.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) } - if len(m.ExtensionOptions) > 0 { - for iNdEx := len(m.ExtensionOptions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ExtensionOptions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3f - i-- - dAtA[i] = 0xfa + if m.B != nil { + l = m.B.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + if len(m.C) > 0 { + for _, e := range m.C { + l = e.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) } } - if m.SomeNewField != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.SomeNewField)) - i-- - dAtA[i] = 0x20 + if len(m.D) > 0 { + for _, e := range m.D { + l = e.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } } - if m.TimeoutHeight != 0 { - i = encodeVarintProto(dAtA, i, uint64(m.TimeoutHeight)) - i-- - dAtA[i] = 0x18 + if m.Sum != nil { + n += m.Sum.Size() } - if len(m.Memo) > 0 { - i -= len(m.Memo) - copy(dAtA[i:], m.Memo) - i = encodeVarintProto(dAtA, i, uint64(len(m.Memo))) - i-- - dAtA[i] = 0x12 + if m.G != nil { + l = m.G.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) } - if len(m.Messages) > 0 { - for iNdEx := len(m.Messages) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Messages[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + if len(m.H) > 0 { + for _, e := range m.H { + l = e.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) } } - return len(dAtA) - i, nil + if m.Customer1 != nil { + l = m.Customer1.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + return n } -func (m *TestUpdatedAuthInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *TestVersion1_E) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil + var l int + _ = l + n += 1 + sovUnknonwnproto(uint64(m.E)) + return n } - -func (m *TestUpdatedAuthInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) +func (m *TestVersion1_F) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.F != nil { + l = m.F.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + return n } - -func (m *TestUpdatedAuthInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *TestVersion2) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if len(m.NewField_1024) > 0 { - i -= len(m.NewField_1024) - copy(dAtA[i:], m.NewField_1024) - i = encodeVarintProto(dAtA, i, uint64(len(m.NewField_1024))) - i-- - dAtA[i] = 0x40 - i-- - dAtA[i] = 0x82 + if m.X != 0 { + n += 1 + sovUnknonwnproto(uint64(m.X)) } - if len(m.NewField_3) > 0 { - i -= len(m.NewField_3) - copy(dAtA[i:], m.NewField_3) - i = encodeVarintProto(dAtA, i, uint64(len(m.NewField_3))) - i-- - dAtA[i] = 0x1a + if m.A != nil { + l = m.A.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) } - if m.Fee != nil { - { - size, err := m.Fee.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) + if m.B != nil { + l = m.B.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + if len(m.C) > 0 { + for _, e := range m.C { + l = e.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) } - i-- - dAtA[i] = 0x12 } - if len(m.SignerInfos) > 0 { - for iNdEx := len(m.SignerInfos) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SignerInfos[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintProto(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa + if len(m.D) > 0 { + for _, e := range m.D { + l = e.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) } } - return len(dAtA) - i, nil -} - -func (m *TestRepeatedUints) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TestRepeatedUints) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TestRepeatedUints) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Nums) > 0 { - dAtA59 := make([]byte, len(m.Nums)*10) - var j58 int - for _, num := range m.Nums { - for num >= 1<<7 { - dAtA59[j58] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j58++ - } - dAtA59[j58] = uint8(num) - j58++ - } - i -= j58 - copy(dAtA[i:], dAtA59[:j58]) - i = encodeVarintProto(dAtA, i, uint64(j58)) - i-- - dAtA[i] = 0xa + if m.Sum != nil { + n += m.Sum.Size() } - return len(dAtA) - i, nil -} - -func encodeVarintProto(dAtA []byte, offset int, v uint64) int { - offset -= sovProto(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ + if m.G != nil { + l = m.G.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) } - dAtA[offset] = uint8(v) - return base -} -func (m *Dog) Size() (n int) { - if m == nil { - return 0 + if len(m.H) > 0 { + for _, e := range m.H { + l = e.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } } - var l int - _ = l - l = len(m.Size_) - if l > 0 { - n += 1 + l + sovProto(uint64(l)) + if m.Customer1 != nil { + l = m.Customer1.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovProto(uint64(l)) + if m.NewField != 0 { + n += 2 + sovUnknonwnproto(uint64(m.NewField)) } return n } -func (m *Cat) Size() (n int) { +func (m *TestVersion2_E) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Moniker) - if l > 0 { - n += 1 + l + sovProto(uint64(l)) - } - if m.Lives != 0 { - n += 1 + sovProto(uint64(m.Lives)) - } + n += 1 + sovUnknonwnproto(uint64(m.E)) return n } - -func (m *HasAnimal) Size() (n int) { +func (m *TestVersion2_F) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Animal != nil { - l = m.Animal.Size() - n += 1 + l + sovProto(uint64(l)) - } - if m.X != 0 { - n += 1 + sovProto(uint64(m.X)) + if m.F != nil { + l = m.F.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) } return n } - -func (m *HasHasAnimal) Size() (n int) { +func (m *TestVersion3) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.HasAnimal != nil { - l = m.HasAnimal.Size() - n += 1 + l + sovProto(uint64(l)) + if m.X != 0 { + n += 1 + sovUnknonwnproto(uint64(m.X)) + } + if m.A != nil { + l = m.A.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + if m.B != nil { + l = m.B.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + if len(m.C) > 0 { + for _, e := range m.C { + l = e.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + } + if len(m.D) > 0 { + for _, e := range m.D { + l = e.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + } + if m.Sum != nil { + n += m.Sum.Size() + } + if m.G != nil { + l = m.G.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + if len(m.H) > 0 { + for _, e := range m.H { + l = e.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + } + if m.Customer1 != nil { + l = m.Customer1.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + l = len(m.NonCriticalField) + if l > 0 { + n += 2 + l + sovUnknonwnproto(uint64(l)) } return n } -func (m *HasHasHasAnimal) Size() (n int) { +func (m *TestVersion3_E) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.HasHasAnimal != nil { - l = m.HasHasAnimal.Size() - n += 1 + l + sovProto(uint64(l)) - } + n += 1 + sovUnknonwnproto(uint64(m.E)) return n } - -func (m *EchoRequest) Size() (n int) { +func (m *TestVersion3_F) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Message) - if l > 0 { - n += 1 + l + sovProto(uint64(l)) + if m.F != nil { + l = m.F.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) } return n } - -func (m *EchoResponse) Size() (n int) { +func (m *TestVersion3LoneOneOfValue) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Message) + if m.X != 0 { + n += 1 + sovUnknonwnproto(uint64(m.X)) + } + if m.A != nil { + l = m.A.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + if m.B != nil { + l = m.B.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + if len(m.C) > 0 { + for _, e := range m.C { + l = e.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + } + if len(m.D) > 0 { + for _, e := range m.D { + l = e.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + } + if m.Sum != nil { + n += m.Sum.Size() + } + if m.G != nil { + l = m.G.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + if len(m.H) > 0 { + for _, e := range m.H { + l = e.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + } + if m.Customer1 != nil { + l = m.Customer1.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + l = len(m.NonCriticalField) if l > 0 { - n += 1 + l + sovProto(uint64(l)) + n += 2 + l + sovUnknonwnproto(uint64(l)) } return n } -func (m *SayHelloRequest) Size() (n int) { +func (m *TestVersion3LoneOneOfValue_E) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovProto(uint64(l)) - } + n += 1 + sovUnknonwnproto(uint64(m.E)) return n } - -func (m *SayHelloResponse) Size() (n int) { +func (m *TestVersion3LoneNesting) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Greeting) + if m.X != 0 { + n += 1 + sovUnknonwnproto(uint64(m.X)) + } + if m.A != nil { + l = m.A.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + if m.B != nil { + l = m.B.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + if len(m.C) > 0 { + for _, e := range m.C { + l = e.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + } + if len(m.D) > 0 { + for _, e := range m.D { + l = e.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + } + if m.Sum != nil { + n += m.Sum.Size() + } + if m.G != nil { + l = m.G.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + if len(m.H) > 0 { + for _, e := range m.H { + l = e.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + } + if m.Customer1 != nil { + l = m.Customer1.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + if m.Inner1 != nil { + l = m.Inner1.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + if m.Inner2 != nil { + l = m.Inner2.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + l = len(m.NonCriticalField) if l > 0 { - n += 1 + l + sovProto(uint64(l)) + n += 2 + l + sovUnknonwnproto(uint64(l)) } return n } -func (m *TestAnyRequest) Size() (n int) { +func (m *TestVersion3LoneNesting_F) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.AnyAnimal != nil { - l = m.AnyAnimal.Size() - n += 1 + l + sovProto(uint64(l)) + if m.F != nil { + l = m.F.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) } return n } - -func (m *TestAnyResponse) Size() (n int) { +func (m *TestVersion3LoneNesting_Inner1) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.HasAnimal != nil { - l = m.HasAnimal.Size() - n += 1 + l + sovProto(uint64(l)) + if m.Id != 0 { + n += 1 + sovUnknonwnproto(uint64(m.Id)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + if m.Inner != nil { + l = m.Inner.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) } return n } -func (m *TestMsg) Size() (n int) { +func (m *TestVersion3LoneNesting_Inner1_InnerInner) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.Signers) > 0 { - for _, s := range m.Signers { - l = len(s) - n += 1 + l + sovProto(uint64(l)) - } + l = len(m.Id) + if l > 0 { + n += 1 + l + sovUnknonwnproto(uint64(l)) + } + l = len(m.City) + if l > 0 { + n += 1 + l + sovUnknonwnproto(uint64(l)) } return n } -func (m *BadMultiSignature) Size() (n int) { +func (m *TestVersion3LoneNesting_Inner2) Size() (n int) { if m == nil { return 0 } var l int _ = l - if len(m.Signatures) > 0 { - for _, b := range m.Signatures { - l = len(b) - n += 1 + l + sovProto(uint64(l)) - } + l = len(m.Id) + if l > 0 { + n += 1 + l + sovUnknonwnproto(uint64(l)) } - l = len(m.MaliciousField) + l = len(m.Country) if l > 0 { - n += 1 + l + sovProto(uint64(l)) + n += 1 + l + sovUnknonwnproto(uint64(l)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if m.Inner != nil { + l = m.Inner.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) } return n } -func (m *Customer1) Size() (n int) { +func (m *TestVersion3LoneNesting_Inner2_InnerInner) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Id != 0 { - n += 1 + sovProto(uint64(m.Id)) - } - l = len(m.Name) + l = len(m.Id) if l > 0 { - n += 1 + l + sovProto(uint64(l)) - } - if m.SubscriptionFee != 0 { - n += 5 + n += 1 + l + sovUnknonwnproto(uint64(l)) } - l = len(m.Payment) + l = len(m.City) if l > 0 { - n += 1 + l + sovProto(uint64(l)) + n += 1 + l + sovUnknonwnproto(uint64(l)) } return n } -func (m *Customer2) Size() (n int) { +func (m *TestVersion4LoneNesting) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Id != 0 { - n += 1 + sovProto(uint64(m.Id)) - } - if m.Industry != 0 { - n += 1 + sovProto(uint64(m.Industry)) + if m.X != 0 { + n += 1 + sovUnknonwnproto(uint64(m.X)) } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovProto(uint64(l)) + if m.A != nil { + l = m.A.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) } - if m.Fewer != 0 { - n += 5 - } - if m.City != 0 { - n += 1 + sovProto(uint64(m.City)) - } - if m.Miscellaneous != nil { - l = m.Miscellaneous.Size() - n += 1 + l + sovProto(uint64(l)) - } - if m.Reserved != 0 { - n += 2 + sovProto(uint64(m.Reserved)) - } - return n -} - -func (m *Nested4A) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovProto(uint64(m.Id)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovProto(uint64(l)) - } - return n -} - -func (m *Nested3A) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovProto(uint64(m.Id)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovProto(uint64(l)) + if m.B != nil { + l = m.B.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) } - if len(m.A4) > 0 { - for _, e := range m.A4 { + if len(m.C) > 0 { + for _, e := range m.C { l = e.Size() - n += 1 + l + sovProto(uint64(l)) + n += 1 + l + sovUnknonwnproto(uint64(l)) } } - if len(m.Index) > 0 { - for k, v := range m.Index { - _ = k - _ = v - l = 0 - if v != nil { - l = v.Size() - l += 1 + sovProto(uint64(l)) - } - mapEntrySize := 1 + sovProto(uint64(k)) + l - n += mapEntrySize + 1 + sovProto(uint64(mapEntrySize)) + if len(m.D) > 0 { + for _, e := range m.D { + l = e.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) } } - return n -} - -func (m *Nested2A) Size() (n int) { - if m == nil { - return 0 + if m.Sum != nil { + n += m.Sum.Size() } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovProto(uint64(m.Id)) + if m.G != nil { + l = m.G.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovProto(uint64(l)) + if len(m.H) > 0 { + for _, e := range m.H { + l = e.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } } - if m.Nested != nil { - l = m.Nested.Size() - n += 1 + l + sovProto(uint64(l)) + if m.Customer1 != nil { + l = m.Customer1.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) } - return n -} - -func (m *Nested1A) Size() (n int) { - if m == nil { - return 0 + if m.Inner1 != nil { + l = m.Inner1.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovProto(uint64(m.Id)) + if m.Inner2 != nil { + l = m.Inner2.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) } - if m.Nested != nil { - l = m.Nested.Size() - n += 1 + l + sovProto(uint64(l)) + l = len(m.NonCriticalField) + if l > 0 { + n += 2 + l + sovUnknonwnproto(uint64(l)) } return n } -func (m *Nested4B) Size() (n int) { +func (m *TestVersion4LoneNesting_F) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Id != 0 { - n += 1 + sovProto(uint64(m.Id)) - } - if m.Age != 0 { - n += 1 + sovProto(uint64(m.Age)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovProto(uint64(l)) + if m.F != nil { + l = m.F.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) } return n } - -func (m *Nested3B) Size() (n int) { +func (m *TestVersion4LoneNesting_Inner1) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Id != 0 { - n += 1 + sovProto(uint64(m.Id)) - } - if m.Age != 0 { - n += 1 + sovProto(uint64(m.Age)) + n += 1 + sovUnknonwnproto(uint64(m.Id)) } l = len(m.Name) if l > 0 { - n += 1 + l + sovProto(uint64(l)) + n += 1 + l + sovUnknonwnproto(uint64(l)) } - if len(m.B4) > 0 { - for _, e := range m.B4 { - l = e.Size() - n += 1 + l + sovProto(uint64(l)) - } + if m.Inner != nil { + l = m.Inner.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) } return n } -func (m *Nested2B) Size() (n int) { +func (m *TestVersion4LoneNesting_Inner1_InnerInner) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.Id != 0 { - n += 1 + sovProto(uint64(m.Id)) - } - if m.Fee != 0 { - n += 9 + n += 1 + sovUnknonwnproto(uint64(m.Id)) } - if m.Nested != nil { - l = m.Nested.Size() - n += 1 + l + sovProto(uint64(l)) - } - l = len(m.Route) + l = len(m.City) if l > 0 { - n += 1 + l + sovProto(uint64(l)) + n += 1 + l + sovUnknonwnproto(uint64(l)) } return n } -func (m *Nested1B) Size() (n int) { +func (m *TestVersion4LoneNesting_Inner2) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Id != 0 { - n += 1 + sovProto(uint64(m.Id)) + l = len(m.Id) + if l > 0 { + n += 1 + l + sovUnknonwnproto(uint64(l)) } - if m.Nested != nil { - l = m.Nested.Size() - n += 1 + l + sovProto(uint64(l)) + l = len(m.Country) + if l > 0 { + n += 1 + l + sovUnknonwnproto(uint64(l)) } - if m.Age != 0 { - n += 1 + sovProto(uint64(m.Age)) + if m.Inner != nil { + l = m.Inner.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) } return n } -func (m *Customer3) Size() (n int) { +func (m *TestVersion4LoneNesting_Inner2_InnerInner) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Id != 0 { - n += 1 + sovProto(uint64(m.Id)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovProto(uint64(l)) - } - if m.Sf != 0 { - n += 5 - } - if m.Surcharge != 0 { - n += 5 - } - l = len(m.Destination) + l = len(m.Id) if l > 0 { - n += 1 + l + sovProto(uint64(l)) + n += 1 + l + sovUnknonwnproto(uint64(l)) } - if m.Payment != nil { - n += m.Payment.Size() - } - if m.Original != nil { - l = m.Original.Size() - n += 1 + l + sovProto(uint64(l)) + if m.Value != 0 { + n += 1 + sovUnknonwnproto(uint64(m.Value)) } return n } -func (m *Customer3_CreditCardNo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.CreditCardNo) - n += 1 + l + sovProto(uint64(l)) - return n -} -func (m *Customer3_ChequeNo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ChequeNo) - n += 1 + l + sovProto(uint64(l)) - return n -} -func (m *TestVersion1) Size() (n int) { +func (m *TestVersionFD1) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.X != 0 { - n += 1 + sovProto(uint64(m.X)) + n += 1 + sovUnknonwnproto(uint64(m.X)) } if m.A != nil { l = m.A.Size() - n += 1 + l + sovProto(uint64(l)) - } - if m.B != nil { - l = m.B.Size() - n += 1 + l + sovProto(uint64(l)) - } - if len(m.C) > 0 { - for _, e := range m.C { - l = e.Size() - n += 1 + l + sovProto(uint64(l)) - } - } - if len(m.D) > 0 { - for _, e := range m.D { - l = e.Size() - n += 1 + l + sovProto(uint64(l)) - } + n += 1 + l + sovUnknonwnproto(uint64(l)) } if m.Sum != nil { n += m.Sum.Size() } if m.G != nil { l = m.G.Size() - n += 1 + l + sovProto(uint64(l)) + n += 1 + l + sovUnknonwnproto(uint64(l)) } if len(m.H) > 0 { for _, e := range m.H { l = e.Size() - n += 1 + l + sovProto(uint64(l)) + n += 1 + l + sovUnknonwnproto(uint64(l)) } } - if m.Customer1 != nil { - l = m.Customer1.Size() - n += 1 + l + sovProto(uint64(l)) - } return n } -func (m *TestVersion1_E) Size() (n int) { +func (m *TestVersionFD1_E) Size() (n int) { if m == nil { return 0 } var l int _ = l - n += 1 + sovProto(uint64(m.E)) + n += 1 + sovUnknonwnproto(uint64(m.E)) return n } -func (m *TestVersion1_F) Size() (n int) { +func (m *TestVersionFD1_F) Size() (n int) { if m == nil { return 0 } @@ -7176,72 +6300,49 @@ func (m *TestVersion1_F) Size() (n int) { _ = l if m.F != nil { l = m.F.Size() - n += 1 + l + sovProto(uint64(l)) + n += 1 + l + sovUnknonwnproto(uint64(l)) } return n } -func (m *TestVersion2) Size() (n int) { +func (m *TestVersionFD1WithExtraAny) Size() (n int) { if m == nil { return 0 } var l int _ = l if m.X != 0 { - n += 1 + sovProto(uint64(m.X)) + n += 1 + sovUnknonwnproto(uint64(m.X)) } if m.A != nil { l = m.A.Size() - n += 1 + l + sovProto(uint64(l)) - } - if m.B != nil { - l = m.B.Size() - n += 1 + l + sovProto(uint64(l)) - } - if len(m.C) > 0 { - for _, e := range m.C { - l = e.Size() - n += 1 + l + sovProto(uint64(l)) - } - } - if len(m.D) > 0 { - for _, e := range m.D { - l = e.Size() - n += 1 + l + sovProto(uint64(l)) - } + n += 1 + l + sovUnknonwnproto(uint64(l)) } if m.Sum != nil { n += m.Sum.Size() } if m.G != nil { l = m.G.Size() - n += 1 + l + sovProto(uint64(l)) + n += 1 + l + sovUnknonwnproto(uint64(l)) } if len(m.H) > 0 { for _, e := range m.H { l = e.Size() - n += 1 + l + sovProto(uint64(l)) + n += 1 + l + sovUnknonwnproto(uint64(l)) } } - if m.Customer1 != nil { - l = m.Customer1.Size() - n += 1 + l + sovProto(uint64(l)) - } - if m.NewField != 0 { - n += 2 + sovProto(uint64(m.NewField)) - } return n } -func (m *TestVersion2_E) Size() (n int) { +func (m *TestVersionFD1WithExtraAny_E) Size() (n int) { if m == nil { return 0 } var l int _ = l - n += 1 + sovProto(uint64(m.E)) + n += 1 + sovUnknonwnproto(uint64(m.E)) return n } -func (m *TestVersion2_F) Size() (n int) { +func (m *TestVersionFD1WithExtraAny_F) Size() (n int) { if m == nil { return 0 } @@ -7249,1909 +6350,149 @@ func (m *TestVersion2_F) Size() (n int) { _ = l if m.F != nil { l = m.F.Size() - n += 1 + l + sovProto(uint64(l)) + n += 1 + l + sovUnknonwnproto(uint64(l)) } return n } -func (m *TestVersion3) Size() (n int) { +func (m *AnyWithExtra) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.X != 0 { - n += 1 + sovProto(uint64(m.X)) + if m.Any != nil { + l = m.Any.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) } - if m.A != nil { - l = m.A.Size() - n += 1 + l + sovProto(uint64(l)) + if m.B != 0 { + n += 1 + sovUnknonwnproto(uint64(m.B)) } - if m.B != nil { - l = m.B.Size() - n += 1 + l + sovProto(uint64(l)) + if m.C != 0 { + n += 1 + sovUnknonwnproto(uint64(m.C)) } - if len(m.C) > 0 { - for _, e := range m.C { - l = e.Size() - n += 1 + l + sovProto(uint64(l)) - } + return n +} + +func (m *TestUpdatedTxRaw) Size() (n int) { + if m == nil { + return 0 } - if len(m.D) > 0 { - for _, e := range m.D { - l = e.Size() - n += 1 + l + sovProto(uint64(l)) - } + var l int + _ = l + l = len(m.BodyBytes) + if l > 0 { + n += 1 + l + sovUnknonwnproto(uint64(l)) } - if m.Sum != nil { - n += m.Sum.Size() + l = len(m.AuthInfoBytes) + if l > 0 { + n += 1 + l + sovUnknonwnproto(uint64(l)) } - if m.G != nil { - l = m.G.Size() - n += 1 + l + sovProto(uint64(l)) - } - if len(m.H) > 0 { - for _, e := range m.H { - l = e.Size() - n += 1 + l + sovProto(uint64(l)) + if len(m.Signatures) > 0 { + for _, b := range m.Signatures { + l = len(b) + n += 1 + l + sovUnknonwnproto(uint64(l)) } } - if m.Customer1 != nil { - l = m.Customer1.Size() - n += 1 + l + sovProto(uint64(l)) + l = len(m.NewField_5) + if l > 0 { + n += 1 + l + sovUnknonwnproto(uint64(l)) } - l = len(m.NonCriticalField) + l = len(m.NewField_1024) if l > 0 { - n += 2 + l + sovProto(uint64(l)) + n += 2 + l + sovUnknonwnproto(uint64(l)) } return n } -func (m *TestVersion3_E) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovProto(uint64(m.E)) - return n -} -func (m *TestVersion3_F) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.F != nil { - l = m.F.Size() - n += 1 + l + sovProto(uint64(l)) - } - return n -} -func (m *TestVersion3LoneOneOfValue) Size() (n int) { +func (m *TestUpdatedTxBody) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.X != 0 { - n += 1 + sovProto(uint64(m.X)) - } - if m.A != nil { - l = m.A.Size() - n += 1 + l + sovProto(uint64(l)) - } - if m.B != nil { - l = m.B.Size() - n += 1 + l + sovProto(uint64(l)) - } - if len(m.C) > 0 { - for _, e := range m.C { - l = e.Size() - n += 1 + l + sovProto(uint64(l)) - } - } - if len(m.D) > 0 { - for _, e := range m.D { - l = e.Size() - n += 1 + l + sovProto(uint64(l)) - } - } - if m.Sum != nil { - n += m.Sum.Size() - } - if m.G != nil { - l = m.G.Size() - n += 1 + l + sovProto(uint64(l)) - } - if len(m.H) > 0 { - for _, e := range m.H { + if len(m.Messages) > 0 { + for _, e := range m.Messages { l = e.Size() - n += 1 + l + sovProto(uint64(l)) + n += 1 + l + sovUnknonwnproto(uint64(l)) } } - if m.Customer1 != nil { - l = m.Customer1.Size() - n += 1 + l + sovProto(uint64(l)) - } - l = len(m.NonCriticalField) + l = len(m.Memo) if l > 0 { - n += 2 + l + sovProto(uint64(l)) - } - return n -} - -func (m *TestVersion3LoneOneOfValue_E) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovProto(uint64(m.E)) - return n -} -func (m *TestVersion3LoneNesting) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.X != 0 { - n += 1 + sovProto(uint64(m.X)) - } - if m.A != nil { - l = m.A.Size() - n += 1 + l + sovProto(uint64(l)) + n += 1 + l + sovUnknonwnproto(uint64(l)) } - if m.B != nil { - l = m.B.Size() - n += 1 + l + sovProto(uint64(l)) + if m.TimeoutHeight != 0 { + n += 1 + sovUnknonwnproto(uint64(m.TimeoutHeight)) } - if len(m.C) > 0 { - for _, e := range m.C { - l = e.Size() - n += 1 + l + sovProto(uint64(l)) - } + if m.SomeNewField != 0 { + n += 1 + sovUnknonwnproto(uint64(m.SomeNewField)) } - if len(m.D) > 0 { - for _, e := range m.D { + if len(m.ExtensionOptions) > 0 { + for _, e := range m.ExtensionOptions { l = e.Size() - n += 1 + l + sovProto(uint64(l)) + n += 2 + l + sovUnknonwnproto(uint64(l)) } } - if m.Sum != nil { - n += m.Sum.Size() - } - if m.G != nil { - l = m.G.Size() - n += 1 + l + sovProto(uint64(l)) + l = len(m.SomeNewFieldNonCriticalField) + if l > 0 { + n += 2 + l + sovUnknonwnproto(uint64(l)) } - if len(m.H) > 0 { - for _, e := range m.H { + if len(m.NonCriticalExtensionOptions) > 0 { + for _, e := range m.NonCriticalExtensionOptions { l = e.Size() - n += 1 + l + sovProto(uint64(l)) + n += 2 + l + sovUnknonwnproto(uint64(l)) } } - if m.Customer1 != nil { - l = m.Customer1.Size() - n += 1 + l + sovProto(uint64(l)) - } - if m.Inner1 != nil { - l = m.Inner1.Size() - n += 1 + l + sovProto(uint64(l)) - } - if m.Inner2 != nil { - l = m.Inner2.Size() - n += 1 + l + sovProto(uint64(l)) - } - l = len(m.NonCriticalField) - if l > 0 { - n += 2 + l + sovProto(uint64(l)) - } - return n -} - -func (m *TestVersion3LoneNesting_F) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.F != nil { - l = m.F.Size() - n += 1 + l + sovProto(uint64(l)) - } - return n -} -func (m *TestVersion3LoneNesting_Inner1) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovProto(uint64(m.Id)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovProto(uint64(l)) - } - if m.Inner != nil { - l = m.Inner.Size() - n += 1 + l + sovProto(uint64(l)) - } - return n -} - -func (m *TestVersion3LoneNesting_Inner1_InnerInner) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovProto(uint64(l)) - } - l = len(m.City) - if l > 0 { - n += 1 + l + sovProto(uint64(l)) - } return n } -func (m *TestVersion3LoneNesting_Inner2) Size() (n int) { +func (m *TestUpdatedAuthInfo) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovProto(uint64(l)) - } - l = len(m.Country) - if l > 0 { - n += 1 + l + sovProto(uint64(l)) - } - if m.Inner != nil { - l = m.Inner.Size() - n += 1 + l + sovProto(uint64(l)) + if len(m.SignerInfos) > 0 { + for _, e := range m.SignerInfos { + l = e.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) + } } - return n -} - -func (m *TestVersion3LoneNesting_Inner2_InnerInner) Size() (n int) { - if m == nil { - return 0 + if m.Fee != nil { + l = m.Fee.Size() + n += 1 + l + sovUnknonwnproto(uint64(l)) } - var l int - _ = l - l = len(m.Id) + l = len(m.NewField_3) if l > 0 { - n += 1 + l + sovProto(uint64(l)) + n += 1 + l + sovUnknonwnproto(uint64(l)) } - l = len(m.City) + l = len(m.NewField_1024) if l > 0 { - n += 1 + l + sovProto(uint64(l)) + n += 2 + l + sovUnknonwnproto(uint64(l)) } return n } -func (m *TestVersion4LoneNesting) Size() (n int) { +func (m *TestRepeatedUints) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.X != 0 { - n += 1 + sovProto(uint64(m.X)) - } - if m.A != nil { - l = m.A.Size() - n += 1 + l + sovProto(uint64(l)) - } - if m.B != nil { - l = m.B.Size() - n += 1 + l + sovProto(uint64(l)) - } - if len(m.C) > 0 { - for _, e := range m.C { - l = e.Size() - n += 1 + l + sovProto(uint64(l)) - } - } - if len(m.D) > 0 { - for _, e := range m.D { - l = e.Size() - n += 1 + l + sovProto(uint64(l)) - } - } - if m.Sum != nil { - n += m.Sum.Size() - } - if m.G != nil { - l = m.G.Size() - n += 1 + l + sovProto(uint64(l)) - } - if len(m.H) > 0 { - for _, e := range m.H { - l = e.Size() - n += 1 + l + sovProto(uint64(l)) + if len(m.Nums) > 0 { + l = 0 + for _, e := range m.Nums { + l += sovUnknonwnproto(uint64(e)) } - } - if m.Customer1 != nil { - l = m.Customer1.Size() - n += 1 + l + sovProto(uint64(l)) - } - if m.Inner1 != nil { - l = m.Inner1.Size() - n += 1 + l + sovProto(uint64(l)) - } - if m.Inner2 != nil { - l = m.Inner2.Size() - n += 1 + l + sovProto(uint64(l)) - } - l = len(m.NonCriticalField) - if l > 0 { - n += 2 + l + sovProto(uint64(l)) + n += 1 + sovUnknonwnproto(uint64(l)) + l } return n } -func (m *TestVersion4LoneNesting_F) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.F != nil { - l = m.F.Size() - n += 1 + l + sovProto(uint64(l)) - } - return n +func sovUnknonwnproto(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 } -func (m *TestVersion4LoneNesting_Inner1) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovProto(uint64(m.Id)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovProto(uint64(l)) - } - if m.Inner != nil { - l = m.Inner.Size() - n += 1 + l + sovProto(uint64(l)) - } - return n -} - -func (m *TestVersion4LoneNesting_Inner1_InnerInner) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Id != 0 { - n += 1 + sovProto(uint64(m.Id)) - } - l = len(m.City) - if l > 0 { - n += 1 + l + sovProto(uint64(l)) - } - return n -} - -func (m *TestVersion4LoneNesting_Inner2) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovProto(uint64(l)) - } - l = len(m.Country) - if l > 0 { - n += 1 + l + sovProto(uint64(l)) - } - if m.Inner != nil { - l = m.Inner.Size() - n += 1 + l + sovProto(uint64(l)) - } - return n -} - -func (m *TestVersion4LoneNesting_Inner2_InnerInner) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovProto(uint64(l)) - } - if m.Value != 0 { - n += 1 + sovProto(uint64(m.Value)) - } - return n -} - -func (m *TestVersionFD1) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.X != 0 { - n += 1 + sovProto(uint64(m.X)) - } - if m.A != nil { - l = m.A.Size() - n += 1 + l + sovProto(uint64(l)) - } - if m.Sum != nil { - n += m.Sum.Size() - } - if m.G != nil { - l = m.G.Size() - n += 1 + l + sovProto(uint64(l)) - } - if len(m.H) > 0 { - for _, e := range m.H { - l = e.Size() - n += 1 + l + sovProto(uint64(l)) - } - } - return n -} - -func (m *TestVersionFD1_E) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovProto(uint64(m.E)) - return n -} -func (m *TestVersionFD1_F) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.F != nil { - l = m.F.Size() - n += 1 + l + sovProto(uint64(l)) - } - return n -} -func (m *TestVersionFD1WithExtraAny) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.X != 0 { - n += 1 + sovProto(uint64(m.X)) - } - if m.A != nil { - l = m.A.Size() - n += 1 + l + sovProto(uint64(l)) - } - if m.Sum != nil { - n += m.Sum.Size() - } - if m.G != nil { - l = m.G.Size() - n += 1 + l + sovProto(uint64(l)) - } - if len(m.H) > 0 { - for _, e := range m.H { - l = e.Size() - n += 1 + l + sovProto(uint64(l)) - } - } - return n -} - -func (m *TestVersionFD1WithExtraAny_E) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovProto(uint64(m.E)) - return n -} -func (m *TestVersionFD1WithExtraAny_F) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.F != nil { - l = m.F.Size() - n += 1 + l + sovProto(uint64(l)) - } - return n -} -func (m *AnyWithExtra) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Any != nil { - l = m.Any.Size() - n += 1 + l + sovProto(uint64(l)) - } - if m.B != 0 { - n += 1 + sovProto(uint64(m.B)) - } - if m.C != 0 { - n += 1 + sovProto(uint64(m.C)) - } - return n -} - -func (m *TestUpdatedTxRaw) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.BodyBytes) - if l > 0 { - n += 1 + l + sovProto(uint64(l)) - } - l = len(m.AuthInfoBytes) - if l > 0 { - n += 1 + l + sovProto(uint64(l)) - } - if len(m.Signatures) > 0 { - for _, b := range m.Signatures { - l = len(b) - n += 1 + l + sovProto(uint64(l)) - } - } - l = len(m.NewField_5) - if l > 0 { - n += 1 + l + sovProto(uint64(l)) - } - l = len(m.NewField_1024) - if l > 0 { - n += 2 + l + sovProto(uint64(l)) - } - return n -} - -func (m *TestUpdatedTxBody) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Messages) > 0 { - for _, e := range m.Messages { - l = e.Size() - n += 1 + l + sovProto(uint64(l)) - } - } - l = len(m.Memo) - if l > 0 { - n += 1 + l + sovProto(uint64(l)) - } - if m.TimeoutHeight != 0 { - n += 1 + sovProto(uint64(m.TimeoutHeight)) - } - if m.SomeNewField != 0 { - n += 1 + sovProto(uint64(m.SomeNewField)) - } - if len(m.ExtensionOptions) > 0 { - for _, e := range m.ExtensionOptions { - l = e.Size() - n += 2 + l + sovProto(uint64(l)) - } - } - l = len(m.SomeNewFieldNonCriticalField) - if l > 0 { - n += 2 + l + sovProto(uint64(l)) - } - if len(m.NonCriticalExtensionOptions) > 0 { - for _, e := range m.NonCriticalExtensionOptions { - l = e.Size() - n += 2 + l + sovProto(uint64(l)) - } - } - return n -} - -func (m *TestUpdatedAuthInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.SignerInfos) > 0 { - for _, e := range m.SignerInfos { - l = e.Size() - n += 1 + l + sovProto(uint64(l)) - } - } - if m.Fee != nil { - l = m.Fee.Size() - n += 1 + l + sovProto(uint64(l)) - } - l = len(m.NewField_3) - if l > 0 { - n += 1 + l + sovProto(uint64(l)) - } - l = len(m.NewField_1024) - if l > 0 { - n += 2 + l + sovProto(uint64(l)) - } - return n -} - -func (m *TestRepeatedUints) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Nums) > 0 { - l = 0 - for _, e := range m.Nums { - l += sovProto(uint64(e)) - } - n += 1 + sovProto(uint64(l)) + l - } - return n -} - -func sovProto(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozProto(x uint64) (n int) { - return sovProto(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Dog) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Dog: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Dog: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Size_", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProto - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProto - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Size_ = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProto - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProto - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Cat) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Cat: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Cat: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Moniker", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProto - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProto - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Moniker = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Lives", wireType) - } - m.Lives = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Lives |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HasAnimal) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HasAnimal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HasAnimal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Animal", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProto - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProto - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Animal == nil { - m.Animal = &types.Any{} - } - if err := m.Animal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field X", wireType) - } - m.X = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.X |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HasHasAnimal) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HasHasAnimal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HasHasAnimal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HasAnimal", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProto - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProto - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.HasAnimal == nil { - m.HasAnimal = &types.Any{} - } - if err := m.HasAnimal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HasHasHasAnimal) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HasHasHasAnimal: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HasHasHasAnimal: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HasHasAnimal", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProto - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProto - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.HasHasAnimal == nil { - m.HasHasAnimal = &types.Any{} - } - if err := m.HasHasAnimal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EchoRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EchoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EchoRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProto - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProto - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EchoResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EchoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EchoResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProto - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProto - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SayHelloRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SayHelloRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SayHelloRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProto - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProto - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SayHelloResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SayHelloResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SayHelloResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Greeting", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProto - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProto - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Greeting = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TestAnyRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TestAnyRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TestAnyRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AnyAnimal", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProto - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProto - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AnyAnimal == nil { - m.AnyAnimal = &types.Any{} - } - if err := m.AnyAnimal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TestAnyResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TestAnyResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TestAnyResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HasAnimal", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthProto - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthProto - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.HasAnimal == nil { - m.HasAnimal = &HasAnimal{} - } - if err := m.HasAnimal.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TestMsg) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TestMsg: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TestMsg: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signers", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthProto - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthProto - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signers = append(m.Signers, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BadMultiSignature) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BadMultiSignature: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BadMultiSignature: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthProto - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthProto - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signatures = append(m.Signatures, make([]byte, postIndex-iNdEx)) - copy(m.Signatures[len(m.Signatures)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaliciousField", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowProto - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthProto - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthProto - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MaliciousField = append(m.MaliciousField[:0], dAtA[iNdEx:postIndex]...) - if m.MaliciousField == nil { - m.MaliciousField = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil +func sozUnknonwnproto(x uint64) (n int) { + return sovUnknonwnproto(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } func (m *Customer1) Unmarshal(dAtA []byte) error { l := len(dAtA) @@ -9161,7 +6502,7 @@ func (m *Customer1) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9189,7 +6530,7 @@ func (m *Customer1) Unmarshal(dAtA []byte) error { m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9208,7 +6549,7 @@ func (m *Customer1) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9222,11 +6563,11 @@ func (m *Customer1) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -9251,7 +6592,7 @@ func (m *Customer1) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9265,11 +6606,11 @@ func (m *Customer1) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -9278,15 +6619,15 @@ func (m *Customer1) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -9308,7 +6649,7 @@ func (m *Customer2) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9336,7 +6677,7 @@ func (m *Customer2) Unmarshal(dAtA []byte) error { m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9355,7 +6696,7 @@ func (m *Customer2) Unmarshal(dAtA []byte) error { m.Industry = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9374,7 +6715,7 @@ func (m *Customer2) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9388,11 +6729,11 @@ func (m *Customer2) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -9417,7 +6758,7 @@ func (m *Customer2) Unmarshal(dAtA []byte) error { m.City = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9436,7 +6777,7 @@ func (m *Customer2) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9449,11 +6790,11 @@ func (m *Customer2) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -9472,7 +6813,7 @@ func (m *Customer2) Unmarshal(dAtA []byte) error { m.Reserved = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9486,15 +6827,15 @@ func (m *Customer2) Unmarshal(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -9516,7 +6857,7 @@ func (m *Nested4A) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9544,7 +6885,7 @@ func (m *Nested4A) Unmarshal(dAtA []byte) error { m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9563,7 +6904,7 @@ func (m *Nested4A) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9577,11 +6918,11 @@ func (m *Nested4A) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -9590,15 +6931,15 @@ func (m *Nested4A) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -9620,7 +6961,7 @@ func (m *Nested3A) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9648,7 +6989,7 @@ func (m *Nested3A) Unmarshal(dAtA []byte) error { m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9667,7 +7008,7 @@ func (m *Nested3A) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9681,11 +7022,11 @@ func (m *Nested3A) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -9699,7 +7040,7 @@ func (m *Nested3A) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9712,11 +7053,11 @@ func (m *Nested3A) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -9733,7 +7074,7 @@ func (m *Nested3A) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9746,11 +7087,11 @@ func (m *Nested3A) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -9765,7 +7106,7 @@ func (m *Nested3A) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9781,7 +7122,7 @@ func (m *Nested3A) Unmarshal(dAtA []byte) error { if fieldNum == 1 { for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9797,7 +7138,7 @@ func (m *Nested3A) Unmarshal(dAtA []byte) error { var mapmsglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9810,11 +7151,11 @@ func (m *Nested3A) Unmarshal(dAtA []byte) error { } } if mapmsglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postmsgIndex := iNdEx + mapmsglen if postmsgIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postmsgIndex > l { return io.ErrUnexpectedEOF @@ -9826,12 +7167,12 @@ func (m *Nested3A) Unmarshal(dAtA []byte) error { iNdEx = postmsgIndex } else { iNdEx = entryPreIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF @@ -9843,15 +7184,15 @@ func (m *Nested3A) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -9873,7 +7214,7 @@ func (m *Nested2A) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9901,7 +7242,7 @@ func (m *Nested2A) Unmarshal(dAtA []byte) error { m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9920,7 +7261,7 @@ func (m *Nested2A) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9934,11 +7275,11 @@ func (m *Nested2A) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -9952,7 +7293,7 @@ func (m *Nested2A) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -9965,11 +7306,11 @@ func (m *Nested2A) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -9983,15 +7324,15 @@ func (m *Nested2A) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -10013,7 +7354,7 @@ func (m *Nested1A) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10041,7 +7382,7 @@ func (m *Nested1A) Unmarshal(dAtA []byte) error { m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10060,7 +7401,7 @@ func (m *Nested1A) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10073,11 +7414,11 @@ func (m *Nested1A) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -10091,15 +7432,15 @@ func (m *Nested1A) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -10121,7 +7462,7 @@ func (m *Nested4B) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10149,7 +7490,7 @@ func (m *Nested4B) Unmarshal(dAtA []byte) error { m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10168,7 +7509,7 @@ func (m *Nested4B) Unmarshal(dAtA []byte) error { m.Age = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10187,7 +7528,7 @@ func (m *Nested4B) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10201,11 +7542,11 @@ func (m *Nested4B) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -10214,15 +7555,15 @@ func (m *Nested4B) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -10244,7 +7585,7 @@ func (m *Nested3B) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10272,7 +7613,7 @@ func (m *Nested3B) Unmarshal(dAtA []byte) error { m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10291,7 +7632,7 @@ func (m *Nested3B) Unmarshal(dAtA []byte) error { m.Age = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10310,7 +7651,7 @@ func (m *Nested3B) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10324,11 +7665,11 @@ func (m *Nested3B) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -10342,7 +7683,7 @@ func (m *Nested3B) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10355,11 +7696,11 @@ func (m *Nested3B) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -10371,15 +7712,15 @@ func (m *Nested3B) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -10401,7 +7742,7 @@ func (m *Nested2B) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10429,7 +7770,7 @@ func (m *Nested2B) Unmarshal(dAtA []byte) error { m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10459,7 +7800,7 @@ func (m *Nested2B) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10472,11 +7813,11 @@ func (m *Nested2B) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -10495,7 +7836,7 @@ func (m *Nested2B) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10509,11 +7850,11 @@ func (m *Nested2B) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -10522,15 +7863,15 @@ func (m *Nested2B) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -10552,7 +7893,7 @@ func (m *Nested1B) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10580,7 +7921,7 @@ func (m *Nested1B) Unmarshal(dAtA []byte) error { m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10599,7 +7940,7 @@ func (m *Nested1B) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10612,11 +7953,11 @@ func (m *Nested1B) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -10635,7 +7976,7 @@ func (m *Nested1B) Unmarshal(dAtA []byte) error { m.Age = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10649,15 +7990,15 @@ func (m *Nested1B) Unmarshal(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -10679,7 +8020,7 @@ func (m *Customer3) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10707,7 +8048,7 @@ func (m *Customer3) Unmarshal(dAtA []byte) error { m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10726,7 +8067,7 @@ func (m *Customer3) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10740,11 +8081,11 @@ func (m *Customer3) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -10780,7 +8121,7 @@ func (m *Customer3) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10794,11 +8135,11 @@ func (m *Customer3) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -10812,7 +8153,7 @@ func (m *Customer3) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10826,11 +8167,11 @@ func (m *Customer3) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -10844,7 +8185,7 @@ func (m *Customer3) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10858,11 +8199,11 @@ func (m *Customer3) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -10876,7 +8217,7 @@ func (m *Customer3) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10889,11 +8230,11 @@ func (m *Customer3) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -10907,15 +8248,15 @@ func (m *Customer3) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -10937,7 +8278,7 @@ func (m *TestVersion1) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10965,7 +8306,7 @@ func (m *TestVersion1) Unmarshal(dAtA []byte) error { m.X = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10984,7 +8325,7 @@ func (m *TestVersion1) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -10997,11 +8338,11 @@ func (m *TestVersion1) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -11020,7 +8361,7 @@ func (m *TestVersion1) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11033,11 +8374,11 @@ func (m *TestVersion1) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -11056,7 +8397,7 @@ func (m *TestVersion1) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11069,11 +8410,11 @@ func (m *TestVersion1) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -11090,7 +8431,7 @@ func (m *TestVersion1) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11103,11 +8444,11 @@ func (m *TestVersion1) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -11124,7 +8465,7 @@ func (m *TestVersion1) Unmarshal(dAtA []byte) error { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11144,7 +8485,7 @@ func (m *TestVersion1) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11157,11 +8498,11 @@ func (m *TestVersion1) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -11179,7 +8520,7 @@ func (m *TestVersion1) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11192,11 +8533,11 @@ func (m *TestVersion1) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -11215,7 +8556,7 @@ func (m *TestVersion1) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11228,11 +8569,11 @@ func (m *TestVersion1) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -11249,7 +8590,7 @@ func (m *TestVersion1) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11262,11 +8603,11 @@ func (m *TestVersion1) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -11280,15 +8621,15 @@ func (m *TestVersion1) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -11310,7 +8651,7 @@ func (m *TestVersion2) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11338,7 +8679,7 @@ func (m *TestVersion2) Unmarshal(dAtA []byte) error { m.X = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11357,7 +8698,7 @@ func (m *TestVersion2) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11370,11 +8711,11 @@ func (m *TestVersion2) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -11393,7 +8734,7 @@ func (m *TestVersion2) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11406,11 +8747,11 @@ func (m *TestVersion2) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -11429,7 +8770,7 @@ func (m *TestVersion2) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11442,11 +8783,11 @@ func (m *TestVersion2) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -11463,7 +8804,7 @@ func (m *TestVersion2) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11476,11 +8817,11 @@ func (m *TestVersion2) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -11497,7 +8838,7 @@ func (m *TestVersion2) Unmarshal(dAtA []byte) error { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11517,7 +8858,7 @@ func (m *TestVersion2) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11530,11 +8871,11 @@ func (m *TestVersion2) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -11552,7 +8893,7 @@ func (m *TestVersion2) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11565,11 +8906,11 @@ func (m *TestVersion2) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -11588,7 +8929,7 @@ func (m *TestVersion2) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11601,11 +8942,11 @@ func (m *TestVersion2) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -11622,7 +8963,7 @@ func (m *TestVersion2) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11635,11 +8976,11 @@ func (m *TestVersion2) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -11658,7 +8999,7 @@ func (m *TestVersion2) Unmarshal(dAtA []byte) error { m.NewField = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11672,15 +9013,15 @@ func (m *TestVersion2) Unmarshal(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -11702,7 +9043,7 @@ func (m *TestVersion3) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11730,7 +9071,7 @@ func (m *TestVersion3) Unmarshal(dAtA []byte) error { m.X = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11749,7 +9090,7 @@ func (m *TestVersion3) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11762,11 +9103,11 @@ func (m *TestVersion3) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -11785,7 +9126,7 @@ func (m *TestVersion3) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11798,11 +9139,11 @@ func (m *TestVersion3) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -11821,7 +9162,7 @@ func (m *TestVersion3) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11834,11 +9175,11 @@ func (m *TestVersion3) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -11855,7 +9196,7 @@ func (m *TestVersion3) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11868,11 +9209,11 @@ func (m *TestVersion3) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -11889,7 +9230,7 @@ func (m *TestVersion3) Unmarshal(dAtA []byte) error { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11909,7 +9250,7 @@ func (m *TestVersion3) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11922,11 +9263,11 @@ func (m *TestVersion3) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -11944,7 +9285,7 @@ func (m *TestVersion3) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11957,11 +9298,11 @@ func (m *TestVersion3) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -11980,7 +9321,7 @@ func (m *TestVersion3) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -11993,11 +9334,11 @@ func (m *TestVersion3) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -12014,7 +9355,7 @@ func (m *TestVersion3) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12027,11 +9368,11 @@ func (m *TestVersion3) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -12050,7 +9391,7 @@ func (m *TestVersion3) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12064,11 +9405,11 @@ func (m *TestVersion3) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -12077,15 +9418,15 @@ func (m *TestVersion3) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -12107,7 +9448,7 @@ func (m *TestVersion3LoneOneOfValue) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12135,7 +9476,7 @@ func (m *TestVersion3LoneOneOfValue) Unmarshal(dAtA []byte) error { m.X = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12154,7 +9495,7 @@ func (m *TestVersion3LoneOneOfValue) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12167,11 +9508,11 @@ func (m *TestVersion3LoneOneOfValue) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -12190,7 +9531,7 @@ func (m *TestVersion3LoneOneOfValue) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12203,11 +9544,11 @@ func (m *TestVersion3LoneOneOfValue) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -12226,7 +9567,7 @@ func (m *TestVersion3LoneOneOfValue) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12239,11 +9580,11 @@ func (m *TestVersion3LoneOneOfValue) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -12260,7 +9601,7 @@ func (m *TestVersion3LoneOneOfValue) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12273,11 +9614,11 @@ func (m *TestVersion3LoneOneOfValue) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -12294,7 +9635,7 @@ func (m *TestVersion3LoneOneOfValue) Unmarshal(dAtA []byte) error { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12314,7 +9655,7 @@ func (m *TestVersion3LoneOneOfValue) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12327,11 +9668,11 @@ func (m *TestVersion3LoneOneOfValue) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -12350,7 +9691,7 @@ func (m *TestVersion3LoneOneOfValue) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12363,11 +9704,11 @@ func (m *TestVersion3LoneOneOfValue) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -12384,7 +9725,7 @@ func (m *TestVersion3LoneOneOfValue) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12397,11 +9738,11 @@ func (m *TestVersion3LoneOneOfValue) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -12420,7 +9761,7 @@ func (m *TestVersion3LoneOneOfValue) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12434,11 +9775,11 @@ func (m *TestVersion3LoneOneOfValue) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -12447,15 +9788,15 @@ func (m *TestVersion3LoneOneOfValue) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -12477,7 +9818,7 @@ func (m *TestVersion3LoneNesting) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12505,7 +9846,7 @@ func (m *TestVersion3LoneNesting) Unmarshal(dAtA []byte) error { m.X = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12524,7 +9865,7 @@ func (m *TestVersion3LoneNesting) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12537,11 +9878,11 @@ func (m *TestVersion3LoneNesting) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -12560,7 +9901,7 @@ func (m *TestVersion3LoneNesting) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12573,11 +9914,11 @@ func (m *TestVersion3LoneNesting) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -12596,7 +9937,7 @@ func (m *TestVersion3LoneNesting) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12609,11 +9950,11 @@ func (m *TestVersion3LoneNesting) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -12630,7 +9971,7 @@ func (m *TestVersion3LoneNesting) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12643,11 +9984,11 @@ func (m *TestVersion3LoneNesting) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -12664,7 +10005,7 @@ func (m *TestVersion3LoneNesting) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12677,11 +10018,11 @@ func (m *TestVersion3LoneNesting) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -12699,7 +10040,7 @@ func (m *TestVersion3LoneNesting) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12712,11 +10053,11 @@ func (m *TestVersion3LoneNesting) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -12735,7 +10076,7 @@ func (m *TestVersion3LoneNesting) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12748,11 +10089,11 @@ func (m *TestVersion3LoneNesting) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -12769,7 +10110,7 @@ func (m *TestVersion3LoneNesting) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12782,11 +10123,11 @@ func (m *TestVersion3LoneNesting) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -12805,7 +10146,7 @@ func (m *TestVersion3LoneNesting) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12818,11 +10159,11 @@ func (m *TestVersion3LoneNesting) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -12841,7 +10182,7 @@ func (m *TestVersion3LoneNesting) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12854,11 +10195,11 @@ func (m *TestVersion3LoneNesting) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -12877,7 +10218,7 @@ func (m *TestVersion3LoneNesting) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12891,11 +10232,11 @@ func (m *TestVersion3LoneNesting) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -12904,15 +10245,15 @@ func (m *TestVersion3LoneNesting) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -12934,7 +10275,7 @@ func (m *TestVersion3LoneNesting_Inner1) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12962,7 +10303,7 @@ func (m *TestVersion3LoneNesting_Inner1) Unmarshal(dAtA []byte) error { m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12981,7 +10322,7 @@ func (m *TestVersion3LoneNesting_Inner1) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -12995,11 +10336,11 @@ func (m *TestVersion3LoneNesting_Inner1) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -13013,7 +10354,7 @@ func (m *TestVersion3LoneNesting_Inner1) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13026,11 +10367,11 @@ func (m *TestVersion3LoneNesting_Inner1) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -13044,15 +10385,15 @@ func (m *TestVersion3LoneNesting_Inner1) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -13074,7 +10415,7 @@ func (m *TestVersion3LoneNesting_Inner1_InnerInner) Unmarshal(dAtA []byte) error var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13102,7 +10443,7 @@ func (m *TestVersion3LoneNesting_Inner1_InnerInner) Unmarshal(dAtA []byte) error var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13116,11 +10457,11 @@ func (m *TestVersion3LoneNesting_Inner1_InnerInner) Unmarshal(dAtA []byte) error } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -13134,7 +10475,7 @@ func (m *TestVersion3LoneNesting_Inner1_InnerInner) Unmarshal(dAtA []byte) error var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13148,11 +10489,11 @@ func (m *TestVersion3LoneNesting_Inner1_InnerInner) Unmarshal(dAtA []byte) error } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -13161,15 +10502,15 @@ func (m *TestVersion3LoneNesting_Inner1_InnerInner) Unmarshal(dAtA []byte) error iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -13191,7 +10532,7 @@ func (m *TestVersion3LoneNesting_Inner2) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13219,7 +10560,7 @@ func (m *TestVersion3LoneNesting_Inner2) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13233,11 +10574,11 @@ func (m *TestVersion3LoneNesting_Inner2) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -13251,7 +10592,7 @@ func (m *TestVersion3LoneNesting_Inner2) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13265,11 +10606,11 @@ func (m *TestVersion3LoneNesting_Inner2) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -13283,7 +10624,7 @@ func (m *TestVersion3LoneNesting_Inner2) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13296,11 +10637,11 @@ func (m *TestVersion3LoneNesting_Inner2) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -13314,15 +10655,15 @@ func (m *TestVersion3LoneNesting_Inner2) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -13344,7 +10685,7 @@ func (m *TestVersion3LoneNesting_Inner2_InnerInner) Unmarshal(dAtA []byte) error var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13372,7 +10713,7 @@ func (m *TestVersion3LoneNesting_Inner2_InnerInner) Unmarshal(dAtA []byte) error var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13386,11 +10727,11 @@ func (m *TestVersion3LoneNesting_Inner2_InnerInner) Unmarshal(dAtA []byte) error } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -13404,7 +10745,7 @@ func (m *TestVersion3LoneNesting_Inner2_InnerInner) Unmarshal(dAtA []byte) error var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13418,11 +10759,11 @@ func (m *TestVersion3LoneNesting_Inner2_InnerInner) Unmarshal(dAtA []byte) error } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -13431,15 +10772,15 @@ func (m *TestVersion3LoneNesting_Inner2_InnerInner) Unmarshal(dAtA []byte) error iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -13461,7 +10802,7 @@ func (m *TestVersion4LoneNesting) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13489,7 +10830,7 @@ func (m *TestVersion4LoneNesting) Unmarshal(dAtA []byte) error { m.X = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13508,7 +10849,7 @@ func (m *TestVersion4LoneNesting) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13521,11 +10862,11 @@ func (m *TestVersion4LoneNesting) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -13544,7 +10885,7 @@ func (m *TestVersion4LoneNesting) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13557,11 +10898,11 @@ func (m *TestVersion4LoneNesting) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -13580,7 +10921,7 @@ func (m *TestVersion4LoneNesting) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13593,11 +10934,11 @@ func (m *TestVersion4LoneNesting) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -13614,7 +10955,7 @@ func (m *TestVersion4LoneNesting) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13627,11 +10968,11 @@ func (m *TestVersion4LoneNesting) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -13648,7 +10989,7 @@ func (m *TestVersion4LoneNesting) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13661,11 +11002,11 @@ func (m *TestVersion4LoneNesting) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -13683,7 +11024,7 @@ func (m *TestVersion4LoneNesting) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13696,11 +11037,11 @@ func (m *TestVersion4LoneNesting) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -13719,7 +11060,7 @@ func (m *TestVersion4LoneNesting) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13732,11 +11073,11 @@ func (m *TestVersion4LoneNesting) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -13753,7 +11094,7 @@ func (m *TestVersion4LoneNesting) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13766,11 +11107,11 @@ func (m *TestVersion4LoneNesting) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -13789,7 +11130,7 @@ func (m *TestVersion4LoneNesting) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13802,11 +11143,11 @@ func (m *TestVersion4LoneNesting) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -13825,7 +11166,7 @@ func (m *TestVersion4LoneNesting) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13838,11 +11179,11 @@ func (m *TestVersion4LoneNesting) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -13861,7 +11202,7 @@ func (m *TestVersion4LoneNesting) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13875,11 +11216,11 @@ func (m *TestVersion4LoneNesting) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -13888,15 +11229,15 @@ func (m *TestVersion4LoneNesting) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -13918,7 +11259,7 @@ func (m *TestVersion4LoneNesting_Inner1) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13946,7 +11287,7 @@ func (m *TestVersion4LoneNesting_Inner1) Unmarshal(dAtA []byte) error { m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13965,7 +11306,7 @@ func (m *TestVersion4LoneNesting_Inner1) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -13979,11 +11320,11 @@ func (m *TestVersion4LoneNesting_Inner1) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -13997,7 +11338,7 @@ func (m *TestVersion4LoneNesting_Inner1) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14010,11 +11351,11 @@ func (m *TestVersion4LoneNesting_Inner1) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -14028,15 +11369,15 @@ func (m *TestVersion4LoneNesting_Inner1) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -14058,7 +11399,7 @@ func (m *TestVersion4LoneNesting_Inner1_InnerInner) Unmarshal(dAtA []byte) error var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14086,7 +11427,7 @@ func (m *TestVersion4LoneNesting_Inner1_InnerInner) Unmarshal(dAtA []byte) error m.Id = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14105,7 +11446,7 @@ func (m *TestVersion4LoneNesting_Inner1_InnerInner) Unmarshal(dAtA []byte) error var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14119,11 +11460,11 @@ func (m *TestVersion4LoneNesting_Inner1_InnerInner) Unmarshal(dAtA []byte) error } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -14132,15 +11473,15 @@ func (m *TestVersion4LoneNesting_Inner1_InnerInner) Unmarshal(dAtA []byte) error iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -14162,7 +11503,7 @@ func (m *TestVersion4LoneNesting_Inner2) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14190,7 +11531,7 @@ func (m *TestVersion4LoneNesting_Inner2) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14204,11 +11545,11 @@ func (m *TestVersion4LoneNesting_Inner2) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -14222,7 +11563,7 @@ func (m *TestVersion4LoneNesting_Inner2) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14236,11 +11577,11 @@ func (m *TestVersion4LoneNesting_Inner2) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -14254,7 +11595,7 @@ func (m *TestVersion4LoneNesting_Inner2) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14267,11 +11608,11 @@ func (m *TestVersion4LoneNesting_Inner2) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -14285,15 +11626,15 @@ func (m *TestVersion4LoneNesting_Inner2) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -14315,7 +11656,7 @@ func (m *TestVersion4LoneNesting_Inner2_InnerInner) Unmarshal(dAtA []byte) error var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14343,7 +11684,7 @@ func (m *TestVersion4LoneNesting_Inner2_InnerInner) Unmarshal(dAtA []byte) error var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14357,11 +11698,11 @@ func (m *TestVersion4LoneNesting_Inner2_InnerInner) Unmarshal(dAtA []byte) error } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -14375,7 +11716,7 @@ func (m *TestVersion4LoneNesting_Inner2_InnerInner) Unmarshal(dAtA []byte) error m.Value = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14389,15 +11730,15 @@ func (m *TestVersion4LoneNesting_Inner2_InnerInner) Unmarshal(dAtA []byte) error } default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -14419,7 +11760,7 @@ func (m *TestVersionFD1) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14447,7 +11788,7 @@ func (m *TestVersionFD1) Unmarshal(dAtA []byte) error { m.X = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14466,7 +11807,7 @@ func (m *TestVersionFD1) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14479,11 +11820,11 @@ func (m *TestVersionFD1) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -14502,7 +11843,7 @@ func (m *TestVersionFD1) Unmarshal(dAtA []byte) error { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14522,7 +11863,7 @@ func (m *TestVersionFD1) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14535,11 +11876,11 @@ func (m *TestVersionFD1) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -14557,7 +11898,7 @@ func (m *TestVersionFD1) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14570,11 +11911,11 @@ func (m *TestVersionFD1) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -14593,7 +11934,7 @@ func (m *TestVersionFD1) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14606,11 +11947,11 @@ func (m *TestVersionFD1) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -14622,15 +11963,15 @@ func (m *TestVersionFD1) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -14652,7 +11993,7 @@ func (m *TestVersionFD1WithExtraAny) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14680,7 +12021,7 @@ func (m *TestVersionFD1WithExtraAny) Unmarshal(dAtA []byte) error { m.X = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14699,7 +12040,7 @@ func (m *TestVersionFD1WithExtraAny) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14712,11 +12053,11 @@ func (m *TestVersionFD1WithExtraAny) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -14735,7 +12076,7 @@ func (m *TestVersionFD1WithExtraAny) Unmarshal(dAtA []byte) error { var v int32 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14755,7 +12096,7 @@ func (m *TestVersionFD1WithExtraAny) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14768,11 +12109,11 @@ func (m *TestVersionFD1WithExtraAny) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -14790,7 +12131,7 @@ func (m *TestVersionFD1WithExtraAny) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14803,11 +12144,11 @@ func (m *TestVersionFD1WithExtraAny) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -14826,7 +12167,7 @@ func (m *TestVersionFD1WithExtraAny) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14839,11 +12180,11 @@ func (m *TestVersionFD1WithExtraAny) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -14855,15 +12196,15 @@ func (m *TestVersionFD1WithExtraAny) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -14885,7 +12226,7 @@ func (m *AnyWithExtra) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14913,7 +12254,7 @@ func (m *AnyWithExtra) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14926,11 +12267,11 @@ func (m *AnyWithExtra) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -14949,7 +12290,7 @@ func (m *AnyWithExtra) Unmarshal(dAtA []byte) error { m.B = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14968,7 +12309,7 @@ func (m *AnyWithExtra) Unmarshal(dAtA []byte) error { m.C = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -14982,15 +12323,15 @@ func (m *AnyWithExtra) Unmarshal(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -15012,7 +12353,7 @@ func (m *TestUpdatedTxRaw) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15040,7 +12381,7 @@ func (m *TestUpdatedTxRaw) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15053,11 +12394,11 @@ func (m *TestUpdatedTxRaw) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -15074,7 +12415,7 @@ func (m *TestUpdatedTxRaw) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15087,11 +12428,11 @@ func (m *TestUpdatedTxRaw) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -15108,7 +12449,7 @@ func (m *TestUpdatedTxRaw) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15121,11 +12462,11 @@ func (m *TestUpdatedTxRaw) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -15140,7 +12481,7 @@ func (m *TestUpdatedTxRaw) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15153,11 +12494,11 @@ func (m *TestUpdatedTxRaw) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -15174,7 +12515,7 @@ func (m *TestUpdatedTxRaw) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15187,11 +12528,11 @@ func (m *TestUpdatedTxRaw) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -15203,15 +12544,15 @@ func (m *TestUpdatedTxRaw) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -15233,7 +12574,7 @@ func (m *TestUpdatedTxBody) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15261,7 +12602,7 @@ func (m *TestUpdatedTxBody) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15274,11 +12615,11 @@ func (m *TestUpdatedTxBody) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -15295,7 +12636,7 @@ func (m *TestUpdatedTxBody) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15309,11 +12650,11 @@ func (m *TestUpdatedTxBody) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -15327,7 +12668,7 @@ func (m *TestUpdatedTxBody) Unmarshal(dAtA []byte) error { m.TimeoutHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15346,7 +12687,7 @@ func (m *TestUpdatedTxBody) Unmarshal(dAtA []byte) error { m.SomeNewField = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15365,7 +12706,7 @@ func (m *TestUpdatedTxBody) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15378,11 +12719,11 @@ func (m *TestUpdatedTxBody) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -15399,7 +12740,7 @@ func (m *TestUpdatedTxBody) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15413,11 +12754,11 @@ func (m *TestUpdatedTxBody) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -15431,7 +12772,7 @@ func (m *TestUpdatedTxBody) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15444,11 +12785,11 @@ func (m *TestUpdatedTxBody) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -15460,15 +12801,15 @@ func (m *TestUpdatedTxBody) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -15490,7 +12831,7 @@ func (m *TestUpdatedAuthInfo) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15518,7 +12859,7 @@ func (m *TestUpdatedAuthInfo) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15531,11 +12872,11 @@ func (m *TestUpdatedAuthInfo) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -15552,7 +12893,7 @@ func (m *TestUpdatedAuthInfo) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15565,11 +12906,11 @@ func (m *TestUpdatedAuthInfo) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -15588,7 +12929,7 @@ func (m *TestUpdatedAuthInfo) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15601,11 +12942,11 @@ func (m *TestUpdatedAuthInfo) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -15622,7 +12963,7 @@ func (m *TestUpdatedAuthInfo) Unmarshal(dAtA []byte) error { var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15635,11 +12976,11 @@ func (m *TestUpdatedAuthInfo) Unmarshal(dAtA []byte) error { } } if byteLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + byteLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -15651,15 +12992,15 @@ func (m *TestUpdatedAuthInfo) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -15681,7 +13022,7 @@ func (m *TestRepeatedUints) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15707,7 +13048,7 @@ func (m *TestRepeatedUints) Unmarshal(dAtA []byte) error { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15724,7 +13065,7 @@ func (m *TestRepeatedUints) Unmarshal(dAtA []byte) error { var packedLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15737,11 +13078,11 @@ func (m *TestRepeatedUints) Unmarshal(dAtA []byte) error { } } if packedLen < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } postIndex := iNdEx + packedLen if postIndex < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if postIndex > l { return io.ErrUnexpectedEOF @@ -15761,7 +13102,7 @@ func (m *TestRepeatedUints) Unmarshal(dAtA []byte) error { var v uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowProto + return ErrIntOverflowUnknonwnproto } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -15780,15 +13121,15 @@ func (m *TestRepeatedUints) Unmarshal(dAtA []byte) error { } default: iNdEx = preIndex - skippy, err := skipProto(dAtA[iNdEx:]) + skippy, err := skipUnknonwnproto(dAtA[iNdEx:]) if err != nil { return err } if skippy < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) < 0 { - return ErrInvalidLengthProto + return ErrInvalidLengthUnknonwnproto } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -15802,7 +13143,7 @@ func (m *TestRepeatedUints) Unmarshal(dAtA []byte) error { } return nil } -func skipProto(dAtA []byte) (n int, err error) { +func skipUnknonwnproto(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 @@ -15810,7 +13151,7 @@ func skipProto(dAtA []byte) (n int, err error) { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowProto + return 0, ErrIntOverflowUnknonwnproto } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -15827,7 +13168,7 @@ func skipProto(dAtA []byte) (n int, err error) { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowProto + return 0, ErrIntOverflowUnknonwnproto } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -15843,7 +13184,7 @@ func skipProto(dAtA []byte) (n int, err error) { var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowProto + return 0, ErrIntOverflowUnknonwnproto } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -15856,14 +13197,14 @@ func skipProto(dAtA []byte) (n int, err error) { } } if length < 0 { - return 0, ErrInvalidLengthProto + return 0, ErrInvalidLengthUnknonwnproto } iNdEx += length case 3: depth++ case 4: if depth == 0 { - return 0, ErrUnexpectedEndOfGroupProto + return 0, ErrUnexpectedEndOfGroupUnknonwnproto } depth-- case 5: @@ -15872,7 +13213,7 @@ func skipProto(dAtA []byte) (n int, err error) { return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { - return 0, ErrInvalidLengthProto + return 0, ErrInvalidLengthUnknonwnproto } if depth == 0 { return iNdEx, nil @@ -15882,7 +13223,7 @@ func skipProto(dAtA []byte) (n int, err error) { } var ( - ErrInvalidLengthProto = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowProto = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupProto = fmt.Errorf("proto: unexpected end of group") + ErrInvalidLengthUnknonwnproto = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowUnknonwnproto = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupUnknonwnproto = fmt.Errorf("proto: unexpected end of group") ) diff --git a/testutil/testdata/proto.proto b/testutil/testdata/unknonwnproto.proto similarity index 87% rename from testutil/testdata/proto.proto rename to testutil/testdata/unknonwnproto.proto index 154bd92be85f..a11773f92e0e 100644 --- a/testutil/testdata/proto.proto +++ b/testutil/testdata/unknonwnproto.proto @@ -7,72 +7,6 @@ import "cosmos/tx/v1beta1/tx.proto"; option go_package = "github.com/cosmos/cosmos-sdk/testutil/testdata"; -message Dog { - string size = 1; - string name = 2; -} - -message Cat { - string moniker = 1; - int32 lives = 2; -} - -message HasAnimal { - google.protobuf.Any animal = 1; - int64 x = 2; -} - -message HasHasAnimal { - google.protobuf.Any has_animal = 1; -} - -message HasHasHasAnimal { - google.protobuf.Any has_has_animal = 1; -} - -service TestService { - rpc Echo(EchoRequest) returns (EchoResponse); - rpc SayHello(SayHelloRequest) returns (SayHelloResponse); - rpc TestAny(TestAnyRequest) returns (TestAnyResponse); -} - -message EchoRequest { - string message = 1; -} - -message EchoResponse { - string message = 1; -} - -message SayHelloRequest { - string name = 1; -} - -message SayHelloResponse { - string greeting = 1; -} - -message TestAnyRequest { - google.protobuf.Any any_animal = 1; -} - -message TestAnyResponse { - HasAnimal has_animal = 1; -} - -// msg type for testing -message TestMsg { - option (gogoproto.goproto_getters) = false; - repeated string signers = 1; -} - -// bad MultiSignature with extra fields -message BadMultiSignature { - option (gogoproto.goproto_unrecognized) = true; - repeated bytes signatures = 1; - bytes malicious_field = 5; -} - message Customer1 { int32 id = 1; string name = 2; diff --git a/types/codec.go b/types/codec.go index 5d1bf40e4cf2..152bb9d724f5 100644 --- a/types/codec.go +++ b/types/codec.go @@ -14,4 +14,7 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { // RegisterInterfaces registers the sdk message type. func RegisterInterfaces(registry types.InterfaceRegistry) { registry.RegisterInterface("cosmos.base.v1beta1.Msg", (*Msg)(nil)) + // the interface name for MsgRequest is ServiceMsg because this is most useful for clients + // to understand - it will be the way for clients to introspect on available Msg service methods + registry.RegisterInterface("cosmos.base.v1beta1.ServiceMsg", (*MsgRequest)(nil)) } diff --git a/types/service_msg.go b/types/service_msg.go new file mode 100644 index 000000000000..61c0f15ab12a --- /dev/null +++ b/types/service_msg.go @@ -0,0 +1,58 @@ +package types + +import ( + "github.com/gogo/protobuf/proto" +) + +// MsgRequest is the interface a transaction message, defined as a proto +// service method, must fulfill. +type MsgRequest interface { + proto.Message + // ValidateBasic does a simple validation check that + // doesn't require access to any other information. + ValidateBasic() error + // Signers returns the addrs of signers that must sign. + // CONTRACT: All signatures must be present to be valid. + // CONTRACT: Returns addrs in some deterministic order. + GetSigners() []AccAddress +} + +// ServiceMsg is the struct into which an Any whose typeUrl matches a service +// method format (ex. `/cosmos.gov.Msg/SubmitProposal`) unpacks. +type ServiceMsg struct { + // MethodName is the fully-qualified service method name. + MethodName string + // Request is the request payload. + Request MsgRequest +} + +var _ Msg = ServiceMsg{} + +func (msg ServiceMsg) ProtoMessage() {} +func (msg ServiceMsg) Reset() {} +func (msg ServiceMsg) String() string { return "ServiceMsg" } + +// Route implements Msg.Route method. +func (msg ServiceMsg) Route() string { + return msg.MethodName +} + +// ValidateBasic implements Msg.ValidateBasic method. +func (msg ServiceMsg) ValidateBasic() error { + return msg.Request.ValidateBasic() +} + +// GetSignBytes implements Msg.GetSignBytes method. +func (msg ServiceMsg) GetSignBytes() []byte { + panic("ServiceMsg does not have a GetSignBytes method") +} + +// GetSigners implements Msg.GetSigners method. +func (msg ServiceMsg) GetSigners() []AccAddress { + return msg.Request.GetSigners() +} + +// Type implements Msg.Type method. +func (msg ServiceMsg) Type() string { + return msg.MethodName +} diff --git a/types/tx/tx.pb.go b/types/tx/tx.pb.go index 996ed527cb8c..aef71a802f08 100644 --- a/types/tx/tx.pb.go +++ b/types/tx/tx.pb.go @@ -5,6 +5,10 @@ package tx import ( fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + types "github.com/cosmos/cosmos-sdk/codec/types" types1 "github.com/cosmos/cosmos-sdk/crypto/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" @@ -12,9 +16,6 @@ import ( signing "github.com/cosmos/cosmos-sdk/types/tx/signing" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" - io "io" - math "math" - math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/types/tx/types.go b/types/tx/types.go index b5463c1bcc71..e9066ef41b42 100644 --- a/types/tx/types.go +++ b/types/tx/types.go @@ -1,7 +1,8 @@ package tx import ( - fmt "fmt" + "fmt" + "strings" "github.com/tendermint/tendermint/crypto" @@ -26,7 +27,15 @@ func (t *Tx) GetMsgs() []sdk.Msg { anys := t.Body.Messages res := make([]sdk.Msg, len(anys)) for i, any := range anys { - msg := any.GetCachedValue().(sdk.Msg) + var msg sdk.Msg + if isServiceMsg(any.TypeUrl) { + msg = sdk.ServiceMsg{ + MethodName: any.TypeUrl, + Request: any.GetCachedValue().(sdk.MsgRequest), + } + } else { + msg = any.GetCachedValue().(sdk.Msg) + } res[i] = msg } return res @@ -138,12 +147,23 @@ func (t *Tx) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { // UnpackInterfaces implements the UnpackInterfaceMessages.UnpackInterfaces method func (m *TxBody) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { for _, any := range m.Messages { - var msg sdk.Msg - err := unpacker.UnpackAny(any, &msg) - if err != nil { - return err + // If the any's typeUrl contains 2 slashes, then we unpack the any into + // a ServiceMsg struct as per ADR-031. + if isServiceMsg(any.TypeUrl) { + var req sdk.MsgRequest + err := unpacker.UnpackAny(any, &req) + if err != nil { + return err + } + } else { + var msg sdk.Msg + err := unpacker.UnpackAny(any, &msg) + if err != nil { + return err + } } } + return nil } @@ -168,3 +188,9 @@ func RegisterInterfaces(registry codectypes.InterfaceRegistry) { registry.RegisterInterface("cosmos.tx.v1beta1.Tx", (*sdk.Tx)(nil)) registry.RegisterImplementations((*sdk.Tx)(nil), &Tx{}) } + +// isServiceMsg checks if a type URL corresponds to a service method name, +// i.e. /cosmos.bank.Msg/Send vs /cosmos.bank.MsgSend +func isServiceMsg(typeURL string) bool { + return strings.Count(typeURL, "/") >= 2 +} diff --git a/x/auth/ante/testutil_test.go b/x/auth/ante/testutil_test.go index 5ab35b7f19a5..a6755d0c35af 100644 --- a/x/auth/ante/testutil_test.go +++ b/x/auth/ante/testutil_test.go @@ -54,8 +54,9 @@ func (suite *AnteTestSuite) SetupTest(isCheckTx bool) { // Set up TxConfig. encodingConfig := simapp.MakeEncodingConfig() - // We're using TestMsg amino encoding in some tests, so register it here. + // We're using TestMsg encoding in some tests, so register it here. encodingConfig.Amino.RegisterConcrete(&testdata.TestMsg{}, "testdata.TestMsg", nil) + testdata.RegisterInterfaces(encodingConfig.InterfaceRegistry) suite.clientCtx = client.Context{}. WithTxConfig(encodingConfig.TxConfig) diff --git a/x/auth/client/tx_test.go b/x/auth/client/tx_test.go index 66371fdc290c..7ab1597bc8e6 100644 --- a/x/auth/client/tx_test.go +++ b/x/auth/client/tx_test.go @@ -31,7 +31,7 @@ func TestParseQueryResponse(t *testing.T) { Result: &sdk.Result{Data: []byte("tx data"), Log: "log"}, } - bz, err := codec.ProtoMarshalJSON(simRes) + bz, err := codec.ProtoMarshalJSON(simRes, nil) require.NoError(t, err) res, err := authclient.ParseQueryResponse(bz) diff --git a/x/auth/tx/builder.go b/x/auth/tx/builder.go index 42645f375beb..b3697e70b262 100644 --- a/x/auth/tx/builder.go +++ b/x/auth/tx/builder.go @@ -205,10 +205,27 @@ func (w *wrapper) SetMsgs(msgs ...sdk.Msg) error { for i, msg := range msgs { var err error - anys[i], err = codectypes.NewAnyWithValue(msg) - if err != nil { - return err + switch msg := msg.(type) { + case sdk.ServiceMsg: + { + bz, err := proto.Marshal(msg.Request) + if err != nil { + return err + } + anys[i] = &codectypes.Any{ + TypeUrl: msg.MethodName, + Value: bz, + } + } + default: + { + anys[i], err = codectypes.NewAnyWithValue(msg) + if err != nil { + return err + } + } } + } w.tx.Body.Messages = anys diff --git a/x/auth/tx/config.go b/x/auth/tx/config.go index 5b6fc5abf618..b7ca179a84f3 100644 --- a/x/auth/tx/config.go +++ b/x/auth/tx/config.go @@ -29,7 +29,7 @@ func NewTxConfig(protoCodec *codec.ProtoCodec, enabledSignModes []signingtypes.S decoder: DefaultTxDecoder(protoCodec), encoder: DefaultTxEncoder(), jsonDecoder: DefaultJSONTxDecoder(protoCodec), - jsonEncoder: DefaultJSONTxEncoder(), + jsonEncoder: DefaultJSONTxEncoder(protoCodec), protoCodec: protoCodec, } } diff --git a/x/auth/tx/decoder.go b/x/auth/tx/decoder.go index 76129a3a1f2c..59ba8467ebde 100644 --- a/x/auth/tx/decoder.go +++ b/x/auth/tx/decoder.go @@ -14,7 +14,7 @@ func DefaultTxDecoder(cdc *codec.ProtoCodec) sdk.TxDecoder { var raw tx.TxRaw // reject all unknown proto fields in the root TxRaw - err := unknownproto.RejectUnknownFieldsStrict(txBytes, &raw) + err := unknownproto.RejectUnknownFieldsStrict(txBytes, &raw, cdc.InterfaceRegistry()) if err != nil { return nil, sdkerrors.Wrap(sdkerrors.ErrTxDecode, err.Error()) } @@ -27,7 +27,7 @@ func DefaultTxDecoder(cdc *codec.ProtoCodec) sdk.TxDecoder { var body tx.TxBody // allow non-critical unknown fields in TxBody - txBodyHasUnknownNonCriticals, err := unknownproto.RejectUnknownFields(raw.BodyBytes, &body, true) + txBodyHasUnknownNonCriticals, err := unknownproto.RejectUnknownFields(raw.BodyBytes, &body, true, cdc.InterfaceRegistry()) if err != nil { return nil, sdkerrors.Wrap(sdkerrors.ErrTxDecode, err.Error()) } @@ -40,7 +40,7 @@ func DefaultTxDecoder(cdc *codec.ProtoCodec) sdk.TxDecoder { var authInfo tx.AuthInfo // reject all unknown proto fields in AuthInfo - err = unknownproto.RejectUnknownFieldsStrict(raw.AuthInfoBytes, &authInfo) + err = unknownproto.RejectUnknownFieldsStrict(raw.AuthInfoBytes, &authInfo, cdc.InterfaceRegistry()) if err != nil { return nil, sdkerrors.Wrap(sdkerrors.ErrTxDecode, err.Error()) } diff --git a/x/auth/tx/encode_decode_test.go b/x/auth/tx/encode_decode_test.go index a509704ef4b3..55fff38c366f 100644 --- a/x/auth/tx/encode_decode_test.go +++ b/x/auth/tx/encode_decode_test.go @@ -15,7 +15,6 @@ import ( "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/testutil/testdata" - sdk "github.com/cosmos/cosmos-sdk/types" ) func TestDefaultTxDecoderError(t *testing.T) { @@ -32,9 +31,9 @@ func TestDefaultTxDecoderError(t *testing.T) { require.NoError(t, err) _, err = decoder(txBz) - require.EqualError(t, err, "no registered implementations of type types.Msg: tx parse error") + require.EqualError(t, err, "unable to resolve type URL /testdata.TestMsg: tx parse error") - registry.RegisterImplementations((*sdk.Msg)(nil), &testdata.TestMsg{}) + testdata.RegisterInterfaces(registry) _, err = decoder(txBz) require.NoError(t, err) } diff --git a/x/auth/tx/encoder.go b/x/auth/tx/encoder.go index f8889cb62fab..5655df7686d7 100644 --- a/x/auth/tx/encoder.go +++ b/x/auth/tx/encoder.go @@ -29,16 +29,16 @@ func DefaultTxEncoder() sdk.TxEncoder { } // DefaultJSONTxEncoder returns a default protobuf JSON TxEncoder using the provided Marshaler. -func DefaultJSONTxEncoder() sdk.TxEncoder { +func DefaultJSONTxEncoder(cdc *codec.ProtoCodec) sdk.TxEncoder { return func(tx sdk.Tx) ([]byte, error) { txWrapper, ok := tx.(*wrapper) if ok { - return codec.ProtoMarshalJSON(txWrapper.tx) + return cdc.MarshalJSON(txWrapper.tx) } protoTx, ok := tx.(*txtypes.Tx) if ok { - return codec.ProtoMarshalJSON(protoTx) + return cdc.MarshalJSON(protoTx) } return nil, fmt.Errorf("expected %T, got %T", &wrapper{}, tx) diff --git a/x/auth/tx/sigs.go b/x/auth/tx/sigs.go index 0f58ace4ffef..d0e43ede7526 100644 --- a/x/auth/tx/sigs.go +++ b/x/auth/tx/sigs.go @@ -125,7 +125,7 @@ func (g config) MarshalSignatureJSON(sigs []signing.SignatureV2) ([]byte, error) toJSON := &signing.SignatureDescriptors{Signatures: descs} - return codec.ProtoMarshalJSON(toJSON) + return codec.ProtoMarshalJSON(toJSON, nil) } func (g config) UnmarshalSignatureJSON(bz []byte) ([]signing.SignatureV2, error) { diff --git a/x/auth/types/codec.go b/x/auth/types/codec.go index beb14eab7ae7..629e2919d24d 100644 --- a/x/auth/types/codec.go +++ b/x/auth/types/codec.go @@ -30,7 +30,7 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { ) registry.RegisterInterface( - "cosmos.auth.GenesisAccount", + "cosmos.auth.v1beta1.GenesisAccount", (*GenesisAccount)(nil), &BaseAccount{}, &ModuleAccount{}, diff --git a/x/auth/vesting/types/codec.go b/x/auth/vesting/types/codec.go index 8abf56cd6bd5..f5652ea017e1 100644 --- a/x/auth/vesting/types/codec.go +++ b/x/auth/vesting/types/codec.go @@ -31,6 +31,7 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { registry.RegisterImplementations( (*authtypes.AccountI)(nil), + &BaseVestingAccount{}, &DelayedVestingAccount{}, &ContinuousVestingAccount{}, &PeriodicVestingAccount{}, @@ -38,6 +39,7 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { registry.RegisterImplementations( (*authtypes.GenesisAccount)(nil), + &BaseVestingAccount{}, &DelayedVestingAccount{}, &ContinuousVestingAccount{}, &PeriodicVestingAccount{}, diff --git a/x/bank/types/tx.pb.go b/x/bank/types/tx.pb.go index abc37dcf0ae7..a9e70007c389 100644 --- a/x/bank/types/tx.pb.go +++ b/x/bank/types/tx.pb.go @@ -70,6 +70,7 @@ func (m *MsgSend) XXX_DiscardUnknown() { var xxx_messageInfo_MsgSend proto.InternalMessageInfo +// MsgSendResponse defines the Msg/Send response type. type MsgSendResponse struct { } @@ -159,6 +160,7 @@ func (m *MsgMultiSend) GetOutputs() []Output { return nil } +// MsgMultiSendResponse defines the Msg/MultiSend response type. type MsgMultiSendResponse struct { } @@ -248,7 +250,9 @@ const _ = grpc.SupportPackageIsVersion4 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type MsgClient interface { + // Send defines a method for sending coins from one account to another account. Send(ctx context.Context, in *MsgSend, opts ...grpc.CallOption) (*MsgSendResponse, error) + // MultiSend defines a method for sending coins from some accounts to other accounts. MultiSend(ctx context.Context, in *MsgMultiSend, opts ...grpc.CallOption) (*MsgMultiSendResponse, error) } @@ -280,7 +284,9 @@ func (c *msgClient) MultiSend(ctx context.Context, in *MsgMultiSend, opts ...grp // MsgServer is the server API for Msg service. type MsgServer interface { + // Send defines a method for sending coins from one account to another account. Send(context.Context, *MsgSend) (*MsgSendResponse, error) + // MultiSend defines a method for sending coins from some accounts to other accounts. MultiSend(context.Context, *MsgMultiSend) (*MsgMultiSendResponse, error) }