From 8d7770a962faaed972998574375a554a6576627e Mon Sep 17 00:00:00 2001 From: Joshua Humphries Date: Mon, 22 Feb 2021 17:32:40 -0500 Subject: [PATCH] use latest version of protoreflect (#212) --- cmd/grpcurl/grpcurl.go | 15 +- desc_source.go | 22 +- desc_source_test.go | 14 +- format.go | 5 +- format_test.go | 6 +- go.mod | 7 +- go.sum | 33 + grpcurl.go | 54 +- grpcurl_test.go | 6 +- internal/testing/cmd/bankdemo/auth.go | 2 +- internal/testing/cmd/bankdemo/bank.go | 2 +- internal/testing/cmd/bankdemo/bank.pb.go | 1762 ++++++++++------- internal/testing/cmd/bankdemo/bank.proto | 2 +- internal/testing/cmd/bankdemo/chat.go | 8 +- internal/testing/cmd/bankdemo/db.go | 18 +- internal/testing/cmd/bankdemo/main.go | 2 +- internal/testing/cmd/bankdemo/support.pb.go | 1556 +++++++-------- internal/testing/cmd/bankdemo/support.proto | 2 +- internal/testing/cmd/testserver/testserver.go | 2 +- internal/testing/example.protoset | Bin 8958 -> 9002 bytes .../jsonpb_test_proto/test_objects.pb.go | 401 ++-- .../jsonpb_test_proto/test_objects.proto | 33 +- internal/testing/test.pb.go | 1160 +++++++---- internal/testing/test.proto | 2 + internal/testing/test.protoset | Bin 1835 -> 1848 bytes internal/testing/test_server.go | 2 +- invoke.go | 6 +- tls_settings_test.go | 2 +- 28 files changed, 3024 insertions(+), 2100 deletions(-) diff --git a/cmd/grpcurl/grpcurl.go b/cmd/grpcurl/grpcurl.go index 1da608a..b0e69a9 100644 --- a/cmd/grpcurl/grpcurl.go +++ b/cmd/grpcurl/grpcurl.go @@ -4,6 +4,7 @@ package main import ( + "context" "flag" "fmt" "io" @@ -13,11 +14,8 @@ import ( "strings" "time" - "github.com/fullstorydev/grpcurl" - descpb "github.com/golang/protobuf/protoc-gen-go/descriptor" "github.com/jhump/protoreflect/desc" "github.com/jhump/protoreflect/grpcreflect" - "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/credentials" @@ -25,11 +23,14 @@ import ( "google.golang.org/grpc/metadata" reflectpb "google.golang.org/grpc/reflection/grpc_reflection_v1alpha" "google.golang.org/grpc/status" + "google.golang.org/protobuf/types/descriptorpb" // Register gzip compressor so compressed responses will work _ "google.golang.org/grpc/encoding/gzip" // Register xds so xds and xds-experimental resolver schemes work _ "google.golang.org/grpc/xds" + + "github.com/fullstorydev/grpcurl" ) // To avoid confusion between program error codes and the gRPC resonse @@ -382,7 +383,9 @@ func main() { ctx := context.Background() if *maxTime > 0 { timeout := time.Duration(*maxTime * float64(time.Second)) - ctx, _ = context.WithTimeout(ctx, timeout) + var cancel context.CancelFunc + ctx, cancel = context.WithTimeout(ctx, timeout) + defer cancel() } dial := func() *grpc.ClientConn { @@ -603,7 +606,7 @@ func main() { } else { // see if it's a group for _, f := range parent.GetFields() { - if f.GetType() == descpb.FieldDescriptorProto_TYPE_GROUP && f.GetMessageType() == d { + if f.GetType() == descriptorpb.FieldDescriptorProto_TYPE_GROUP && f.GetMessageType() == d { // found it: describe the map field instead elementType = "the type of a group field" dsc = f @@ -614,7 +617,7 @@ func main() { } case *desc.FieldDescriptor: elementType = "a field" - if d.GetType() == descpb.FieldDescriptorProto_TYPE_GROUP { + if d.GetType() == descriptorpb.FieldDescriptorProto_TYPE_GROUP { elementType = "a group field" } else if d.IsExtension() { elementType = "an extension" diff --git a/desc_source.go b/desc_source.go index 635ddef..03caaf1 100644 --- a/desc_source.go +++ b/desc_source.go @@ -1,21 +1,21 @@ package grpcurl import ( + "context" "errors" "fmt" "io" "io/ioutil" "sync" - "github.com/golang/protobuf/proto" - descpb "github.com/golang/protobuf/protoc-gen-go/descriptor" + "github.com/golang/protobuf/proto" //lint:ignore SA1019 we have to import this because it appears in exported API "github.com/jhump/protoreflect/desc" "github.com/jhump/protoreflect/desc/protoparse" "github.com/jhump/protoreflect/dynamic" "github.com/jhump/protoreflect/grpcreflect" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + "google.golang.org/protobuf/types/descriptorpb" ) // ErrReflectionNotSupported is returned by DescriptorSource operations that @@ -39,13 +39,13 @@ type DescriptorSource interface { // DescriptorSourceFromProtoSets creates a DescriptorSource that is backed by the named files, whose contents // are encoded FileDescriptorSet protos. func DescriptorSourceFromProtoSets(fileNames ...string) (DescriptorSource, error) { - files := &descpb.FileDescriptorSet{} + files := &descriptorpb.FileDescriptorSet{} for _, fileName := range fileNames { b, err := ioutil.ReadFile(fileName) if err != nil { return nil, fmt.Errorf("could not load protoset file %q: %v", fileName, err) } - var fs descpb.FileDescriptorSet + var fs descriptorpb.FileDescriptorSet err = proto.Unmarshal(b, &fs) if err != nil { return nil, fmt.Errorf("could not parse contents of protoset file %q: %v", fileName, err) @@ -76,8 +76,8 @@ func DescriptorSourceFromProtoFiles(importPaths []string, fileNames ...string) ( } // DescriptorSourceFromFileDescriptorSet creates a DescriptorSource that is backed by the FileDescriptorSet. -func DescriptorSourceFromFileDescriptorSet(files *descpb.FileDescriptorSet) (DescriptorSource, error) { - unresolved := map[string]*descpb.FileDescriptorProto{} +func DescriptorSourceFromFileDescriptorSet(files *descriptorpb.FileDescriptorSet) (DescriptorSource, error) { + unresolved := map[string]*descriptorpb.FileDescriptorProto{} for _, fd := range files.File { unresolved[fd.GetName()] = fd } @@ -91,7 +91,7 @@ func DescriptorSourceFromFileDescriptorSet(files *descpb.FileDescriptorSet) (Des return &fileSource{files: resolved}, nil } -func resolveFileDescriptor(unresolved map[string]*descpb.FileDescriptorProto, resolved map[string]*desc.FileDescriptor, filename string) (*desc.FileDescriptor, error) { +func resolveFileDescriptor(unresolved map[string]*descriptorpb.FileDescriptorProto, resolved map[string]*desc.FileDescriptor, filename string) (*desc.FileDescriptor, error) { if r, ok := resolved[filename]; ok { return r, nil } @@ -275,12 +275,12 @@ func WriteProtoset(out io.Writer, descSource DescriptorSource, symbols ...string // now expand that to include transitive dependencies in topologically sorted // order (such that file always appears after its dependencies) expandedFiles := make(map[string]struct{}, len(fds)) - allFilesSlice := make([]*descpb.FileDescriptorProto, 0, len(fds)) + allFilesSlice := make([]*descriptorpb.FileDescriptorProto, 0, len(fds)) for _, filename := range filenames { allFilesSlice = addFilesToSet(allFilesSlice, expandedFiles, fds[filename]) } // now we can serialize to file - b, err := proto.Marshal(&descpb.FileDescriptorSet{File: allFilesSlice}) + b, err := proto.Marshal(&descriptorpb.FileDescriptorSet{File: allFilesSlice}) if err != nil { return fmt.Errorf("failed to serialize file descriptor set: %v", err) } @@ -290,7 +290,7 @@ func WriteProtoset(out io.Writer, descSource DescriptorSource, symbols ...string return nil } -func addFilesToSet(allFiles []*descpb.FileDescriptorProto, expanded map[string]struct{}, fd *desc.FileDescriptor) []*descpb.FileDescriptorProto { +func addFilesToSet(allFiles []*descriptorpb.FileDescriptorProto, expanded map[string]struct{}, fd *desc.FileDescriptor) []*descriptorpb.FileDescriptorProto { if _, ok := expanded[fd.GetName()]; ok { // already seen this one return allFiles diff --git a/desc_source_test.go b/desc_source_test.go index a9c9a8c..a40d6af 100644 --- a/desc_source_test.go +++ b/desc_source_test.go @@ -5,8 +5,8 @@ import ( "io/ioutil" "testing" - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/protoc-gen-go/descriptor" + "github.com/golang/protobuf/proto" //lint:ignore SA1019 we have to import this because it appears in exported API + "google.golang.org/protobuf/types/descriptorpb" ) func TestWriteProtoset(t *testing.T) { @@ -19,7 +19,7 @@ func TestWriteProtoset(t *testing.T) { t.Fatalf("failed to load test.protoset: %v", err) } - mergedProtoset := &descriptor.FileDescriptorSet{ + mergedProtoset := &descriptorpb.FileDescriptorSet{ File: append(exampleProtoset.File, testProtoset.File...), } @@ -33,25 +33,25 @@ func TestWriteProtoset(t *testing.T) { checkWriteProtoset(t, descSrc, mergedProtoset, "TestService", "testing.TestService") } -func loadProtoset(path string) (*descriptor.FileDescriptorSet, error) { +func loadProtoset(path string) (*descriptorpb.FileDescriptorSet, error) { b, err := ioutil.ReadFile(path) if err != nil { return nil, err } - var protoset descriptor.FileDescriptorSet + var protoset descriptorpb.FileDescriptorSet if err := proto.Unmarshal(b, &protoset); err != nil { return nil, err } return &protoset, nil } -func checkWriteProtoset(t *testing.T, descSrc DescriptorSource, protoset *descriptor.FileDescriptorSet, symbols ...string) { +func checkWriteProtoset(t *testing.T, descSrc DescriptorSource, protoset *descriptorpb.FileDescriptorSet, symbols ...string) { var buf bytes.Buffer if err := WriteProtoset(&buf, descSrc, symbols...); err != nil { t.Fatalf("failed to write protoset: %v", err) } - var result descriptor.FileDescriptorSet + var result descriptorpb.FileDescriptorSet if err := proto.Unmarshal(buf.Bytes(), &result); err != nil { t.Fatalf("failed to unmarshal written protoset: %v", err) } diff --git a/format.go b/format.go index 98d6a24..2f3d7d5 100644 --- a/format.go +++ b/format.go @@ -11,8 +11,8 @@ import ( "strings" "sync" - "github.com/golang/protobuf/jsonpb" - "github.com/golang/protobuf/proto" + "github.com/golang/protobuf/jsonpb" //lint:ignore SA1019 we have to import this because it appears in exported API + "github.com/golang/protobuf/proto" //lint:ignore SA1019 we have to import this because it appears in exported API "github.com/jhump/protoreflect/desc" "github.com/jhump/protoreflect/dynamic" "google.golang.org/grpc/codes" @@ -305,6 +305,7 @@ func (r anyResolverWithFallback) Resolve(typeUrl string) (proto.Message, error) if slash := strings.LastIndex(mname, "/"); slash >= 0 { mname = mname[slash+1:] } + //lint:ignore SA1019 new non-deprecated API requires other code changes; deferring... mt := proto.MessageType(mname) if mt != nil { return reflect.New(mt.Elem()).Interface().(proto.Message), nil diff --git a/format_test.go b/format_test.go index d7c509d..dd7454e 100644 --- a/format_test.go +++ b/format_test.go @@ -7,11 +7,11 @@ import ( "strings" "testing" - "github.com/golang/protobuf/jsonpb" - "github.com/golang/protobuf/proto" - "github.com/golang/protobuf/ptypes/struct" + "github.com/golang/protobuf/jsonpb" //lint:ignore SA1019 we have to import this because it appears in exported API + "github.com/golang/protobuf/proto" //lint:ignore SA1019 we have to import this because it appears in exported API "github.com/jhump/protoreflect/desc" "google.golang.org/grpc/metadata" + "google.golang.org/protobuf/types/known/structpb" ) func TestRequestParser(t *testing.T) { diff --git a/go.mod b/go.mod index fbf99ca..a7647a0 100644 --- a/go.mod +++ b/go.mod @@ -3,13 +3,14 @@ module github.com/fullstorydev/grpcurl go 1.13 require ( - github.com/golang/protobuf v1.3.5 + github.com/golang/protobuf v1.4.2 github.com/gordonklaus/ineffassign v0.0.0-20200309095847-7953dde2c7bf // indirect github.com/goreleaser/goreleaser v0.134.0 // indirect - github.com/jhump/protoreflect v1.6.1 + github.com/jhump/protoreflect v1.8.2 github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3 // indirect - golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e + golang.org/x/net v0.0.0-20200625001655-4c5254603344 google.golang.org/api v0.29.0 // indirect google.golang.org/grpc v1.30.0 + google.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12 honnef.co/go/tools v0.0.1-2020.1.4 // indirect ) diff --git a/go.sum b/go.sum index 8173527..c1bd178 100644 --- a/go.sum +++ b/go.sum @@ -149,6 +149,14 @@ github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5y github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5 h1:F768QJ1E9tib+q5Sc8MkdJi1RxLTbRcTf8LJV56aRls= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ= @@ -158,6 +166,8 @@ github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-github/v28 v28.1.1 h1:kORf5ekX5qwXO2mGzXXOjMe/g6ap8ahVe0sBEulhSxo= github.com/google/go-github/v28 v28.1.1/go.mod h1:bsqJWQX05omyWVmc00nEUql9mhQyv38lDZ8kPZcQVoM= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= @@ -217,6 +227,8 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/jarcoal/httpmock v1.0.5/go.mod h1:ATjnClrvW/3tijVmpL/va5Z3aAyGvqU3gCT8nX0Txik= github.com/jhump/protoreflect v1.6.1 h1:4/2yi5LyDPP7nN+Hiird1SAJ6YoxUm13/oxHGRnbPd8= github.com/jhump/protoreflect v1.6.1/go.mod h1:RZQ/lnuN+zqeRVpQigTwO6o0AJUkxbnSnpuG7toUTG4= +github.com/jhump/protoreflect v1.8.2 h1:k2xE7wcUomeqwY0LDCYA16y4WWfyTcMx5mKhk0d4ua0= +github.com/jhump/protoreflect v1.8.2/go.mod h1:7GcYQDdMU/O/BBrl/cX6PNHpXh6cenjd8pneu5yW7Tg= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -323,6 +335,7 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.opencensus.io v0.15.0/go.mod h1:UffZAU+4sDEINUGP/B7UfBBkq4fqLu9zXAX7ke6CHW0= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -344,6 +357,7 @@ golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -374,6 +388,8 @@ golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -400,6 +416,8 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b h1:0mm1VjtFUOIlE1SbDlwjYaDxZ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e h1:3G+cUijn7XD+S4eJFddp53Pv7+slrESplyjG25HgL+k= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344 h1:vGXIOMxbNfDTk/aXCmfdLgkrSV+Z2tcbze+pEc3v5W4= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be h1:vEDujvNQGv4jgYKudGeI/+DAX4Jffq6hpD55MmoEvKs= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -418,6 +436,7 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e h1:vcxGaoTs7kV8m5Np9uUNQin4 golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a h1:WXEvlFVvvGxCJLG6REjsT03iWnKLEWinaScsxF2Vm2o= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -493,6 +512,8 @@ golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b h1:zSzQJAznWxAh9fZxiPy2FZo golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375 h1:SjQ2+AKWgZLc1xej6WSzL+Dfs5Uyd5xcZH1mGC411IA= golang.org/x/tools v0.0.0-20200522201501-cb1345f3a375/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6 h1:nULzSsKgihxFGLnQFv2T7lE5vIhOtg8ZPpJHapEt7o0= +golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= @@ -544,6 +565,8 @@ google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940 h1:MRHtG0U6SnaUb+s+LhNE1qt1FQ1wlhqr5E4usBKC0uA= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -560,6 +583,16 @@ google.golang.org/grpc v1.29.0/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0 h1:M5a8xTlYTxwMn5ZFkwhRabsygDY5G8TYLyQDBxJNAxE= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12 h1:OwhZOOMuf7leLaSCuxtQ9FW7ui2L2L6UKOtKAUqovUQ= +google.golang.org/protobuf v1.25.1-0.20200805231151-a709e31e5d12/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/grpcurl.go b/grpcurl.go index 521fb1c..167cab0 100644 --- a/grpcurl.go +++ b/grpcurl.go @@ -8,6 +8,7 @@ package grpcurl import ( "bytes" + "context" "crypto/tls" "crypto/x509" "encoding/base64" @@ -20,18 +21,18 @@ import ( "sort" "strings" - "github.com/golang/protobuf/proto" - descpb "github.com/golang/protobuf/protoc-gen-go/descriptor" - "github.com/golang/protobuf/ptypes" - "github.com/golang/protobuf/ptypes/empty" - "github.com/golang/protobuf/ptypes/struct" + "github.com/golang/protobuf/proto" //lint:ignore SA1019 we have to import this because it appears in exported API "github.com/jhump/protoreflect/desc" "github.com/jhump/protoreflect/desc/protoprint" "github.com/jhump/protoreflect/dynamic" - "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/credentials" "google.golang.org/grpc/metadata" + protov2 "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/types/descriptorpb" + "google.golang.org/protobuf/types/known/anypb" + "google.golang.org/protobuf/types/known/emptypb" + "google.golang.org/protobuf/types/known/structpb" ) // ListServices uses the given descriptor source to return a sorted list of fully-qualified @@ -405,8 +406,9 @@ func makeTemplate(md *desc.MessageDescriptor, path []*desc.MessageDescriptor) pr case "google.protobuf.Any": // empty type URL is not allowed by JSON representation // so we must give it a dummy type - msg, _ := ptypes.MarshalAny(&empty.Empty{}) - return msg + var any anypb.Any + _ = anypb.MarshalFrom(&any, &emptypb.Empty{}, protov2.MarshalOptions{}) + return &any case "google.protobuf.Value": // unset kind is not allowed by JSON representation // so we must give it something @@ -461,42 +463,42 @@ func makeTemplate(md *desc.MessageDescriptor, path []*desc.MessageDescriptor) pr for _, fd := range dm.GetMessageDescriptor().GetFields() { if fd.IsRepeated() { switch fd.GetType() { - case descpb.FieldDescriptorProto_TYPE_FIXED32, - descpb.FieldDescriptorProto_TYPE_UINT32: + case descriptorpb.FieldDescriptorProto_TYPE_FIXED32, + descriptorpb.FieldDescriptorProto_TYPE_UINT32: dm.AddRepeatedField(fd, uint32(0)) - case descpb.FieldDescriptorProto_TYPE_SFIXED32, - descpb.FieldDescriptorProto_TYPE_SINT32, - descpb.FieldDescriptorProto_TYPE_INT32, - descpb.FieldDescriptorProto_TYPE_ENUM: + case descriptorpb.FieldDescriptorProto_TYPE_SFIXED32, + descriptorpb.FieldDescriptorProto_TYPE_SINT32, + descriptorpb.FieldDescriptorProto_TYPE_INT32, + descriptorpb.FieldDescriptorProto_TYPE_ENUM: dm.AddRepeatedField(fd, int32(0)) - case descpb.FieldDescriptorProto_TYPE_FIXED64, - descpb.FieldDescriptorProto_TYPE_UINT64: + case descriptorpb.FieldDescriptorProto_TYPE_FIXED64, + descriptorpb.FieldDescriptorProto_TYPE_UINT64: dm.AddRepeatedField(fd, uint64(0)) - case descpb.FieldDescriptorProto_TYPE_SFIXED64, - descpb.FieldDescriptorProto_TYPE_SINT64, - descpb.FieldDescriptorProto_TYPE_INT64: + case descriptorpb.FieldDescriptorProto_TYPE_SFIXED64, + descriptorpb.FieldDescriptorProto_TYPE_SINT64, + descriptorpb.FieldDescriptorProto_TYPE_INT64: dm.AddRepeatedField(fd, int64(0)) - case descpb.FieldDescriptorProto_TYPE_STRING: + case descriptorpb.FieldDescriptorProto_TYPE_STRING: dm.AddRepeatedField(fd, "") - case descpb.FieldDescriptorProto_TYPE_BYTES: + case descriptorpb.FieldDescriptorProto_TYPE_BYTES: dm.AddRepeatedField(fd, []byte{}) - case descpb.FieldDescriptorProto_TYPE_BOOL: + case descriptorpb.FieldDescriptorProto_TYPE_BOOL: dm.AddRepeatedField(fd, false) - case descpb.FieldDescriptorProto_TYPE_FLOAT: + case descriptorpb.FieldDescriptorProto_TYPE_FLOAT: dm.AddRepeatedField(fd, float32(0)) - case descpb.FieldDescriptorProto_TYPE_DOUBLE: + case descriptorpb.FieldDescriptorProto_TYPE_DOUBLE: dm.AddRepeatedField(fd, float64(0)) - case descpb.FieldDescriptorProto_TYPE_MESSAGE, - descpb.FieldDescriptorProto_TYPE_GROUP: + case descriptorpb.FieldDescriptorProto_TYPE_MESSAGE, + descriptorpb.FieldDescriptorProto_TYPE_GROUP: dm.AddRepeatedField(fd, makeTemplate(fd.GetMessageType(), path)) } } else if fd.GetMessageType() != nil { diff --git a/grpcurl_test.go b/grpcurl_test.go index dabde2d..b16b18d 100644 --- a/grpcurl_test.go +++ b/grpcurl_test.go @@ -1,6 +1,7 @@ package grpcurl_test import ( + "context" "encoding/json" "fmt" "io" @@ -11,11 +12,10 @@ import ( "testing" "time" - "github.com/golang/protobuf/jsonpb" - "github.com/golang/protobuf/proto" + "github.com/golang/protobuf/jsonpb" //lint:ignore SA1019 we have to import this because it appears in exported API + "github.com/golang/protobuf/proto" //lint:ignore SA1019 we have to import this because it appears in exported API "github.com/jhump/protoreflect/desc" "github.com/jhump/protoreflect/grpcreflect" - "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" diff --git a/internal/testing/cmd/bankdemo/auth.go b/internal/testing/cmd/bankdemo/auth.go index ce0bc07..0664cce 100644 --- a/internal/testing/cmd/bankdemo/auth.go +++ b/internal/testing/cmd/bankdemo/auth.go @@ -1,9 +1,9 @@ package main import ( + "context" "strings" - "golang.org/x/net/context" "google.golang.org/grpc/metadata" ) diff --git a/internal/testing/cmd/bankdemo/bank.go b/internal/testing/cmd/bankdemo/bank.go index 2971cc8..cfa041a 100644 --- a/internal/testing/cmd/bankdemo/bank.go +++ b/internal/testing/cmd/bankdemo/bank.go @@ -1,12 +1,12 @@ package main import ( + "context" "fmt" "time" "github.com/golang/protobuf/ptypes" "github.com/golang/protobuf/ptypes/empty" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" ) diff --git a/internal/testing/cmd/bankdemo/bank.pb.go b/internal/testing/cmd/bankdemo/bank.pb.go index c5fe017..43f86ba 100644 --- a/internal/testing/cmd/bankdemo/bank.pb.go +++ b/internal/testing/cmd/bankdemo/bank.pb.go @@ -1,29 +1,35 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0-devel +// protoc v3.14.0 // source: bank.proto package main -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import empty "github.com/golang/protobuf/ptypes/empty" -import timestamp "github.com/golang/protobuf/ptypes/timestamp" - import ( - context "golang.org/x/net/context" + context "context" + proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + emptypb "google.golang.org/protobuf/types/known/emptypb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) -// 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.ProtoPackageIsVersion2 // please upgrade the proto package +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 type Account_Type int32 @@ -37,30 +43,53 @@ const ( Account_EQUITIES Account_Type = 6 ) -var Account_Type_name = map[int32]string{ - 0: "UNKNOWN", - 1: "CHECKING", - 2: "SAVING", - 3: "MONEY_MARKET", - 4: "LINE_OF_CREDIT", - 5: "LOAN", - 6: "EQUITIES", -} -var Account_Type_value = map[string]int32{ - "UNKNOWN": 0, - "CHECKING": 1, - "SAVING": 2, - "MONEY_MARKET": 3, - "LINE_OF_CREDIT": 4, - "LOAN": 5, - "EQUITIES": 6, +// Enum value maps for Account_Type. +var ( + Account_Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "CHECKING", + 2: "SAVING", + 3: "MONEY_MARKET", + 4: "LINE_OF_CREDIT", + 5: "LOAN", + 6: "EQUITIES", + } + Account_Type_value = map[string]int32{ + "UNKNOWN": 0, + "CHECKING": 1, + "SAVING": 2, + "MONEY_MARKET": 3, + "LINE_OF_CREDIT": 4, + "LOAN": 5, + "EQUITIES": 6, + } +) + +func (x Account_Type) Enum() *Account_Type { + p := new(Account_Type) + *p = x + return p } func (x Account_Type) String() string { - return proto.EnumName(Account_Type_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Account_Type) Descriptor() protoreflect.EnumDescriptor { + return file_bank_proto_enumTypes[0].Descriptor() } + +func (Account_Type) Type() protoreflect.EnumType { + return &file_bank_proto_enumTypes[0] +} + +func (x Account_Type) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Account_Type.Descriptor instead. func (Account_Type) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_bank_485eb966c3eae5d1, []int{3, 0} + return file_bank_proto_rawDescGZIP(), []int{3, 0} } type DepositRequest_Source int32 @@ -73,856 +102,1259 @@ const ( DepositRequest_WIRE DepositRequest_Source = 4 ) -var DepositRequest_Source_name = map[int32]string{ - 0: "UNKNOWN", - 1: "CASH", - 2: "CHECK", - 3: "ACH", - 4: "WIRE", -} -var DepositRequest_Source_value = map[string]int32{ - "UNKNOWN": 0, - "CASH": 1, - "CHECK": 2, - "ACH": 3, - "WIRE": 4, +// Enum value maps for DepositRequest_Source. +var ( + DepositRequest_Source_name = map[int32]string{ + 0: "UNKNOWN", + 1: "CASH", + 2: "CHECK", + 3: "ACH", + 4: "WIRE", + } + DepositRequest_Source_value = map[string]int32{ + "UNKNOWN": 0, + "CASH": 1, + "CHECK": 2, + "ACH": 3, + "WIRE": 4, + } +) + +func (x DepositRequest_Source) Enum() *DepositRequest_Source { + p := new(DepositRequest_Source) + *p = x + return p } func (x DepositRequest_Source) String() string { - return proto.EnumName(DepositRequest_Source_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (DepositRequest_Source) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_bank_485eb966c3eae5d1, []int{6, 0} + +func (DepositRequest_Source) Descriptor() protoreflect.EnumDescriptor { + return file_bank_proto_enumTypes[1].Descriptor() } -type OpenAccountRequest struct { - InitialDepositCents int32 `protobuf:"varint,1,opt,name=initial_deposit_cents,json=initialDepositCents,proto3" json:"initial_deposit_cents,omitempty"` - Type Account_Type `protobuf:"varint,2,opt,name=type,proto3,enum=Account_Type" json:"type,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (DepositRequest_Source) Type() protoreflect.EnumType { + return &file_bank_proto_enumTypes[1] } -func (m *OpenAccountRequest) Reset() { *m = OpenAccountRequest{} } -func (m *OpenAccountRequest) String() string { return proto.CompactTextString(m) } -func (*OpenAccountRequest) ProtoMessage() {} -func (*OpenAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bank_485eb966c3eae5d1, []int{0} +func (x DepositRequest_Source) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (m *OpenAccountRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_OpenAccountRequest.Unmarshal(m, b) + +// Deprecated: Use DepositRequest_Source.Descriptor instead. +func (DepositRequest_Source) EnumDescriptor() ([]byte, []int) { + return file_bank_proto_rawDescGZIP(), []int{6, 0} } -func (m *OpenAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_OpenAccountRequest.Marshal(b, m, deterministic) + +type OpenAccountRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InitialDepositCents int32 `protobuf:"varint,1,opt,name=initial_deposit_cents,json=initialDepositCents,proto3" json:"initial_deposit_cents,omitempty"` + Type Account_Type `protobuf:"varint,2,opt,name=type,proto3,enum=Account_Type" json:"type,omitempty"` } -func (dst *OpenAccountRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_OpenAccountRequest.Merge(dst, src) + +func (x *OpenAccountRequest) Reset() { + *x = OpenAccountRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_bank_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *OpenAccountRequest) XXX_Size() int { - return xxx_messageInfo_OpenAccountRequest.Size(m) + +func (x *OpenAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *OpenAccountRequest) XXX_DiscardUnknown() { - xxx_messageInfo_OpenAccountRequest.DiscardUnknown(m) + +func (*OpenAccountRequest) ProtoMessage() {} + +func (x *OpenAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_bank_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_OpenAccountRequest proto.InternalMessageInfo +// Deprecated: Use OpenAccountRequest.ProtoReflect.Descriptor instead. +func (*OpenAccountRequest) Descriptor() ([]byte, []int) { + return file_bank_proto_rawDescGZIP(), []int{0} +} -func (m *OpenAccountRequest) GetInitialDepositCents() int32 { - if m != nil { - return m.InitialDepositCents +func (x *OpenAccountRequest) GetInitialDepositCents() int32 { + if x != nil { + return x.InitialDepositCents } return 0 } -func (m *OpenAccountRequest) GetType() Account_Type { - if m != nil { - return m.Type +func (x *OpenAccountRequest) GetType() Account_Type { + if x != nil { + return x.Type } return Account_UNKNOWN } type CloseAccountRequest struct { - AccountNumber uint64 `protobuf:"varint,1,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *CloseAccountRequest) Reset() { *m = CloseAccountRequest{} } -func (m *CloseAccountRequest) String() string { return proto.CompactTextString(m) } -func (*CloseAccountRequest) ProtoMessage() {} -func (*CloseAccountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bank_485eb966c3eae5d1, []int{1} -} -func (m *CloseAccountRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_CloseAccountRequest.Unmarshal(m, b) -} -func (m *CloseAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_CloseAccountRequest.Marshal(b, m, deterministic) + AccountNumber uint64 `protobuf:"varint,1,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` } -func (dst *CloseAccountRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_CloseAccountRequest.Merge(dst, src) + +func (x *CloseAccountRequest) Reset() { + *x = CloseAccountRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_bank_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *CloseAccountRequest) XXX_Size() int { - return xxx_messageInfo_CloseAccountRequest.Size(m) + +func (x *CloseAccountRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *CloseAccountRequest) XXX_DiscardUnknown() { - xxx_messageInfo_CloseAccountRequest.DiscardUnknown(m) + +func (*CloseAccountRequest) ProtoMessage() {} + +func (x *CloseAccountRequest) ProtoReflect() protoreflect.Message { + mi := &file_bank_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_CloseAccountRequest proto.InternalMessageInfo +// Deprecated: Use CloseAccountRequest.ProtoReflect.Descriptor instead. +func (*CloseAccountRequest) Descriptor() ([]byte, []int) { + return file_bank_proto_rawDescGZIP(), []int{1} +} -func (m *CloseAccountRequest) GetAccountNumber() uint64 { - if m != nil { - return m.AccountNumber +func (x *CloseAccountRequest) GetAccountNumber() uint64 { + if x != nil { + return x.AccountNumber } return 0 } type GetAccountsResponse struct { - Accounts []*Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *GetAccountsResponse) Reset() { *m = GetAccountsResponse{} } -func (m *GetAccountsResponse) String() string { return proto.CompactTextString(m) } -func (*GetAccountsResponse) ProtoMessage() {} -func (*GetAccountsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bank_485eb966c3eae5d1, []int{2} + Accounts []*Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` } -func (m *GetAccountsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetAccountsResponse.Unmarshal(m, b) -} -func (m *GetAccountsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetAccountsResponse.Marshal(b, m, deterministic) -} -func (dst *GetAccountsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetAccountsResponse.Merge(dst, src) + +func (x *GetAccountsResponse) Reset() { + *x = GetAccountsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_bank_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *GetAccountsResponse) XXX_Size() int { - return xxx_messageInfo_GetAccountsResponse.Size(m) + +func (x *GetAccountsResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetAccountsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetAccountsResponse.DiscardUnknown(m) + +func (*GetAccountsResponse) ProtoMessage() {} + +func (x *GetAccountsResponse) ProtoReflect() protoreflect.Message { + mi := &file_bank_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_GetAccountsResponse proto.InternalMessageInfo +// Deprecated: Use GetAccountsResponse.ProtoReflect.Descriptor instead. +func (*GetAccountsResponse) Descriptor() ([]byte, []int) { + return file_bank_proto_rawDescGZIP(), []int{2} +} -func (m *GetAccountsResponse) GetAccounts() []*Account { - if m != nil { - return m.Accounts +func (x *GetAccountsResponse) GetAccounts() []*Account { + if x != nil { + return x.Accounts } return nil } type Account struct { - AccountNumber uint64 `protobuf:"varint,1,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` - Type Account_Type `protobuf:"varint,2,opt,name=type,proto3,enum=Account_Type" json:"type,omitempty"` - BalanceCents int32 `protobuf:"varint,3,opt,name=balance_cents,json=balanceCents,proto3" json:"balance_cents,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *Account) Reset() { *m = Account{} } -func (m *Account) String() string { return proto.CompactTextString(m) } -func (*Account) ProtoMessage() {} -func (*Account) Descriptor() ([]byte, []int) { - return fileDescriptor_bank_485eb966c3eae5d1, []int{3} -} -func (m *Account) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Account.Unmarshal(m, b) + AccountNumber uint64 `protobuf:"varint,1,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` + Type Account_Type `protobuf:"varint,2,opt,name=type,proto3,enum=Account_Type" json:"type,omitempty"` + BalanceCents int32 `protobuf:"varint,3,opt,name=balance_cents,json=balanceCents,proto3" json:"balance_cents,omitempty"` } -func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Account.Marshal(b, m, deterministic) -} -func (dst *Account) XXX_Merge(src proto.Message) { - xxx_messageInfo_Account.Merge(dst, src) + +func (x *Account) Reset() { + *x = Account{} + if protoimpl.UnsafeEnabled { + mi := &file_bank_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Account) XXX_Size() int { - return xxx_messageInfo_Account.Size(m) + +func (x *Account) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Account) XXX_DiscardUnknown() { - xxx_messageInfo_Account.DiscardUnknown(m) + +func (*Account) ProtoMessage() {} + +func (x *Account) ProtoReflect() protoreflect.Message { + mi := &file_bank_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Account proto.InternalMessageInfo +// Deprecated: Use Account.ProtoReflect.Descriptor instead. +func (*Account) Descriptor() ([]byte, []int) { + return file_bank_proto_rawDescGZIP(), []int{3} +} -func (m *Account) GetAccountNumber() uint64 { - if m != nil { - return m.AccountNumber +func (x *Account) GetAccountNumber() uint64 { + if x != nil { + return x.AccountNumber } return 0 } -func (m *Account) GetType() Account_Type { - if m != nil { - return m.Type +func (x *Account) GetType() Account_Type { + if x != nil { + return x.Type } return Account_UNKNOWN } -func (m *Account) GetBalanceCents() int32 { - if m != nil { - return m.BalanceCents +func (x *Account) GetBalanceCents() int32 { + if x != nil { + return x.BalanceCents } return 0 } type GetTransactionsRequest struct { - AccountNumber uint64 `protobuf:"varint,1,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` - Start *timestamp.Timestamp `protobuf:"bytes,2,opt,name=start,proto3" json:"start,omitempty"` - End *timestamp.Timestamp `protobuf:"bytes,3,opt,name=end,proto3" json:"end,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *GetTransactionsRequest) Reset() { *m = GetTransactionsRequest{} } -func (m *GetTransactionsRequest) String() string { return proto.CompactTextString(m) } -func (*GetTransactionsRequest) ProtoMessage() {} -func (*GetTransactionsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bank_485eb966c3eae5d1, []int{4} -} -func (m *GetTransactionsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetTransactionsRequest.Unmarshal(m, b) -} -func (m *GetTransactionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetTransactionsRequest.Marshal(b, m, deterministic) + AccountNumber uint64 `protobuf:"varint,1,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` + Start *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start,proto3" json:"start,omitempty"` + End *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=end,proto3" json:"end,omitempty"` } -func (dst *GetTransactionsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetTransactionsRequest.Merge(dst, src) + +func (x *GetTransactionsRequest) Reset() { + *x = GetTransactionsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_bank_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *GetTransactionsRequest) XXX_Size() int { - return xxx_messageInfo_GetTransactionsRequest.Size(m) + +func (x *GetTransactionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *GetTransactionsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetTransactionsRequest.DiscardUnknown(m) + +func (*GetTransactionsRequest) ProtoMessage() {} + +func (x *GetTransactionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_bank_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_GetTransactionsRequest proto.InternalMessageInfo +// Deprecated: Use GetTransactionsRequest.ProtoReflect.Descriptor instead. +func (*GetTransactionsRequest) Descriptor() ([]byte, []int) { + return file_bank_proto_rawDescGZIP(), []int{4} +} -func (m *GetTransactionsRequest) GetAccountNumber() uint64 { - if m != nil { - return m.AccountNumber +func (x *GetTransactionsRequest) GetAccountNumber() uint64 { + if x != nil { + return x.AccountNumber } return 0 } -func (m *GetTransactionsRequest) GetStart() *timestamp.Timestamp { - if m != nil { - return m.Start +func (x *GetTransactionsRequest) GetStart() *timestamppb.Timestamp { + if x != nil { + return x.Start } return nil } -func (m *GetTransactionsRequest) GetEnd() *timestamp.Timestamp { - if m != nil { - return m.End +func (x *GetTransactionsRequest) GetEnd() *timestamppb.Timestamp { + if x != nil { + return x.End } return nil } type Transaction struct { - AccountNumber uint64 `protobuf:"varint,1,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` - SeqNumber uint64 `protobuf:"varint,2,opt,name=seq_number,json=seqNumber,proto3" json:"seq_number,omitempty"` - Date *timestamp.Timestamp `protobuf:"bytes,3,opt,name=date,proto3" json:"date,omitempty"` - AmountCents int32 `protobuf:"varint,4,opt,name=amount_cents,json=amountCents,proto3" json:"amount_cents,omitempty"` - Desc string `protobuf:"bytes,5,opt,name=desc,proto3" json:"desc,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Transaction) Reset() { *m = Transaction{} } -func (m *Transaction) String() string { return proto.CompactTextString(m) } -func (*Transaction) ProtoMessage() {} -func (*Transaction) Descriptor() ([]byte, []int) { - return fileDescriptor_bank_485eb966c3eae5d1, []int{5} -} -func (m *Transaction) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Transaction.Unmarshal(m, b) -} -func (m *Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Transaction.Marshal(b, m, deterministic) + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccountNumber uint64 `protobuf:"varint,1,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` + SeqNumber uint64 `protobuf:"varint,2,opt,name=seq_number,json=seqNumber,proto3" json:"seq_number,omitempty"` + Date *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=date,proto3" json:"date,omitempty"` + AmountCents int32 `protobuf:"varint,4,opt,name=amount_cents,json=amountCents,proto3" json:"amount_cents,omitempty"` + Desc string `protobuf:"bytes,5,opt,name=desc,proto3" json:"desc,omitempty"` } -func (dst *Transaction) XXX_Merge(src proto.Message) { - xxx_messageInfo_Transaction.Merge(dst, src) + +func (x *Transaction) Reset() { + *x = Transaction{} + if protoimpl.UnsafeEnabled { + mi := &file_bank_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Transaction) XXX_Size() int { - return xxx_messageInfo_Transaction.Size(m) + +func (x *Transaction) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Transaction) XXX_DiscardUnknown() { - xxx_messageInfo_Transaction.DiscardUnknown(m) + +func (*Transaction) ProtoMessage() {} + +func (x *Transaction) ProtoReflect() protoreflect.Message { + mi := &file_bank_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Transaction proto.InternalMessageInfo +// Deprecated: Use Transaction.ProtoReflect.Descriptor instead. +func (*Transaction) Descriptor() ([]byte, []int) { + return file_bank_proto_rawDescGZIP(), []int{5} +} -func (m *Transaction) GetAccountNumber() uint64 { - if m != nil { - return m.AccountNumber +func (x *Transaction) GetAccountNumber() uint64 { + if x != nil { + return x.AccountNumber } return 0 } -func (m *Transaction) GetSeqNumber() uint64 { - if m != nil { - return m.SeqNumber +func (x *Transaction) GetSeqNumber() uint64 { + if x != nil { + return x.SeqNumber } return 0 } -func (m *Transaction) GetDate() *timestamp.Timestamp { - if m != nil { - return m.Date +func (x *Transaction) GetDate() *timestamppb.Timestamp { + if x != nil { + return x.Date } return nil } -func (m *Transaction) GetAmountCents() int32 { - if m != nil { - return m.AmountCents +func (x *Transaction) GetAmountCents() int32 { + if x != nil { + return x.AmountCents } return 0 } -func (m *Transaction) GetDesc() string { - if m != nil { - return m.Desc +func (x *Transaction) GetDesc() string { + if x != nil { + return x.Desc } return "" } type DepositRequest struct { - AccountNumber uint64 `protobuf:"varint,1,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` - AmountCents int32 `protobuf:"varint,2,opt,name=amount_cents,json=amountCents,proto3" json:"amount_cents,omitempty"` - Source DepositRequest_Source `protobuf:"varint,3,opt,name=source,proto3,enum=DepositRequest_Source" json:"source,omitempty"` - Desc string `protobuf:"bytes,4,opt,name=desc,proto3" json:"desc,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DepositRequest) Reset() { *m = DepositRequest{} } -func (m *DepositRequest) String() string { return proto.CompactTextString(m) } -func (*DepositRequest) ProtoMessage() {} -func (*DepositRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bank_485eb966c3eae5d1, []int{6} -} -func (m *DepositRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DepositRequest.Unmarshal(m, b) -} -func (m *DepositRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DepositRequest.Marshal(b, m, deterministic) + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AccountNumber uint64 `protobuf:"varint,1,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` + AmountCents int32 `protobuf:"varint,2,opt,name=amount_cents,json=amountCents,proto3" json:"amount_cents,omitempty"` + Source DepositRequest_Source `protobuf:"varint,3,opt,name=source,proto3,enum=DepositRequest_Source" json:"source,omitempty"` + Desc string `protobuf:"bytes,4,opt,name=desc,proto3" json:"desc,omitempty"` } -func (dst *DepositRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DepositRequest.Merge(dst, src) + +func (x *DepositRequest) Reset() { + *x = DepositRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_bank_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *DepositRequest) XXX_Size() int { - return xxx_messageInfo_DepositRequest.Size(m) + +func (x *DepositRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DepositRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DepositRequest.DiscardUnknown(m) + +func (*DepositRequest) ProtoMessage() {} + +func (x *DepositRequest) ProtoReflect() protoreflect.Message { + mi := &file_bank_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_DepositRequest proto.InternalMessageInfo +// Deprecated: Use DepositRequest.ProtoReflect.Descriptor instead. +func (*DepositRequest) Descriptor() ([]byte, []int) { + return file_bank_proto_rawDescGZIP(), []int{6} +} -func (m *DepositRequest) GetAccountNumber() uint64 { - if m != nil { - return m.AccountNumber +func (x *DepositRequest) GetAccountNumber() uint64 { + if x != nil { + return x.AccountNumber } return 0 } -func (m *DepositRequest) GetAmountCents() int32 { - if m != nil { - return m.AmountCents +func (x *DepositRequest) GetAmountCents() int32 { + if x != nil { + return x.AmountCents } return 0 } -func (m *DepositRequest) GetSource() DepositRequest_Source { - if m != nil { - return m.Source +func (x *DepositRequest) GetSource() DepositRequest_Source { + if x != nil { + return x.Source } return DepositRequest_UNKNOWN } -func (m *DepositRequest) GetDesc() string { - if m != nil { - return m.Desc +func (x *DepositRequest) GetDesc() string { + if x != nil { + return x.Desc } return "" } type BalanceResponse struct { - AccountNumber uint64 `protobuf:"varint,1,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` - BalanceCents int32 `protobuf:"varint,2,opt,name=balance_cents,json=balanceCents,proto3" json:"balance_cents,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *BalanceResponse) Reset() { *m = BalanceResponse{} } -func (m *BalanceResponse) String() string { return proto.CompactTextString(m) } -func (*BalanceResponse) ProtoMessage() {} -func (*BalanceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bank_485eb966c3eae5d1, []int{7} -} -func (m *BalanceResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BalanceResponse.Unmarshal(m, b) + AccountNumber uint64 `protobuf:"varint,1,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` + BalanceCents int32 `protobuf:"varint,2,opt,name=balance_cents,json=balanceCents,proto3" json:"balance_cents,omitempty"` } -func (m *BalanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BalanceResponse.Marshal(b, m, deterministic) -} -func (dst *BalanceResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_BalanceResponse.Merge(dst, src) + +func (x *BalanceResponse) Reset() { + *x = BalanceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_bank_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *BalanceResponse) XXX_Size() int { - return xxx_messageInfo_BalanceResponse.Size(m) + +func (x *BalanceResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *BalanceResponse) XXX_DiscardUnknown() { - xxx_messageInfo_BalanceResponse.DiscardUnknown(m) + +func (*BalanceResponse) ProtoMessage() {} + +func (x *BalanceResponse) ProtoReflect() protoreflect.Message { + mi := &file_bank_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_BalanceResponse proto.InternalMessageInfo +// Deprecated: Use BalanceResponse.ProtoReflect.Descriptor instead. +func (*BalanceResponse) Descriptor() ([]byte, []int) { + return file_bank_proto_rawDescGZIP(), []int{7} +} -func (m *BalanceResponse) GetAccountNumber() uint64 { - if m != nil { - return m.AccountNumber +func (x *BalanceResponse) GetAccountNumber() uint64 { + if x != nil { + return x.AccountNumber } return 0 } -func (m *BalanceResponse) GetBalanceCents() int32 { - if m != nil { - return m.BalanceCents +func (x *BalanceResponse) GetBalanceCents() int32 { + if x != nil { + return x.BalanceCents } return 0 } type WithdrawRequest struct { - AccountNumber uint64 `protobuf:"varint,1,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` - AmountCents int32 `protobuf:"varint,2,opt,name=amount_cents,json=amountCents,proto3" json:"amount_cents,omitempty"` - Desc string `protobuf:"bytes,3,opt,name=desc,proto3" json:"desc,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *WithdrawRequest) Reset() { *m = WithdrawRequest{} } -func (m *WithdrawRequest) String() string { return proto.CompactTextString(m) } -func (*WithdrawRequest) ProtoMessage() {} -func (*WithdrawRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bank_485eb966c3eae5d1, []int{8} -} -func (m *WithdrawRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_WithdrawRequest.Unmarshal(m, b) + AccountNumber uint64 `protobuf:"varint,1,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` + AmountCents int32 `protobuf:"varint,2,opt,name=amount_cents,json=amountCents,proto3" json:"amount_cents,omitempty"` + Desc string `protobuf:"bytes,3,opt,name=desc,proto3" json:"desc,omitempty"` } -func (m *WithdrawRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_WithdrawRequest.Marshal(b, m, deterministic) -} -func (dst *WithdrawRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_WithdrawRequest.Merge(dst, src) + +func (x *WithdrawRequest) Reset() { + *x = WithdrawRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_bank_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *WithdrawRequest) XXX_Size() int { - return xxx_messageInfo_WithdrawRequest.Size(m) + +func (x *WithdrawRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *WithdrawRequest) XXX_DiscardUnknown() { - xxx_messageInfo_WithdrawRequest.DiscardUnknown(m) + +func (*WithdrawRequest) ProtoMessage() {} + +func (x *WithdrawRequest) ProtoReflect() protoreflect.Message { + mi := &file_bank_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_WithdrawRequest proto.InternalMessageInfo +// Deprecated: Use WithdrawRequest.ProtoReflect.Descriptor instead. +func (*WithdrawRequest) Descriptor() ([]byte, []int) { + return file_bank_proto_rawDescGZIP(), []int{8} +} -func (m *WithdrawRequest) GetAccountNumber() uint64 { - if m != nil { - return m.AccountNumber +func (x *WithdrawRequest) GetAccountNumber() uint64 { + if x != nil { + return x.AccountNumber } return 0 } -func (m *WithdrawRequest) GetAmountCents() int32 { - if m != nil { - return m.AmountCents +func (x *WithdrawRequest) GetAmountCents() int32 { + if x != nil { + return x.AmountCents } return 0 } -func (m *WithdrawRequest) GetDesc() string { - if m != nil { - return m.Desc +func (x *WithdrawRequest) GetDesc() string { + if x != nil { + return x.Desc } return "" } type TransferRequest struct { - // Types that are valid to be assigned to Source: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Source: // *TransferRequest_SourceAccountNumber // *TransferRequest_ExternalSource Source isTransferRequest_Source `protobuf_oneof:"source"` - // Types that are valid to be assigned to Dest: + // Types that are assignable to Dest: // *TransferRequest_DestAccountNumber // *TransferRequest_ExternalDest - Dest isTransferRequest_Dest `protobuf_oneof:"dest"` - AmountCents int32 `protobuf:"varint,5,opt,name=amount_cents,json=amountCents,proto3" json:"amount_cents,omitempty"` - Desc string `protobuf:"bytes,6,opt,name=desc,proto3" json:"desc,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Dest isTransferRequest_Dest `protobuf_oneof:"dest"` + AmountCents int32 `protobuf:"varint,5,opt,name=amount_cents,json=amountCents,proto3" json:"amount_cents,omitempty"` + Desc string `protobuf:"bytes,6,opt,name=desc,proto3" json:"desc,omitempty"` } -func (m *TransferRequest) Reset() { *m = TransferRequest{} } -func (m *TransferRequest) String() string { return proto.CompactTextString(m) } -func (*TransferRequest) ProtoMessage() {} -func (*TransferRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_bank_485eb966c3eae5d1, []int{9} -} -func (m *TransferRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TransferRequest.Unmarshal(m, b) -} -func (m *TransferRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TransferRequest.Marshal(b, m, deterministic) -} -func (dst *TransferRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransferRequest.Merge(dst, src) -} -func (m *TransferRequest) XXX_Size() int { - return xxx_messageInfo_TransferRequest.Size(m) +func (x *TransferRequest) Reset() { + *x = TransferRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_bank_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TransferRequest) XXX_DiscardUnknown() { - xxx_messageInfo_TransferRequest.DiscardUnknown(m) + +func (x *TransferRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_TransferRequest proto.InternalMessageInfo +func (*TransferRequest) ProtoMessage() {} -type isTransferRequest_Source interface { - isTransferRequest_Source() -} -type isTransferRequest_Dest interface { - isTransferRequest_Dest() +func (x *TransferRequest) ProtoReflect() protoreflect.Message { + mi := &file_bank_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -type TransferRequest_SourceAccountNumber struct { - SourceAccountNumber uint64 `protobuf:"varint,1,opt,name=source_account_number,json=sourceAccountNumber,proto3,oneof"` -} -type TransferRequest_ExternalSource struct { - ExternalSource *TransferRequest_ExternalAccount `protobuf:"bytes,2,opt,name=external_source,json=externalSource,proto3,oneof"` -} -type TransferRequest_DestAccountNumber struct { - DestAccountNumber uint64 `protobuf:"varint,3,opt,name=dest_account_number,json=destAccountNumber,proto3,oneof"` -} -type TransferRequest_ExternalDest struct { - ExternalDest *TransferRequest_ExternalAccount `protobuf:"bytes,4,opt,name=external_dest,json=externalDest,proto3,oneof"` +// Deprecated: Use TransferRequest.ProtoReflect.Descriptor instead. +func (*TransferRequest) Descriptor() ([]byte, []int) { + return file_bank_proto_rawDescGZIP(), []int{9} } -func (*TransferRequest_SourceAccountNumber) isTransferRequest_Source() {} -func (*TransferRequest_ExternalSource) isTransferRequest_Source() {} -func (*TransferRequest_DestAccountNumber) isTransferRequest_Dest() {} -func (*TransferRequest_ExternalDest) isTransferRequest_Dest() {} - func (m *TransferRequest) GetSource() isTransferRequest_Source { if m != nil { return m.Source } return nil } -func (m *TransferRequest) GetDest() isTransferRequest_Dest { - if m != nil { - return m.Dest - } - return nil -} -func (m *TransferRequest) GetSourceAccountNumber() uint64 { - if x, ok := m.GetSource().(*TransferRequest_SourceAccountNumber); ok { +func (x *TransferRequest) GetSourceAccountNumber() uint64 { + if x, ok := x.GetSource().(*TransferRequest_SourceAccountNumber); ok { return x.SourceAccountNumber } return 0 } -func (m *TransferRequest) GetExternalSource() *TransferRequest_ExternalAccount { - if x, ok := m.GetSource().(*TransferRequest_ExternalSource); ok { +func (x *TransferRequest) GetExternalSource() *TransferRequest_ExternalAccount { + if x, ok := x.GetSource().(*TransferRequest_ExternalSource); ok { return x.ExternalSource } return nil } -func (m *TransferRequest) GetDestAccountNumber() uint64 { - if x, ok := m.GetDest().(*TransferRequest_DestAccountNumber); ok { +func (m *TransferRequest) GetDest() isTransferRequest_Dest { + if m != nil { + return m.Dest + } + return nil +} + +func (x *TransferRequest) GetDestAccountNumber() uint64 { + if x, ok := x.GetDest().(*TransferRequest_DestAccountNumber); ok { return x.DestAccountNumber } return 0 } -func (m *TransferRequest) GetExternalDest() *TransferRequest_ExternalAccount { - if x, ok := m.GetDest().(*TransferRequest_ExternalDest); ok { +func (x *TransferRequest) GetExternalDest() *TransferRequest_ExternalAccount { + if x, ok := x.GetDest().(*TransferRequest_ExternalDest); ok { return x.ExternalDest } return nil } -func (m *TransferRequest) GetAmountCents() int32 { - if m != nil { - return m.AmountCents +func (x *TransferRequest) GetAmountCents() int32 { + if x != nil { + return x.AmountCents } return 0 } -func (m *TransferRequest) GetDesc() string { - if m != nil { - return m.Desc +func (x *TransferRequest) GetDesc() string { + if x != nil { + return x.Desc } return "" } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*TransferRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _TransferRequest_OneofMarshaler, _TransferRequest_OneofUnmarshaler, _TransferRequest_OneofSizer, []interface{}{ - (*TransferRequest_SourceAccountNumber)(nil), - (*TransferRequest_ExternalSource)(nil), - (*TransferRequest_DestAccountNumber)(nil), - (*TransferRequest_ExternalDest)(nil), - } +type isTransferRequest_Source interface { + isTransferRequest_Source() } -func _TransferRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*TransferRequest) - // source - switch x := m.Source.(type) { - case *TransferRequest_SourceAccountNumber: - b.EncodeVarint(1<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.SourceAccountNumber)) - case *TransferRequest_ExternalSource: - b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.ExternalSource); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("TransferRequest.Source has unexpected type %T", x) - } - // dest - switch x := m.Dest.(type) { - case *TransferRequest_DestAccountNumber: - b.EncodeVarint(3<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.DestAccountNumber)) - case *TransferRequest_ExternalDest: - b.EncodeVarint(4<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.ExternalDest); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("TransferRequest.Dest has unexpected type %T", x) - } - return nil +type TransferRequest_SourceAccountNumber struct { + SourceAccountNumber uint64 `protobuf:"varint,1,opt,name=source_account_number,json=sourceAccountNumber,proto3,oneof"` } -func _TransferRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*TransferRequest) - switch tag { - case 1: // source.source_account_number - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Source = &TransferRequest_SourceAccountNumber{x} - return true, err - case 2: // source.external_source - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(TransferRequest_ExternalAccount) - err := b.DecodeMessage(msg) - m.Source = &TransferRequest_ExternalSource{msg} - return true, err - case 3: // dest.dest_account_number - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Dest = &TransferRequest_DestAccountNumber{x} - return true, err - case 4: // dest.external_dest - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(TransferRequest_ExternalAccount) - err := b.DecodeMessage(msg) - m.Dest = &TransferRequest_ExternalDest{msg} - return true, err - default: - return false, nil - } -} - -func _TransferRequest_OneofSizer(msg proto.Message) (n int) { - m := msg.(*TransferRequest) - // source - switch x := m.Source.(type) { - case *TransferRequest_SourceAccountNumber: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(x.SourceAccountNumber)) - case *TransferRequest_ExternalSource: - s := proto.Size(x.ExternalSource) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - // dest - switch x := m.Dest.(type) { - case *TransferRequest_DestAccountNumber: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(x.DestAccountNumber)) - case *TransferRequest_ExternalDest: - s := proto.Size(x.ExternalDest) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n +type TransferRequest_ExternalSource struct { + ExternalSource *TransferRequest_ExternalAccount `protobuf:"bytes,2,opt,name=external_source,json=externalSource,proto3,oneof"` } -type TransferRequest_ExternalAccount struct { - AchRoutingNumber uint64 `protobuf:"varint,1,opt,name=ach_routing_number,json=achRoutingNumber,proto3" json:"ach_routing_number,omitempty"` - AchAccountNumber uint64 `protobuf:"varint,2,opt,name=ach_account_number,json=achAccountNumber,proto3" json:"ach_account_number,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (*TransferRequest_SourceAccountNumber) isTransferRequest_Source() {} + +func (*TransferRequest_ExternalSource) isTransferRequest_Source() {} + +type isTransferRequest_Dest interface { + isTransferRequest_Dest() } -func (m *TransferRequest_ExternalAccount) Reset() { *m = TransferRequest_ExternalAccount{} } -func (m *TransferRequest_ExternalAccount) String() string { return proto.CompactTextString(m) } -func (*TransferRequest_ExternalAccount) ProtoMessage() {} -func (*TransferRequest_ExternalAccount) Descriptor() ([]byte, []int) { - return fileDescriptor_bank_485eb966c3eae5d1, []int{9, 0} +type TransferRequest_DestAccountNumber struct { + DestAccountNumber uint64 `protobuf:"varint,3,opt,name=dest_account_number,json=destAccountNumber,proto3,oneof"` } -func (m *TransferRequest_ExternalAccount) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TransferRequest_ExternalAccount.Unmarshal(m, b) + +type TransferRequest_ExternalDest struct { + ExternalDest *TransferRequest_ExternalAccount `protobuf:"bytes,4,opt,name=external_dest,json=externalDest,proto3,oneof"` } -func (m *TransferRequest_ExternalAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TransferRequest_ExternalAccount.Marshal(b, m, deterministic) + +func (*TransferRequest_DestAccountNumber) isTransferRequest_Dest() {} + +func (*TransferRequest_ExternalDest) isTransferRequest_Dest() {} + +type TransferResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SrcAccountNumber uint64 `protobuf:"varint,1,opt,name=src_account_number,json=srcAccountNumber,proto3" json:"src_account_number,omitempty"` + SrcBalanceCents int32 `protobuf:"varint,2,opt,name=src_balance_cents,json=srcBalanceCents,proto3" json:"src_balance_cents,omitempty"` + DestAccountNumber uint64 `protobuf:"varint,3,opt,name=dest_account_number,json=destAccountNumber,proto3" json:"dest_account_number,omitempty"` + DestBalanceCents int32 `protobuf:"varint,4,opt,name=dest_balance_cents,json=destBalanceCents,proto3" json:"dest_balance_cents,omitempty"` } -func (dst *TransferRequest_ExternalAccount) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransferRequest_ExternalAccount.Merge(dst, src) + +func (x *TransferResponse) Reset() { + *x = TransferResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_bank_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TransferRequest_ExternalAccount) XXX_Size() int { - return xxx_messageInfo_TransferRequest_ExternalAccount.Size(m) + +func (x *TransferResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TransferRequest_ExternalAccount) XXX_DiscardUnknown() { - xxx_messageInfo_TransferRequest_ExternalAccount.DiscardUnknown(m) + +func (*TransferResponse) ProtoMessage() {} + +func (x *TransferResponse) ProtoReflect() protoreflect.Message { + mi := &file_bank_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_TransferRequest_ExternalAccount proto.InternalMessageInfo +// Deprecated: Use TransferResponse.ProtoReflect.Descriptor instead. +func (*TransferResponse) Descriptor() ([]byte, []int) { + return file_bank_proto_rawDescGZIP(), []int{10} +} -func (m *TransferRequest_ExternalAccount) GetAchRoutingNumber() uint64 { - if m != nil { - return m.AchRoutingNumber +func (x *TransferResponse) GetSrcAccountNumber() uint64 { + if x != nil { + return x.SrcAccountNumber } return 0 } -func (m *TransferRequest_ExternalAccount) GetAchAccountNumber() uint64 { - if m != nil { - return m.AchAccountNumber +func (x *TransferResponse) GetSrcBalanceCents() int32 { + if x != nil { + return x.SrcBalanceCents } return 0 } -type TransferResponse struct { - SrcAccountNumber uint64 `protobuf:"varint,1,opt,name=src_account_number,json=srcAccountNumber,proto3" json:"src_account_number,omitempty"` - SrcBalanceCents int32 `protobuf:"varint,2,opt,name=src_balance_cents,json=srcBalanceCents,proto3" json:"src_balance_cents,omitempty"` - DestAccountNumber uint64 `protobuf:"varint,3,opt,name=dest_account_number,json=destAccountNumber,proto3" json:"dest_account_number,omitempty"` - DestBalanceCents int32 `protobuf:"varint,4,opt,name=dest_balance_cents,json=destBalanceCents,proto3" json:"dest_balance_cents,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *TransferResponse) Reset() { *m = TransferResponse{} } -func (m *TransferResponse) String() string { return proto.CompactTextString(m) } -func (*TransferResponse) ProtoMessage() {} -func (*TransferResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_bank_485eb966c3eae5d1, []int{10} -} -func (m *TransferResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TransferResponse.Unmarshal(m, b) +func (x *TransferResponse) GetDestAccountNumber() uint64 { + if x != nil { + return x.DestAccountNumber + } + return 0 } -func (m *TransferResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TransferResponse.Marshal(b, m, deterministic) + +func (x *TransferResponse) GetDestBalanceCents() int32 { + if x != nil { + return x.DestBalanceCents + } + return 0 } -func (dst *TransferResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_TransferResponse.Merge(dst, src) + +type TransferRequest_ExternalAccount struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AchRoutingNumber uint64 `protobuf:"varint,1,opt,name=ach_routing_number,json=achRoutingNumber,proto3" json:"ach_routing_number,omitempty"` + AchAccountNumber uint64 `protobuf:"varint,2,opt,name=ach_account_number,json=achAccountNumber,proto3" json:"ach_account_number,omitempty"` } -func (m *TransferResponse) XXX_Size() int { - return xxx_messageInfo_TransferResponse.Size(m) + +func (x *TransferRequest_ExternalAccount) Reset() { + *x = TransferRequest_ExternalAccount{} + if protoimpl.UnsafeEnabled { + mi := &file_bank_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TransferResponse) XXX_DiscardUnknown() { - xxx_messageInfo_TransferResponse.DiscardUnknown(m) + +func (x *TransferRequest_ExternalAccount) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_TransferResponse proto.InternalMessageInfo +func (*TransferRequest_ExternalAccount) ProtoMessage() {} -func (m *TransferResponse) GetSrcAccountNumber() uint64 { - if m != nil { - return m.SrcAccountNumber +func (x *TransferRequest_ExternalAccount) ProtoReflect() protoreflect.Message { + mi := &file_bank_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return 0 + return mi.MessageOf(x) } -func (m *TransferResponse) GetSrcBalanceCents() int32 { - if m != nil { - return m.SrcBalanceCents - } - return 0 +// Deprecated: Use TransferRequest_ExternalAccount.ProtoReflect.Descriptor instead. +func (*TransferRequest_ExternalAccount) Descriptor() ([]byte, []int) { + return file_bank_proto_rawDescGZIP(), []int{9, 0} } -func (m *TransferResponse) GetDestAccountNumber() uint64 { - if m != nil { - return m.DestAccountNumber +func (x *TransferRequest_ExternalAccount) GetAchRoutingNumber() uint64 { + if x != nil { + return x.AchRoutingNumber } return 0 } -func (m *TransferResponse) GetDestBalanceCents() int32 { - if m != nil { - return m.DestBalanceCents +func (x *TransferRequest_ExternalAccount) GetAchAccountNumber() uint64 { + if x != nil { + return x.AchAccountNumber } return 0 } -func init() { - proto.RegisterType((*OpenAccountRequest)(nil), "OpenAccountRequest") - proto.RegisterType((*CloseAccountRequest)(nil), "CloseAccountRequest") - proto.RegisterType((*GetAccountsResponse)(nil), "GetAccountsResponse") - proto.RegisterType((*Account)(nil), "Account") - proto.RegisterType((*GetTransactionsRequest)(nil), "GetTransactionsRequest") - proto.RegisterType((*Transaction)(nil), "Transaction") - proto.RegisterType((*DepositRequest)(nil), "DepositRequest") - proto.RegisterType((*BalanceResponse)(nil), "BalanceResponse") - proto.RegisterType((*WithdrawRequest)(nil), "WithdrawRequest") - proto.RegisterType((*TransferRequest)(nil), "TransferRequest") - proto.RegisterType((*TransferRequest_ExternalAccount)(nil), "TransferRequest.ExternalAccount") - proto.RegisterType((*TransferResponse)(nil), "TransferResponse") - proto.RegisterEnum("Account_Type", Account_Type_name, Account_Type_value) - proto.RegisterEnum("DepositRequest_Source", DepositRequest_Source_name, DepositRequest_Source_value) +var File_bank_proto protoreflect.FileDescriptor + +var file_bank_proto_rawDesc = []byte{ + 0x0a, 0x0a, 0x62, 0x61, 0x6e, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, + 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6b, 0x0a, 0x12, 0x4f, 0x70, + 0x65, 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x32, 0x0a, 0x15, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x64, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x13, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x43, + 0x65, 0x6e, 0x74, 0x73, 0x12, 0x21, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3c, 0x0a, 0x13, 0x43, 0x6c, 0x6f, 0x73, 0x65, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, + 0x0a, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x3b, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x08, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x08, + 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, + 0x74, 0x73, 0x22, 0xe5, 0x01, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x25, + 0x0a, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x0c, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x6b, 0x0a, + 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x48, 0x45, 0x43, 0x4b, 0x49, 0x4e, 0x47, 0x10, 0x01, + 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x41, 0x56, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, + 0x4d, 0x4f, 0x4e, 0x45, 0x59, 0x5f, 0x4d, 0x41, 0x52, 0x4b, 0x45, 0x54, 0x10, 0x03, 0x12, 0x12, + 0x0a, 0x0e, 0x4c, 0x49, 0x4e, 0x45, 0x5f, 0x4f, 0x46, 0x5f, 0x43, 0x52, 0x45, 0x44, 0x49, 0x54, + 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x4f, 0x41, 0x4e, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, + 0x45, 0x51, 0x55, 0x49, 0x54, 0x49, 0x45, 0x53, 0x10, 0x06, 0x22, 0x9f, 0x01, 0x0a, 0x16, 0x47, + 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x2c, + 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0xba, 0x01, 0x0a, + 0x0b, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x71, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x73, 0x65, 0x71, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x64, 0x61, + 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x63, 0x65, 0x6e, + 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x43, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x22, 0xdd, 0x01, 0x0a, 0x0e, 0x44, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x63, 0x65, + 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x43, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2e, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x22, 0x3d, 0x0a, 0x06, 0x53, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, + 0x00, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x41, 0x53, 0x48, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x43, + 0x48, 0x45, 0x43, 0x4b, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x41, 0x43, 0x48, 0x10, 0x03, 0x12, + 0x08, 0x0a, 0x04, 0x57, 0x49, 0x52, 0x45, 0x10, 0x04, 0x22, 0x5d, 0x0a, 0x0f, 0x42, 0x61, 0x6c, + 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x63, + 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x62, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x43, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x6f, 0x0a, 0x0f, 0x57, 0x69, 0x74, 0x68, + 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x63, 0x65, 0x6e, + 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x43, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, 0x73, 0x63, 0x22, 0xc7, 0x03, 0x0a, 0x0f, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, + 0x15, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x13, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x4b, 0x0a, 0x0f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x45, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x48, 0x00, + 0x52, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x12, 0x30, 0x0a, 0x13, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x48, 0x01, 0x52, + 0x11, 0x64, 0x65, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x47, 0x0a, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x64, + 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x78, 0x74, 0x65, + 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x48, 0x01, 0x52, 0x0c, 0x65, + 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x44, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0b, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x43, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x12, + 0x0a, 0x04, 0x64, 0x65, 0x73, 0x63, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x65, + 0x73, 0x63, 0x1a, 0x6d, 0x0a, 0x0f, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x61, 0x63, 0x68, 0x5f, 0x72, 0x6f, 0x75, + 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x10, 0x61, 0x63, 0x68, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x12, 0x61, 0x63, 0x68, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x10, 0x61, 0x63, 0x68, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x42, 0x08, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x64, + 0x65, 0x73, 0x74, 0x22, 0xca, 0x01, 0x0a, 0x10, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x73, 0x72, 0x63, 0x5f, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x73, 0x72, 0x63, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x72, 0x63, 0x5f, 0x62, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0f, 0x73, 0x72, 0x63, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x65, 0x6e, + 0x74, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x11, 0x64, 0x65, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x12, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, + 0x63, 0x65, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, + 0x64, 0x65, 0x73, 0x74, 0x42, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x43, 0x65, 0x6e, 0x74, 0x73, + 0x32, 0xfa, 0x02, 0x0a, 0x04, 0x42, 0x61, 0x6e, 0x6b, 0x12, 0x2c, 0x0a, 0x0b, 0x4f, 0x70, 0x65, + 0x6e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x13, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x08, 0x2e, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x43, 0x6c, 0x6f, 0x73, 0x65, + 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3b, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x14, 0x2e, 0x47, + 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x17, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, + 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x30, 0x01, 0x12, 0x2c, + 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x0f, 0x2e, 0x44, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x42, 0x61, 0x6c, + 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x08, + 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x12, 0x10, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, + 0x72, 0x61, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x42, 0x61, 0x6c, + 0x61, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x08, + 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x10, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x08, 0x5a, + 0x06, 0x2e, 0x3b, 0x6d, 0x61, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_bank_proto_rawDescOnce sync.Once + file_bank_proto_rawDescData = file_bank_proto_rawDesc +) + +func file_bank_proto_rawDescGZIP() []byte { + file_bank_proto_rawDescOnce.Do(func() { + file_bank_proto_rawDescData = protoimpl.X.CompressGZIP(file_bank_proto_rawDescData) + }) + return file_bank_proto_rawDescData +} + +var file_bank_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_bank_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_bank_proto_goTypes = []interface{}{ + (Account_Type)(0), // 0: Account.Type + (DepositRequest_Source)(0), // 1: DepositRequest.Source + (*OpenAccountRequest)(nil), // 2: OpenAccountRequest + (*CloseAccountRequest)(nil), // 3: CloseAccountRequest + (*GetAccountsResponse)(nil), // 4: GetAccountsResponse + (*Account)(nil), // 5: Account + (*GetTransactionsRequest)(nil), // 6: GetTransactionsRequest + (*Transaction)(nil), // 7: Transaction + (*DepositRequest)(nil), // 8: DepositRequest + (*BalanceResponse)(nil), // 9: BalanceResponse + (*WithdrawRequest)(nil), // 10: WithdrawRequest + (*TransferRequest)(nil), // 11: TransferRequest + (*TransferResponse)(nil), // 12: TransferResponse + (*TransferRequest_ExternalAccount)(nil), // 13: TransferRequest.ExternalAccount + (*timestamppb.Timestamp)(nil), // 14: google.protobuf.Timestamp + (*emptypb.Empty)(nil), // 15: google.protobuf.Empty +} +var file_bank_proto_depIdxs = []int32{ + 0, // 0: OpenAccountRequest.type:type_name -> Account.Type + 5, // 1: GetAccountsResponse.accounts:type_name -> Account + 0, // 2: Account.type:type_name -> Account.Type + 14, // 3: GetTransactionsRequest.start:type_name -> google.protobuf.Timestamp + 14, // 4: GetTransactionsRequest.end:type_name -> google.protobuf.Timestamp + 14, // 5: Transaction.date:type_name -> google.protobuf.Timestamp + 1, // 6: DepositRequest.source:type_name -> DepositRequest.Source + 13, // 7: TransferRequest.external_source:type_name -> TransferRequest.ExternalAccount + 13, // 8: TransferRequest.external_dest:type_name -> TransferRequest.ExternalAccount + 2, // 9: Bank.OpenAccount:input_type -> OpenAccountRequest + 3, // 10: Bank.CloseAccount:input_type -> CloseAccountRequest + 15, // 11: Bank.GetAccounts:input_type -> google.protobuf.Empty + 6, // 12: Bank.GetTransactions:input_type -> GetTransactionsRequest + 8, // 13: Bank.Deposit:input_type -> DepositRequest + 10, // 14: Bank.Withdraw:input_type -> WithdrawRequest + 11, // 15: Bank.Transfer:input_type -> TransferRequest + 5, // 16: Bank.OpenAccount:output_type -> Account + 15, // 17: Bank.CloseAccount:output_type -> google.protobuf.Empty + 4, // 18: Bank.GetAccounts:output_type -> GetAccountsResponse + 7, // 19: Bank.GetTransactions:output_type -> Transaction + 9, // 20: Bank.Deposit:output_type -> BalanceResponse + 9, // 21: Bank.Withdraw:output_type -> BalanceResponse + 12, // 22: Bank.Transfer:output_type -> TransferResponse + 16, // [16:23] is the sub-list for method output_type + 9, // [9:16] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name +} + +func init() { file_bank_proto_init() } +func file_bank_proto_init() { + if File_bank_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_bank_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OpenAccountRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_bank_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CloseAccountRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_bank_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetAccountsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_bank_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Account); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_bank_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetTransactionsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_bank_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Transaction); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_bank_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DepositRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_bank_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BalanceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_bank_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WithdrawRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_bank_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransferRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_bank_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransferResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_bank_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TransferRequest_ExternalAccount); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_bank_proto_msgTypes[9].OneofWrappers = []interface{}{ + (*TransferRequest_SourceAccountNumber)(nil), + (*TransferRequest_ExternalSource)(nil), + (*TransferRequest_DestAccountNumber)(nil), + (*TransferRequest_ExternalDest)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_bank_proto_rawDesc, + NumEnums: 2, + NumMessages: 12, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_bank_proto_goTypes, + DependencyIndexes: file_bank_proto_depIdxs, + EnumInfos: file_bank_proto_enumTypes, + MessageInfos: file_bank_proto_msgTypes, + }.Build() + File_bank_proto = out.File + file_bank_proto_rawDesc = nil + file_bank_proto_goTypes = nil + file_bank_proto_depIdxs = nil } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConn +var _ grpc.ClientConnInterface // 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 +const _ = grpc.SupportPackageIsVersion6 // BankClient is the client API for Bank service. // @@ -933,9 +1365,9 @@ type BankClient interface { OpenAccount(ctx context.Context, in *OpenAccountRequest, opts ...grpc.CallOption) (*Account, error) // CloseAccount closes the indicated account. An account can only be // closed if its balance is zero. - CloseAccount(ctx context.Context, in *CloseAccountRequest, opts ...grpc.CallOption) (*empty.Empty, error) + CloseAccount(ctx context.Context, in *CloseAccountRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // GetAccounts lists all accounts for the current customer. - GetAccounts(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*GetAccountsResponse, error) + GetAccounts(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetAccountsResponse, error) // GetTransactions streams all transactions that match the given criteria. // If the given start date is not specified, transactions since beginning // of time are included. Similarly, if the given end date is not specified, @@ -952,10 +1384,10 @@ type BankClient interface { } type bankClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewBankClient(cc *grpc.ClientConn) BankClient { +func NewBankClient(cc grpc.ClientConnInterface) BankClient { return &bankClient{cc} } @@ -968,8 +1400,8 @@ func (c *bankClient) OpenAccount(ctx context.Context, in *OpenAccountRequest, op return out, nil } -func (c *bankClient) CloseAccount(ctx context.Context, in *CloseAccountRequest, opts ...grpc.CallOption) (*empty.Empty, error) { - out := new(empty.Empty) +func (c *bankClient) CloseAccount(ctx context.Context, in *CloseAccountRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/Bank/CloseAccount", in, out, opts...) if err != nil { return nil, err @@ -977,7 +1409,7 @@ func (c *bankClient) CloseAccount(ctx context.Context, in *CloseAccountRequest, return out, nil } -func (c *bankClient) GetAccounts(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*GetAccountsResponse, error) { +func (c *bankClient) GetAccounts(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetAccountsResponse, error) { out := new(GetAccountsResponse) err := c.cc.Invoke(ctx, "/Bank/GetAccounts", in, out, opts...) if err != nil { @@ -1052,9 +1484,9 @@ type BankServer interface { OpenAccount(context.Context, *OpenAccountRequest) (*Account, error) // CloseAccount closes the indicated account. An account can only be // closed if its balance is zero. - CloseAccount(context.Context, *CloseAccountRequest) (*empty.Empty, error) + CloseAccount(context.Context, *CloseAccountRequest) (*emptypb.Empty, error) // GetAccounts lists all accounts for the current customer. - GetAccounts(context.Context, *empty.Empty) (*GetAccountsResponse, error) + GetAccounts(context.Context, *emptypb.Empty) (*GetAccountsResponse, error) // GetTransactions streams all transactions that match the given criteria. // If the given start date is not specified, transactions since beginning // of time are included. Similarly, if the given end date is not specified, @@ -1070,6 +1502,32 @@ type BankServer interface { Transfer(context.Context, *TransferRequest) (*TransferResponse, error) } +// UnimplementedBankServer can be embedded to have forward compatible implementations. +type UnimplementedBankServer struct { +} + +func (*UnimplementedBankServer) OpenAccount(context.Context, *OpenAccountRequest) (*Account, error) { + return nil, status.Errorf(codes.Unimplemented, "method OpenAccount not implemented") +} +func (*UnimplementedBankServer) CloseAccount(context.Context, *CloseAccountRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method CloseAccount not implemented") +} +func (*UnimplementedBankServer) GetAccounts(context.Context, *emptypb.Empty) (*GetAccountsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAccounts not implemented") +} +func (*UnimplementedBankServer) GetTransactions(*GetTransactionsRequest, Bank_GetTransactionsServer) error { + return status.Errorf(codes.Unimplemented, "method GetTransactions not implemented") +} +func (*UnimplementedBankServer) Deposit(context.Context, *DepositRequest) (*BalanceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Deposit not implemented") +} +func (*UnimplementedBankServer) Withdraw(context.Context, *WithdrawRequest) (*BalanceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Withdraw not implemented") +} +func (*UnimplementedBankServer) Transfer(context.Context, *TransferRequest) (*TransferResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Transfer not implemented") +} + func RegisterBankServer(s *grpc.Server, srv BankServer) { s.RegisterService(&_Bank_serviceDesc, srv) } @@ -1111,7 +1569,7 @@ func _Bank_CloseAccount_Handler(srv interface{}, ctx context.Context, dec func(i } func _Bank_GetAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(empty.Empty) + in := new(emptypb.Empty) if err := dec(in); err != nil { return nil, err } @@ -1123,7 +1581,7 @@ func _Bank_GetAccounts_Handler(srv interface{}, ctx context.Context, dec func(in FullMethod: "/Bank/GetAccounts", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BankServer).GetAccounts(ctx, req.(*empty.Empty)) + return srv.(BankServer).GetAccounts(ctx, req.(*emptypb.Empty)) } return interceptor(ctx, in, info, handler) } @@ -1241,67 +1699,3 @@ var _Bank_serviceDesc = grpc.ServiceDesc{ }, Metadata: "bank.proto", } - -func init() { proto.RegisterFile("bank.proto", fileDescriptor_bank_485eb966c3eae5d1) } - -var fileDescriptor_bank_485eb966c3eae5d1 = []byte{ - // 913 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xdd, 0x6e, 0xe2, 0x46, - 0x18, 0x8d, 0xb1, 0x21, 0xe4, 0x83, 0xc0, 0x64, 0xd8, 0x4d, 0x23, 0x57, 0x55, 0xb3, 0x6e, 0x2b, - 0x45, 0x15, 0x9a, 0x44, 0xb4, 0x57, 0xdd, 0xed, 0x05, 0x10, 0x37, 0xa0, 0xec, 0x82, 0x3a, 0x61, - 0x1b, 0xb5, 0x52, 0x65, 0x19, 0x33, 0x9b, 0x58, 0x01, 0x9b, 0x78, 0x06, 0xb5, 0x79, 0x9a, 0xbe, - 0x47, 0x5f, 0xa0, 0x52, 0xdf, 0xa1, 0x97, 0x7d, 0x89, 0x5e, 0x55, 0x1e, 0x8f, 0x59, 0xe3, 0x78, - 0x57, 0xac, 0xb4, 0x77, 0x66, 0xce, 0x99, 0x39, 0xdf, 0xcf, 0x99, 0xf9, 0x00, 0x98, 0xba, 0xc1, - 0x1d, 0x59, 0x46, 0xa1, 0x08, 0xcd, 0x4f, 0x6f, 0xc2, 0xf0, 0x66, 0xce, 0x4e, 0xe5, 0xaf, 0xe9, - 0xea, 0xcd, 0x29, 0x5b, 0x2c, 0xc5, 0x83, 0x02, 0x3f, 0xcf, 0x83, 0xc2, 0x5f, 0x30, 0x2e, 0xdc, - 0xc5, 0x32, 0x21, 0x58, 0x77, 0x80, 0xc7, 0x4b, 0x16, 0x74, 0x3d, 0x2f, 0x5c, 0x05, 0x82, 0xb2, - 0xfb, 0x15, 0xe3, 0x02, 0x77, 0xe0, 0xa9, 0x1f, 0xf8, 0xc2, 0x77, 0xe7, 0xce, 0x8c, 0x2d, 0x43, - 0xee, 0x0b, 0xc7, 0x63, 0x81, 0xe0, 0x47, 0xda, 0xb1, 0x76, 0x52, 0xa6, 0x2d, 0x05, 0x9e, 0x27, - 0x58, 0x3f, 0x86, 0xf0, 0x33, 0x30, 0xc4, 0xc3, 0x92, 0x1d, 0x95, 0x8e, 0xb5, 0x93, 0x46, 0x67, - 0x9f, 0xa8, 0x23, 0xc9, 0xe4, 0x61, 0xc9, 0xa8, 0x84, 0xac, 0x17, 0xd0, 0xea, 0xcf, 0x43, 0xce, - 0x72, 0x6a, 0x5f, 0x41, 0xc3, 0x4d, 0x56, 0x9c, 0x60, 0xb5, 0x98, 0xb2, 0x48, 0xca, 0x18, 0x74, - 0x5f, 0xad, 0x8e, 0xe4, 0xa2, 0xf5, 0x1c, 0x5a, 0x17, 0x4c, 0xa8, 0xbd, 0x9c, 0x32, 0xbe, 0x0c, - 0x03, 0xce, 0xf0, 0x97, 0x50, 0x55, 0xbc, 0x38, 0x3c, 0xfd, 0xa4, 0xd6, 0xa9, 0xa6, 0xda, 0x74, - 0x8d, 0x58, 0xff, 0x6a, 0xb0, 0xab, 0x56, 0xb7, 0xd4, 0xdb, 0x22, 0x21, 0xfc, 0x05, 0xec, 0x4f, - 0xdd, 0xb9, 0x1b, 0x78, 0x4c, 0xd5, 0x47, 0x97, 0xf5, 0xa9, 0xab, 0x45, 0x59, 0x18, 0xeb, 0x0e, - 0x8c, 0x78, 0x0b, 0xae, 0xc1, 0xee, 0xeb, 0xd1, 0xe5, 0x68, 0x7c, 0x3d, 0x42, 0x3b, 0xb8, 0x0e, - 0xd5, 0xfe, 0xc0, 0xee, 0x5f, 0x0e, 0x47, 0x17, 0x48, 0xc3, 0x00, 0x95, 0xab, 0xee, 0x4f, 0xf1, - 0x77, 0x09, 0x23, 0xa8, 0xbf, 0x1a, 0x8f, 0xec, 0x9f, 0x9d, 0x57, 0x5d, 0x7a, 0x69, 0x4f, 0x90, - 0x8e, 0x31, 0x34, 0x5e, 0x0e, 0x47, 0xb6, 0x33, 0xfe, 0xc1, 0xe9, 0x53, 0xfb, 0x7c, 0x38, 0x41, - 0x06, 0xae, 0x82, 0xf1, 0x72, 0xdc, 0x1d, 0xa1, 0x72, 0x7c, 0x92, 0xfd, 0xe3, 0xeb, 0xe1, 0x64, - 0x68, 0x5f, 0xa1, 0x8a, 0xf5, 0x87, 0x06, 0x87, 0x17, 0x4c, 0x4c, 0x22, 0x37, 0xe0, 0xae, 0x27, - 0xfc, 0x30, 0xe0, 0x1f, 0x56, 0x66, 0x7c, 0x06, 0x65, 0x2e, 0xdc, 0x48, 0xc8, 0xbc, 0x6b, 0x1d, - 0x93, 0x24, 0x16, 0x22, 0xa9, 0x85, 0xc8, 0x24, 0xb5, 0x10, 0x4d, 0x88, 0xb8, 0x0d, 0x3a, 0x0b, - 0x66, 0x32, 0xf7, 0xf7, 0xf3, 0x63, 0x9a, 0xf5, 0xa7, 0x06, 0xb5, 0x4c, 0x78, 0xdb, 0x86, 0xf5, - 0x19, 0x00, 0x67, 0xf7, 0x29, 0xa5, 0x24, 0x29, 0x7b, 0x9c, 0xdd, 0x2b, 0x98, 0x80, 0x31, 0x73, - 0x05, 0xdb, 0x22, 0x08, 0xc9, 0xc3, 0xcf, 0xa0, 0xee, 0x2e, 0xa4, 0x68, 0xd2, 0x38, 0x43, 0x36, - 0xae, 0x96, 0xac, 0x25, 0x86, 0xc6, 0x60, 0xcc, 0x18, 0xf7, 0x8e, 0xca, 0xc7, 0xda, 0xc9, 0x1e, - 0x95, 0xdf, 0xd6, 0x3f, 0x1a, 0x34, 0x94, 0xeb, 0x3f, 0xb0, 0xac, 0x79, 0xc1, 0xd2, 0x63, 0x41, - 0x02, 0x15, 0x1e, 0xae, 0x22, 0x2f, 0xc9, 0xa2, 0xd1, 0x39, 0x24, 0x9b, 0x52, 0xe4, 0x4a, 0xa2, - 0x54, 0xb1, 0xd6, 0x01, 0x1a, 0x99, 0x00, 0xbf, 0x87, 0x4a, 0xc2, 0xda, 0xb4, 0x5b, 0x15, 0x8c, - 0x7e, 0xf7, 0x6a, 0x80, 0x34, 0xbc, 0x07, 0x65, 0x69, 0x3c, 0x54, 0xc2, 0xbb, 0xa0, 0x77, 0xfb, - 0x03, 0xa4, 0xc7, 0xe8, 0xf5, 0x90, 0xda, 0xc8, 0xb0, 0x7e, 0x85, 0x66, 0x2f, 0xf1, 0xee, 0xfa, - 0x7e, 0x6d, 0x99, 0xdf, 0xa3, 0xab, 0x50, 0x2a, 0xb8, 0x0a, 0x21, 0x34, 0xaf, 0x7d, 0x71, 0x3b, - 0x8b, 0xdc, 0xdf, 0x3e, 0x7e, 0xf9, 0xd2, 0x72, 0xe8, 0x99, 0x72, 0xfc, 0xa5, 0x43, 0x53, 0x9a, - 0xed, 0x0d, 0x8b, 0x52, 0xc5, 0x6f, 0xe1, 0x69, 0x52, 0x40, 0xa7, 0x48, 0x78, 0xb0, 0x43, 0x5b, - 0x09, 0xdc, 0xdd, 0x08, 0xe0, 0x12, 0x9a, 0xec, 0x77, 0xc1, 0xa2, 0xc0, 0x9d, 0x3b, 0xaa, 0x4b, - 0xc9, 0x05, 0x39, 0x26, 0x39, 0x01, 0x62, 0x2b, 0x9e, 0x3a, 0x60, 0xb0, 0x43, 0x1b, 0xe9, 0x56, - 0xd5, 0x9b, 0x33, 0x68, 0xcd, 0x18, 0x17, 0xf9, 0x00, 0x74, 0x19, 0x80, 0x46, 0x0f, 0x62, 0x70, - 0x53, 0xfe, 0x02, 0xf6, 0xd7, 0xf2, 0x31, 0x2a, 0x9b, 0xbe, 0x8d, 0xb8, 0x46, 0xeb, 0xe9, 0xc6, - 0xf3, 0x38, 0xfb, 0x7c, 0x21, 0xcb, 0xef, 0x2e, 0x64, 0xe5, 0x6d, 0x21, 0xcd, 0x05, 0x34, 0x73, - 0x27, 0xe3, 0x36, 0x60, 0xd7, 0xbb, 0x75, 0xa2, 0x70, 0x25, 0xfc, 0xe0, 0x66, 0xb3, 0x7b, 0xc8, - 0xf5, 0x6e, 0x69, 0x02, 0xa8, 0x04, 0x14, 0x3b, 0x97, 0x71, 0x69, 0xcd, 0xde, 0x48, 0xb7, 0x57, - 0x4d, 0xaf, 0x42, 0xaf, 0x22, 0x83, 0x11, 0xd6, 0xdf, 0x1a, 0xa0, 0xb7, 0xb9, 0x2a, 0x6f, 0xb6, - 0x01, 0xf3, 0xc8, 0x2b, 0xec, 0x23, 0x45, 0x3c, 0xf2, 0x36, 0x6b, 0xf8, 0x35, 0x1c, 0xc4, 0xec, - 0x22, 0x9b, 0x36, 0x79, 0xe4, 0xf5, 0x32, 0x4e, 0xc5, 0xe4, 0x3d, 0x1d, 0x2a, 0xea, 0x4f, 0x1b, - 0xb0, 0xe4, 0x6f, 0x1e, 0x9e, 0xbc, 0x2a, 0x28, 0x46, 0xb2, 0xa7, 0x77, 0xfe, 0x2b, 0x81, 0xd1, - 0x73, 0x83, 0x3b, 0xdc, 0x86, 0x5a, 0x66, 0xfc, 0xe2, 0x16, 0x79, 0x3c, 0x8c, 0xcd, 0xf5, 0x38, - 0xc3, 0x2f, 0xa0, 0x9e, 0x9d, 0x9f, 0xf8, 0x09, 0x29, 0x18, 0xa7, 0xe6, 0xe1, 0xa3, 0xc7, 0xcf, - 0x8e, 0xff, 0x11, 0xe0, 0xe7, 0x50, 0xcb, 0xcc, 0x4f, 0xfc, 0x0e, 0x9a, 0xf9, 0x84, 0x14, 0x4d, - 0xd9, 0xef, 0xa0, 0x99, 0x1b, 0x2b, 0xf8, 0x13, 0x52, 0x3c, 0x68, 0xcc, 0x3a, 0xc9, 0xac, 0x9e, - 0x69, 0xb8, 0x0d, 0xbb, 0xea, 0x21, 0xc3, 0xcd, 0xdc, 0x93, 0x66, 0x22, 0x92, 0x7f, 0x6f, 0x08, - 0x54, 0xd3, 0x37, 0x02, 0x23, 0x92, 0x7b, 0x2e, 0x0a, 0xf8, 0xa7, 0x50, 0x4d, 0x7d, 0x81, 0x51, - 0xfe, 0x3a, 0x98, 0x07, 0x24, 0x6f, 0x9a, 0x5e, 0xe5, 0x17, 0x63, 0xe1, 0xfa, 0xc1, 0xb4, 0x22, - 0x13, 0xff, 0xe6, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0xac, 0x47, 0x1e, 0xdd, 0x4d, 0x09, 0x00, - 0x00, -} diff --git a/internal/testing/cmd/bankdemo/bank.proto b/internal/testing/cmd/bankdemo/bank.proto index 8c7b4b9..81eacb4 100644 --- a/internal/testing/cmd/bankdemo/bank.proto +++ b/internal/testing/cmd/bankdemo/bank.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -option go_package = "main"; +option go_package = ".;main"; import "google/protobuf/empty.proto"; import "google/protobuf/timestamp.proto"; diff --git a/internal/testing/cmd/bankdemo/chat.go b/internal/testing/cmd/bankdemo/chat.go index a5206d7..b9721fa 100644 --- a/internal/testing/cmd/bankdemo/chat.go +++ b/internal/testing/cmd/bankdemo/chat.go @@ -1,14 +1,14 @@ package main import ( + "context" "fmt" "io" "sync" - "github.com/golang/protobuf/ptypes" - "golang.org/x/net/context" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + "google.golang.org/protobuf/types/known/timestamppb" ) // chatServer implements the Support gRPC service, for providing @@ -134,7 +134,7 @@ func (s *chatServer) ChatCustomer(stream Support_ChatCustomerServer) error { } entry := &ChatEntry{ - Date: ptypes.TimestampNow(), + Date: timestamppb.Now(), Entry: &ChatEntry_CustomerMsg{ CustomerMsg: req.Msg, }, @@ -279,7 +279,7 @@ func (s *chatServer) ChatAgent(stream Support_ChatAgentServer) error { } entry := &ChatEntry{ - Date: ptypes.TimestampNow(), + Date: timestamppb.Now(), Entry: &ChatEntry_AgentMsg{ AgentMsg: &AgentMessage{ AgentName: agent, diff --git a/internal/testing/cmd/bankdemo/db.go b/internal/testing/cmd/bankdemo/db.go index f731f6e..9b691c2 100644 --- a/internal/testing/cmd/bankdemo/db.go +++ b/internal/testing/cmd/bankdemo/db.go @@ -1,14 +1,13 @@ package main import ( - "bytes" "fmt" "sync" - "github.com/golang/protobuf/jsonpb" - "github.com/golang/protobuf/ptypes" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/types/known/timestamppb" ) // In-memory database that is periodically saved to a JSON file. @@ -43,7 +42,7 @@ func (a *accounts) openAccount(customer string, accountType Account_Type, initia acct.Transactions = append(acct.Transactions, &Transaction{ AccountNumber: num, SeqNumber: 1, - Date: ptypes.TimestampNow(), + Date: timestamppb.Now(), AmountCents: initialBalanceCents, Desc: "initial deposit", }) @@ -130,7 +129,7 @@ func (a *account) newTransaction(amountCents int32, desc string) (newBalance int a.BalanceCents = bal a.Transactions = append(a.Transactions, &Transaction{ AccountNumber: a.AccountNumber, - Date: ptypes.TimestampNow(), + Date: timestamppb.Now(), AmountCents: amountCents, SeqNumber: uint64(len(a.Transactions) + 1), Desc: desc, @@ -139,16 +138,11 @@ func (a *account) newTransaction(amountCents int32, desc string) (newBalance int } func (t *Transaction) MarshalJSON() ([]byte, error) { - var jsm jsonpb.Marshaler - var buf bytes.Buffer - if err := jsm.Marshal(&buf, t); err != nil { - return nil, err - } - return buf.Bytes(), nil + return protojson.Marshal(t) } func (t *Transaction) UnmarshalJSON(b []byte) error { - return jsonpb.Unmarshal(bytes.NewReader(b), t) + return protojson.Unmarshal(b, t) } func (a *accounts) clone() *accounts { diff --git a/internal/testing/cmd/bankdemo/main.go b/internal/testing/cmd/bankdemo/main.go index 77b5cf4..91b634e 100644 --- a/internal/testing/cmd/bankdemo/main.go +++ b/internal/testing/cmd/bankdemo/main.go @@ -3,6 +3,7 @@ package main //go:generate protoc --go_out=plugins=grpc:./ bank.proto support.proto import ( + "context" "encoding/json" "flag" "fmt" @@ -14,7 +15,6 @@ import ( "syscall" "time" - "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/peer" diff --git a/internal/testing/cmd/bankdemo/support.pb.go b/internal/testing/cmd/bankdemo/support.pb.go index 69a7c46..f03d323 100644 --- a/internal/testing/cmd/bankdemo/support.pb.go +++ b/internal/testing/cmd/bankdemo/support.pb.go @@ -1,28 +1,34 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0-devel +// protoc v3.14.0 // source: support.proto package main -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import timestamp "github.com/golang/protobuf/ptypes/timestamp" - import ( - context "golang.org/x/net/context" + context "context" + proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) -// 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.ProtoPackageIsVersion2 // please upgrade the proto package +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 type Void int32 @@ -30,73 +36,87 @@ const ( Void_VOID Void = 0 ) -var Void_name = map[int32]string{ - 0: "VOID", -} -var Void_value = map[string]int32{ - "VOID": 0, +// Enum value maps for Void. +var ( + Void_name = map[int32]string{ + 0: "VOID", + } + Void_value = map[string]int32{ + "VOID": 0, + } +) + +func (x Void) Enum() *Void { + p := new(Void) + *p = x + return p } func (x Void) String() string { - return proto.EnumName(Void_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Void) Descriptor() protoreflect.EnumDescriptor { + return file_support_proto_enumTypes[0].Descriptor() +} + +func (Void) Type() protoreflect.EnumType { + return &file_support_proto_enumTypes[0] } + +func (x Void) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Void.Descriptor instead. func (Void) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_support_640cb5c436dbd37d, []int{0} + return file_support_proto_rawDescGZIP(), []int{0} } type ChatCustomerRequest struct { - // Types that are valid to be assigned to Req: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Req: // *ChatCustomerRequest_Init // *ChatCustomerRequest_Msg // *ChatCustomerRequest_HangUp - Req isChatCustomerRequest_Req `protobuf_oneof:"req"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Req isChatCustomerRequest_Req `protobuf_oneof:"req"` } -func (m *ChatCustomerRequest) Reset() { *m = ChatCustomerRequest{} } -func (m *ChatCustomerRequest) String() string { return proto.CompactTextString(m) } -func (*ChatCustomerRequest) ProtoMessage() {} -func (*ChatCustomerRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_support_640cb5c436dbd37d, []int{0} -} -func (m *ChatCustomerRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ChatCustomerRequest.Unmarshal(m, b) -} -func (m *ChatCustomerRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ChatCustomerRequest.Marshal(b, m, deterministic) -} -func (dst *ChatCustomerRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChatCustomerRequest.Merge(dst, src) -} -func (m *ChatCustomerRequest) XXX_Size() int { - return xxx_messageInfo_ChatCustomerRequest.Size(m) +func (x *ChatCustomerRequest) Reset() { + *x = ChatCustomerRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_support_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ChatCustomerRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ChatCustomerRequest.DiscardUnknown(m) + +func (x *ChatCustomerRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_ChatCustomerRequest proto.InternalMessageInfo +func (*ChatCustomerRequest) ProtoMessage() {} -type isChatCustomerRequest_Req interface { - isChatCustomerRequest_Req() +func (x *ChatCustomerRequest) ProtoReflect() protoreflect.Message { + mi := &file_support_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -type ChatCustomerRequest_Init struct { - Init *InitiateChat `protobuf:"bytes,1,opt,name=init,proto3,oneof"` -} -type ChatCustomerRequest_Msg struct { - Msg string `protobuf:"bytes,2,opt,name=msg,proto3,oneof"` -} -type ChatCustomerRequest_HangUp struct { - HangUp Void `protobuf:"varint,3,opt,name=hang_up,json=hangUp,proto3,enum=Void,oneof"` +// Deprecated: Use ChatCustomerRequest.ProtoReflect.Descriptor instead. +func (*ChatCustomerRequest) Descriptor() ([]byte, []int) { + return file_support_proto_rawDescGZIP(), []int{0} } -func (*ChatCustomerRequest_Init) isChatCustomerRequest_Req() {} -func (*ChatCustomerRequest_Msg) isChatCustomerRequest_Req() {} -func (*ChatCustomerRequest_HangUp) isChatCustomerRequest_Req() {} - func (m *ChatCustomerRequest) GetReq() isChatCustomerRequest_Req { if m != nil { return m.Req @@ -104,243 +124,205 @@ func (m *ChatCustomerRequest) GetReq() isChatCustomerRequest_Req { return nil } -func (m *ChatCustomerRequest) GetInit() *InitiateChat { - if x, ok := m.GetReq().(*ChatCustomerRequest_Init); ok { +func (x *ChatCustomerRequest) GetInit() *InitiateChat { + if x, ok := x.GetReq().(*ChatCustomerRequest_Init); ok { return x.Init } return nil } -func (m *ChatCustomerRequest) GetMsg() string { - if x, ok := m.GetReq().(*ChatCustomerRequest_Msg); ok { +func (x *ChatCustomerRequest) GetMsg() string { + if x, ok := x.GetReq().(*ChatCustomerRequest_Msg); ok { return x.Msg } return "" } -func (m *ChatCustomerRequest) GetHangUp() Void { - if x, ok := m.GetReq().(*ChatCustomerRequest_HangUp); ok { +func (x *ChatCustomerRequest) GetHangUp() Void { + if x, ok := x.GetReq().(*ChatCustomerRequest_HangUp); ok { return x.HangUp } return Void_VOID } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*ChatCustomerRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _ChatCustomerRequest_OneofMarshaler, _ChatCustomerRequest_OneofUnmarshaler, _ChatCustomerRequest_OneofSizer, []interface{}{ - (*ChatCustomerRequest_Init)(nil), - (*ChatCustomerRequest_Msg)(nil), - (*ChatCustomerRequest_HangUp)(nil), - } +type isChatCustomerRequest_Req interface { + isChatCustomerRequest_Req() } -func _ChatCustomerRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*ChatCustomerRequest) - // req - switch x := m.Req.(type) { - case *ChatCustomerRequest_Init: - b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Init); err != nil { - return err - } - case *ChatCustomerRequest_Msg: - b.EncodeVarint(2<<3 | proto.WireBytes) - b.EncodeStringBytes(x.Msg) - case *ChatCustomerRequest_HangUp: - b.EncodeVarint(3<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.HangUp)) - case nil: - default: - return fmt.Errorf("ChatCustomerRequest.Req has unexpected type %T", x) - } - return nil +type ChatCustomerRequest_Init struct { + // init is used when a chat stream is not part of a + // chat session. This is a stream's initial state, as well as + // the state after a "hang_up" request is sent. This creates + // a new state session or resumes an existing one. + Init *InitiateChat `protobuf:"bytes,1,opt,name=init,proto3,oneof"` } -func _ChatCustomerRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*ChatCustomerRequest) - switch tag { - case 1: // req.init - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(InitiateChat) - err := b.DecodeMessage(msg) - m.Req = &ChatCustomerRequest_Init{msg} - return true, err - case 2: // req.msg - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Req = &ChatCustomerRequest_Msg{x} - return true, err - case 3: // req.hang_up - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Req = &ChatCustomerRequest_HangUp{Void(x)} - return true, err - default: - return false, nil - } +type ChatCustomerRequest_Msg struct { + // msg is used to send the customer's messages to support + // agents. + Msg string `protobuf:"bytes,2,opt,name=msg,proto3,oneof"` } -func _ChatCustomerRequest_OneofSizer(msg proto.Message) (n int) { - m := msg.(*ChatCustomerRequest) - // req - switch x := m.Req.(type) { - case *ChatCustomerRequest_Init: - s := proto.Size(x.Init) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *ChatCustomerRequest_Msg: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.Msg))) - n += len(x.Msg) - case *ChatCustomerRequest_HangUp: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(x.HangUp)) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n +type ChatCustomerRequest_HangUp struct { + // hang_up is used to terminate a chat session. If a stream + // is broken, but the session was not terminated, the client + // may initiate a new stream and use init to resume that + // session. Sessions are not terminated unless done so + // explicitly via sending this kind of request on the stream. + HangUp Void `protobuf:"varint,3,opt,name=hang_up,json=hangUp,proto3,enum=Void,oneof"` } +func (*ChatCustomerRequest_Init) isChatCustomerRequest_Req() {} + +func (*ChatCustomerRequest_Msg) isChatCustomerRequest_Req() {} + +func (*ChatCustomerRequest_HangUp) isChatCustomerRequest_Req() {} + type InitiateChat struct { - ResumeSessionId string `protobuf:"bytes,1,opt,name=resume_session_id,json=resumeSessionId,proto3" json:"resume_session_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *InitiateChat) Reset() { *m = InitiateChat{} } -func (m *InitiateChat) String() string { return proto.CompactTextString(m) } -func (*InitiateChat) ProtoMessage() {} -func (*InitiateChat) Descriptor() ([]byte, []int) { - return fileDescriptor_support_640cb5c436dbd37d, []int{1} -} -func (m *InitiateChat) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_InitiateChat.Unmarshal(m, b) -} -func (m *InitiateChat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_InitiateChat.Marshal(b, m, deterministic) + ResumeSessionId string `protobuf:"bytes,1,opt,name=resume_session_id,json=resumeSessionId,proto3" json:"resume_session_id,omitempty"` } -func (dst *InitiateChat) XXX_Merge(src proto.Message) { - xxx_messageInfo_InitiateChat.Merge(dst, src) + +func (x *InitiateChat) Reset() { + *x = InitiateChat{} + if protoimpl.UnsafeEnabled { + mi := &file_support_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *InitiateChat) XXX_Size() int { - return xxx_messageInfo_InitiateChat.Size(m) + +func (x *InitiateChat) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *InitiateChat) XXX_DiscardUnknown() { - xxx_messageInfo_InitiateChat.DiscardUnknown(m) + +func (*InitiateChat) ProtoMessage() {} + +func (x *InitiateChat) ProtoReflect() protoreflect.Message { + mi := &file_support_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_InitiateChat proto.InternalMessageInfo +// Deprecated: Use InitiateChat.ProtoReflect.Descriptor instead. +func (*InitiateChat) Descriptor() ([]byte, []int) { + return file_support_proto_rawDescGZIP(), []int{1} +} -func (m *InitiateChat) GetResumeSessionId() string { - if m != nil { - return m.ResumeSessionId +func (x *InitiateChat) GetResumeSessionId() string { + if x != nil { + return x.ResumeSessionId } return "" } type AgentMessage struct { - AgentName string `protobuf:"bytes,1,opt,name=agent_name,json=agentName,proto3" json:"agent_name,omitempty"` - Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *AgentMessage) Reset() { *m = AgentMessage{} } -func (m *AgentMessage) String() string { return proto.CompactTextString(m) } -func (*AgentMessage) ProtoMessage() {} -func (*AgentMessage) Descriptor() ([]byte, []int) { - return fileDescriptor_support_640cb5c436dbd37d, []int{2} -} -func (m *AgentMessage) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AgentMessage.Unmarshal(m, b) + AgentName string `protobuf:"bytes,1,opt,name=agent_name,json=agentName,proto3" json:"agent_name,omitempty"` + Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` } -func (m *AgentMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AgentMessage.Marshal(b, m, deterministic) -} -func (dst *AgentMessage) XXX_Merge(src proto.Message) { - xxx_messageInfo_AgentMessage.Merge(dst, src) + +func (x *AgentMessage) Reset() { + *x = AgentMessage{} + if protoimpl.UnsafeEnabled { + mi := &file_support_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *AgentMessage) XXX_Size() int { - return xxx_messageInfo_AgentMessage.Size(m) + +func (x *AgentMessage) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AgentMessage) XXX_DiscardUnknown() { - xxx_messageInfo_AgentMessage.DiscardUnknown(m) + +func (*AgentMessage) ProtoMessage() {} + +func (x *AgentMessage) ProtoReflect() protoreflect.Message { + mi := &file_support_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AgentMessage proto.InternalMessageInfo +// Deprecated: Use AgentMessage.ProtoReflect.Descriptor instead. +func (*AgentMessage) Descriptor() ([]byte, []int) { + return file_support_proto_rawDescGZIP(), []int{2} +} -func (m *AgentMessage) GetAgentName() string { - if m != nil { - return m.AgentName +func (x *AgentMessage) GetAgentName() string { + if x != nil { + return x.AgentName } return "" } -func (m *AgentMessage) GetMsg() string { - if m != nil { - return m.Msg +func (x *AgentMessage) GetMsg() string { + if x != nil { + return x.Msg } return "" } type ChatCustomerResponse struct { - // Types that are valid to be assigned to Resp: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Resp: // *ChatCustomerResponse_Session // *ChatCustomerResponse_Msg - Resp isChatCustomerResponse_Resp `protobuf_oneof:"resp"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Resp isChatCustomerResponse_Resp `protobuf_oneof:"resp"` } -func (m *ChatCustomerResponse) Reset() { *m = ChatCustomerResponse{} } -func (m *ChatCustomerResponse) String() string { return proto.CompactTextString(m) } -func (*ChatCustomerResponse) ProtoMessage() {} -func (*ChatCustomerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_support_640cb5c436dbd37d, []int{3} -} -func (m *ChatCustomerResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ChatCustomerResponse.Unmarshal(m, b) -} -func (m *ChatCustomerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ChatCustomerResponse.Marshal(b, m, deterministic) -} -func (dst *ChatCustomerResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChatCustomerResponse.Merge(dst, src) -} -func (m *ChatCustomerResponse) XXX_Size() int { - return xxx_messageInfo_ChatCustomerResponse.Size(m) +func (x *ChatCustomerResponse) Reset() { + *x = ChatCustomerResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_support_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ChatCustomerResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ChatCustomerResponse.DiscardUnknown(m) + +func (x *ChatCustomerResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_ChatCustomerResponse proto.InternalMessageInfo +func (*ChatCustomerResponse) ProtoMessage() {} -type isChatCustomerResponse_Resp interface { - isChatCustomerResponse_Resp() +func (x *ChatCustomerResponse) ProtoReflect() protoreflect.Message { + mi := &file_support_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -type ChatCustomerResponse_Session struct { - Session *Session `protobuf:"bytes,1,opt,name=session,proto3,oneof"` -} -type ChatCustomerResponse_Msg struct { - Msg *AgentMessage `protobuf:"bytes,2,opt,name=msg,proto3,oneof"` +// Deprecated: Use ChatCustomerResponse.ProtoReflect.Descriptor instead. +func (*ChatCustomerResponse) Descriptor() ([]byte, []int) { + return file_support_proto_rawDescGZIP(), []int{3} } -func (*ChatCustomerResponse_Session) isChatCustomerResponse_Resp() {} -func (*ChatCustomerResponse_Msg) isChatCustomerResponse_Resp() {} - func (m *ChatCustomerResponse) GetResp() isChatCustomerResponse_Resp { if m != nil { return m.Resp @@ -348,147 +330,85 @@ func (m *ChatCustomerResponse) GetResp() isChatCustomerResponse_Resp { return nil } -func (m *ChatCustomerResponse) GetSession() *Session { - if x, ok := m.GetResp().(*ChatCustomerResponse_Session); ok { +func (x *ChatCustomerResponse) GetSession() *Session { + if x, ok := x.GetResp().(*ChatCustomerResponse_Session); ok { return x.Session } return nil } -func (m *ChatCustomerResponse) GetMsg() *AgentMessage { - if x, ok := m.GetResp().(*ChatCustomerResponse_Msg); ok { +func (x *ChatCustomerResponse) GetMsg() *AgentMessage { + if x, ok := x.GetResp().(*ChatCustomerResponse_Msg); ok { return x.Msg } return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*ChatCustomerResponse) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _ChatCustomerResponse_OneofMarshaler, _ChatCustomerResponse_OneofUnmarshaler, _ChatCustomerResponse_OneofSizer, []interface{}{ - (*ChatCustomerResponse_Session)(nil), - (*ChatCustomerResponse_Msg)(nil), - } +type isChatCustomerResponse_Resp interface { + isChatCustomerResponse_Resp() } -func _ChatCustomerResponse_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*ChatCustomerResponse) - // resp - switch x := m.Resp.(type) { - case *ChatCustomerResponse_Session: - b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Session); err != nil { - return err - } - case *ChatCustomerResponse_Msg: - b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Msg); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("ChatCustomerResponse.Resp has unexpected type %T", x) - } - return nil +type ChatCustomerResponse_Session struct { + // session is sent from the server when the stream is connected + // to a chat session. This happens after an init request is sent + // and the stream is connected to either a new or resumed session. + Session *Session `protobuf:"bytes,1,opt,name=session,proto3,oneof"` } -func _ChatCustomerResponse_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*ChatCustomerResponse) - switch tag { - case 1: // resp.session - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Session) - err := b.DecodeMessage(msg) - m.Resp = &ChatCustomerResponse_Session{msg} - return true, err - case 2: // resp.msg - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(AgentMessage) - err := b.DecodeMessage(msg) - m.Resp = &ChatCustomerResponse_Msg{msg} - return true, err - default: - return false, nil - } +type ChatCustomerResponse_Msg struct { + // msg is sent from the server to convey agents' messages to the + // customer. + Msg *AgentMessage `protobuf:"bytes,2,opt,name=msg,proto3,oneof"` } -func _ChatCustomerResponse_OneofSizer(msg proto.Message) (n int) { - m := msg.(*ChatCustomerResponse) - // resp - switch x := m.Resp.(type) { - case *ChatCustomerResponse_Session: - s := proto.Size(x.Session) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *ChatCustomerResponse_Msg: - s := proto.Size(x.Msg) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} +func (*ChatCustomerResponse_Session) isChatCustomerResponse_Resp() {} + +func (*ChatCustomerResponse_Msg) isChatCustomerResponse_Resp() {} type ChatAgentRequest struct { - // Types that are valid to be assigned to Req: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Req: // *ChatAgentRequest_Accept // *ChatAgentRequest_Msg // *ChatAgentRequest_LeaveSession - Req isChatAgentRequest_Req `protobuf_oneof:"req"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Req isChatAgentRequest_Req `protobuf_oneof:"req"` } -func (m *ChatAgentRequest) Reset() { *m = ChatAgentRequest{} } -func (m *ChatAgentRequest) String() string { return proto.CompactTextString(m) } -func (*ChatAgentRequest) ProtoMessage() {} -func (*ChatAgentRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_support_640cb5c436dbd37d, []int{4} -} -func (m *ChatAgentRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ChatAgentRequest.Unmarshal(m, b) -} -func (m *ChatAgentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ChatAgentRequest.Marshal(b, m, deterministic) -} -func (dst *ChatAgentRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChatAgentRequest.Merge(dst, src) -} -func (m *ChatAgentRequest) XXX_Size() int { - return xxx_messageInfo_ChatAgentRequest.Size(m) +func (x *ChatAgentRequest) Reset() { + *x = ChatAgentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_support_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ChatAgentRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ChatAgentRequest.DiscardUnknown(m) + +func (x *ChatAgentRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_ChatAgentRequest proto.InternalMessageInfo +func (*ChatAgentRequest) ProtoMessage() {} -type isChatAgentRequest_Req interface { - isChatAgentRequest_Req() +func (x *ChatAgentRequest) ProtoReflect() protoreflect.Message { + mi := &file_support_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -type ChatAgentRequest_Accept struct { - Accept *AcceptChat `protobuf:"bytes,1,opt,name=accept,proto3,oneof"` -} -type ChatAgentRequest_Msg struct { - Msg string `protobuf:"bytes,2,opt,name=msg,proto3,oneof"` -} -type ChatAgentRequest_LeaveSession struct { - LeaveSession Void `protobuf:"varint,3,opt,name=leave_session,json=leaveSession,proto3,enum=Void,oneof"` +// Deprecated: Use ChatAgentRequest.ProtoReflect.Descriptor instead. +func (*ChatAgentRequest) Descriptor() ([]byte, []int) { + return file_support_proto_rawDescGZIP(), []int{4} } -func (*ChatAgentRequest_Accept) isChatAgentRequest_Req() {} -func (*ChatAgentRequest_Msg) isChatAgentRequest_Req() {} -func (*ChatAgentRequest_LeaveSession) isChatAgentRequest_Req() {} - func (m *ChatAgentRequest) GetReq() isChatAgentRequest_Req { if m != nil { return m.Req @@ -496,349 +416,239 @@ func (m *ChatAgentRequest) GetReq() isChatAgentRequest_Req { return nil } -func (m *ChatAgentRequest) GetAccept() *AcceptChat { - if x, ok := m.GetReq().(*ChatAgentRequest_Accept); ok { +func (x *ChatAgentRequest) GetAccept() *AcceptChat { + if x, ok := x.GetReq().(*ChatAgentRequest_Accept); ok { return x.Accept } return nil } -func (m *ChatAgentRequest) GetMsg() string { - if x, ok := m.GetReq().(*ChatAgentRequest_Msg); ok { +func (x *ChatAgentRequest) GetMsg() string { + if x, ok := x.GetReq().(*ChatAgentRequest_Msg); ok { return x.Msg } return "" } -func (m *ChatAgentRequest) GetLeaveSession() Void { - if x, ok := m.GetReq().(*ChatAgentRequest_LeaveSession); ok { +func (x *ChatAgentRequest) GetLeaveSession() Void { + if x, ok := x.GetReq().(*ChatAgentRequest_LeaveSession); ok { return x.LeaveSession } return Void_VOID } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*ChatAgentRequest) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _ChatAgentRequest_OneofMarshaler, _ChatAgentRequest_OneofUnmarshaler, _ChatAgentRequest_OneofSizer, []interface{}{ - (*ChatAgentRequest_Accept)(nil), - (*ChatAgentRequest_Msg)(nil), - (*ChatAgentRequest_LeaveSession)(nil), - } +type isChatAgentRequest_Req interface { + isChatAgentRequest_Req() } -func _ChatAgentRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*ChatAgentRequest) - // req - switch x := m.Req.(type) { - case *ChatAgentRequest_Accept: - b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Accept); err != nil { - return err - } - case *ChatAgentRequest_Msg: - b.EncodeVarint(2<<3 | proto.WireBytes) - b.EncodeStringBytes(x.Msg) - case *ChatAgentRequest_LeaveSession: - b.EncodeVarint(3<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.LeaveSession)) - case nil: - default: - return fmt.Errorf("ChatAgentRequest.Req has unexpected type %T", x) - } - return nil +type ChatAgentRequest_Accept struct { + // accept is used when an agent wants to join a customer chat + // session. It can be used to connect to a specific session (by + // ID), or to just accept the session for which the customer has + // been waiting the longest (e.g. poll a FIFO queue of sessions + // awaiting a support agent). It is possible for multiple agents + // to be connected to the same chat session. + Accept *AcceptChat `protobuf:"bytes,1,opt,name=accept,proto3,oneof"` } -func _ChatAgentRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*ChatAgentRequest) - switch tag { - case 1: // req.accept - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(AcceptChat) - err := b.DecodeMessage(msg) - m.Req = &ChatAgentRequest_Accept{msg} - return true, err - case 2: // req.msg - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Req = &ChatAgentRequest_Msg{x} - return true, err - case 3: // req.leave_session - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Req = &ChatAgentRequest_LeaveSession{Void(x)} - return true, err - default: - return false, nil - } +type ChatAgentRequest_Msg struct { + // msg is used to send a message to the customer. It will also be + // delivered to any other connected support agents. + Msg string `protobuf:"bytes,2,opt,name=msg,proto3,oneof"` } -func _ChatAgentRequest_OneofSizer(msg proto.Message) (n int) { - m := msg.(*ChatAgentRequest) - // req - switch x := m.Req.(type) { - case *ChatAgentRequest_Accept: - s := proto.Size(x.Accept) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *ChatAgentRequest_Msg: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.Msg))) - n += len(x.Msg) - case *ChatAgentRequest_LeaveSession: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(x.LeaveSession)) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n +type ChatAgentRequest_LeaveSession struct { + // leave_session allows an agent to exit a chat session. They can + // always re-enter later by sending an accept message for that + // session ID. + LeaveSession Void `protobuf:"varint,3,opt,name=leave_session,json=leaveSession,proto3,enum=Void,oneof"` } +func (*ChatAgentRequest_Accept) isChatAgentRequest_Req() {} + +func (*ChatAgentRequest_Msg) isChatAgentRequest_Req() {} + +func (*ChatAgentRequest_LeaveSession) isChatAgentRequest_Req() {} + type AcceptChat struct { - SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *AcceptChat) Reset() { *m = AcceptChat{} } -func (m *AcceptChat) String() string { return proto.CompactTextString(m) } -func (*AcceptChat) ProtoMessage() {} -func (*AcceptChat) Descriptor() ([]byte, []int) { - return fileDescriptor_support_640cb5c436dbd37d, []int{5} -} -func (m *AcceptChat) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AcceptChat.Unmarshal(m, b) -} -func (m *AcceptChat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AcceptChat.Marshal(b, m, deterministic) + SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` } -func (dst *AcceptChat) XXX_Merge(src proto.Message) { - xxx_messageInfo_AcceptChat.Merge(dst, src) + +func (x *AcceptChat) Reset() { + *x = AcceptChat{} + if protoimpl.UnsafeEnabled { + mi := &file_support_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *AcceptChat) XXX_Size() int { - return xxx_messageInfo_AcceptChat.Size(m) + +func (x *AcceptChat) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AcceptChat) XXX_DiscardUnknown() { - xxx_messageInfo_AcceptChat.DiscardUnknown(m) + +func (*AcceptChat) ProtoMessage() {} + +func (x *AcceptChat) ProtoReflect() protoreflect.Message { + mi := &file_support_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AcceptChat proto.InternalMessageInfo +// Deprecated: Use AcceptChat.ProtoReflect.Descriptor instead. +func (*AcceptChat) Descriptor() ([]byte, []int) { + return file_support_proto_rawDescGZIP(), []int{5} +} -func (m *AcceptChat) GetSessionId() string { - if m != nil { - return m.SessionId +func (x *AcceptChat) GetSessionId() string { + if x != nil { + return x.SessionId } return "" } type ChatEntry struct { - Date *timestamp.Timestamp `protobuf:"bytes,1,opt,name=date,proto3" json:"date,omitempty"` - // Types that are valid to be assigned to Entry: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Date *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=date,proto3" json:"date,omitempty"` + // Types that are assignable to Entry: // *ChatEntry_CustomerMsg // *ChatEntry_AgentMsg - Entry isChatEntry_Entry `protobuf_oneof:"entry"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Entry isChatEntry_Entry `protobuf_oneof:"entry"` } -func (m *ChatEntry) Reset() { *m = ChatEntry{} } -func (m *ChatEntry) String() string { return proto.CompactTextString(m) } -func (*ChatEntry) ProtoMessage() {} -func (*ChatEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_support_640cb5c436dbd37d, []int{6} -} -func (m *ChatEntry) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ChatEntry.Unmarshal(m, b) -} -func (m *ChatEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ChatEntry.Marshal(b, m, deterministic) -} -func (dst *ChatEntry) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChatEntry.Merge(dst, src) -} -func (m *ChatEntry) XXX_Size() int { - return xxx_messageInfo_ChatEntry.Size(m) +func (x *ChatEntry) Reset() { + *x = ChatEntry{} + if protoimpl.UnsafeEnabled { + mi := &file_support_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ChatEntry) XXX_DiscardUnknown() { - xxx_messageInfo_ChatEntry.DiscardUnknown(m) + +func (x *ChatEntry) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_ChatEntry proto.InternalMessageInfo +func (*ChatEntry) ProtoMessage() {} -type isChatEntry_Entry interface { - isChatEntry_Entry() +func (x *ChatEntry) ProtoReflect() protoreflect.Message { + mi := &file_support_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -type ChatEntry_CustomerMsg struct { - CustomerMsg string `protobuf:"bytes,2,opt,name=customer_msg,json=customerMsg,proto3,oneof"` -} -type ChatEntry_AgentMsg struct { - AgentMsg *AgentMessage `protobuf:"bytes,3,opt,name=agent_msg,json=agentMsg,proto3,oneof"` +// Deprecated: Use ChatEntry.ProtoReflect.Descriptor instead. +func (*ChatEntry) Descriptor() ([]byte, []int) { + return file_support_proto_rawDescGZIP(), []int{6} } -func (*ChatEntry_CustomerMsg) isChatEntry_Entry() {} -func (*ChatEntry_AgentMsg) isChatEntry_Entry() {} - -func (m *ChatEntry) GetEntry() isChatEntry_Entry { - if m != nil { - return m.Entry +func (x *ChatEntry) GetDate() *timestamppb.Timestamp { + if x != nil { + return x.Date } return nil } -func (m *ChatEntry) GetDate() *timestamp.Timestamp { +func (m *ChatEntry) GetEntry() isChatEntry_Entry { if m != nil { - return m.Date + return m.Entry } return nil } -func (m *ChatEntry) GetCustomerMsg() string { - if x, ok := m.GetEntry().(*ChatEntry_CustomerMsg); ok { +func (x *ChatEntry) GetCustomerMsg() string { + if x, ok := x.GetEntry().(*ChatEntry_CustomerMsg); ok { return x.CustomerMsg } return "" } -func (m *ChatEntry) GetAgentMsg() *AgentMessage { - if x, ok := m.GetEntry().(*ChatEntry_AgentMsg); ok { +func (x *ChatEntry) GetAgentMsg() *AgentMessage { + if x, ok := x.GetEntry().(*ChatEntry_AgentMsg); ok { return x.AgentMsg } return nil } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*ChatEntry) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _ChatEntry_OneofMarshaler, _ChatEntry_OneofUnmarshaler, _ChatEntry_OneofSizer, []interface{}{ - (*ChatEntry_CustomerMsg)(nil), - (*ChatEntry_AgentMsg)(nil), - } +type isChatEntry_Entry interface { + isChatEntry_Entry() } -func _ChatEntry_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*ChatEntry) - // entry - switch x := m.Entry.(type) { - case *ChatEntry_CustomerMsg: - b.EncodeVarint(2<<3 | proto.WireBytes) - b.EncodeStringBytes(x.CustomerMsg) - case *ChatEntry_AgentMsg: - b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.AgentMsg); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("ChatEntry.Entry has unexpected type %T", x) - } - return nil +type ChatEntry_CustomerMsg struct { + CustomerMsg string `protobuf:"bytes,2,opt,name=customer_msg,json=customerMsg,proto3,oneof"` } -func _ChatEntry_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*ChatEntry) - switch tag { - case 2: // entry.customer_msg - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeStringBytes() - m.Entry = &ChatEntry_CustomerMsg{x} - return true, err - case 3: // entry.agent_msg - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(AgentMessage) - err := b.DecodeMessage(msg) - m.Entry = &ChatEntry_AgentMsg{msg} - return true, err - default: - return false, nil - } +type ChatEntry_AgentMsg struct { + AgentMsg *AgentMessage `protobuf:"bytes,3,opt,name=agent_msg,json=agentMsg,proto3,oneof"` } -func _ChatEntry_OneofSizer(msg proto.Message) (n int) { - m := msg.(*ChatEntry) - // entry - switch x := m.Entry.(type) { - case *ChatEntry_CustomerMsg: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(len(x.CustomerMsg))) - n += len(x.CustomerMsg) - case *ChatEntry_AgentMsg: - s := proto.Size(x.AgentMsg) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} +func (*ChatEntry_CustomerMsg) isChatEntry_Entry() {} + +func (*ChatEntry_AgentMsg) isChatEntry_Entry() {} type ChatAgentResponse struct { - // Types that are valid to be assigned to Resp: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to Resp: // *ChatAgentResponse_AcceptedSession // *ChatAgentResponse_Msg // *ChatAgentResponse_SessionEnded - Resp isChatAgentResponse_Resp `protobuf_oneof:"resp"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Resp isChatAgentResponse_Resp `protobuf_oneof:"resp"` } -func (m *ChatAgentResponse) Reset() { *m = ChatAgentResponse{} } -func (m *ChatAgentResponse) String() string { return proto.CompactTextString(m) } -func (*ChatAgentResponse) ProtoMessage() {} -func (*ChatAgentResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_support_640cb5c436dbd37d, []int{7} -} -func (m *ChatAgentResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ChatAgentResponse.Unmarshal(m, b) -} -func (m *ChatAgentResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ChatAgentResponse.Marshal(b, m, deterministic) -} -func (dst *ChatAgentResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChatAgentResponse.Merge(dst, src) -} -func (m *ChatAgentResponse) XXX_Size() int { - return xxx_messageInfo_ChatAgentResponse.Size(m) +func (x *ChatAgentResponse) Reset() { + *x = ChatAgentResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_support_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ChatAgentResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ChatAgentResponse.DiscardUnknown(m) + +func (x *ChatAgentResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -var xxx_messageInfo_ChatAgentResponse proto.InternalMessageInfo +func (*ChatAgentResponse) ProtoMessage() {} -type isChatAgentResponse_Resp interface { - isChatAgentResponse_Resp() +func (x *ChatAgentResponse) ProtoReflect() protoreflect.Message { + mi := &file_support_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -type ChatAgentResponse_AcceptedSession struct { - AcceptedSession *Session `protobuf:"bytes,1,opt,name=accepted_session,json=acceptedSession,proto3,oneof"` -} -type ChatAgentResponse_Msg struct { - Msg *ChatEntry `protobuf:"bytes,2,opt,name=msg,proto3,oneof"` -} -type ChatAgentResponse_SessionEnded struct { - SessionEnded Void `protobuf:"varint,3,opt,name=session_ended,json=sessionEnded,proto3,enum=Void,oneof"` +// Deprecated: Use ChatAgentResponse.ProtoReflect.Descriptor instead. +func (*ChatAgentResponse) Descriptor() ([]byte, []int) { + return file_support_proto_rawDescGZIP(), []int{7} } -func (*ChatAgentResponse_AcceptedSession) isChatAgentResponse_Resp() {} -func (*ChatAgentResponse_Msg) isChatAgentResponse_Resp() {} -func (*ChatAgentResponse_SessionEnded) isChatAgentResponse_Resp() {} - func (m *ChatAgentResponse) GetResp() isChatAgentResponse_Resp { if m != nil { return m.Resp @@ -846,189 +656,414 @@ func (m *ChatAgentResponse) GetResp() isChatAgentResponse_Resp { return nil } -func (m *ChatAgentResponse) GetAcceptedSession() *Session { - if x, ok := m.GetResp().(*ChatAgentResponse_AcceptedSession); ok { +func (x *ChatAgentResponse) GetAcceptedSession() *Session { + if x, ok := x.GetResp().(*ChatAgentResponse_AcceptedSession); ok { return x.AcceptedSession } return nil } -func (m *ChatAgentResponse) GetMsg() *ChatEntry { - if x, ok := m.GetResp().(*ChatAgentResponse_Msg); ok { +func (x *ChatAgentResponse) GetMsg() *ChatEntry { + if x, ok := x.GetResp().(*ChatAgentResponse_Msg); ok { return x.Msg } return nil } -func (m *ChatAgentResponse) GetSessionEnded() Void { - if x, ok := m.GetResp().(*ChatAgentResponse_SessionEnded); ok { +func (x *ChatAgentResponse) GetSessionEnded() Void { + if x, ok := x.GetResp().(*ChatAgentResponse_SessionEnded); ok { return x.SessionEnded } return Void_VOID } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*ChatAgentResponse) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _ChatAgentResponse_OneofMarshaler, _ChatAgentResponse_OneofUnmarshaler, _ChatAgentResponse_OneofSizer, []interface{}{ - (*ChatAgentResponse_AcceptedSession)(nil), - (*ChatAgentResponse_Msg)(nil), - (*ChatAgentResponse_SessionEnded)(nil), - } +type isChatAgentResponse_Resp interface { + isChatAgentResponse_Resp() } -func _ChatAgentResponse_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*ChatAgentResponse) - // resp - switch x := m.Resp.(type) { - case *ChatAgentResponse_AcceptedSession: - b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.AcceptedSession); err != nil { - return err - } - case *ChatAgentResponse_Msg: - b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Msg); err != nil { - return err - } - case *ChatAgentResponse_SessionEnded: - b.EncodeVarint(3<<3 | proto.WireVarint) - b.EncodeVarint(uint64(x.SessionEnded)) - case nil: - default: - return fmt.Errorf("ChatAgentResponse.Resp has unexpected type %T", x) - } - return nil +type ChatAgentResponse_AcceptedSession struct { + // accepted_session provides the detail of a chat session. The server + // sends this message after the agent has accepted a chat session. + AcceptedSession *Session `protobuf:"bytes,1,opt,name=accepted_session,json=acceptedSession,proto3,oneof"` } -func _ChatAgentResponse_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*ChatAgentResponse) - switch tag { - case 1: // resp.accepted_session - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Session) - err := b.DecodeMessage(msg) - m.Resp = &ChatAgentResponse_AcceptedSession{msg} - return true, err - case 2: // resp.msg - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(ChatEntry) - err := b.DecodeMessage(msg) - m.Resp = &ChatAgentResponse_Msg{msg} - return true, err - case 3: // resp.session_ended - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.Resp = &ChatAgentResponse_SessionEnded{Void(x)} - return true, err - default: - return false, nil - } +type ChatAgentResponse_Msg struct { + // msg is sent by the server when the customer, or another support + // agent, sends a message in stream's current session. + Msg *ChatEntry `protobuf:"bytes,2,opt,name=msg,proto3,oneof"` } -func _ChatAgentResponse_OneofSizer(msg proto.Message) (n int) { - m := msg.(*ChatAgentResponse) - // resp - switch x := m.Resp.(type) { - case *ChatAgentResponse_AcceptedSession: - s := proto.Size(x.AcceptedSession) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *ChatAgentResponse_Msg: - s := proto.Size(x.Msg) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *ChatAgentResponse_SessionEnded: - n += 1 // tag and wire - n += proto.SizeVarint(uint64(x.SessionEnded)) - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n +type ChatAgentResponse_SessionEnded struct { + // session_ended notifies the support agent that their currently + // connected chat session has been terminated by the customer. + SessionEnded Void `protobuf:"varint,3,opt,name=session_ended,json=sessionEnded,proto3,enum=Void,oneof"` } +func (*ChatAgentResponse_AcceptedSession) isChatAgentResponse_Resp() {} + +func (*ChatAgentResponse_Msg) isChatAgentResponse_Resp() {} + +func (*ChatAgentResponse_SessionEnded) isChatAgentResponse_Resp() {} + type Session struct { - SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` - CustomerName string `protobuf:"bytes,2,opt,name=customer_name,json=customerName,proto3" json:"customer_name,omitempty"` - History []*ChatEntry `protobuf:"bytes,3,rep,name=history,proto3" json:"history,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *Session) Reset() { *m = Session{} } -func (m *Session) String() string { return proto.CompactTextString(m) } -func (*Session) ProtoMessage() {} -func (*Session) Descriptor() ([]byte, []int) { - return fileDescriptor_support_640cb5c436dbd37d, []int{8} -} -func (m *Session) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Session.Unmarshal(m, b) + SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` + CustomerName string `protobuf:"bytes,2,opt,name=customer_name,json=customerName,proto3" json:"customer_name,omitempty"` + History []*ChatEntry `protobuf:"bytes,3,rep,name=history,proto3" json:"history,omitempty"` } -func (m *Session) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Session.Marshal(b, m, deterministic) -} -func (dst *Session) XXX_Merge(src proto.Message) { - xxx_messageInfo_Session.Merge(dst, src) + +func (x *Session) Reset() { + *x = Session{} + if protoimpl.UnsafeEnabled { + mi := &file_support_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Session) XXX_Size() int { - return xxx_messageInfo_Session.Size(m) + +func (x *Session) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Session) XXX_DiscardUnknown() { - xxx_messageInfo_Session.DiscardUnknown(m) + +func (*Session) ProtoMessage() {} + +func (x *Session) ProtoReflect() protoreflect.Message { + mi := &file_support_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Session proto.InternalMessageInfo +// Deprecated: Use Session.ProtoReflect.Descriptor instead. +func (*Session) Descriptor() ([]byte, []int) { + return file_support_proto_rawDescGZIP(), []int{8} +} -func (m *Session) GetSessionId() string { - if m != nil { - return m.SessionId +func (x *Session) GetSessionId() string { + if x != nil { + return x.SessionId } return "" } -func (m *Session) GetCustomerName() string { - if m != nil { - return m.CustomerName +func (x *Session) GetCustomerName() string { + if x != nil { + return x.CustomerName } return "" } -func (m *Session) GetHistory() []*ChatEntry { - if m != nil { - return m.History +func (x *Session) GetHistory() []*ChatEntry { + if x != nil { + return x.History } return nil } -func init() { - proto.RegisterType((*ChatCustomerRequest)(nil), "ChatCustomerRequest") - proto.RegisterType((*InitiateChat)(nil), "InitiateChat") - proto.RegisterType((*AgentMessage)(nil), "AgentMessage") - proto.RegisterType((*ChatCustomerResponse)(nil), "ChatCustomerResponse") - proto.RegisterType((*ChatAgentRequest)(nil), "ChatAgentRequest") - proto.RegisterType((*AcceptChat)(nil), "AcceptChat") - proto.RegisterType((*ChatEntry)(nil), "ChatEntry") - proto.RegisterType((*ChatAgentResponse)(nil), "ChatAgentResponse") - proto.RegisterType((*Session)(nil), "Session") - proto.RegisterEnum("Void", Void_name, Void_value) +var File_support_proto protoreflect.FileDescriptor + +var file_support_proto_rawDesc = []byte{ + 0x0a, 0x0d, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0x77, 0x0a, 0x13, 0x43, 0x68, 0x61, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x04, 0x69, 0x6e, 0x69, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x65, + 0x43, 0x68, 0x61, 0x74, 0x48, 0x00, 0x52, 0x04, 0x69, 0x6e, 0x69, 0x74, 0x12, 0x12, 0x0a, 0x03, + 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x73, 0x67, + 0x12, 0x20, 0x0a, 0x07, 0x68, 0x61, 0x6e, 0x67, 0x5f, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x05, 0x2e, 0x56, 0x6f, 0x69, 0x64, 0x48, 0x00, 0x52, 0x06, 0x68, 0x61, 0x6e, 0x67, + 0x55, 0x70, 0x42, 0x05, 0x0a, 0x03, 0x72, 0x65, 0x71, 0x22, 0x3a, 0x0a, 0x0c, 0x49, 0x6e, 0x69, + 0x74, 0x69, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x72, 0x65, 0x73, + 0x75, 0x6d, 0x65, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x53, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x3f, 0x0a, 0x0c, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0x67, 0x0a, 0x14, 0x43, 0x68, 0x61, 0x74, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, + 0x0a, 0x07, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x08, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x07, 0x73, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0d, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x48, 0x00, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x42, 0x06, 0x0a, 0x04, 0x72, 0x65, 0x73, 0x70, 0x22, + 0x82, 0x01, 0x0a, 0x10, 0x43, 0x68, 0x61, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a, 0x06, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x43, 0x68, 0x61, + 0x74, 0x48, 0x00, 0x52, 0x06, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x12, 0x12, 0x0a, 0x03, 0x6d, + 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, + 0x2c, 0x0a, 0x0d, 0x6c, 0x65, 0x61, 0x76, 0x65, 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x05, 0x2e, 0x56, 0x6f, 0x69, 0x64, 0x48, 0x00, 0x52, + 0x0c, 0x6c, 0x65, 0x61, 0x76, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x05, 0x0a, + 0x03, 0x72, 0x65, 0x71, 0x22, 0x2b, 0x0a, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x43, 0x68, + 0x61, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x22, 0x97, 0x01, 0x0a, 0x09, 0x43, 0x68, 0x61, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x2e, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x64, 0x61, 0x74, 0x65, 0x12, + 0x23, 0x0a, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, + 0x72, 0x4d, 0x73, 0x67, 0x12, 0x2c, 0x0a, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x73, + 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x48, 0x00, 0x52, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x4d, + 0x73, 0x67, 0x42, 0x07, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x22, 0xa0, 0x01, 0x0a, 0x11, + 0x43, 0x68, 0x61, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x35, 0x0a, 0x10, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x53, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0f, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, + 0x64, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x2c, 0x0a, 0x0d, 0x73, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x5f, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x05, 0x2e, 0x56, 0x6f, 0x69, 0x64, 0x48, 0x00, 0x52, 0x0c, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x45, 0x6e, 0x64, 0x65, 0x64, 0x42, 0x06, 0x0a, 0x04, 0x72, 0x65, 0x73, 0x70, 0x22, 0x73, + 0x0a, 0x07, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, + 0x6f, 0x6d, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, + 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, + 0x2e, 0x43, 0x68, 0x61, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x69, 0x73, 0x74, + 0x6f, 0x72, 0x79, 0x2a, 0x10, 0x0a, 0x04, 0x56, 0x6f, 0x69, 0x64, 0x12, 0x08, 0x0a, 0x04, 0x56, + 0x4f, 0x49, 0x44, 0x10, 0x00, 0x32, 0x82, 0x01, 0x0a, 0x07, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, + 0x74, 0x12, 0x3f, 0x0a, 0x0c, 0x43, 0x68, 0x61, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, + 0x72, 0x12, 0x14, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, + 0x30, 0x01, 0x12, 0x36, 0x0a, 0x09, 0x43, 0x68, 0x61, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, + 0x11, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x42, 0x08, 0x5a, 0x06, 0x2e, 0x3b, + 0x6d, 0x61, 0x69, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_support_proto_rawDescOnce sync.Once + file_support_proto_rawDescData = file_support_proto_rawDesc +) + +func file_support_proto_rawDescGZIP() []byte { + file_support_proto_rawDescOnce.Do(func() { + file_support_proto_rawDescData = protoimpl.X.CompressGZIP(file_support_proto_rawDescData) + }) + return file_support_proto_rawDescData +} + +var file_support_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_support_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_support_proto_goTypes = []interface{}{ + (Void)(0), // 0: Void + (*ChatCustomerRequest)(nil), // 1: ChatCustomerRequest + (*InitiateChat)(nil), // 2: InitiateChat + (*AgentMessage)(nil), // 3: AgentMessage + (*ChatCustomerResponse)(nil), // 4: ChatCustomerResponse + (*ChatAgentRequest)(nil), // 5: ChatAgentRequest + (*AcceptChat)(nil), // 6: AcceptChat + (*ChatEntry)(nil), // 7: ChatEntry + (*ChatAgentResponse)(nil), // 8: ChatAgentResponse + (*Session)(nil), // 9: Session + (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp +} +var file_support_proto_depIdxs = []int32{ + 2, // 0: ChatCustomerRequest.init:type_name -> InitiateChat + 0, // 1: ChatCustomerRequest.hang_up:type_name -> Void + 9, // 2: ChatCustomerResponse.session:type_name -> Session + 3, // 3: ChatCustomerResponse.msg:type_name -> AgentMessage + 6, // 4: ChatAgentRequest.accept:type_name -> AcceptChat + 0, // 5: ChatAgentRequest.leave_session:type_name -> Void + 10, // 6: ChatEntry.date:type_name -> google.protobuf.Timestamp + 3, // 7: ChatEntry.agent_msg:type_name -> AgentMessage + 9, // 8: ChatAgentResponse.accepted_session:type_name -> Session + 7, // 9: ChatAgentResponse.msg:type_name -> ChatEntry + 0, // 10: ChatAgentResponse.session_ended:type_name -> Void + 7, // 11: Session.history:type_name -> ChatEntry + 1, // 12: Support.ChatCustomer:input_type -> ChatCustomerRequest + 5, // 13: Support.ChatAgent:input_type -> ChatAgentRequest + 4, // 14: Support.ChatCustomer:output_type -> ChatCustomerResponse + 8, // 15: Support.ChatAgent:output_type -> ChatAgentResponse + 14, // [14:16] is the sub-list for method output_type + 12, // [12:14] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_support_proto_init() } +func file_support_proto_init() { + if File_support_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_support_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChatCustomerRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_support_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InitiateChat); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_support_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AgentMessage); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_support_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChatCustomerResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_support_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChatAgentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_support_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AcceptChat); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_support_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChatEntry); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_support_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChatAgentResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_support_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Session); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_support_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*ChatCustomerRequest_Init)(nil), + (*ChatCustomerRequest_Msg)(nil), + (*ChatCustomerRequest_HangUp)(nil), + } + file_support_proto_msgTypes[3].OneofWrappers = []interface{}{ + (*ChatCustomerResponse_Session)(nil), + (*ChatCustomerResponse_Msg)(nil), + } + file_support_proto_msgTypes[4].OneofWrappers = []interface{}{ + (*ChatAgentRequest_Accept)(nil), + (*ChatAgentRequest_Msg)(nil), + (*ChatAgentRequest_LeaveSession)(nil), + } + file_support_proto_msgTypes[6].OneofWrappers = []interface{}{ + (*ChatEntry_CustomerMsg)(nil), + (*ChatEntry_AgentMsg)(nil), + } + file_support_proto_msgTypes[7].OneofWrappers = []interface{}{ + (*ChatAgentResponse_AcceptedSession)(nil), + (*ChatAgentResponse_Msg)(nil), + (*ChatAgentResponse_SessionEnded)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_support_proto_rawDesc, + NumEnums: 1, + NumMessages: 9, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_support_proto_goTypes, + DependencyIndexes: file_support_proto_depIdxs, + EnumInfos: file_support_proto_enumTypes, + MessageInfos: file_support_proto_msgTypes, + }.Build() + File_support_proto = out.File + file_support_proto_rawDesc = nil + file_support_proto_goTypes = nil + file_support_proto_depIdxs = nil } // Reference imports to suppress errors if they are not otherwise used. var _ context.Context -var _ grpc.ClientConn +var _ grpc.ClientConnInterface // 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 +const _ = grpc.SupportPackageIsVersion6 // SupportClient is the client API for Support service. // @@ -1047,10 +1082,10 @@ type SupportClient interface { } type supportClient struct { - cc *grpc.ClientConn + cc grpc.ClientConnInterface } -func NewSupportClient(cc *grpc.ClientConn) SupportClient { +func NewSupportClient(cc grpc.ClientConnInterface) SupportClient { return &supportClient{cc} } @@ -1130,6 +1165,17 @@ type SupportServer interface { ChatAgent(Support_ChatAgentServer) error } +// UnimplementedSupportServer can be embedded to have forward compatible implementations. +type UnimplementedSupportServer struct { +} + +func (*UnimplementedSupportServer) ChatCustomer(Support_ChatCustomerServer) error { + return status.Errorf(codes.Unimplemented, "method ChatCustomer not implemented") +} +func (*UnimplementedSupportServer) ChatAgent(Support_ChatAgentServer) error { + return status.Errorf(codes.Unimplemented, "method ChatAgent not implemented") +} + func RegisterSupportServer(s *grpc.Server, srv SupportServer) { s.RegisterService(&_Support_serviceDesc, srv) } @@ -1206,45 +1252,3 @@ var _Support_serviceDesc = grpc.ServiceDesc{ }, Metadata: "support.proto", } - -func init() { proto.RegisterFile("support.proto", fileDescriptor_support_640cb5c436dbd37d) } - -var fileDescriptor_support_640cb5c436dbd37d = []byte{ - // 571 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x94, 0x4f, 0x6f, 0xd3, 0x40, - 0x10, 0xc5, 0x63, 0xec, 0xc6, 0xcd, 0x24, 0xa1, 0xc9, 0x52, 0xa4, 0x28, 0x12, 0x10, 0x9c, 0x22, - 0x45, 0x05, 0x6d, 0x51, 0x10, 0x1c, 0xb8, 0x54, 0x4d, 0xa9, 0x94, 0x1c, 0x02, 0x92, 0x0b, 0x3d, - 0x70, 0xb1, 0xb6, 0xf1, 0xe0, 0x58, 0xaa, 0xff, 0xd4, 0xbb, 0x06, 0xf5, 0xda, 0x2f, 0xc1, 0x95, - 0x8f, 0x8a, 0x76, 0xbd, 0x76, 0xdd, 0x26, 0x70, 0xdc, 0x99, 0x67, 0xcf, 0xdb, 0xdf, 0x3c, 0x1b, - 0xba, 0x3c, 0x4f, 0xd3, 0x24, 0x13, 0x34, 0xcd, 0x12, 0x91, 0x0c, 0x5f, 0x04, 0x49, 0x12, 0x5c, - 0xe1, 0x91, 0x3a, 0x5d, 0xe6, 0x3f, 0x8e, 0x44, 0x18, 0x21, 0x17, 0x2c, 0x4a, 0x0b, 0x81, 0xf3, - 0x0b, 0x9e, 0x9c, 0xae, 0x99, 0x38, 0xcd, 0xb9, 0x48, 0x22, 0xcc, 0x5c, 0xbc, 0xce, 0x91, 0x0b, - 0x32, 0x06, 0x2b, 0x8c, 0x43, 0x31, 0x30, 0x46, 0xc6, 0xa4, 0x3d, 0xed, 0xd2, 0x45, 0x1c, 0x8a, - 0x90, 0x09, 0x94, 0xda, 0x79, 0xc3, 0x55, 0x4d, 0x42, 0xc0, 0x8c, 0x78, 0x30, 0x78, 0x34, 0x32, - 0x26, 0xad, 0x79, 0xc3, 0x95, 0x07, 0x32, 0x02, 0x7b, 0xcd, 0xe2, 0xc0, 0xcb, 0xd3, 0x81, 0x39, - 0x32, 0x26, 0x8f, 0xa7, 0x3b, 0xf4, 0x22, 0x09, 0xfd, 0x79, 0xc3, 0x6d, 0xca, 0xfa, 0xb7, 0x74, - 0xb6, 0x03, 0x66, 0x86, 0xd7, 0xce, 0x47, 0xe8, 0xd4, 0x5f, 0x4a, 0x0e, 0xa1, 0x9f, 0x21, 0xcf, - 0x23, 0xf4, 0x38, 0x72, 0x1e, 0x26, 0xb1, 0x17, 0xfa, 0x6a, 0x7c, 0xcb, 0xdd, 0x2b, 0x1a, 0xe7, - 0x45, 0x7d, 0xe1, 0x3b, 0xc7, 0xd0, 0x39, 0x09, 0x30, 0x16, 0x4b, 0xe4, 0x9c, 0x05, 0x48, 0x9e, - 0x01, 0x30, 0x79, 0xf6, 0x62, 0x16, 0xa1, 0x7e, 0xa8, 0xa5, 0x2a, 0x9f, 0x59, 0x84, 0xa4, 0x57, - 0xf3, 0xa9, 0x5c, 0x3a, 0x01, 0xec, 0xdf, 0xbf, 0x35, 0x4f, 0x93, 0x98, 0x23, 0x39, 0x00, 0x5b, - 0x4f, 0xd7, 0x37, 0xdf, 0xa5, 0x7a, 0xea, 0xbc, 0xe1, 0x96, 0x2d, 0xf2, 0xf2, 0xee, 0x7d, 0x92, - 0x4d, 0xdd, 0x8a, 0xc6, 0x30, 0x6b, 0x82, 0x95, 0x21, 0x4f, 0x9d, 0x5b, 0x03, 0x7a, 0x72, 0x92, - 0xd2, 0x94, 0x70, 0x5f, 0x41, 0x93, 0xad, 0x56, 0x98, 0x96, 0x78, 0xdb, 0xf4, 0x44, 0x1d, 0x35, - 0x5c, 0xdd, 0xdc, 0x8a, 0xf7, 0x0d, 0x74, 0xaf, 0x90, 0xfd, 0xac, 0x20, 0x3d, 0x84, 0xdc, 0x51, - 0x5d, 0xed, 0xb9, 0x44, 0xfd, 0x1a, 0xe0, 0x6e, 0x80, 0x84, 0xb5, 0x41, 0xb8, 0xc5, 0x2b, 0xb6, - 0xbf, 0x0d, 0x68, 0x49, 0xdd, 0x59, 0x2c, 0xb2, 0x1b, 0x42, 0xc1, 0xf2, 0x99, 0x40, 0x6d, 0x74, - 0x48, 0x8b, 0x38, 0xd1, 0x32, 0x4e, 0xf4, 0x6b, 0x19, 0x27, 0x57, 0xe9, 0xc8, 0x18, 0x3a, 0x2b, - 0x0d, 0xd5, 0xab, 0x9b, 0x6f, 0x97, 0xd5, 0xa5, 0xba, 0x44, 0xb1, 0x1c, 0xa5, 0x30, 0xb7, 0x53, - 0xdc, 0x55, 0x8a, 0x25, 0x0f, 0x66, 0x36, 0xec, 0xa0, 0xf4, 0xe2, 0xfc, 0x31, 0xa0, 0x5f, 0x63, - 0xa9, 0x57, 0xf6, 0x1e, 0x7a, 0x05, 0x2f, 0xf4, 0xbd, 0x7f, 0xef, 0x6e, 0xaf, 0xd4, 0xe8, 0x12, - 0x79, 0x5e, 0xdf, 0x21, 0xd0, 0xea, 0xc6, 0x35, 0xd0, 0x25, 0x25, 0x8c, 0x7d, 0xf4, 0x37, 0x40, - 0xeb, 0xee, 0x99, 0x6c, 0x56, 0xeb, 0xe6, 0x60, 0x97, 0x03, 0xfe, 0x8f, 0x99, 0x8c, 0xa1, 0x5b, - 0x81, 0x52, 0xa9, 0x2d, 0xd2, 0x59, 0xd1, 0x53, 0xc1, 0x3d, 0x00, 0x7b, 0x1d, 0x72, 0x91, 0x64, - 0x37, 0x03, 0x73, 0x64, 0xde, 0x37, 0xea, 0x96, 0xad, 0xc3, 0x1e, 0x58, 0xd2, 0x14, 0xd9, 0x05, - 0xeb, 0xe2, 0xcb, 0xe2, 0x53, 0xaf, 0x31, 0xbd, 0x35, 0xc0, 0x3e, 0x2f, 0xfe, 0x03, 0xe4, 0x18, - 0x3a, 0xf5, 0xa8, 0x93, 0x7d, 0xba, 0xe5, 0x7b, 0x1f, 0x3e, 0xa5, 0xdb, 0xbe, 0x87, 0x89, 0xf1, - 0xd6, 0x20, 0x1f, 0x8a, 0x3c, 0x28, 0xea, 0xa4, 0x4f, 0x1f, 0xa6, 0x79, 0x48, 0xe8, 0xc6, 0x52, - 0xe4, 0x73, 0xb3, 0xe6, 0x77, 0x2b, 0x62, 0x61, 0x7c, 0xd9, 0x54, 0x61, 0x79, 0xf7, 0x37, 0x00, - 0x00, 0xff, 0xff, 0x00, 0xf3, 0x29, 0x6f, 0x9a, 0x04, 0x00, 0x00, -} diff --git a/internal/testing/cmd/bankdemo/support.proto b/internal/testing/cmd/bankdemo/support.proto index 567b165..3b2d70a 100644 --- a/internal/testing/cmd/bankdemo/support.proto +++ b/internal/testing/cmd/bankdemo/support.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -option go_package = "main"; +option go_package = ".;main"; import "google/protobuf/timestamp.proto"; diff --git a/internal/testing/cmd/testserver/testserver.go b/internal/testing/cmd/testserver/testserver.go index e42821f..7952a3e 100644 --- a/internal/testing/cmd/testserver/testserver.go +++ b/internal/testing/cmd/testserver/testserver.go @@ -2,6 +2,7 @@ package main import ( + "context" "flag" "fmt" "net" @@ -9,7 +10,6 @@ import ( "sync/atomic" "time" - "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" diff --git a/internal/testing/jsonpb_test_proto/test_objects.pb.go b/internal/testing/jsonpb_test_proto/test_objects.pb.go index 0e35f06..57e661c 100644 --- a/internal/testing/jsonpb_test_proto/test_objects.pb.go +++ b/internal/testing/jsonpb_test_proto/test_objects.pb.go @@ -1,215 +1,344 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// source: testing/jsonpb_test_proto/test_objects.proto +// versions: +// protoc-gen-go v1.25.0-devel +// protoc v3.14.0 +// source: test_objects.proto package jsonpb import ( - fmt "fmt" proto "github.com/golang/protobuf/proto" - any "github.com/golang/protobuf/ptypes/any" - duration "github.com/golang/protobuf/ptypes/duration" - _struct "github.com/golang/protobuf/ptypes/struct" - timestamp "github.com/golang/protobuf/ptypes/timestamp" - wrappers "github.com/golang/protobuf/ptypes/wrappers" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + durationpb "google.golang.org/protobuf/types/known/durationpb" + structpb "google.golang.org/protobuf/types/known/structpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) -// 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.ProtoPackageIsVersion3 // please upgrade the proto package +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 type KnownTypes struct { - An *any.Any `protobuf:"bytes,14,opt,name=an" json:"an,omitempty"` - Dur *duration.Duration `protobuf:"bytes,1,opt,name=dur" json:"dur,omitempty"` - St *_struct.Struct `protobuf:"bytes,12,opt,name=st" json:"st,omitempty"` - Ts *timestamp.Timestamp `protobuf:"bytes,2,opt,name=ts" json:"ts,omitempty"` - Lv *_struct.ListValue `protobuf:"bytes,15,opt,name=lv" json:"lv,omitempty"` - Val *_struct.Value `protobuf:"bytes,16,opt,name=val" json:"val,omitempty"` - Dbl *wrappers.DoubleValue `protobuf:"bytes,3,opt,name=dbl" json:"dbl,omitempty"` - Flt *wrappers.FloatValue `protobuf:"bytes,4,opt,name=flt" json:"flt,omitempty"` - I64 *wrappers.Int64Value `protobuf:"bytes,5,opt,name=i64" json:"i64,omitempty"` - U64 *wrappers.UInt64Value `protobuf:"bytes,6,opt,name=u64" json:"u64,omitempty"` - I32 *wrappers.Int32Value `protobuf:"bytes,7,opt,name=i32" json:"i32,omitempty"` - U32 *wrappers.UInt32Value `protobuf:"bytes,8,opt,name=u32" json:"u32,omitempty"` - Bool *wrappers.BoolValue `protobuf:"bytes,9,opt,name=bool" json:"bool,omitempty"` - Str *wrappers.StringValue `protobuf:"bytes,10,opt,name=str" json:"str,omitempty"` - Bytes *wrappers.BytesValue `protobuf:"bytes,11,opt,name=bytes" json:"bytes,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *KnownTypes) Reset() { *m = KnownTypes{} } -func (m *KnownTypes) String() string { return proto.CompactTextString(m) } -func (*KnownTypes) ProtoMessage() {} -func (*KnownTypes) Descriptor() ([]byte, []int) { - return fileDescriptor_ab4422ec10550c41, []int{0} -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *KnownTypes) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_KnownTypes.Unmarshal(m, b) + An *anypb.Any `protobuf:"bytes,14,opt,name=an" json:"an,omitempty"` + Dur *durationpb.Duration `protobuf:"bytes,1,opt,name=dur" json:"dur,omitempty"` + St *structpb.Struct `protobuf:"bytes,12,opt,name=st" json:"st,omitempty"` + Ts *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=ts" json:"ts,omitempty"` + Lv *structpb.ListValue `protobuf:"bytes,15,opt,name=lv" json:"lv,omitempty"` + Val *structpb.Value `protobuf:"bytes,16,opt,name=val" json:"val,omitempty"` + Dbl *wrapperspb.DoubleValue `protobuf:"bytes,3,opt,name=dbl" json:"dbl,omitempty"` + Flt *wrapperspb.FloatValue `protobuf:"bytes,4,opt,name=flt" json:"flt,omitempty"` + I64 *wrapperspb.Int64Value `protobuf:"bytes,5,opt,name=i64" json:"i64,omitempty"` + U64 *wrapperspb.UInt64Value `protobuf:"bytes,6,opt,name=u64" json:"u64,omitempty"` + I32 *wrapperspb.Int32Value `protobuf:"bytes,7,opt,name=i32" json:"i32,omitempty"` + U32 *wrapperspb.UInt32Value `protobuf:"bytes,8,opt,name=u32" json:"u32,omitempty"` + Bool *wrapperspb.BoolValue `protobuf:"bytes,9,opt,name=bool" json:"bool,omitempty"` + Str *wrapperspb.StringValue `protobuf:"bytes,10,opt,name=str" json:"str,omitempty"` + Bytes *wrapperspb.BytesValue `protobuf:"bytes,11,opt,name=bytes" json:"bytes,omitempty"` } -func (m *KnownTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_KnownTypes.Marshal(b, m, deterministic) -} -func (m *KnownTypes) XXX_Merge(src proto.Message) { - xxx_messageInfo_KnownTypes.Merge(m, src) + +func (x *KnownTypes) Reset() { + *x = KnownTypes{} + if protoimpl.UnsafeEnabled { + mi := &file_test_objects_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *KnownTypes) XXX_Size() int { - return xxx_messageInfo_KnownTypes.Size(m) + +func (x *KnownTypes) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *KnownTypes) XXX_DiscardUnknown() { - xxx_messageInfo_KnownTypes.DiscardUnknown(m) + +func (*KnownTypes) ProtoMessage() {} + +func (x *KnownTypes) ProtoReflect() protoreflect.Message { + mi := &file_test_objects_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_KnownTypes proto.InternalMessageInfo +// Deprecated: Use KnownTypes.ProtoReflect.Descriptor instead. +func (*KnownTypes) Descriptor() ([]byte, []int) { + return file_test_objects_proto_rawDescGZIP(), []int{0} +} -func (m *KnownTypes) GetAn() *any.Any { - if m != nil { - return m.An +func (x *KnownTypes) GetAn() *anypb.Any { + if x != nil { + return x.An } return nil } -func (m *KnownTypes) GetDur() *duration.Duration { - if m != nil { - return m.Dur +func (x *KnownTypes) GetDur() *durationpb.Duration { + if x != nil { + return x.Dur } return nil } -func (m *KnownTypes) GetSt() *_struct.Struct { - if m != nil { - return m.St +func (x *KnownTypes) GetSt() *structpb.Struct { + if x != nil { + return x.St } return nil } -func (m *KnownTypes) GetTs() *timestamp.Timestamp { - if m != nil { - return m.Ts +func (x *KnownTypes) GetTs() *timestamppb.Timestamp { + if x != nil { + return x.Ts } return nil } -func (m *KnownTypes) GetLv() *_struct.ListValue { - if m != nil { - return m.Lv +func (x *KnownTypes) GetLv() *structpb.ListValue { + if x != nil { + return x.Lv } return nil } -func (m *KnownTypes) GetVal() *_struct.Value { - if m != nil { - return m.Val +func (x *KnownTypes) GetVal() *structpb.Value { + if x != nil { + return x.Val } return nil } -func (m *KnownTypes) GetDbl() *wrappers.DoubleValue { - if m != nil { - return m.Dbl +func (x *KnownTypes) GetDbl() *wrapperspb.DoubleValue { + if x != nil { + return x.Dbl } return nil } -func (m *KnownTypes) GetFlt() *wrappers.FloatValue { - if m != nil { - return m.Flt +func (x *KnownTypes) GetFlt() *wrapperspb.FloatValue { + if x != nil { + return x.Flt } return nil } -func (m *KnownTypes) GetI64() *wrappers.Int64Value { - if m != nil { - return m.I64 +func (x *KnownTypes) GetI64() *wrapperspb.Int64Value { + if x != nil { + return x.I64 } return nil } -func (m *KnownTypes) GetU64() *wrappers.UInt64Value { - if m != nil { - return m.U64 +func (x *KnownTypes) GetU64() *wrapperspb.UInt64Value { + if x != nil { + return x.U64 } return nil } -func (m *KnownTypes) GetI32() *wrappers.Int32Value { - if m != nil { - return m.I32 +func (x *KnownTypes) GetI32() *wrapperspb.Int32Value { + if x != nil { + return x.I32 } return nil } -func (m *KnownTypes) GetU32() *wrappers.UInt32Value { - if m != nil { - return m.U32 +func (x *KnownTypes) GetU32() *wrapperspb.UInt32Value { + if x != nil { + return x.U32 } return nil } -func (m *KnownTypes) GetBool() *wrappers.BoolValue { - if m != nil { - return m.Bool +func (x *KnownTypes) GetBool() *wrapperspb.BoolValue { + if x != nil { + return x.Bool } return nil } -func (m *KnownTypes) GetStr() *wrappers.StringValue { - if m != nil { - return m.Str +func (x *KnownTypes) GetStr() *wrapperspb.StringValue { + if x != nil { + return x.Str } return nil } -func (m *KnownTypes) GetBytes() *wrappers.BytesValue { - if m != nil { - return m.Bytes +func (x *KnownTypes) GetBytes() *wrapperspb.BytesValue { + if x != nil { + return x.Bytes } return nil } -func init() { - proto.RegisterType((*KnownTypes)(nil), "jsonpb.KnownTypes") -} - -func init() { - proto.RegisterFile("testing/jsonpb_test_proto/test_objects.proto", fileDescriptor_ab4422ec10550c41) -} - -var fileDescriptor_ab4422ec10550c41 = []byte{ - // 402 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0xd0, 0xdf, 0x6b, 0xd5, 0x30, - 0x14, 0x07, 0x70, 0x96, 0xee, 0x4e, 0xcd, 0x44, 0x25, 0x88, 0x66, 0xd7, 0xa1, 0x22, 0x82, 0xc3, - 0x1f, 0x2d, 0xb6, 0xa5, 0xef, 0x0e, 0x11, 0x44, 0x9f, 0xba, 0xe9, 0xeb, 0x48, 0xd6, 0xac, 0x74, - 0x64, 0x49, 0x49, 0x4e, 0xee, 0xe8, 0xbf, 0xe6, 0x5f, 0x27, 0x49, 0x73, 0x45, 0x6e, 0xc9, 0xde, - 0xee, 0xcd, 0xf7, 0x73, 0xbe, 0x9c, 0x53, 0xfc, 0x11, 0x84, 0x85, 0x41, 0xf5, 0xc5, 0xb5, 0xd5, - 0x6a, 0xe4, 0x17, 0xfe, 0xef, 0xc5, 0x68, 0x34, 0xe8, 0x22, 0xfc, 0xd4, 0xfc, 0x5a, 0x5c, 0x82, - 0xcd, 0xc3, 0x13, 0x39, 0x98, 0xd5, 0xfa, 0xa8, 0xd7, 0xba, 0x97, 0xa2, 0x08, 0xaf, 0xdc, 0x5d, - 0x15, 0x4c, 0x4d, 0x33, 0x59, 0xbf, 0xdc, 0x8d, 0x3a, 0x67, 0x18, 0x0c, 0x5a, 0xc5, 0xfc, 0x78, - 0x37, 0xb7, 0x60, 0xdc, 0x25, 0xc4, 0xf4, 0xd5, 0x6e, 0x0a, 0xc3, 0x8d, 0xb0, 0xc0, 0x6e, 0xc6, - 0x54, 0xfd, 0xad, 0x61, 0xe3, 0x28, 0x4c, 0xdc, 0xf0, 0xcd, 0x9f, 0x15, 0xc6, 0x3f, 0x94, 0xbe, - 0x55, 0xe7, 0xd3, 0x28, 0x2c, 0x79, 0x8b, 0x11, 0x53, 0xf4, 0xd1, 0xeb, 0xbd, 0x93, 0xc3, 0xf2, - 0x69, 0x3e, 0xcf, 0xe6, 0xdb, 0xd9, 0xfc, 0x8b, 0x9a, 0x5a, 0xc4, 0x14, 0xf9, 0x80, 0xb3, 0xce, - 0x19, 0xba, 0x17, 0xd8, 0xd1, 0x82, 0x7d, 0x8d, 0x17, 0xb4, 0x5e, 0x91, 0x77, 0x18, 0x59, 0xa0, - 0x0f, 0x83, 0x7d, 0xbe, 0xb0, 0x67, 0xe1, 0x9a, 0x16, 0x59, 0x20, 0xef, 0x31, 0x02, 0x4b, 0x51, - 0x80, 0xeb, 0x05, 0x3c, 0xdf, 0x1e, 0xd6, 0x22, 0xb0, 0xde, 0xca, 0x0d, 0x7d, 0x9c, 0xb0, 0x3f, - 0x07, 0x0b, 0xbf, 0x99, 0x74, 0xa2, 0x45, 0x72, 0x43, 0x4e, 0x70, 0xb6, 0x61, 0x92, 0x3e, 0x09, - 0xf8, 0xd9, 0x02, 0xcf, 0xd0, 0x13, 0x92, 0xe3, 0xac, 0xe3, 0x92, 0x66, 0x41, 0x1e, 0x2f, 0xef, - 0xd2, 0x8e, 0x4b, 0x11, 0x7d, 0xc7, 0x25, 0xf9, 0x84, 0xb3, 0x2b, 0x09, 0x74, 0x3f, 0xf8, 0x17, - 0x0b, 0xff, 0x4d, 0x6a, 0x16, 0xf7, 0xf0, 0xce, 0xf3, 0xa1, 0xa9, 0xe9, 0x2a, 0xc1, 0xbf, 0x2b, - 0x68, 0xea, 0xc8, 0x87, 0xa6, 0xf6, 0xdb, 0xb8, 0xa6, 0xa6, 0x07, 0x89, 0x6d, 0x7e, 0xfd, 0xef, - 0x5d, 0x53, 0x87, 0xfa, 0xaa, 0xa4, 0xf7, 0xd2, 0xf5, 0x55, 0xb9, 0xad, 0xaf, 0xca, 0x50, 0x5f, - 0x95, 0xf4, 0xfe, 0x1d, 0xf5, 0xff, 0xbc, 0x0b, 0x7e, 0x9f, 0x6b, 0x2d, 0xe9, 0x83, 0xc4, 0x47, - 0x3f, 0xd5, 0x5a, 0xce, 0x3c, 0x38, 0xdf, 0x6f, 0xc1, 0x50, 0x9c, 0xe8, 0x3f, 0x03, 0x33, 0xa8, - 0x3e, 0xf6, 0x5b, 0x30, 0xe4, 0x33, 0x5e, 0xf1, 0x09, 0x84, 0xa5, 0x87, 0x89, 0x03, 0x4e, 0x7d, - 0x3a, 0x0f, 0xcc, 0xf2, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xab, 0x65, 0x99, 0x5a, 0x8d, 0x03, - 0x00, 0x00, +var File_test_objects_proto protoreflect.FileDescriptor + +var file_test_objects_proto_rawDesc = []byte{ + 0x0a, 0x12, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x6a, 0x73, 0x6f, 0x6e, 0x70, 0x62, 0x1a, 0x19, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xba, 0x05, 0x0a, 0x0a, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, + 0x54, 0x79, 0x70, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x02, 0x61, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x02, 0x61, 0x6e, 0x12, 0x2b, 0x0a, 0x03, 0x64, + 0x75, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x64, 0x75, 0x72, 0x12, 0x27, 0x0a, 0x02, 0x73, 0x74, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x02, 0x73, + 0x74, 0x12, 0x2a, 0x0a, 0x02, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x02, 0x74, 0x73, 0x12, 0x2a, 0x0a, + 0x02, 0x6c, 0x76, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x02, 0x6c, 0x76, 0x12, 0x28, 0x0a, 0x03, 0x76, 0x61, 0x6c, + 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x03, + 0x76, 0x61, 0x6c, 0x12, 0x2e, 0x0a, 0x03, 0x64, 0x62, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x03, + 0x64, 0x62, 0x6c, 0x12, 0x2d, 0x0a, 0x03, 0x66, 0x6c, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x03, 0x66, + 0x6c, 0x74, 0x12, 0x2d, 0x0a, 0x03, 0x69, 0x36, 0x34, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x03, 0x69, 0x36, + 0x34, 0x12, 0x2e, 0x0a, 0x03, 0x75, 0x36, 0x34, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x03, 0x75, 0x36, + 0x34, 0x12, 0x2d, 0x0a, 0x03, 0x69, 0x33, 0x32, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x03, 0x69, 0x33, 0x32, + 0x12, 0x2e, 0x0a, 0x03, 0x75, 0x33, 0x32, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x03, 0x75, 0x33, 0x32, + 0x12, 0x2e, 0x0a, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6c, + 0x12, 0x2e, 0x0a, 0x03, 0x73, 0x74, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x03, 0x73, 0x74, 0x72, + 0x12, 0x31, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x3b, 0x6a, 0x73, 0x6f, 0x6e, 0x70, 0x62, +} + +var ( + file_test_objects_proto_rawDescOnce sync.Once + file_test_objects_proto_rawDescData = file_test_objects_proto_rawDesc +) + +func file_test_objects_proto_rawDescGZIP() []byte { + file_test_objects_proto_rawDescOnce.Do(func() { + file_test_objects_proto_rawDescData = protoimpl.X.CompressGZIP(file_test_objects_proto_rawDescData) + }) + return file_test_objects_proto_rawDescData +} + +var file_test_objects_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_test_objects_proto_goTypes = []interface{}{ + (*KnownTypes)(nil), // 0: jsonpb.KnownTypes + (*anypb.Any)(nil), // 1: google.protobuf.Any + (*durationpb.Duration)(nil), // 2: google.protobuf.Duration + (*structpb.Struct)(nil), // 3: google.protobuf.Struct + (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp + (*structpb.ListValue)(nil), // 5: google.protobuf.ListValue + (*structpb.Value)(nil), // 6: google.protobuf.Value + (*wrapperspb.DoubleValue)(nil), // 7: google.protobuf.DoubleValue + (*wrapperspb.FloatValue)(nil), // 8: google.protobuf.FloatValue + (*wrapperspb.Int64Value)(nil), // 9: google.protobuf.Int64Value + (*wrapperspb.UInt64Value)(nil), // 10: google.protobuf.UInt64Value + (*wrapperspb.Int32Value)(nil), // 11: google.protobuf.Int32Value + (*wrapperspb.UInt32Value)(nil), // 12: google.protobuf.UInt32Value + (*wrapperspb.BoolValue)(nil), // 13: google.protobuf.BoolValue + (*wrapperspb.StringValue)(nil), // 14: google.protobuf.StringValue + (*wrapperspb.BytesValue)(nil), // 15: google.protobuf.BytesValue +} +var file_test_objects_proto_depIdxs = []int32{ + 1, // 0: jsonpb.KnownTypes.an:type_name -> google.protobuf.Any + 2, // 1: jsonpb.KnownTypes.dur:type_name -> google.protobuf.Duration + 3, // 2: jsonpb.KnownTypes.st:type_name -> google.protobuf.Struct + 4, // 3: jsonpb.KnownTypes.ts:type_name -> google.protobuf.Timestamp + 5, // 4: jsonpb.KnownTypes.lv:type_name -> google.protobuf.ListValue + 6, // 5: jsonpb.KnownTypes.val:type_name -> google.protobuf.Value + 7, // 6: jsonpb.KnownTypes.dbl:type_name -> google.protobuf.DoubleValue + 8, // 7: jsonpb.KnownTypes.flt:type_name -> google.protobuf.FloatValue + 9, // 8: jsonpb.KnownTypes.i64:type_name -> google.protobuf.Int64Value + 10, // 9: jsonpb.KnownTypes.u64:type_name -> google.protobuf.UInt64Value + 11, // 10: jsonpb.KnownTypes.i32:type_name -> google.protobuf.Int32Value + 12, // 11: jsonpb.KnownTypes.u32:type_name -> google.protobuf.UInt32Value + 13, // 12: jsonpb.KnownTypes.bool:type_name -> google.protobuf.BoolValue + 14, // 13: jsonpb.KnownTypes.str:type_name -> google.protobuf.StringValue + 15, // 14: jsonpb.KnownTypes.bytes:type_name -> google.protobuf.BytesValue + 15, // [15:15] is the sub-list for method output_type + 15, // [15:15] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name +} + +func init() { file_test_objects_proto_init() } +func file_test_objects_proto_init() { + if File_test_objects_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_test_objects_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KnownTypes); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_test_objects_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_test_objects_proto_goTypes, + DependencyIndexes: file_test_objects_proto_depIdxs, + MessageInfos: file_test_objects_proto_msgTypes, + }.Build() + File_test_objects_proto = out.File + file_test_objects_proto_rawDesc = nil + file_test_objects_proto_goTypes = nil + file_test_objects_proto_depIdxs = nil } diff --git a/internal/testing/jsonpb_test_proto/test_objects.proto b/internal/testing/jsonpb_test_proto/test_objects.proto index 0b1e332..8e6f00f 100644 --- a/internal/testing/jsonpb_test_proto/test_objects.proto +++ b/internal/testing/jsonpb_test_proto/test_objects.proto @@ -1,34 +1,3 @@ -// Go support for Protocol Buffers - Google's data interchange format -// -// Copyright 2015 The Go Authors. All rights reserved. -// https://github.com/golang/protobuf -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - syntax = "proto2"; import "google/protobuf/any.proto"; @@ -39,6 +8,8 @@ import "google/protobuf/wrappers.proto"; package jsonpb; +option go_package=".;jsonpb"; + message KnownTypes { optional google.protobuf.Any an = 14; optional google.protobuf.Duration dur = 1; diff --git a/internal/testing/test.pb.go b/internal/testing/test.pb.go index 3c70e08..2095469 100644 --- a/internal/testing/test.pb.go +++ b/internal/testing/test.pb.go @@ -1,28 +1,52 @@ +// NB: Copied from the gRPC Go repo: google.golang.org/grpc/interop/grpc_testing/test.proto + +// Copyright 2017 gRPC authors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// An integration test service that covers all the method signature permutations +// of unary/streaming requests/responses. + // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.25.0-devel +// protoc v3.14.0 // source: test.proto package testing import ( context "context" - fmt "fmt" proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) -// 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.ProtoPackageIsVersion3 // please upgrade the proto package +// This is a compile-time assertion that a sufficiently up-to-date version +// of the legacy proto package is being used. +const _ = proto.ProtoPackageIsVersion4 // The type of payload that should be returned. type PayloadType int32 @@ -36,103 +60,139 @@ const ( PayloadType_RANDOM PayloadType = 2 ) -var PayloadType_name = map[int32]string{ - 0: "COMPRESSABLE", - 1: "UNCOMPRESSABLE", - 2: "RANDOM", -} +// Enum value maps for PayloadType. +var ( + PayloadType_name = map[int32]string{ + 0: "COMPRESSABLE", + 1: "UNCOMPRESSABLE", + 2: "RANDOM", + } + PayloadType_value = map[string]int32{ + "COMPRESSABLE": 0, + "UNCOMPRESSABLE": 1, + "RANDOM": 2, + } +) -var PayloadType_value = map[string]int32{ - "COMPRESSABLE": 0, - "UNCOMPRESSABLE": 1, - "RANDOM": 2, +func (x PayloadType) Enum() *PayloadType { + p := new(PayloadType) + *p = x + return p } func (x PayloadType) String() string { - return proto.EnumName(PayloadType_name, int32(x)) + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (PayloadType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_c161fcfdc0c3ff1e, []int{0} +func (PayloadType) Descriptor() protoreflect.EnumDescriptor { + return file_test_proto_enumTypes[0].Descriptor() } -type Empty struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` +func (PayloadType) Type() protoreflect.EnumType { + return &file_test_proto_enumTypes[0] } -func (m *Empty) Reset() { *m = Empty{} } -func (m *Empty) String() string { return proto.CompactTextString(m) } -func (*Empty) ProtoMessage() {} -func (*Empty) Descriptor() ([]byte, []int) { - return fileDescriptor_c161fcfdc0c3ff1e, []int{0} +func (x PayloadType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) } -func (m *Empty) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Empty.Unmarshal(m, b) +// Deprecated: Use PayloadType.Descriptor instead. +func (PayloadType) EnumDescriptor() ([]byte, []int) { + return file_test_proto_rawDescGZIP(), []int{0} } -func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Empty.Marshal(b, m, deterministic) + +type Empty struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields } -func (m *Empty) XXX_Merge(src proto.Message) { - xxx_messageInfo_Empty.Merge(m, src) + +func (x *Empty) Reset() { + *x = Empty{} + if protoimpl.UnsafeEnabled { + mi := &file_test_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Empty) XXX_Size() int { - return xxx_messageInfo_Empty.Size(m) + +func (x *Empty) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Empty) XXX_DiscardUnknown() { - xxx_messageInfo_Empty.DiscardUnknown(m) + +func (*Empty) ProtoMessage() {} + +func (x *Empty) ProtoReflect() protoreflect.Message { + mi := &file_test_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Empty proto.InternalMessageInfo +// Deprecated: Use Empty.ProtoReflect.Descriptor instead. +func (*Empty) Descriptor() ([]byte, []int) { + return file_test_proto_rawDescGZIP(), []int{0} +} // A block of data, to simply increase gRPC message size. type Payload struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // The type of data in body. Type PayloadType `protobuf:"varint,1,opt,name=type,proto3,enum=testing.PayloadType" json:"type,omitempty"` // Primary contents of payload. - Body []byte `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Body []byte `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` } -func (m *Payload) Reset() { *m = Payload{} } -func (m *Payload) String() string { return proto.CompactTextString(m) } -func (*Payload) ProtoMessage() {} -func (*Payload) Descriptor() ([]byte, []int) { - return fileDescriptor_c161fcfdc0c3ff1e, []int{1} +func (x *Payload) Reset() { + *x = Payload{} + if protoimpl.UnsafeEnabled { + mi := &file_test_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Payload) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Payload.Unmarshal(m, b) -} -func (m *Payload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Payload.Marshal(b, m, deterministic) -} -func (m *Payload) XXX_Merge(src proto.Message) { - xxx_messageInfo_Payload.Merge(m, src) -} -func (m *Payload) XXX_Size() int { - return xxx_messageInfo_Payload.Size(m) +func (x *Payload) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Payload) XXX_DiscardUnknown() { - xxx_messageInfo_Payload.DiscardUnknown(m) + +func (*Payload) ProtoMessage() {} + +func (x *Payload) ProtoReflect() protoreflect.Message { + mi := &file_test_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Payload proto.InternalMessageInfo +// Deprecated: Use Payload.ProtoReflect.Descriptor instead. +func (*Payload) Descriptor() ([]byte, []int) { + return file_test_proto_rawDescGZIP(), []int{1} +} -func (m *Payload) GetType() PayloadType { - if m != nil { - return m.Type +func (x *Payload) GetType() PayloadType { + if x != nil { + return x.Type } return PayloadType_COMPRESSABLE } -func (m *Payload) GetBody() []byte { - if m != nil { - return m.Body +func (x *Payload) GetBody() []byte { + if x != nil { + return x.Body } return nil } @@ -140,54 +200,66 @@ func (m *Payload) GetBody() []byte { // A protobuf representation for grpc status. This is used by test // clients to specify a status that the server should attempt to return. type EchoStatus struct { - Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *EchoStatus) Reset() { *m = EchoStatus{} } -func (m *EchoStatus) String() string { return proto.CompactTextString(m) } -func (*EchoStatus) ProtoMessage() {} -func (*EchoStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_c161fcfdc0c3ff1e, []int{2} + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` } -func (m *EchoStatus) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EchoStatus.Unmarshal(m, b) -} -func (m *EchoStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EchoStatus.Marshal(b, m, deterministic) -} -func (m *EchoStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_EchoStatus.Merge(m, src) +func (x *EchoStatus) Reset() { + *x = EchoStatus{} + if protoimpl.UnsafeEnabled { + mi := &file_test_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *EchoStatus) XXX_Size() int { - return xxx_messageInfo_EchoStatus.Size(m) + +func (x *EchoStatus) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *EchoStatus) XXX_DiscardUnknown() { - xxx_messageInfo_EchoStatus.DiscardUnknown(m) + +func (*EchoStatus) ProtoMessage() {} + +func (x *EchoStatus) ProtoReflect() protoreflect.Message { + mi := &file_test_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_EchoStatus proto.InternalMessageInfo +// Deprecated: Use EchoStatus.ProtoReflect.Descriptor instead. +func (*EchoStatus) Descriptor() ([]byte, []int) { + return file_test_proto_rawDescGZIP(), []int{2} +} -func (m *EchoStatus) GetCode() int32 { - if m != nil { - return m.Code +func (x *EchoStatus) GetCode() int32 { + if x != nil { + return x.Code } return 0 } -func (m *EchoStatus) GetMessage() string { - if m != nil { - return m.Message +func (x *EchoStatus) GetMessage() string { + if x != nil { + return x.Message } return "" } // Unary request. type SimpleRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Desired payload type in the response from the server. // If response_type is RANDOM, server randomly chooses one from other formats. ResponseType PayloadType `protobuf:"varint,1,opt,name=response_type,json=responseType,proto3,enum=testing.PayloadType" json:"response_type,omitempty"` @@ -201,275 +273,315 @@ type SimpleRequest struct { // Whether SimpleResponse should include OAuth scope. FillOauthScope bool `protobuf:"varint,5,opt,name=fill_oauth_scope,json=fillOauthScope,proto3" json:"fill_oauth_scope,omitempty"` // Whether server should return a given status - ResponseStatus *EchoStatus `protobuf:"bytes,7,opt,name=response_status,json=responseStatus,proto3" json:"response_status,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ResponseStatus *EchoStatus `protobuf:"bytes,7,opt,name=response_status,json=responseStatus,proto3" json:"response_status,omitempty"` } -func (m *SimpleRequest) Reset() { *m = SimpleRequest{} } -func (m *SimpleRequest) String() string { return proto.CompactTextString(m) } -func (*SimpleRequest) ProtoMessage() {} -func (*SimpleRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c161fcfdc0c3ff1e, []int{3} +func (x *SimpleRequest) Reset() { + *x = SimpleRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_test_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SimpleRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SimpleRequest.Unmarshal(m, b) -} -func (m *SimpleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SimpleRequest.Marshal(b, m, deterministic) -} -func (m *SimpleRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SimpleRequest.Merge(m, src) +func (x *SimpleRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SimpleRequest) XXX_Size() int { - return xxx_messageInfo_SimpleRequest.Size(m) -} -func (m *SimpleRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SimpleRequest.DiscardUnknown(m) + +func (*SimpleRequest) ProtoMessage() {} + +func (x *SimpleRequest) ProtoReflect() protoreflect.Message { + mi := &file_test_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SimpleRequest proto.InternalMessageInfo +// Deprecated: Use SimpleRequest.ProtoReflect.Descriptor instead. +func (*SimpleRequest) Descriptor() ([]byte, []int) { + return file_test_proto_rawDescGZIP(), []int{3} +} -func (m *SimpleRequest) GetResponseType() PayloadType { - if m != nil { - return m.ResponseType +func (x *SimpleRequest) GetResponseType() PayloadType { + if x != nil { + return x.ResponseType } return PayloadType_COMPRESSABLE } -func (m *SimpleRequest) GetResponseSize() int32 { - if m != nil { - return m.ResponseSize +func (x *SimpleRequest) GetResponseSize() int32 { + if x != nil { + return x.ResponseSize } return 0 } -func (m *SimpleRequest) GetPayload() *Payload { - if m != nil { - return m.Payload +func (x *SimpleRequest) GetPayload() *Payload { + if x != nil { + return x.Payload } return nil } -func (m *SimpleRequest) GetFillUsername() bool { - if m != nil { - return m.FillUsername +func (x *SimpleRequest) GetFillUsername() bool { + if x != nil { + return x.FillUsername } return false } -func (m *SimpleRequest) GetFillOauthScope() bool { - if m != nil { - return m.FillOauthScope +func (x *SimpleRequest) GetFillOauthScope() bool { + if x != nil { + return x.FillOauthScope } return false } -func (m *SimpleRequest) GetResponseStatus() *EchoStatus { - if m != nil { - return m.ResponseStatus +func (x *SimpleRequest) GetResponseStatus() *EchoStatus { + if x != nil { + return x.ResponseStatus } return nil } // Unary response, as configured by the request. type SimpleResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Payload to increase message size. Payload *Payload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // The user the request came from, for verifying authentication was // successful when the client expected it. Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` // OAuth scope. - OauthScope string `protobuf:"bytes,3,opt,name=oauth_scope,json=oauthScope,proto3" json:"oauth_scope,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + OauthScope string `protobuf:"bytes,3,opt,name=oauth_scope,json=oauthScope,proto3" json:"oauth_scope,omitempty"` } -func (m *SimpleResponse) Reset() { *m = SimpleResponse{} } -func (m *SimpleResponse) String() string { return proto.CompactTextString(m) } -func (*SimpleResponse) ProtoMessage() {} -func (*SimpleResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c161fcfdc0c3ff1e, []int{4} +func (x *SimpleResponse) Reset() { + *x = SimpleResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_test_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SimpleResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SimpleResponse.Unmarshal(m, b) -} -func (m *SimpleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SimpleResponse.Marshal(b, m, deterministic) -} -func (m *SimpleResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SimpleResponse.Merge(m, src) -} -func (m *SimpleResponse) XXX_Size() int { - return xxx_messageInfo_SimpleResponse.Size(m) +func (x *SimpleResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SimpleResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SimpleResponse.DiscardUnknown(m) + +func (*SimpleResponse) ProtoMessage() {} + +func (x *SimpleResponse) ProtoReflect() protoreflect.Message { + mi := &file_test_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SimpleResponse proto.InternalMessageInfo +// Deprecated: Use SimpleResponse.ProtoReflect.Descriptor instead. +func (*SimpleResponse) Descriptor() ([]byte, []int) { + return file_test_proto_rawDescGZIP(), []int{4} +} -func (m *SimpleResponse) GetPayload() *Payload { - if m != nil { - return m.Payload +func (x *SimpleResponse) GetPayload() *Payload { + if x != nil { + return x.Payload } return nil } -func (m *SimpleResponse) GetUsername() string { - if m != nil { - return m.Username +func (x *SimpleResponse) GetUsername() string { + if x != nil { + return x.Username } return "" } -func (m *SimpleResponse) GetOauthScope() string { - if m != nil { - return m.OauthScope +func (x *SimpleResponse) GetOauthScope() string { + if x != nil { + return x.OauthScope } return "" } // Client-streaming request. type StreamingInputCallRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Optional input payload sent along with the request. - Payload *Payload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Payload *Payload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` } -func (m *StreamingInputCallRequest) Reset() { *m = StreamingInputCallRequest{} } -func (m *StreamingInputCallRequest) String() string { return proto.CompactTextString(m) } -func (*StreamingInputCallRequest) ProtoMessage() {} -func (*StreamingInputCallRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c161fcfdc0c3ff1e, []int{5} +func (x *StreamingInputCallRequest) Reset() { + *x = StreamingInputCallRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_test_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *StreamingInputCallRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StreamingInputCallRequest.Unmarshal(m, b) +func (x *StreamingInputCallRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *StreamingInputCallRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StreamingInputCallRequest.Marshal(b, m, deterministic) -} -func (m *StreamingInputCallRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_StreamingInputCallRequest.Merge(m, src) -} -func (m *StreamingInputCallRequest) XXX_Size() int { - return xxx_messageInfo_StreamingInputCallRequest.Size(m) -} -func (m *StreamingInputCallRequest) XXX_DiscardUnknown() { - xxx_messageInfo_StreamingInputCallRequest.DiscardUnknown(m) + +func (*StreamingInputCallRequest) ProtoMessage() {} + +func (x *StreamingInputCallRequest) ProtoReflect() protoreflect.Message { + mi := &file_test_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_StreamingInputCallRequest proto.InternalMessageInfo +// Deprecated: Use StreamingInputCallRequest.ProtoReflect.Descriptor instead. +func (*StreamingInputCallRequest) Descriptor() ([]byte, []int) { + return file_test_proto_rawDescGZIP(), []int{5} +} -func (m *StreamingInputCallRequest) GetPayload() *Payload { - if m != nil { - return m.Payload +func (x *StreamingInputCallRequest) GetPayload() *Payload { + if x != nil { + return x.Payload } return nil } // Client-streaming response. type StreamingInputCallResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Aggregated size of payloads received from the client. - AggregatedPayloadSize int32 `protobuf:"varint,1,opt,name=aggregated_payload_size,json=aggregatedPayloadSize,proto3" json:"aggregated_payload_size,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + AggregatedPayloadSize int32 `protobuf:"varint,1,opt,name=aggregated_payload_size,json=aggregatedPayloadSize,proto3" json:"aggregated_payload_size,omitempty"` } -func (m *StreamingInputCallResponse) Reset() { *m = StreamingInputCallResponse{} } -func (m *StreamingInputCallResponse) String() string { return proto.CompactTextString(m) } -func (*StreamingInputCallResponse) ProtoMessage() {} -func (*StreamingInputCallResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c161fcfdc0c3ff1e, []int{6} +func (x *StreamingInputCallResponse) Reset() { + *x = StreamingInputCallResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_test_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *StreamingInputCallResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StreamingInputCallResponse.Unmarshal(m, b) -} -func (m *StreamingInputCallResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StreamingInputCallResponse.Marshal(b, m, deterministic) -} -func (m *StreamingInputCallResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_StreamingInputCallResponse.Merge(m, src) +func (x *StreamingInputCallResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *StreamingInputCallResponse) XXX_Size() int { - return xxx_messageInfo_StreamingInputCallResponse.Size(m) -} -func (m *StreamingInputCallResponse) XXX_DiscardUnknown() { - xxx_messageInfo_StreamingInputCallResponse.DiscardUnknown(m) + +func (*StreamingInputCallResponse) ProtoMessage() {} + +func (x *StreamingInputCallResponse) ProtoReflect() protoreflect.Message { + mi := &file_test_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_StreamingInputCallResponse proto.InternalMessageInfo +// Deprecated: Use StreamingInputCallResponse.ProtoReflect.Descriptor instead. +func (*StreamingInputCallResponse) Descriptor() ([]byte, []int) { + return file_test_proto_rawDescGZIP(), []int{6} +} -func (m *StreamingInputCallResponse) GetAggregatedPayloadSize() int32 { - if m != nil { - return m.AggregatedPayloadSize +func (x *StreamingInputCallResponse) GetAggregatedPayloadSize() int32 { + if x != nil { + return x.AggregatedPayloadSize } return 0 } // Configuration for a particular response. type ResponseParameters struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Desired payload sizes in responses from the server. // If response_type is COMPRESSABLE, this denotes the size before compression. Size int32 `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"` // Desired interval between consecutive responses in the response stream in // microseconds. - IntervalUs int32 `protobuf:"varint,2,opt,name=interval_us,json=intervalUs,proto3" json:"interval_us,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + IntervalUs int32 `protobuf:"varint,2,opt,name=interval_us,json=intervalUs,proto3" json:"interval_us,omitempty"` } -func (m *ResponseParameters) Reset() { *m = ResponseParameters{} } -func (m *ResponseParameters) String() string { return proto.CompactTextString(m) } -func (*ResponseParameters) ProtoMessage() {} -func (*ResponseParameters) Descriptor() ([]byte, []int) { - return fileDescriptor_c161fcfdc0c3ff1e, []int{7} +func (x *ResponseParameters) Reset() { + *x = ResponseParameters{} + if protoimpl.UnsafeEnabled { + mi := &file_test_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *ResponseParameters) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ResponseParameters.Unmarshal(m, b) -} -func (m *ResponseParameters) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ResponseParameters.Marshal(b, m, deterministic) -} -func (m *ResponseParameters) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResponseParameters.Merge(m, src) -} -func (m *ResponseParameters) XXX_Size() int { - return xxx_messageInfo_ResponseParameters.Size(m) +func (x *ResponseParameters) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *ResponseParameters) XXX_DiscardUnknown() { - xxx_messageInfo_ResponseParameters.DiscardUnknown(m) + +func (*ResponseParameters) ProtoMessage() {} + +func (x *ResponseParameters) ProtoReflect() protoreflect.Message { + mi := &file_test_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_ResponseParameters proto.InternalMessageInfo +// Deprecated: Use ResponseParameters.ProtoReflect.Descriptor instead. +func (*ResponseParameters) Descriptor() ([]byte, []int) { + return file_test_proto_rawDescGZIP(), []int{7} +} -func (m *ResponseParameters) GetSize() int32 { - if m != nil { - return m.Size +func (x *ResponseParameters) GetSize() int32 { + if x != nil { + return x.Size } return 0 } -func (m *ResponseParameters) GetIntervalUs() int32 { - if m != nil { - return m.IntervalUs +func (x *ResponseParameters) GetIntervalUs() int32 { + if x != nil { + return x.IntervalUs } return 0 } // Server-streaming request. type StreamingOutputCallRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Desired payload type in the response from the server. // If response_type is RANDOM, the payload from each response in the stream // might be of different types. This is to simulate a mixed type of payload @@ -480,167 +592,445 @@ type StreamingOutputCallRequest struct { // Optional input payload sent along with the request. Payload *Payload `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"` // Whether server should return a given status - ResponseStatus *EchoStatus `protobuf:"bytes,7,opt,name=response_status,json=responseStatus,proto3" json:"response_status,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + ResponseStatus *EchoStatus `protobuf:"bytes,7,opt,name=response_status,json=responseStatus,proto3" json:"response_status,omitempty"` } -func (m *StreamingOutputCallRequest) Reset() { *m = StreamingOutputCallRequest{} } -func (m *StreamingOutputCallRequest) String() string { return proto.CompactTextString(m) } -func (*StreamingOutputCallRequest) ProtoMessage() {} -func (*StreamingOutputCallRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c161fcfdc0c3ff1e, []int{8} +func (x *StreamingOutputCallRequest) Reset() { + *x = StreamingOutputCallRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_test_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *StreamingOutputCallRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StreamingOutputCallRequest.Unmarshal(m, b) -} -func (m *StreamingOutputCallRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StreamingOutputCallRequest.Marshal(b, m, deterministic) +func (x *StreamingOutputCallRequest) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *StreamingOutputCallRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_StreamingOutputCallRequest.Merge(m, src) -} -func (m *StreamingOutputCallRequest) XXX_Size() int { - return xxx_messageInfo_StreamingOutputCallRequest.Size(m) -} -func (m *StreamingOutputCallRequest) XXX_DiscardUnknown() { - xxx_messageInfo_StreamingOutputCallRequest.DiscardUnknown(m) + +func (*StreamingOutputCallRequest) ProtoMessage() {} + +func (x *StreamingOutputCallRequest) ProtoReflect() protoreflect.Message { + mi := &file_test_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_StreamingOutputCallRequest proto.InternalMessageInfo +// Deprecated: Use StreamingOutputCallRequest.ProtoReflect.Descriptor instead. +func (*StreamingOutputCallRequest) Descriptor() ([]byte, []int) { + return file_test_proto_rawDescGZIP(), []int{8} +} -func (m *StreamingOutputCallRequest) GetResponseType() PayloadType { - if m != nil { - return m.ResponseType +func (x *StreamingOutputCallRequest) GetResponseType() PayloadType { + if x != nil { + return x.ResponseType } return PayloadType_COMPRESSABLE } -func (m *StreamingOutputCallRequest) GetResponseParameters() []*ResponseParameters { - if m != nil { - return m.ResponseParameters +func (x *StreamingOutputCallRequest) GetResponseParameters() []*ResponseParameters { + if x != nil { + return x.ResponseParameters } return nil } -func (m *StreamingOutputCallRequest) GetPayload() *Payload { - if m != nil { - return m.Payload +func (x *StreamingOutputCallRequest) GetPayload() *Payload { + if x != nil { + return x.Payload } return nil } -func (m *StreamingOutputCallRequest) GetResponseStatus() *EchoStatus { - if m != nil { - return m.ResponseStatus +func (x *StreamingOutputCallRequest) GetResponseStatus() *EchoStatus { + if x != nil { + return x.ResponseStatus } return nil } // Server-streaming response, as configured by the request and parameters. type StreamingOutputCallResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Payload to increase response size. - Payload *Payload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Payload *Payload `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` } -func (m *StreamingOutputCallResponse) Reset() { *m = StreamingOutputCallResponse{} } -func (m *StreamingOutputCallResponse) String() string { return proto.CompactTextString(m) } -func (*StreamingOutputCallResponse) ProtoMessage() {} -func (*StreamingOutputCallResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c161fcfdc0c3ff1e, []int{9} +func (x *StreamingOutputCallResponse) Reset() { + *x = StreamingOutputCallResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_test_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *StreamingOutputCallResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StreamingOutputCallResponse.Unmarshal(m, b) -} -func (m *StreamingOutputCallResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StreamingOutputCallResponse.Marshal(b, m, deterministic) +func (x *StreamingOutputCallResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *StreamingOutputCallResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_StreamingOutputCallResponse.Merge(m, src) -} -func (m *StreamingOutputCallResponse) XXX_Size() int { - return xxx_messageInfo_StreamingOutputCallResponse.Size(m) -} -func (m *StreamingOutputCallResponse) XXX_DiscardUnknown() { - xxx_messageInfo_StreamingOutputCallResponse.DiscardUnknown(m) + +func (*StreamingOutputCallResponse) ProtoMessage() {} + +func (x *StreamingOutputCallResponse) ProtoReflect() protoreflect.Message { + mi := &file_test_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_StreamingOutputCallResponse proto.InternalMessageInfo +// Deprecated: Use StreamingOutputCallResponse.ProtoReflect.Descriptor instead. +func (*StreamingOutputCallResponse) Descriptor() ([]byte, []int) { + return file_test_proto_rawDescGZIP(), []int{9} +} -func (m *StreamingOutputCallResponse) GetPayload() *Payload { - if m != nil { - return m.Payload +func (x *StreamingOutputCallResponse) GetPayload() *Payload { + if x != nil { + return x.Payload } return nil } -func init() { - proto.RegisterEnum("testing.PayloadType", PayloadType_name, PayloadType_value) - proto.RegisterType((*Empty)(nil), "testing.Empty") - proto.RegisterType((*Payload)(nil), "testing.Payload") - proto.RegisterType((*EchoStatus)(nil), "testing.EchoStatus") - proto.RegisterType((*SimpleRequest)(nil), "testing.SimpleRequest") - proto.RegisterType((*SimpleResponse)(nil), "testing.SimpleResponse") - proto.RegisterType((*StreamingInputCallRequest)(nil), "testing.StreamingInputCallRequest") - proto.RegisterType((*StreamingInputCallResponse)(nil), "testing.StreamingInputCallResponse") - proto.RegisterType((*ResponseParameters)(nil), "testing.ResponseParameters") - proto.RegisterType((*StreamingOutputCallRequest)(nil), "testing.StreamingOutputCallRequest") - proto.RegisterType((*StreamingOutputCallResponse)(nil), "testing.StreamingOutputCallResponse") -} - -func init() { - proto.RegisterFile("test.proto", fileDescriptor_c161fcfdc0c3ff1e) -} - -var fileDescriptor_c161fcfdc0c3ff1e = []byte{ - // 646 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x5d, 0x4f, 0x13, 0x51, - 0x10, 0x75, 0x5b, 0x4a, 0x61, 0x5a, 0xd6, 0x3a, 0xa0, 0xac, 0xe5, 0xc1, 0x66, 0xf1, 0x61, 0x83, - 0x09, 0x31, 0x25, 0x31, 0xd1, 0x90, 0x18, 0x84, 0x8a, 0x44, 0xa0, 0x64, 0x97, 0x3e, 0x37, 0x97, - 0x76, 0x28, 0x9b, 0xec, 0x97, 0xbb, 0x77, 0x89, 0xe5, 0x4f, 0xf8, 0x37, 0xfc, 0x97, 0x9a, 0x7b, - 0xf7, 0xa3, 0x4b, 0x8b, 0x60, 0x83, 0xbe, 0xdd, 0x7b, 0xee, 0x99, 0x99, 0x73, 0x66, 0xa6, 0x5b, - 0x00, 0x4e, 0x11, 0xdf, 0x0e, 0x42, 0x9f, 0xfb, 0x58, 0x15, 0x67, 0xdb, 0x1b, 0xe9, 0x55, 0xa8, - 0x74, 0xdc, 0x80, 0x8f, 0xf5, 0x43, 0xa8, 0x9e, 0xb1, 0xb1, 0xe3, 0xb3, 0x21, 0x1a, 0xb0, 0xc0, - 0xc7, 0x01, 0x69, 0x4a, 0x4b, 0x31, 0xd4, 0xf6, 0xda, 0x76, 0xca, 0xdd, 0x4e, 0xdf, 0xcf, 0xc7, - 0x01, 0x99, 0x92, 0x81, 0x08, 0x0b, 0x17, 0xfe, 0x70, 0xac, 0x95, 0x5a, 0x8a, 0x51, 0x37, 0xe5, - 0x59, 0xff, 0x00, 0xd0, 0x19, 0x5c, 0xf9, 0x16, 0x67, 0x3c, 0x8e, 0x04, 0x63, 0xe0, 0x0f, 0x93, - 0x5c, 0x15, 0x53, 0x9e, 0x51, 0x83, 0xaa, 0x4b, 0x51, 0xc4, 0x46, 0x24, 0x03, 0x97, 0xcd, 0xec, - 0xaa, 0xff, 0x2c, 0xc1, 0x8a, 0x65, 0xbb, 0x81, 0x43, 0x26, 0x7d, 0x8b, 0x29, 0xe2, 0xf8, 0x1e, - 0x56, 0x42, 0x8a, 0x02, 0xdf, 0x8b, 0xa8, 0xff, 0xa0, 0xa8, 0x7a, 0x46, 0x15, 0x37, 0xdc, 0x2c, - 0x84, 0x46, 0xf6, 0x4d, 0x52, 0xac, 0x32, 0x21, 0x59, 0xf6, 0x0d, 0xe1, 0x16, 0x54, 0x83, 0x24, - 0x83, 0x56, 0x6e, 0x29, 0x46, 0xad, 0xdd, 0x98, 0xce, 0x6c, 0x66, 0x04, 0x91, 0xf0, 0xd2, 0x76, - 0x9c, 0x7e, 0x1c, 0x51, 0xe8, 0x31, 0x97, 0xb4, 0x85, 0x96, 0x62, 0x2c, 0x99, 0x75, 0x01, 0xf6, - 0x52, 0x0c, 0x0d, 0x68, 0x48, 0x92, 0xcf, 0x62, 0x7e, 0xd5, 0x8f, 0x06, 0x7e, 0x40, 0x5a, 0x45, - 0xf2, 0x54, 0x81, 0x77, 0x05, 0x6c, 0x09, 0x14, 0x77, 0xe1, 0xe9, 0x44, 0x9f, 0xec, 0x96, 0x56, - 0x95, 0x12, 0x56, 0x73, 0x09, 0x93, 0x46, 0x9a, 0x6a, 0x2e, 0x5b, 0xde, 0xf5, 0x31, 0xa8, 0x59, - 0xa7, 0x12, 0xbc, 0x68, 0x45, 0x79, 0xc8, 0x4a, 0x13, 0x96, 0x72, 0x17, 0xc9, 0x0c, 0xf2, 0x3b, - 0xbe, 0x82, 0x5a, 0x51, 0x7c, 0x59, 0x3e, 0x83, 0x9f, 0x0b, 0xd7, 0x0f, 0xe1, 0xa5, 0xc5, 0x43, - 0x62, 0xae, 0xed, 0x8d, 0x8e, 0xbc, 0x20, 0xe6, 0xfb, 0xcc, 0x71, 0xb2, 0x81, 0xcd, 0xa1, 0x42, - 0x3f, 0x87, 0xe6, 0x5d, 0x89, 0x52, 0x3f, 0xef, 0x60, 0x9d, 0x8d, 0x46, 0x21, 0x8d, 0x18, 0xa7, - 0x61, 0x3f, 0x8d, 0x49, 0x26, 0x99, 0x6c, 0xd3, 0xf3, 0xc9, 0x73, 0x9a, 0x5a, 0x8c, 0x54, 0x3f, - 0x02, 0xcc, 0x72, 0x9c, 0xb1, 0x90, 0xb9, 0xc4, 0x29, 0x94, 0x8b, 0x58, 0x08, 0x95, 0x67, 0xe1, - 0xd4, 0xf6, 0x38, 0x85, 0xd7, 0x4c, 0x0c, 0x35, 0xdd, 0x0f, 0xc8, 0xa0, 0x5e, 0xa4, 0xff, 0x28, - 0x15, 0x14, 0x76, 0x63, 0x3e, 0xe5, 0xf5, 0x11, 0xcb, 0x79, 0x0c, 0xab, 0x79, 0x68, 0x90, 0xab, - 0xd4, 0x4a, 0xad, 0xb2, 0x51, 0x6b, 0x6f, 0xe4, 0x09, 0x66, 0x8d, 0x98, 0x18, 0xce, 0x9a, 0x9b, - 0x67, 0x8b, 0x1f, 0xb7, 0x76, 0x47, 0xb0, 0x71, 0x67, 0x43, 0xe6, 0xdf, 0xc1, 0xad, 0x8f, 0x50, - 0x2b, 0xf4, 0x07, 0x1b, 0x50, 0xdf, 0xef, 0x9e, 0x9c, 0x99, 0x1d, 0xcb, 0xda, 0xfb, 0x74, 0xdc, - 0x69, 0x3c, 0x41, 0x04, 0xb5, 0x77, 0x7a, 0x0b, 0x53, 0x10, 0x60, 0xd1, 0xdc, 0x3b, 0x3d, 0xe8, - 0x9e, 0x34, 0x4a, 0xed, 0x5f, 0x65, 0xa8, 0x9d, 0x53, 0xc4, 0x2d, 0x0a, 0xaf, 0xed, 0x01, 0xe1, - 0x1b, 0x58, 0x96, 0xdf, 0x32, 0xa1, 0x08, 0xd5, 0x89, 0x1b, 0x81, 0x35, 0xa7, 0xee, 0xb8, 0x0b, - 0xcb, 0x3d, 0x8f, 0x85, 0x09, 0xf9, 0x45, 0xfe, 0x78, 0xeb, 0xeb, 0xd3, 0x5c, 0x9f, 0xc1, 0x53, - 0x9f, 0x17, 0xb0, 0x7a, 0x47, 0x1b, 0x70, 0x73, 0xc2, 0xff, 0xe3, 0xd6, 0x34, 0x5f, 0xdf, 0x4f, - 0x4a, 0x2a, 0xbc, 0x55, 0xb0, 0x0f, 0x38, 0xfb, 0xeb, 0x40, 0x7d, 0x36, 0x7a, 0xfa, 0x37, 0xd8, - 0xdc, 0xbc, 0x97, 0x93, 0x14, 0x30, 0x44, 0x01, 0xf5, 0x73, 0xec, 0x38, 0x07, 0x71, 0xe0, 0xd0, - 0xf7, 0x7f, 0xac, 0xdf, 0x50, 0xa4, 0x03, 0xf5, 0x0b, 0x73, 0x2e, 0xff, 0x5b, 0x81, 0xf6, 0x57, - 0x58, 0xeb, 0x79, 0x72, 0x32, 0x2e, 0x79, 0x9c, 0x86, 0xd9, 0x26, 0xec, 0xc0, 0xb3, 0x5b, 0xf8, - 0xdf, 0x6c, 0xc4, 0xc5, 0xa2, 0xfc, 0x6b, 0xdc, 0xf9, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xca, 0x17, - 0x8b, 0xfe, 0x28, 0x07, 0x00, 0x00, +var File_test_proto protoreflect.FileDescriptor + +var file_test_proto_rawDesc = []byte{ + 0x0a, 0x0a, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x74, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x47, + 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x28, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x67, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x3a, 0x0a, 0x0a, 0x45, 0x63, 0x68, 0x6f, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x22, 0xa8, 0x02, 0x0a, 0x0d, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x39, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, + 0x70, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, + 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x69, 0x6c, 0x6c, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x66, 0x69, 0x6c, 0x6c, 0x55, 0x73, + 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x66, 0x69, 0x6c, 0x6c, 0x5f, 0x6f, + 0x61, 0x75, 0x74, 0x68, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x0e, 0x66, 0x69, 0x6c, 0x6c, 0x4f, 0x61, 0x75, 0x74, 0x68, 0x53, 0x63, 0x6f, 0x70, 0x65, + 0x12, 0x3c, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x67, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, + 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x79, + 0x0a, 0x0e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x2a, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x50, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1a, 0x0a, 0x08, + 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x61, 0x75, 0x74, + 0x68, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, + 0x61, 0x75, 0x74, 0x68, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x22, 0x47, 0x0a, 0x19, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2a, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x67, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x22, 0x54, 0x0a, 0x1a, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x49, + 0x6e, 0x70, 0x75, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x36, 0x0a, 0x17, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x15, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x69, 0x7a, 0x65, 0x22, 0x49, 0x0a, 0x12, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x12, + 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x73, 0x69, + 0x7a, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x5f, 0x75, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, + 0x6c, 0x55, 0x73, 0x22, 0x8f, 0x02, 0x0a, 0x1a, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, + 0x67, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x39, 0x0a, 0x0d, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x74, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x67, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, + 0x0c, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4c, 0x0a, + 0x13, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x12, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x2a, 0x0a, 0x07, 0x70, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x07, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x3c, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x13, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x45, 0x63, 0x68, 0x6f, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x49, 0x0a, 0x1b, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, + 0x6e, 0x67, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, + 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x2a, 0x3f, 0x0a, 0x0b, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x10, 0x0a, 0x0c, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x41, 0x42, 0x4c, 0x45, 0x10, + 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x43, 0x4f, 0x4d, 0x50, 0x52, 0x45, 0x53, 0x53, 0x41, + 0x42, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x41, 0x4e, 0x44, 0x4f, 0x4d, 0x10, + 0x02, 0x32, 0xff, 0x03, 0x0a, 0x0b, 0x54, 0x65, 0x73, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x2b, 0x0a, 0x09, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x0e, + 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x0e, + 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3c, + 0x0a, 0x09, 0x55, 0x6e, 0x61, 0x72, 0x79, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x16, 0x2e, 0x74, 0x65, + 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x69, + 0x6d, 0x70, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x62, 0x0a, 0x13, + 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, + 0x61, 0x6c, 0x6c, 0x12, 0x23, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x61, 0x6c, + 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x67, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x4f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, + 0x12, 0x5f, 0x0a, 0x12, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x70, + 0x75, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x22, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, + 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x43, + 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x74, 0x65, 0x73, + 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x49, 0x6e, + 0x70, 0x75, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, + 0x01, 0x12, 0x5f, 0x0a, 0x0e, 0x46, 0x75, 0x6c, 0x6c, 0x44, 0x75, 0x70, 0x6c, 0x65, 0x78, 0x43, + 0x61, 0x6c, 0x6c, 0x12, 0x23, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x74, + 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x61, 0x6c, + 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x67, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x4f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, + 0x30, 0x01, 0x12, 0x5f, 0x0a, 0x0e, 0x48, 0x61, 0x6c, 0x66, 0x44, 0x75, 0x70, 0x6c, 0x65, 0x78, + 0x43, 0x61, 0x6c, 0x6c, 0x12, 0x23, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x53, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x61, + 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x74, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x4f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, + 0x01, 0x30, 0x01, 0x32, 0x4b, 0x0a, 0x14, 0x55, 0x6e, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x33, 0x0a, 0x11, 0x55, + 0x6e, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x43, 0x61, 0x6c, 0x6c, + 0x12, 0x0e, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x1a, 0x0e, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x42, 0x0b, 0x5a, 0x09, 0x2e, 0x3b, 0x74, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_test_proto_rawDescOnce sync.Once + file_test_proto_rawDescData = file_test_proto_rawDesc +) + +func file_test_proto_rawDescGZIP() []byte { + file_test_proto_rawDescOnce.Do(func() { + file_test_proto_rawDescData = protoimpl.X.CompressGZIP(file_test_proto_rawDescData) + }) + return file_test_proto_rawDescData +} + +var file_test_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_test_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_test_proto_goTypes = []interface{}{ + (PayloadType)(0), // 0: testing.PayloadType + (*Empty)(nil), // 1: testing.Empty + (*Payload)(nil), // 2: testing.Payload + (*EchoStatus)(nil), // 3: testing.EchoStatus + (*SimpleRequest)(nil), // 4: testing.SimpleRequest + (*SimpleResponse)(nil), // 5: testing.SimpleResponse + (*StreamingInputCallRequest)(nil), // 6: testing.StreamingInputCallRequest + (*StreamingInputCallResponse)(nil), // 7: testing.StreamingInputCallResponse + (*ResponseParameters)(nil), // 8: testing.ResponseParameters + (*StreamingOutputCallRequest)(nil), // 9: testing.StreamingOutputCallRequest + (*StreamingOutputCallResponse)(nil), // 10: testing.StreamingOutputCallResponse +} +var file_test_proto_depIdxs = []int32{ + 0, // 0: testing.Payload.type:type_name -> testing.PayloadType + 0, // 1: testing.SimpleRequest.response_type:type_name -> testing.PayloadType + 2, // 2: testing.SimpleRequest.payload:type_name -> testing.Payload + 3, // 3: testing.SimpleRequest.response_status:type_name -> testing.EchoStatus + 2, // 4: testing.SimpleResponse.payload:type_name -> testing.Payload + 2, // 5: testing.StreamingInputCallRequest.payload:type_name -> testing.Payload + 0, // 6: testing.StreamingOutputCallRequest.response_type:type_name -> testing.PayloadType + 8, // 7: testing.StreamingOutputCallRequest.response_parameters:type_name -> testing.ResponseParameters + 2, // 8: testing.StreamingOutputCallRequest.payload:type_name -> testing.Payload + 3, // 9: testing.StreamingOutputCallRequest.response_status:type_name -> testing.EchoStatus + 2, // 10: testing.StreamingOutputCallResponse.payload:type_name -> testing.Payload + 1, // 11: testing.TestService.EmptyCall:input_type -> testing.Empty + 4, // 12: testing.TestService.UnaryCall:input_type -> testing.SimpleRequest + 9, // 13: testing.TestService.StreamingOutputCall:input_type -> testing.StreamingOutputCallRequest + 6, // 14: testing.TestService.StreamingInputCall:input_type -> testing.StreamingInputCallRequest + 9, // 15: testing.TestService.FullDuplexCall:input_type -> testing.StreamingOutputCallRequest + 9, // 16: testing.TestService.HalfDuplexCall:input_type -> testing.StreamingOutputCallRequest + 1, // 17: testing.UnimplementedService.UnimplementedCall:input_type -> testing.Empty + 1, // 18: testing.TestService.EmptyCall:output_type -> testing.Empty + 5, // 19: testing.TestService.UnaryCall:output_type -> testing.SimpleResponse + 10, // 20: testing.TestService.StreamingOutputCall:output_type -> testing.StreamingOutputCallResponse + 7, // 21: testing.TestService.StreamingInputCall:output_type -> testing.StreamingInputCallResponse + 10, // 22: testing.TestService.FullDuplexCall:output_type -> testing.StreamingOutputCallResponse + 10, // 23: testing.TestService.HalfDuplexCall:output_type -> testing.StreamingOutputCallResponse + 1, // 24: testing.UnimplementedService.UnimplementedCall:output_type -> testing.Empty + 18, // [18:25] is the sub-list for method output_type + 11, // [11:18] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name +} + +func init() { file_test_proto_init() } +func file_test_proto_init() { + if File_test_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Empty); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Payload); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EchoStatus); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SimpleRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SimpleResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamingInputCallRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamingInputCallResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResponseParameters); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamingOutputCallRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_test_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StreamingOutputCallResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_test_proto_rawDesc, + NumEnums: 1, + NumMessages: 10, + NumExtensions: 0, + NumServices: 2, + }, + GoTypes: file_test_proto_goTypes, + DependencyIndexes: file_test_proto_depIdxs, + EnumInfos: file_test_proto_enumTypes, + MessageInfos: file_test_proto_msgTypes, + }.Build() + File_test_proto = out.File + file_test_proto_rawDesc = nil + file_test_proto_goTypes = nil + file_test_proto_depIdxs = nil } // Reference imports to suppress errors if they are not otherwise used. @@ -859,22 +1249,22 @@ type TestServiceServer interface { type UnimplementedTestServiceServer struct { } -func (*UnimplementedTestServiceServer) EmptyCall(ctx context.Context, req *Empty) (*Empty, error) { +func (*UnimplementedTestServiceServer) EmptyCall(context.Context, *Empty) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method EmptyCall not implemented") } -func (*UnimplementedTestServiceServer) UnaryCall(ctx context.Context, req *SimpleRequest) (*SimpleResponse, error) { +func (*UnimplementedTestServiceServer) UnaryCall(context.Context, *SimpleRequest) (*SimpleResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UnaryCall not implemented") } -func (*UnimplementedTestServiceServer) StreamingOutputCall(req *StreamingOutputCallRequest, srv TestService_StreamingOutputCallServer) error { +func (*UnimplementedTestServiceServer) StreamingOutputCall(*StreamingOutputCallRequest, TestService_StreamingOutputCallServer) error { return status.Errorf(codes.Unimplemented, "method StreamingOutputCall not implemented") } -func (*UnimplementedTestServiceServer) StreamingInputCall(srv TestService_StreamingInputCallServer) error { +func (*UnimplementedTestServiceServer) StreamingInputCall(TestService_StreamingInputCallServer) error { return status.Errorf(codes.Unimplemented, "method StreamingInputCall not implemented") } -func (*UnimplementedTestServiceServer) FullDuplexCall(srv TestService_FullDuplexCallServer) error { +func (*UnimplementedTestServiceServer) FullDuplexCall(TestService_FullDuplexCallServer) error { return status.Errorf(codes.Unimplemented, "method FullDuplexCall not implemented") } -func (*UnimplementedTestServiceServer) HalfDuplexCall(srv TestService_HalfDuplexCallServer) error { +func (*UnimplementedTestServiceServer) HalfDuplexCall(TestService_HalfDuplexCallServer) error { return status.Errorf(codes.Unimplemented, "method HalfDuplexCall not implemented") } @@ -1092,7 +1482,7 @@ type UnimplementedServiceServer interface { type UnimplementedUnimplementedServiceServer struct { } -func (*UnimplementedUnimplementedServiceServer) UnimplementedCall(ctx context.Context, req *Empty) (*Empty, error) { +func (*UnimplementedUnimplementedServiceServer) UnimplementedCall(context.Context, *Empty) (*Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method UnimplementedCall not implemented") } diff --git a/internal/testing/test.proto b/internal/testing/test.proto index 3ab9bb1..90506aa 100644 --- a/internal/testing/test.proto +++ b/internal/testing/test.proto @@ -20,6 +20,8 @@ syntax = "proto3"; package testing; +option go_package = ".;testing"; + message Empty {} // The type of payload that should be returned. diff --git a/internal/testing/test_server.go b/internal/testing/test_server.go index 413f2c5..f96eea0 100644 --- a/internal/testing/test_server.go +++ b/internal/testing/test_server.go @@ -5,11 +5,11 @@ package testing //go:generate protoc --descriptor_set_out=./example.protoset --include_imports example.proto import ( + "context" "io" "strconv" "time" - "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" diff --git a/invoke.go b/invoke.go index 39a0eb9..0db362c 100644 --- a/invoke.go +++ b/invoke.go @@ -2,19 +2,19 @@ package grpcurl import ( "bytes" + "context" "fmt" "io" "strings" "sync" "sync/atomic" - "github.com/golang/protobuf/jsonpb" - "github.com/golang/protobuf/proto" + "github.com/golang/protobuf/jsonpb" //lint:ignore SA1019 we have to import this because it appears in exported API + "github.com/golang/protobuf/proto" //lint:ignore SA1019 we have to import this because it appears in exported API "github.com/jhump/protoreflect/desc" "github.com/jhump/protoreflect/dynamic" "github.com/jhump/protoreflect/dynamic/grpcdynamic" "github.com/jhump/protoreflect/grpcreflect" - "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" diff --git a/tls_settings_test.go b/tls_settings_test.go index b6d77ad..bd96482 100644 --- a/tls_settings_test.go +++ b/tls_settings_test.go @@ -1,13 +1,13 @@ package grpcurl_test import ( + "context" "fmt" "net" "strings" "testing" "time" - "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/credentials" -- 2.31.1