Codebase list golang-goprotobuf / a4e147d
Update upstream source from tag 'upstream/1.3.2' Update to upstream version '1.3.2' with Debian dir 74ebbc0eb38ecd57e5c490b330112dfe205d20f2 Anthony Fok 4 years ago
87 changed file(s) with 3315 addition(s) and 5592 deletion(s). Raw diff Collapse all Expand all
00 sudo: false
11 language: go
22 go:
3 - 1.6.x
3 - 1.9.x
44 - 1.10.x
5 - 1.11.x
56 - 1.x
67
78 install:
89 - go get -v -d google.golang.org/grpc
910 - go get -v -d -t github.com/golang/protobuf/...
10 - curl -L https://github.com/google/protobuf/releases/download/v3.5.1/protoc-3.5.1-linux-x86_64.zip -o /tmp/protoc.zip
11 - curl -L https://github.com/google/protobuf/releases/download/v3.6.1/protoc-3.6.1-linux-x86_64.zip -o /tmp/protoc.zip
1112 - unzip /tmp/protoc.zip -d "$HOME"/protoc
1213 - mkdir -p "$HOME"/src && ln -s "$HOME"/protoc "$HOME"/src/protobuf
1314
3737 go test ./... ./protoc-gen-go/testdata
3838 go test -tags purego ./... ./protoc-gen-go/testdata
3939 go build ./protoc-gen-go/testdata/grpc/grpc.pb.go
40 make -C conformance test
4140
4241 clean:
4342 go clean ./...
66 Copyright 2010 The Go Authors.
77 https://github.com/golang/protobuf
88
9 This package and the code it generates requires at least Go 1.6.
9 This package and the code it generates requires at least Go 1.9.
1010
1111 This software implements Go bindings for protocol buffers. For
1212 information about protocol buffers themselves, see
2323 https://golang.org/doc/install
2424 for details or, if you are using gccgo, follow the instructions at
2525 https://golang.org/doc/install/gccgo
26 - Grab the code from the repository and install the proto package.
26 - Grab the code from the repository and install the `proto` package.
2727 The simplest way is to run `go get -u github.com/golang/protobuf/protoc-gen-go`.
28 The compiler plugin, protoc-gen-go, will be installed in $GOBIN,
29 defaulting to $GOPATH/bin. It must be in your $PATH for the protocol
30 compiler, protoc, to find it.
28 The compiler plugin, `protoc-gen-go`, will be installed in `$GOPATH/bin`
29 unless `$GOBIN` is set. It must be in your `$PATH` for the protocol
30 compiler, `protoc`, to find it.
31 - If you need a particular version of `protoc-gen-go` (e.g., to match your
32 `proto` package version), one option is
33 ```shell
34 GIT_TAG="v1.2.0" # change as needed
35 go get -d -u github.com/golang/protobuf/protoc-gen-go
36 git -C "$(go env GOPATH)"/src/github.com/golang/protobuf checkout $GIT_TAG
37 go install github.com/golang/protobuf/protoc-gen-go
38 ```
3139
3240 This software has two parts: a 'protocol compiler plugin' that
3341 generates Go source files that, once compiled, can access and manage
+0
-49
conformance/Makefile less more
0 # Go support for Protocol Buffers - Google's data interchange format
1 #
2 # Copyright 2016 The Go Authors. All rights reserved.
3 # https://github.com/golang/protobuf
4 #
5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions are
7 # met:
8 #
9 # * Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer.
11 # * Redistributions in binary form must reproduce the above
12 # copyright notice, this list of conditions and the following disclaimer
13 # in the documentation and/or other materials provided with the
14 # distribution.
15 # * Neither the name of Google Inc. nor the names of its
16 # contributors may be used to endorse or promote products derived from
17 # this software without specific prior written permission.
18 #
19 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
31 PROTOBUF_ROOT=$(HOME)/src/protobuf
32
33 all:
34 @echo To run the tests in this directory, acquire the main protobuf
35 @echo distribution from:
36 @echo
37 @echo ' https://github.com/google/protobuf'
38 @echo
39 @echo Build the test runner with:
40 @echo
41 @echo ' cd conformance && make conformance-test-runner'
42 @echo
43 @echo And run the tests in this directory with:
44 @echo
45 @echo ' make test PROTOBUF_ROOT=<protobuf distribution>'
46
47 test:
48 ./test.sh $(PROTOBUF_ROOT)
+0
-154
conformance/conformance.go less more
0 // Go support for Protocol Buffers - Google's data interchange format
1 //
2 // Copyright 2016 The Go Authors. All rights reserved.
3 // https://github.com/golang/protobuf
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
7 // met:
8 //
9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 // * Redistributions in binary form must reproduce the above
12 // copyright notice, this list of conditions and the following disclaimer
13 // in the documentation and/or other materials provided with the
14 // distribution.
15 // * Neither the name of Google Inc. nor the names of its
16 // contributors may be used to endorse or promote products derived from
17 // this software without specific prior written permission.
18 //
19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
31 // conformance implements the conformance test subprocess protocol as
32 // documented in conformance.proto.
33 package main
34
35 import (
36 "encoding/binary"
37 "fmt"
38 "io"
39 "os"
40
41 pb "github.com/golang/protobuf/conformance/internal/conformance_proto"
42 "github.com/golang/protobuf/jsonpb"
43 "github.com/golang/protobuf/proto"
44 )
45
46 func main() {
47 var sizeBuf [4]byte
48 inbuf := make([]byte, 0, 4096)
49 outbuf := proto.NewBuffer(nil)
50 for {
51 if _, err := io.ReadFull(os.Stdin, sizeBuf[:]); err == io.EOF {
52 break
53 } else if err != nil {
54 fmt.Fprintln(os.Stderr, "go conformance: read request:", err)
55 os.Exit(1)
56 }
57 size := binary.LittleEndian.Uint32(sizeBuf[:])
58 if int(size) > cap(inbuf) {
59 inbuf = make([]byte, size)
60 }
61 inbuf = inbuf[:size]
62 if _, err := io.ReadFull(os.Stdin, inbuf); err != nil {
63 fmt.Fprintln(os.Stderr, "go conformance: read request:", err)
64 os.Exit(1)
65 }
66
67 req := new(pb.ConformanceRequest)
68 if err := proto.Unmarshal(inbuf, req); err != nil {
69 fmt.Fprintln(os.Stderr, "go conformance: parse request:", err)
70 os.Exit(1)
71 }
72 res := handle(req)
73
74 if err := outbuf.Marshal(res); err != nil {
75 fmt.Fprintln(os.Stderr, "go conformance: marshal response:", err)
76 os.Exit(1)
77 }
78 binary.LittleEndian.PutUint32(sizeBuf[:], uint32(len(outbuf.Bytes())))
79 if _, err := os.Stdout.Write(sizeBuf[:]); err != nil {
80 fmt.Fprintln(os.Stderr, "go conformance: write response:", err)
81 os.Exit(1)
82 }
83 if _, err := os.Stdout.Write(outbuf.Bytes()); err != nil {
84 fmt.Fprintln(os.Stderr, "go conformance: write response:", err)
85 os.Exit(1)
86 }
87 outbuf.Reset()
88 }
89 }
90
91 var jsonMarshaler = jsonpb.Marshaler{
92 OrigName: true,
93 }
94
95 func handle(req *pb.ConformanceRequest) *pb.ConformanceResponse {
96 var err error
97 var msg pb.TestAllTypes
98 switch p := req.Payload.(type) {
99 case *pb.ConformanceRequest_ProtobufPayload:
100 err = proto.Unmarshal(p.ProtobufPayload, &msg)
101 case *pb.ConformanceRequest_JsonPayload:
102 err = jsonpb.UnmarshalString(p.JsonPayload, &msg)
103 default:
104 return &pb.ConformanceResponse{
105 Result: &pb.ConformanceResponse_RuntimeError{
106 RuntimeError: "unknown request payload type",
107 },
108 }
109 }
110 if err != nil {
111 return &pb.ConformanceResponse{
112 Result: &pb.ConformanceResponse_ParseError{
113 ParseError: err.Error(),
114 },
115 }
116 }
117 switch req.RequestedOutputFormat {
118 case pb.WireFormat_PROTOBUF:
119 p, err := proto.Marshal(&msg)
120 if err != nil {
121 return &pb.ConformanceResponse{
122 Result: &pb.ConformanceResponse_SerializeError{
123 SerializeError: err.Error(),
124 },
125 }
126 }
127 return &pb.ConformanceResponse{
128 Result: &pb.ConformanceResponse_ProtobufPayload{
129 ProtobufPayload: p,
130 },
131 }
132 case pb.WireFormat_JSON:
133 p, err := jsonMarshaler.MarshalToString(&msg)
134 if err != nil {
135 return &pb.ConformanceResponse{
136 Result: &pb.ConformanceResponse_SerializeError{
137 SerializeError: err.Error(),
138 },
139 }
140 }
141 return &pb.ConformanceResponse{
142 Result: &pb.ConformanceResponse_JsonPayload{
143 JsonPayload: p,
144 },
145 }
146 default:
147 return &pb.ConformanceResponse{
148 Result: &pb.ConformanceResponse_RuntimeError{
149 RuntimeError: "unknown output format",
150 },
151 }
152 }
153 }
+0
-4
conformance/conformance.sh less more
0 #!/bin/sh
1
2 cd $(dirname $0)
3 exec go run conformance.go $*
+0
-61
conformance/failure_list_go.txt less more
0 # This is the list of conformance tests that are known ot fail right now.
1 # TODO: These should be fixed.
2
3 DurationProtoInputTooLarge.JsonOutput
4 DurationProtoInputTooSmall.JsonOutput
5 FieldMaskNumbersDontRoundTrip.JsonOutput
6 FieldMaskPathsDontRoundTrip.JsonOutput
7 FieldMaskTooManyUnderscore.JsonOutput
8 JsonInput.AnyWithFieldMask.JsonOutput
9 JsonInput.AnyWithFieldMask.ProtobufOutput
10 JsonInput.DoubleFieldQuotedValue.JsonOutput
11 JsonInput.DoubleFieldQuotedValue.ProtobufOutput
12 JsonInput.DurationHas3FractionalDigits.Validator
13 JsonInput.DurationHas6FractionalDigits.Validator
14 JsonInput.DurationHas9FractionalDigits.Validator
15 JsonInput.DurationHasZeroFractionalDigit.Validator
16 JsonInput.DurationMaxValue.JsonOutput
17 JsonInput.DurationMaxValue.ProtobufOutput
18 JsonInput.DurationMinValue.JsonOutput
19 JsonInput.DurationMinValue.ProtobufOutput
20 JsonInput.EnumFieldUnknownValue.Validator
21 JsonInput.FieldMask.JsonOutput
22 JsonInput.FieldMask.ProtobufOutput
23 JsonInput.FieldNameInLowerCamelCase.Validator
24 JsonInput.FieldNameWithMixedCases.JsonOutput
25 JsonInput.FieldNameWithMixedCases.ProtobufOutput
26 JsonInput.FieldNameWithMixedCases.Validator
27 JsonInput.FieldNameWithNumbers.Validator
28 JsonInput.FloatFieldQuotedValue.JsonOutput
29 JsonInput.FloatFieldQuotedValue.ProtobufOutput
30 JsonInput.Int32FieldExponentialFormat.JsonOutput
31 JsonInput.Int32FieldExponentialFormat.ProtobufOutput
32 JsonInput.Int32FieldFloatTrailingZero.JsonOutput
33 JsonInput.Int32FieldFloatTrailingZero.ProtobufOutput
34 JsonInput.Int32FieldMaxFloatValue.JsonOutput
35 JsonInput.Int32FieldMaxFloatValue.ProtobufOutput
36 JsonInput.Int32FieldMinFloatValue.JsonOutput
37 JsonInput.Int32FieldMinFloatValue.ProtobufOutput
38 JsonInput.Int32FieldStringValue.JsonOutput
39 JsonInput.Int32FieldStringValue.ProtobufOutput
40 JsonInput.Int32FieldStringValueEscaped.JsonOutput
41 JsonInput.Int32FieldStringValueEscaped.ProtobufOutput
42 JsonInput.Int64FieldBeString.Validator
43 JsonInput.MapFieldValueIsNull
44 JsonInput.OneofFieldDuplicate
45 JsonInput.RepeatedFieldMessageElementIsNull
46 JsonInput.RepeatedFieldPrimitiveElementIsNull
47 JsonInput.StringFieldSurrogateInWrongOrder
48 JsonInput.StringFieldUnpairedHighSurrogate
49 JsonInput.StringFieldUnpairedLowSurrogate
50 JsonInput.TimestampHas3FractionalDigits.Validator
51 JsonInput.TimestampHas6FractionalDigits.Validator
52 JsonInput.TimestampHas9FractionalDigits.Validator
53 JsonInput.TimestampHasZeroFractionalDigit.Validator
54 JsonInput.TimestampJsonInputTooSmall
55 JsonInput.TimestampZeroNormalized.Validator
56 JsonInput.Uint32FieldMaxFloatValue.JsonOutput
57 JsonInput.Uint32FieldMaxFloatValue.ProtobufOutput
58 JsonInput.Uint64FieldBeString.Validator
59 TimestampProtoInputTooLarge.JsonOutput
60 TimestampProtoInputTooSmall.JsonOutput
+0
-1834
conformance/internal/conformance_proto/conformance.pb.go less more
0 // Code generated by protoc-gen-go. DO NOT EDIT.
1 // source: conformance.proto
2
3 package conformance
4
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
8 import any "github.com/golang/protobuf/ptypes/any"
9 import duration "github.com/golang/protobuf/ptypes/duration"
10 import _struct "github.com/golang/protobuf/ptypes/struct"
11 import timestamp "github.com/golang/protobuf/ptypes/timestamp"
12 import wrappers "github.com/golang/protobuf/ptypes/wrappers"
13 import field_mask "google.golang.org/genproto/protobuf/field_mask"
14
15 // Reference imports to suppress errors if they are not otherwise used.
16 var _ = proto.Marshal
17 var _ = fmt.Errorf
18 var _ = math.Inf
19
20 // This is a compile-time assertion to ensure that this generated file
21 // is compatible with the proto package it is being compiled against.
22 // A compilation error at this line likely means your copy of the
23 // proto package needs to be updated.
24 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
25
26 type WireFormat int32
27
28 const (
29 WireFormat_UNSPECIFIED WireFormat = 0
30 WireFormat_PROTOBUF WireFormat = 1
31 WireFormat_JSON WireFormat = 2
32 )
33
34 var WireFormat_name = map[int32]string{
35 0: "UNSPECIFIED",
36 1: "PROTOBUF",
37 2: "JSON",
38 }
39 var WireFormat_value = map[string]int32{
40 "UNSPECIFIED": 0,
41 "PROTOBUF": 1,
42 "JSON": 2,
43 }
44
45 func (x WireFormat) String() string {
46 return proto.EnumName(WireFormat_name, int32(x))
47 }
48 func (WireFormat) EnumDescriptor() ([]byte, []int) {
49 return fileDescriptor_conformance_48ac832451f5d6c3, []int{0}
50 }
51
52 type ForeignEnum int32
53
54 const (
55 ForeignEnum_FOREIGN_FOO ForeignEnum = 0
56 ForeignEnum_FOREIGN_BAR ForeignEnum = 1
57 ForeignEnum_FOREIGN_BAZ ForeignEnum = 2
58 )
59
60 var ForeignEnum_name = map[int32]string{
61 0: "FOREIGN_FOO",
62 1: "FOREIGN_BAR",
63 2: "FOREIGN_BAZ",
64 }
65 var ForeignEnum_value = map[string]int32{
66 "FOREIGN_FOO": 0,
67 "FOREIGN_BAR": 1,
68 "FOREIGN_BAZ": 2,
69 }
70
71 func (x ForeignEnum) String() string {
72 return proto.EnumName(ForeignEnum_name, int32(x))
73 }
74 func (ForeignEnum) EnumDescriptor() ([]byte, []int) {
75 return fileDescriptor_conformance_48ac832451f5d6c3, []int{1}
76 }
77
78 type TestAllTypes_NestedEnum int32
79
80 const (
81 TestAllTypes_FOO TestAllTypes_NestedEnum = 0
82 TestAllTypes_BAR TestAllTypes_NestedEnum = 1
83 TestAllTypes_BAZ TestAllTypes_NestedEnum = 2
84 TestAllTypes_NEG TestAllTypes_NestedEnum = -1
85 )
86
87 var TestAllTypes_NestedEnum_name = map[int32]string{
88 0: "FOO",
89 1: "BAR",
90 2: "BAZ",
91 -1: "NEG",
92 }
93 var TestAllTypes_NestedEnum_value = map[string]int32{
94 "FOO": 0,
95 "BAR": 1,
96 "BAZ": 2,
97 "NEG": -1,
98 }
99
100 func (x TestAllTypes_NestedEnum) String() string {
101 return proto.EnumName(TestAllTypes_NestedEnum_name, int32(x))
102 }
103 func (TestAllTypes_NestedEnum) EnumDescriptor() ([]byte, []int) {
104 return fileDescriptor_conformance_48ac832451f5d6c3, []int{2, 0}
105 }
106
107 // Represents a single test case's input. The testee should:
108 //
109 // 1. parse this proto (which should always succeed)
110 // 2. parse the protobuf or JSON payload in "payload" (which may fail)
111 // 3. if the parse succeeded, serialize the message in the requested format.
112 type ConformanceRequest struct {
113 // The payload (whether protobuf of JSON) is always for a TestAllTypes proto
114 // (see below).
115 //
116 // Types that are valid to be assigned to Payload:
117 // *ConformanceRequest_ProtobufPayload
118 // *ConformanceRequest_JsonPayload
119 Payload isConformanceRequest_Payload `protobuf_oneof:"payload"`
120 // Which format should the testee serialize its message to?
121 RequestedOutputFormat WireFormat `protobuf:"varint,3,opt,name=requested_output_format,json=requestedOutputFormat,proto3,enum=conformance.WireFormat" json:"requested_output_format,omitempty"`
122 XXX_NoUnkeyedLiteral struct{} `json:"-"`
123 XXX_unrecognized []byte `json:"-"`
124 XXX_sizecache int32 `json:"-"`
125 }
126
127 func (m *ConformanceRequest) Reset() { *m = ConformanceRequest{} }
128 func (m *ConformanceRequest) String() string { return proto.CompactTextString(m) }
129 func (*ConformanceRequest) ProtoMessage() {}
130 func (*ConformanceRequest) Descriptor() ([]byte, []int) {
131 return fileDescriptor_conformance_48ac832451f5d6c3, []int{0}
132 }
133 func (m *ConformanceRequest) XXX_Unmarshal(b []byte) error {
134 return xxx_messageInfo_ConformanceRequest.Unmarshal(m, b)
135 }
136 func (m *ConformanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
137 return xxx_messageInfo_ConformanceRequest.Marshal(b, m, deterministic)
138 }
139 func (dst *ConformanceRequest) XXX_Merge(src proto.Message) {
140 xxx_messageInfo_ConformanceRequest.Merge(dst, src)
141 }
142 func (m *ConformanceRequest) XXX_Size() int {
143 return xxx_messageInfo_ConformanceRequest.Size(m)
144 }
145 func (m *ConformanceRequest) XXX_DiscardUnknown() {
146 xxx_messageInfo_ConformanceRequest.DiscardUnknown(m)
147 }
148
149 var xxx_messageInfo_ConformanceRequest proto.InternalMessageInfo
150
151 type isConformanceRequest_Payload interface {
152 isConformanceRequest_Payload()
153 }
154
155 type ConformanceRequest_ProtobufPayload struct {
156 ProtobufPayload []byte `protobuf:"bytes,1,opt,name=protobuf_payload,json=protobufPayload,proto3,oneof"`
157 }
158
159 type ConformanceRequest_JsonPayload struct {
160 JsonPayload string `protobuf:"bytes,2,opt,name=json_payload,json=jsonPayload,proto3,oneof"`
161 }
162
163 func (*ConformanceRequest_ProtobufPayload) isConformanceRequest_Payload() {}
164
165 func (*ConformanceRequest_JsonPayload) isConformanceRequest_Payload() {}
166
167 func (m *ConformanceRequest) GetPayload() isConformanceRequest_Payload {
168 if m != nil {
169 return m.Payload
170 }
171 return nil
172 }
173
174 func (m *ConformanceRequest) GetProtobufPayload() []byte {
175 if x, ok := m.GetPayload().(*ConformanceRequest_ProtobufPayload); ok {
176 return x.ProtobufPayload
177 }
178 return nil
179 }
180
181 func (m *ConformanceRequest) GetJsonPayload() string {
182 if x, ok := m.GetPayload().(*ConformanceRequest_JsonPayload); ok {
183 return x.JsonPayload
184 }
185 return ""
186 }
187
188 func (m *ConformanceRequest) GetRequestedOutputFormat() WireFormat {
189 if m != nil {
190 return m.RequestedOutputFormat
191 }
192 return WireFormat_UNSPECIFIED
193 }
194
195 // XXX_OneofFuncs is for the internal use of the proto package.
196 func (*ConformanceRequest) 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{}) {
197 return _ConformanceRequest_OneofMarshaler, _ConformanceRequest_OneofUnmarshaler, _ConformanceRequest_OneofSizer, []interface{}{
198 (*ConformanceRequest_ProtobufPayload)(nil),
199 (*ConformanceRequest_JsonPayload)(nil),
200 }
201 }
202
203 func _ConformanceRequest_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
204 m := msg.(*ConformanceRequest)
205 // payload
206 switch x := m.Payload.(type) {
207 case *ConformanceRequest_ProtobufPayload:
208 b.EncodeVarint(1<<3 | proto.WireBytes)
209 b.EncodeRawBytes(x.ProtobufPayload)
210 case *ConformanceRequest_JsonPayload:
211 b.EncodeVarint(2<<3 | proto.WireBytes)
212 b.EncodeStringBytes(x.JsonPayload)
213 case nil:
214 default:
215 return fmt.Errorf("ConformanceRequest.Payload has unexpected type %T", x)
216 }
217 return nil
218 }
219
220 func _ConformanceRequest_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
221 m := msg.(*ConformanceRequest)
222 switch tag {
223 case 1: // payload.protobuf_payload
224 if wire != proto.WireBytes {
225 return true, proto.ErrInternalBadWireType
226 }
227 x, err := b.DecodeRawBytes(true)
228 m.Payload = &ConformanceRequest_ProtobufPayload{x}
229 return true, err
230 case 2: // payload.json_payload
231 if wire != proto.WireBytes {
232 return true, proto.ErrInternalBadWireType
233 }
234 x, err := b.DecodeStringBytes()
235 m.Payload = &ConformanceRequest_JsonPayload{x}
236 return true, err
237 default:
238 return false, nil
239 }
240 }
241
242 func _ConformanceRequest_OneofSizer(msg proto.Message) (n int) {
243 m := msg.(*ConformanceRequest)
244 // payload
245 switch x := m.Payload.(type) {
246 case *ConformanceRequest_ProtobufPayload:
247 n += 1 // tag and wire
248 n += proto.SizeVarint(uint64(len(x.ProtobufPayload)))
249 n += len(x.ProtobufPayload)
250 case *ConformanceRequest_JsonPayload:
251 n += 1 // tag and wire
252 n += proto.SizeVarint(uint64(len(x.JsonPayload)))
253 n += len(x.JsonPayload)
254 case nil:
255 default:
256 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
257 }
258 return n
259 }
260
261 // Represents a single test case's output.
262 type ConformanceResponse struct {
263 // Types that are valid to be assigned to Result:
264 // *ConformanceResponse_ParseError
265 // *ConformanceResponse_SerializeError
266 // *ConformanceResponse_RuntimeError
267 // *ConformanceResponse_ProtobufPayload
268 // *ConformanceResponse_JsonPayload
269 // *ConformanceResponse_Skipped
270 Result isConformanceResponse_Result `protobuf_oneof:"result"`
271 XXX_NoUnkeyedLiteral struct{} `json:"-"`
272 XXX_unrecognized []byte `json:"-"`
273 XXX_sizecache int32 `json:"-"`
274 }
275
276 func (m *ConformanceResponse) Reset() { *m = ConformanceResponse{} }
277 func (m *ConformanceResponse) String() string { return proto.CompactTextString(m) }
278 func (*ConformanceResponse) ProtoMessage() {}
279 func (*ConformanceResponse) Descriptor() ([]byte, []int) {
280 return fileDescriptor_conformance_48ac832451f5d6c3, []int{1}
281 }
282 func (m *ConformanceResponse) XXX_Unmarshal(b []byte) error {
283 return xxx_messageInfo_ConformanceResponse.Unmarshal(m, b)
284 }
285 func (m *ConformanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
286 return xxx_messageInfo_ConformanceResponse.Marshal(b, m, deterministic)
287 }
288 func (dst *ConformanceResponse) XXX_Merge(src proto.Message) {
289 xxx_messageInfo_ConformanceResponse.Merge(dst, src)
290 }
291 func (m *ConformanceResponse) XXX_Size() int {
292 return xxx_messageInfo_ConformanceResponse.Size(m)
293 }
294 func (m *ConformanceResponse) XXX_DiscardUnknown() {
295 xxx_messageInfo_ConformanceResponse.DiscardUnknown(m)
296 }
297
298 var xxx_messageInfo_ConformanceResponse proto.InternalMessageInfo
299
300 type isConformanceResponse_Result interface {
301 isConformanceResponse_Result()
302 }
303
304 type ConformanceResponse_ParseError struct {
305 ParseError string `protobuf:"bytes,1,opt,name=parse_error,json=parseError,proto3,oneof"`
306 }
307
308 type ConformanceResponse_SerializeError struct {
309 SerializeError string `protobuf:"bytes,6,opt,name=serialize_error,json=serializeError,proto3,oneof"`
310 }
311
312 type ConformanceResponse_RuntimeError struct {
313 RuntimeError string `protobuf:"bytes,2,opt,name=runtime_error,json=runtimeError,proto3,oneof"`
314 }
315
316 type ConformanceResponse_ProtobufPayload struct {
317 ProtobufPayload []byte `protobuf:"bytes,3,opt,name=protobuf_payload,json=protobufPayload,proto3,oneof"`
318 }
319
320 type ConformanceResponse_JsonPayload struct {
321 JsonPayload string `protobuf:"bytes,4,opt,name=json_payload,json=jsonPayload,proto3,oneof"`
322 }
323
324 type ConformanceResponse_Skipped struct {
325 Skipped string `protobuf:"bytes,5,opt,name=skipped,proto3,oneof"`
326 }
327
328 func (*ConformanceResponse_ParseError) isConformanceResponse_Result() {}
329
330 func (*ConformanceResponse_SerializeError) isConformanceResponse_Result() {}
331
332 func (*ConformanceResponse_RuntimeError) isConformanceResponse_Result() {}
333
334 func (*ConformanceResponse_ProtobufPayload) isConformanceResponse_Result() {}
335
336 func (*ConformanceResponse_JsonPayload) isConformanceResponse_Result() {}
337
338 func (*ConformanceResponse_Skipped) isConformanceResponse_Result() {}
339
340 func (m *ConformanceResponse) GetResult() isConformanceResponse_Result {
341 if m != nil {
342 return m.Result
343 }
344 return nil
345 }
346
347 func (m *ConformanceResponse) GetParseError() string {
348 if x, ok := m.GetResult().(*ConformanceResponse_ParseError); ok {
349 return x.ParseError
350 }
351 return ""
352 }
353
354 func (m *ConformanceResponse) GetSerializeError() string {
355 if x, ok := m.GetResult().(*ConformanceResponse_SerializeError); ok {
356 return x.SerializeError
357 }
358 return ""
359 }
360
361 func (m *ConformanceResponse) GetRuntimeError() string {
362 if x, ok := m.GetResult().(*ConformanceResponse_RuntimeError); ok {
363 return x.RuntimeError
364 }
365 return ""
366 }
367
368 func (m *ConformanceResponse) GetProtobufPayload() []byte {
369 if x, ok := m.GetResult().(*ConformanceResponse_ProtobufPayload); ok {
370 return x.ProtobufPayload
371 }
372 return nil
373 }
374
375 func (m *ConformanceResponse) GetJsonPayload() string {
376 if x, ok := m.GetResult().(*ConformanceResponse_JsonPayload); ok {
377 return x.JsonPayload
378 }
379 return ""
380 }
381
382 func (m *ConformanceResponse) GetSkipped() string {
383 if x, ok := m.GetResult().(*ConformanceResponse_Skipped); ok {
384 return x.Skipped
385 }
386 return ""
387 }
388
389 // XXX_OneofFuncs is for the internal use of the proto package.
390 func (*ConformanceResponse) 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{}) {
391 return _ConformanceResponse_OneofMarshaler, _ConformanceResponse_OneofUnmarshaler, _ConformanceResponse_OneofSizer, []interface{}{
392 (*ConformanceResponse_ParseError)(nil),
393 (*ConformanceResponse_SerializeError)(nil),
394 (*ConformanceResponse_RuntimeError)(nil),
395 (*ConformanceResponse_ProtobufPayload)(nil),
396 (*ConformanceResponse_JsonPayload)(nil),
397 (*ConformanceResponse_Skipped)(nil),
398 }
399 }
400
401 func _ConformanceResponse_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
402 m := msg.(*ConformanceResponse)
403 // result
404 switch x := m.Result.(type) {
405 case *ConformanceResponse_ParseError:
406 b.EncodeVarint(1<<3 | proto.WireBytes)
407 b.EncodeStringBytes(x.ParseError)
408 case *ConformanceResponse_SerializeError:
409 b.EncodeVarint(6<<3 | proto.WireBytes)
410 b.EncodeStringBytes(x.SerializeError)
411 case *ConformanceResponse_RuntimeError:
412 b.EncodeVarint(2<<3 | proto.WireBytes)
413 b.EncodeStringBytes(x.RuntimeError)
414 case *ConformanceResponse_ProtobufPayload:
415 b.EncodeVarint(3<<3 | proto.WireBytes)
416 b.EncodeRawBytes(x.ProtobufPayload)
417 case *ConformanceResponse_JsonPayload:
418 b.EncodeVarint(4<<3 | proto.WireBytes)
419 b.EncodeStringBytes(x.JsonPayload)
420 case *ConformanceResponse_Skipped:
421 b.EncodeVarint(5<<3 | proto.WireBytes)
422 b.EncodeStringBytes(x.Skipped)
423 case nil:
424 default:
425 return fmt.Errorf("ConformanceResponse.Result has unexpected type %T", x)
426 }
427 return nil
428 }
429
430 func _ConformanceResponse_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
431 m := msg.(*ConformanceResponse)
432 switch tag {
433 case 1: // result.parse_error
434 if wire != proto.WireBytes {
435 return true, proto.ErrInternalBadWireType
436 }
437 x, err := b.DecodeStringBytes()
438 m.Result = &ConformanceResponse_ParseError{x}
439 return true, err
440 case 6: // result.serialize_error
441 if wire != proto.WireBytes {
442 return true, proto.ErrInternalBadWireType
443 }
444 x, err := b.DecodeStringBytes()
445 m.Result = &ConformanceResponse_SerializeError{x}
446 return true, err
447 case 2: // result.runtime_error
448 if wire != proto.WireBytes {
449 return true, proto.ErrInternalBadWireType
450 }
451 x, err := b.DecodeStringBytes()
452 m.Result = &ConformanceResponse_RuntimeError{x}
453 return true, err
454 case 3: // result.protobuf_payload
455 if wire != proto.WireBytes {
456 return true, proto.ErrInternalBadWireType
457 }
458 x, err := b.DecodeRawBytes(true)
459 m.Result = &ConformanceResponse_ProtobufPayload{x}
460 return true, err
461 case 4: // result.json_payload
462 if wire != proto.WireBytes {
463 return true, proto.ErrInternalBadWireType
464 }
465 x, err := b.DecodeStringBytes()
466 m.Result = &ConformanceResponse_JsonPayload{x}
467 return true, err
468 case 5: // result.skipped
469 if wire != proto.WireBytes {
470 return true, proto.ErrInternalBadWireType
471 }
472 x, err := b.DecodeStringBytes()
473 m.Result = &ConformanceResponse_Skipped{x}
474 return true, err
475 default:
476 return false, nil
477 }
478 }
479
480 func _ConformanceResponse_OneofSizer(msg proto.Message) (n int) {
481 m := msg.(*ConformanceResponse)
482 // result
483 switch x := m.Result.(type) {
484 case *ConformanceResponse_ParseError:
485 n += 1 // tag and wire
486 n += proto.SizeVarint(uint64(len(x.ParseError)))
487 n += len(x.ParseError)
488 case *ConformanceResponse_SerializeError:
489 n += 1 // tag and wire
490 n += proto.SizeVarint(uint64(len(x.SerializeError)))
491 n += len(x.SerializeError)
492 case *ConformanceResponse_RuntimeError:
493 n += 1 // tag and wire
494 n += proto.SizeVarint(uint64(len(x.RuntimeError)))
495 n += len(x.RuntimeError)
496 case *ConformanceResponse_ProtobufPayload:
497 n += 1 // tag and wire
498 n += proto.SizeVarint(uint64(len(x.ProtobufPayload)))
499 n += len(x.ProtobufPayload)
500 case *ConformanceResponse_JsonPayload:
501 n += 1 // tag and wire
502 n += proto.SizeVarint(uint64(len(x.JsonPayload)))
503 n += len(x.JsonPayload)
504 case *ConformanceResponse_Skipped:
505 n += 1 // tag and wire
506 n += proto.SizeVarint(uint64(len(x.Skipped)))
507 n += len(x.Skipped)
508 case nil:
509 default:
510 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
511 }
512 return n
513 }
514
515 // This proto includes every type of field in both singular and repeated
516 // forms.
517 type TestAllTypes struct {
518 // Singular
519 OptionalInt32 int32 `protobuf:"varint,1,opt,name=optional_int32,json=optionalInt32,proto3" json:"optional_int32,omitempty"`
520 OptionalInt64 int64 `protobuf:"varint,2,opt,name=optional_int64,json=optionalInt64,proto3" json:"optional_int64,omitempty"`
521 OptionalUint32 uint32 `protobuf:"varint,3,opt,name=optional_uint32,json=optionalUint32,proto3" json:"optional_uint32,omitempty"`
522 OptionalUint64 uint64 `protobuf:"varint,4,opt,name=optional_uint64,json=optionalUint64,proto3" json:"optional_uint64,omitempty"`
523 OptionalSint32 int32 `protobuf:"zigzag32,5,opt,name=optional_sint32,json=optionalSint32,proto3" json:"optional_sint32,omitempty"`
524 OptionalSint64 int64 `protobuf:"zigzag64,6,opt,name=optional_sint64,json=optionalSint64,proto3" json:"optional_sint64,omitempty"`
525 OptionalFixed32 uint32 `protobuf:"fixed32,7,opt,name=optional_fixed32,json=optionalFixed32,proto3" json:"optional_fixed32,omitempty"`
526 OptionalFixed64 uint64 `protobuf:"fixed64,8,opt,name=optional_fixed64,json=optionalFixed64,proto3" json:"optional_fixed64,omitempty"`
527 OptionalSfixed32 int32 `protobuf:"fixed32,9,opt,name=optional_sfixed32,json=optionalSfixed32,proto3" json:"optional_sfixed32,omitempty"`
528 OptionalSfixed64 int64 `protobuf:"fixed64,10,opt,name=optional_sfixed64,json=optionalSfixed64,proto3" json:"optional_sfixed64,omitempty"`
529 OptionalFloat float32 `protobuf:"fixed32,11,opt,name=optional_float,json=optionalFloat,proto3" json:"optional_float,omitempty"`
530 OptionalDouble float64 `protobuf:"fixed64,12,opt,name=optional_double,json=optionalDouble,proto3" json:"optional_double,omitempty"`
531 OptionalBool bool `protobuf:"varint,13,opt,name=optional_bool,json=optionalBool,proto3" json:"optional_bool,omitempty"`
532 OptionalString string `protobuf:"bytes,14,opt,name=optional_string,json=optionalString,proto3" json:"optional_string,omitempty"`
533 OptionalBytes []byte `protobuf:"bytes,15,opt,name=optional_bytes,json=optionalBytes,proto3" json:"optional_bytes,omitempty"`
534 OptionalNestedMessage *TestAllTypes_NestedMessage `protobuf:"bytes,18,opt,name=optional_nested_message,json=optionalNestedMessage,proto3" json:"optional_nested_message,omitempty"`
535 OptionalForeignMessage *ForeignMessage `protobuf:"bytes,19,opt,name=optional_foreign_message,json=optionalForeignMessage,proto3" json:"optional_foreign_message,omitempty"`
536 OptionalNestedEnum TestAllTypes_NestedEnum `protobuf:"varint,21,opt,name=optional_nested_enum,json=optionalNestedEnum,proto3,enum=conformance.TestAllTypes_NestedEnum" json:"optional_nested_enum,omitempty"`
537 OptionalForeignEnum ForeignEnum `protobuf:"varint,22,opt,name=optional_foreign_enum,json=optionalForeignEnum,proto3,enum=conformance.ForeignEnum" json:"optional_foreign_enum,omitempty"`
538 OptionalStringPiece string `protobuf:"bytes,24,opt,name=optional_string_piece,json=optionalStringPiece,proto3" json:"optional_string_piece,omitempty"`
539 OptionalCord string `protobuf:"bytes,25,opt,name=optional_cord,json=optionalCord,proto3" json:"optional_cord,omitempty"`
540 RecursiveMessage *TestAllTypes `protobuf:"bytes,27,opt,name=recursive_message,json=recursiveMessage,proto3" json:"recursive_message,omitempty"`
541 // Repeated
542 RepeatedInt32 []int32 `protobuf:"varint,31,rep,packed,name=repeated_int32,json=repeatedInt32,proto3" json:"repeated_int32,omitempty"`
543 RepeatedInt64 []int64 `protobuf:"varint,32,rep,packed,name=repeated_int64,json=repeatedInt64,proto3" json:"repeated_int64,omitempty"`
544 RepeatedUint32 []uint32 `protobuf:"varint,33,rep,packed,name=repeated_uint32,json=repeatedUint32,proto3" json:"repeated_uint32,omitempty"`
545 RepeatedUint64 []uint64 `protobuf:"varint,34,rep,packed,name=repeated_uint64,json=repeatedUint64,proto3" json:"repeated_uint64,omitempty"`
546 RepeatedSint32 []int32 `protobuf:"zigzag32,35,rep,packed,name=repeated_sint32,json=repeatedSint32,proto3" json:"repeated_sint32,omitempty"`
547 RepeatedSint64 []int64 `protobuf:"zigzag64,36,rep,packed,name=repeated_sint64,json=repeatedSint64,proto3" json:"repeated_sint64,omitempty"`
548 RepeatedFixed32 []uint32 `protobuf:"fixed32,37,rep,packed,name=repeated_fixed32,json=repeatedFixed32,proto3" json:"repeated_fixed32,omitempty"`
549 RepeatedFixed64 []uint64 `protobuf:"fixed64,38,rep,packed,name=repeated_fixed64,json=repeatedFixed64,proto3" json:"repeated_fixed64,omitempty"`
550 RepeatedSfixed32 []int32 `protobuf:"fixed32,39,rep,packed,name=repeated_sfixed32,json=repeatedSfixed32,proto3" json:"repeated_sfixed32,omitempty"`
551 RepeatedSfixed64 []int64 `protobuf:"fixed64,40,rep,packed,name=repeated_sfixed64,json=repeatedSfixed64,proto3" json:"repeated_sfixed64,omitempty"`
552 RepeatedFloat []float32 `protobuf:"fixed32,41,rep,packed,name=repeated_float,json=repeatedFloat,proto3" json:"repeated_float,omitempty"`
553 RepeatedDouble []float64 `protobuf:"fixed64,42,rep,packed,name=repeated_double,json=repeatedDouble,proto3" json:"repeated_double,omitempty"`
554 RepeatedBool []bool `protobuf:"varint,43,rep,packed,name=repeated_bool,json=repeatedBool,proto3" json:"repeated_bool,omitempty"`
555 RepeatedString []string `protobuf:"bytes,44,rep,name=repeated_string,json=repeatedString,proto3" json:"repeated_string,omitempty"`
556 RepeatedBytes [][]byte `protobuf:"bytes,45,rep,name=repeated_bytes,json=repeatedBytes,proto3" json:"repeated_bytes,omitempty"`
557 RepeatedNestedMessage []*TestAllTypes_NestedMessage `protobuf:"bytes,48,rep,name=repeated_nested_message,json=repeatedNestedMessage,proto3" json:"repeated_nested_message,omitempty"`
558 RepeatedForeignMessage []*ForeignMessage `protobuf:"bytes,49,rep,name=repeated_foreign_message,json=repeatedForeignMessage,proto3" json:"repeated_foreign_message,omitempty"`
559 RepeatedNestedEnum []TestAllTypes_NestedEnum `protobuf:"varint,51,rep,packed,name=repeated_nested_enum,json=repeatedNestedEnum,proto3,enum=conformance.TestAllTypes_NestedEnum" json:"repeated_nested_enum,omitempty"`
560 RepeatedForeignEnum []ForeignEnum `protobuf:"varint,52,rep,packed,name=repeated_foreign_enum,json=repeatedForeignEnum,proto3,enum=conformance.ForeignEnum" json:"repeated_foreign_enum,omitempty"`
561 RepeatedStringPiece []string `protobuf:"bytes,54,rep,name=repeated_string_piece,json=repeatedStringPiece,proto3" json:"repeated_string_piece,omitempty"`
562 RepeatedCord []string `protobuf:"bytes,55,rep,name=repeated_cord,json=repeatedCord,proto3" json:"repeated_cord,omitempty"`
563 // Map
564 MapInt32Int32 map[int32]int32 `protobuf:"bytes,56,rep,name=map_int32_int32,json=mapInt32Int32,proto3" json:"map_int32_int32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
565 MapInt64Int64 map[int64]int64 `protobuf:"bytes,57,rep,name=map_int64_int64,json=mapInt64Int64,proto3" json:"map_int64_int64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
566 MapUint32Uint32 map[uint32]uint32 `protobuf:"bytes,58,rep,name=map_uint32_uint32,json=mapUint32Uint32,proto3" json:"map_uint32_uint32,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
567 MapUint64Uint64 map[uint64]uint64 `protobuf:"bytes,59,rep,name=map_uint64_uint64,json=mapUint64Uint64,proto3" json:"map_uint64_uint64,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
568 MapSint32Sint32 map[int32]int32 `protobuf:"bytes,60,rep,name=map_sint32_sint32,json=mapSint32Sint32,proto3" json:"map_sint32_sint32,omitempty" protobuf_key:"zigzag32,1,opt,name=key,proto3" protobuf_val:"zigzag32,2,opt,name=value,proto3"`
569 MapSint64Sint64 map[int64]int64 `protobuf:"bytes,61,rep,name=map_sint64_sint64,json=mapSint64Sint64,proto3" json:"map_sint64_sint64,omitempty" protobuf_key:"zigzag64,1,opt,name=key,proto3" protobuf_val:"zigzag64,2,opt,name=value,proto3"`
570 MapFixed32Fixed32 map[uint32]uint32 `protobuf:"bytes,62,rep,name=map_fixed32_fixed32,json=mapFixed32Fixed32,proto3" json:"map_fixed32_fixed32,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"`
571 MapFixed64Fixed64 map[uint64]uint64 `protobuf:"bytes,63,rep,name=map_fixed64_fixed64,json=mapFixed64Fixed64,proto3" json:"map_fixed64_fixed64,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"`
572 MapSfixed32Sfixed32 map[int32]int32 `protobuf:"bytes,64,rep,name=map_sfixed32_sfixed32,json=mapSfixed32Sfixed32,proto3" json:"map_sfixed32_sfixed32,omitempty" protobuf_key:"fixed32,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"`
573 MapSfixed64Sfixed64 map[int64]int64 `protobuf:"bytes,65,rep,name=map_sfixed64_sfixed64,json=mapSfixed64Sfixed64,proto3" json:"map_sfixed64_sfixed64,omitempty" protobuf_key:"fixed64,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"`
574 MapInt32Float map[int32]float32 `protobuf:"bytes,66,rep,name=map_int32_float,json=mapInt32Float,proto3" json:"map_int32_float,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"fixed32,2,opt,name=value,proto3"`
575 MapInt32Double map[int32]float64 `protobuf:"bytes,67,rep,name=map_int32_double,json=mapInt32Double,proto3" json:"map_int32_double,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"fixed64,2,opt,name=value,proto3"`
576 MapBoolBool map[bool]bool `protobuf:"bytes,68,rep,name=map_bool_bool,json=mapBoolBool,proto3" json:"map_bool_bool,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"`
577 MapStringString map[string]string `protobuf:"bytes,69,rep,name=map_string_string,json=mapStringString,proto3" json:"map_string_string,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
578 MapStringBytes map[string][]byte `protobuf:"bytes,70,rep,name=map_string_bytes,json=mapStringBytes,proto3" json:"map_string_bytes,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
579 MapStringNestedMessage map[string]*TestAllTypes_NestedMessage `protobuf:"bytes,71,rep,name=map_string_nested_message,json=mapStringNestedMessage,proto3" json:"map_string_nested_message,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
580 MapStringForeignMessage map[string]*ForeignMessage `protobuf:"bytes,72,rep,name=map_string_foreign_message,json=mapStringForeignMessage,proto3" json:"map_string_foreign_message,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
581 MapStringNestedEnum map[string]TestAllTypes_NestedEnum `protobuf:"bytes,73,rep,name=map_string_nested_enum,json=mapStringNestedEnum,proto3" json:"map_string_nested_enum,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=conformance.TestAllTypes_NestedEnum"`
582 MapStringForeignEnum map[string]ForeignEnum `protobuf:"bytes,74,rep,name=map_string_foreign_enum,json=mapStringForeignEnum,proto3" json:"map_string_foreign_enum,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3,enum=conformance.ForeignEnum"`
583 // Types that are valid to be assigned to OneofField:
584 // *TestAllTypes_OneofUint32
585 // *TestAllTypes_OneofNestedMessage
586 // *TestAllTypes_OneofString
587 // *TestAllTypes_OneofBytes
588 OneofField isTestAllTypes_OneofField `protobuf_oneof:"oneof_field"`
589 // Well-known types
590 OptionalBoolWrapper *wrappers.BoolValue `protobuf:"bytes,201,opt,name=optional_bool_wrapper,json=optionalBoolWrapper,proto3" json:"optional_bool_wrapper,omitempty"`
591 OptionalInt32Wrapper *wrappers.Int32Value `protobuf:"bytes,202,opt,name=optional_int32_wrapper,json=optionalInt32Wrapper,proto3" json:"optional_int32_wrapper,omitempty"`
592 OptionalInt64Wrapper *wrappers.Int64Value `protobuf:"bytes,203,opt,name=optional_int64_wrapper,json=optionalInt64Wrapper,proto3" json:"optional_int64_wrapper,omitempty"`
593 OptionalUint32Wrapper *wrappers.UInt32Value `protobuf:"bytes,204,opt,name=optional_uint32_wrapper,json=optionalUint32Wrapper,proto3" json:"optional_uint32_wrapper,omitempty"`
594 OptionalUint64Wrapper *wrappers.UInt64Value `protobuf:"bytes,205,opt,name=optional_uint64_wrapper,json=optionalUint64Wrapper,proto3" json:"optional_uint64_wrapper,omitempty"`
595 OptionalFloatWrapper *wrappers.FloatValue `protobuf:"bytes,206,opt,name=optional_float_wrapper,json=optionalFloatWrapper,proto3" json:"optional_float_wrapper,omitempty"`
596 OptionalDoubleWrapper *wrappers.DoubleValue `protobuf:"bytes,207,opt,name=optional_double_wrapper,json=optionalDoubleWrapper,proto3" json:"optional_double_wrapper,omitempty"`
597 OptionalStringWrapper *wrappers.StringValue `protobuf:"bytes,208,opt,name=optional_string_wrapper,json=optionalStringWrapper,proto3" json:"optional_string_wrapper,omitempty"`
598 OptionalBytesWrapper *wrappers.BytesValue `protobuf:"bytes,209,opt,name=optional_bytes_wrapper,json=optionalBytesWrapper,proto3" json:"optional_bytes_wrapper,omitempty"`
599 RepeatedBoolWrapper []*wrappers.BoolValue `protobuf:"bytes,211,rep,name=repeated_bool_wrapper,json=repeatedBoolWrapper,proto3" json:"repeated_bool_wrapper,omitempty"`
600 RepeatedInt32Wrapper []*wrappers.Int32Value `protobuf:"bytes,212,rep,name=repeated_int32_wrapper,json=repeatedInt32Wrapper,proto3" json:"repeated_int32_wrapper,omitempty"`
601 RepeatedInt64Wrapper []*wrappers.Int64Value `protobuf:"bytes,213,rep,name=repeated_int64_wrapper,json=repeatedInt64Wrapper,proto3" json:"repeated_int64_wrapper,omitempty"`
602 RepeatedUint32Wrapper []*wrappers.UInt32Value `protobuf:"bytes,214,rep,name=repeated_uint32_wrapper,json=repeatedUint32Wrapper,proto3" json:"repeated_uint32_wrapper,omitempty"`
603 RepeatedUint64Wrapper []*wrappers.UInt64Value `protobuf:"bytes,215,rep,name=repeated_uint64_wrapper,json=repeatedUint64Wrapper,proto3" json:"repeated_uint64_wrapper,omitempty"`
604 RepeatedFloatWrapper []*wrappers.FloatValue `protobuf:"bytes,216,rep,name=repeated_float_wrapper,json=repeatedFloatWrapper,proto3" json:"repeated_float_wrapper,omitempty"`
605 RepeatedDoubleWrapper []*wrappers.DoubleValue `protobuf:"bytes,217,rep,name=repeated_double_wrapper,json=repeatedDoubleWrapper,proto3" json:"repeated_double_wrapper,omitempty"`
606 RepeatedStringWrapper []*wrappers.StringValue `protobuf:"bytes,218,rep,name=repeated_string_wrapper,json=repeatedStringWrapper,proto3" json:"repeated_string_wrapper,omitempty"`
607 RepeatedBytesWrapper []*wrappers.BytesValue `protobuf:"bytes,219,rep,name=repeated_bytes_wrapper,json=repeatedBytesWrapper,proto3" json:"repeated_bytes_wrapper,omitempty"`
608 OptionalDuration *duration.Duration `protobuf:"bytes,301,opt,name=optional_duration,json=optionalDuration,proto3" json:"optional_duration,omitempty"`
609 OptionalTimestamp *timestamp.Timestamp `protobuf:"bytes,302,opt,name=optional_timestamp,json=optionalTimestamp,proto3" json:"optional_timestamp,omitempty"`
610 OptionalFieldMask *field_mask.FieldMask `protobuf:"bytes,303,opt,name=optional_field_mask,json=optionalFieldMask,proto3" json:"optional_field_mask,omitempty"`
611 OptionalStruct *_struct.Struct `protobuf:"bytes,304,opt,name=optional_struct,json=optionalStruct,proto3" json:"optional_struct,omitempty"`
612 OptionalAny *any.Any `protobuf:"bytes,305,opt,name=optional_any,json=optionalAny,proto3" json:"optional_any,omitempty"`
613 OptionalValue *_struct.Value `protobuf:"bytes,306,opt,name=optional_value,json=optionalValue,proto3" json:"optional_value,omitempty"`
614 RepeatedDuration []*duration.Duration `protobuf:"bytes,311,rep,name=repeated_duration,json=repeatedDuration,proto3" json:"repeated_duration,omitempty"`
615 RepeatedTimestamp []*timestamp.Timestamp `protobuf:"bytes,312,rep,name=repeated_timestamp,json=repeatedTimestamp,proto3" json:"repeated_timestamp,omitempty"`
616 RepeatedFieldmask []*field_mask.FieldMask `protobuf:"bytes,313,rep,name=repeated_fieldmask,json=repeatedFieldmask,proto3" json:"repeated_fieldmask,omitempty"`
617 RepeatedStruct []*_struct.Struct `protobuf:"bytes,324,rep,name=repeated_struct,json=repeatedStruct,proto3" json:"repeated_struct,omitempty"`
618 RepeatedAny []*any.Any `protobuf:"bytes,315,rep,name=repeated_any,json=repeatedAny,proto3" json:"repeated_any,omitempty"`
619 RepeatedValue []*_struct.Value `protobuf:"bytes,316,rep,name=repeated_value,json=repeatedValue,proto3" json:"repeated_value,omitempty"`
620 // Test field-name-to-JSON-name convention.
621 Fieldname1 int32 `protobuf:"varint,401,opt,name=fieldname1,proto3" json:"fieldname1,omitempty"`
622 FieldName2 int32 `protobuf:"varint,402,opt,name=field_name2,json=fieldName2,proto3" json:"field_name2,omitempty"`
623 XFieldName3 int32 `protobuf:"varint,403,opt,name=_field_name3,json=FieldName3,proto3" json:"_field_name3,omitempty"`
624 Field_Name4_ int32 `protobuf:"varint,404,opt,name=field__name4_,json=fieldName4,proto3" json:"field__name4_,omitempty"`
625 Field0Name5 int32 `protobuf:"varint,405,opt,name=field0name5,proto3" json:"field0name5,omitempty"`
626 Field_0Name6 int32 `protobuf:"varint,406,opt,name=field_0_name6,json=field0Name6,proto3" json:"field_0_name6,omitempty"`
627 FieldName7 int32 `protobuf:"varint,407,opt,name=fieldName7,proto3" json:"fieldName7,omitempty"`
628 FieldName8 int32 `protobuf:"varint,408,opt,name=FieldName8,proto3" json:"FieldName8,omitempty"`
629 Field_Name9 int32 `protobuf:"varint,409,opt,name=field_Name9,json=fieldName9,proto3" json:"field_Name9,omitempty"`
630 Field_Name10 int32 `protobuf:"varint,410,opt,name=Field_Name10,json=FieldName10,proto3" json:"Field_Name10,omitempty"`
631 FIELD_NAME11 int32 `protobuf:"varint,411,opt,name=FIELD_NAME11,json=FIELDNAME11,proto3" json:"FIELD_NAME11,omitempty"`
632 FIELDName12 int32 `protobuf:"varint,412,opt,name=FIELD_name12,json=FIELDName12,proto3" json:"FIELD_name12,omitempty"`
633 XXX_NoUnkeyedLiteral struct{} `json:"-"`
634 XXX_unrecognized []byte `json:"-"`
635 XXX_sizecache int32 `json:"-"`
636 }
637
638 func (m *TestAllTypes) Reset() { *m = TestAllTypes{} }
639 func (m *TestAllTypes) String() string { return proto.CompactTextString(m) }
640 func (*TestAllTypes) ProtoMessage() {}
641 func (*TestAllTypes) Descriptor() ([]byte, []int) {
642 return fileDescriptor_conformance_48ac832451f5d6c3, []int{2}
643 }
644 func (m *TestAllTypes) XXX_Unmarshal(b []byte) error {
645 return xxx_messageInfo_TestAllTypes.Unmarshal(m, b)
646 }
647 func (m *TestAllTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
648 return xxx_messageInfo_TestAllTypes.Marshal(b, m, deterministic)
649 }
650 func (dst *TestAllTypes) XXX_Merge(src proto.Message) {
651 xxx_messageInfo_TestAllTypes.Merge(dst, src)
652 }
653 func (m *TestAllTypes) XXX_Size() int {
654 return xxx_messageInfo_TestAllTypes.Size(m)
655 }
656 func (m *TestAllTypes) XXX_DiscardUnknown() {
657 xxx_messageInfo_TestAllTypes.DiscardUnknown(m)
658 }
659
660 var xxx_messageInfo_TestAllTypes proto.InternalMessageInfo
661
662 func (m *TestAllTypes) GetOptionalInt32() int32 {
663 if m != nil {
664 return m.OptionalInt32
665 }
666 return 0
667 }
668
669 func (m *TestAllTypes) GetOptionalInt64() int64 {
670 if m != nil {
671 return m.OptionalInt64
672 }
673 return 0
674 }
675
676 func (m *TestAllTypes) GetOptionalUint32() uint32 {
677 if m != nil {
678 return m.OptionalUint32
679 }
680 return 0
681 }
682
683 func (m *TestAllTypes) GetOptionalUint64() uint64 {
684 if m != nil {
685 return m.OptionalUint64
686 }
687 return 0
688 }
689
690 func (m *TestAllTypes) GetOptionalSint32() int32 {
691 if m != nil {
692 return m.OptionalSint32
693 }
694 return 0
695 }
696
697 func (m *TestAllTypes) GetOptionalSint64() int64 {
698 if m != nil {
699 return m.OptionalSint64
700 }
701 return 0
702 }
703
704 func (m *TestAllTypes) GetOptionalFixed32() uint32 {
705 if m != nil {
706 return m.OptionalFixed32
707 }
708 return 0
709 }
710
711 func (m *TestAllTypes) GetOptionalFixed64() uint64 {
712 if m != nil {
713 return m.OptionalFixed64
714 }
715 return 0
716 }
717
718 func (m *TestAllTypes) GetOptionalSfixed32() int32 {
719 if m != nil {
720 return m.OptionalSfixed32
721 }
722 return 0
723 }
724
725 func (m *TestAllTypes) GetOptionalSfixed64() int64 {
726 if m != nil {
727 return m.OptionalSfixed64
728 }
729 return 0
730 }
731
732 func (m *TestAllTypes) GetOptionalFloat() float32 {
733 if m != nil {
734 return m.OptionalFloat
735 }
736 return 0
737 }
738
739 func (m *TestAllTypes) GetOptionalDouble() float64 {
740 if m != nil {
741 return m.OptionalDouble
742 }
743 return 0
744 }
745
746 func (m *TestAllTypes) GetOptionalBool() bool {
747 if m != nil {
748 return m.OptionalBool
749 }
750 return false
751 }
752
753 func (m *TestAllTypes) GetOptionalString() string {
754 if m != nil {
755 return m.OptionalString
756 }
757 return ""
758 }
759
760 func (m *TestAllTypes) GetOptionalBytes() []byte {
761 if m != nil {
762 return m.OptionalBytes
763 }
764 return nil
765 }
766
767 func (m *TestAllTypes) GetOptionalNestedMessage() *TestAllTypes_NestedMessage {
768 if m != nil {
769 return m.OptionalNestedMessage
770 }
771 return nil
772 }
773
774 func (m *TestAllTypes) GetOptionalForeignMessage() *ForeignMessage {
775 if m != nil {
776 return m.OptionalForeignMessage
777 }
778 return nil
779 }
780
781 func (m *TestAllTypes) GetOptionalNestedEnum() TestAllTypes_NestedEnum {
782 if m != nil {
783 return m.OptionalNestedEnum
784 }
785 return TestAllTypes_FOO
786 }
787
788 func (m *TestAllTypes) GetOptionalForeignEnum() ForeignEnum {
789 if m != nil {
790 return m.OptionalForeignEnum
791 }
792 return ForeignEnum_FOREIGN_FOO
793 }
794
795 func (m *TestAllTypes) GetOptionalStringPiece() string {
796 if m != nil {
797 return m.OptionalStringPiece
798 }
799 return ""
800 }
801
802 func (m *TestAllTypes) GetOptionalCord() string {
803 if m != nil {
804 return m.OptionalCord
805 }
806 return ""
807 }
808
809 func (m *TestAllTypes) GetRecursiveMessage() *TestAllTypes {
810 if m != nil {
811 return m.RecursiveMessage
812 }
813 return nil
814 }
815
816 func (m *TestAllTypes) GetRepeatedInt32() []int32 {
817 if m != nil {
818 return m.RepeatedInt32
819 }
820 return nil
821 }
822
823 func (m *TestAllTypes) GetRepeatedInt64() []int64 {
824 if m != nil {
825 return m.RepeatedInt64
826 }
827 return nil
828 }
829
830 func (m *TestAllTypes) GetRepeatedUint32() []uint32 {
831 if m != nil {
832 return m.RepeatedUint32
833 }
834 return nil
835 }
836
837 func (m *TestAllTypes) GetRepeatedUint64() []uint64 {
838 if m != nil {
839 return m.RepeatedUint64
840 }
841 return nil
842 }
843
844 func (m *TestAllTypes) GetRepeatedSint32() []int32 {
845 if m != nil {
846 return m.RepeatedSint32
847 }
848 return nil
849 }
850
851 func (m *TestAllTypes) GetRepeatedSint64() []int64 {
852 if m != nil {
853 return m.RepeatedSint64
854 }
855 return nil
856 }
857
858 func (m *TestAllTypes) GetRepeatedFixed32() []uint32 {
859 if m != nil {
860 return m.RepeatedFixed32
861 }
862 return nil
863 }
864
865 func (m *TestAllTypes) GetRepeatedFixed64() []uint64 {
866 if m != nil {
867 return m.RepeatedFixed64
868 }
869 return nil
870 }
871
872 func (m *TestAllTypes) GetRepeatedSfixed32() []int32 {
873 if m != nil {
874 return m.RepeatedSfixed32
875 }
876 return nil
877 }
878
879 func (m *TestAllTypes) GetRepeatedSfixed64() []int64 {
880 if m != nil {
881 return m.RepeatedSfixed64
882 }
883 return nil
884 }
885
886 func (m *TestAllTypes) GetRepeatedFloat() []float32 {
887 if m != nil {
888 return m.RepeatedFloat
889 }
890 return nil
891 }
892
893 func (m *TestAllTypes) GetRepeatedDouble() []float64 {
894 if m != nil {
895 return m.RepeatedDouble
896 }
897 return nil
898 }
899
900 func (m *TestAllTypes) GetRepeatedBool() []bool {
901 if m != nil {
902 return m.RepeatedBool
903 }
904 return nil
905 }
906
907 func (m *TestAllTypes) GetRepeatedString() []string {
908 if m != nil {
909 return m.RepeatedString
910 }
911 return nil
912 }
913
914 func (m *TestAllTypes) GetRepeatedBytes() [][]byte {
915 if m != nil {
916 return m.RepeatedBytes
917 }
918 return nil
919 }
920
921 func (m *TestAllTypes) GetRepeatedNestedMessage() []*TestAllTypes_NestedMessage {
922 if m != nil {
923 return m.RepeatedNestedMessage
924 }
925 return nil
926 }
927
928 func (m *TestAllTypes) GetRepeatedForeignMessage() []*ForeignMessage {
929 if m != nil {
930 return m.RepeatedForeignMessage
931 }
932 return nil
933 }
934
935 func (m *TestAllTypes) GetRepeatedNestedEnum() []TestAllTypes_NestedEnum {
936 if m != nil {
937 return m.RepeatedNestedEnum
938 }
939 return nil
940 }
941
942 func (m *TestAllTypes) GetRepeatedForeignEnum() []ForeignEnum {
943 if m != nil {
944 return m.RepeatedForeignEnum
945 }
946 return nil
947 }
948
949 func (m *TestAllTypes) GetRepeatedStringPiece() []string {
950 if m != nil {
951 return m.RepeatedStringPiece
952 }
953 return nil
954 }
955
956 func (m *TestAllTypes) GetRepeatedCord() []string {
957 if m != nil {
958 return m.RepeatedCord
959 }
960 return nil
961 }
962
963 func (m *TestAllTypes) GetMapInt32Int32() map[int32]int32 {
964 if m != nil {
965 return m.MapInt32Int32
966 }
967 return nil
968 }
969
970 func (m *TestAllTypes) GetMapInt64Int64() map[int64]int64 {
971 if m != nil {
972 return m.MapInt64Int64
973 }
974 return nil
975 }
976
977 func (m *TestAllTypes) GetMapUint32Uint32() map[uint32]uint32 {
978 if m != nil {
979 return m.MapUint32Uint32
980 }
981 return nil
982 }
983
984 func (m *TestAllTypes) GetMapUint64Uint64() map[uint64]uint64 {
985 if m != nil {
986 return m.MapUint64Uint64
987 }
988 return nil
989 }
990
991 func (m *TestAllTypes) GetMapSint32Sint32() map[int32]int32 {
992 if m != nil {
993 return m.MapSint32Sint32
994 }
995 return nil
996 }
997
998 func (m *TestAllTypes) GetMapSint64Sint64() map[int64]int64 {
999 if m != nil {
1000 return m.MapSint64Sint64
1001 }
1002 return nil
1003 }
1004
1005 func (m *TestAllTypes) GetMapFixed32Fixed32() map[uint32]uint32 {
1006 if m != nil {
1007 return m.MapFixed32Fixed32
1008 }
1009 return nil
1010 }
1011
1012 func (m *TestAllTypes) GetMapFixed64Fixed64() map[uint64]uint64 {
1013 if m != nil {
1014 return m.MapFixed64Fixed64
1015 }
1016 return nil
1017 }
1018
1019 func (m *TestAllTypes) GetMapSfixed32Sfixed32() map[int32]int32 {
1020 if m != nil {
1021 return m.MapSfixed32Sfixed32
1022 }
1023 return nil
1024 }
1025
1026 func (m *TestAllTypes) GetMapSfixed64Sfixed64() map[int64]int64 {
1027 if m != nil {
1028 return m.MapSfixed64Sfixed64
1029 }
1030 return nil
1031 }
1032
1033 func (m *TestAllTypes) GetMapInt32Float() map[int32]float32 {
1034 if m != nil {
1035 return m.MapInt32Float
1036 }
1037 return nil
1038 }
1039
1040 func (m *TestAllTypes) GetMapInt32Double() map[int32]float64 {
1041 if m != nil {
1042 return m.MapInt32Double
1043 }
1044 return nil
1045 }
1046
1047 func (m *TestAllTypes) GetMapBoolBool() map[bool]bool {
1048 if m != nil {
1049 return m.MapBoolBool
1050 }
1051 return nil
1052 }
1053
1054 func (m *TestAllTypes) GetMapStringString() map[string]string {
1055 if m != nil {
1056 return m.MapStringString
1057 }
1058 return nil
1059 }
1060
1061 func (m *TestAllTypes) GetMapStringBytes() map[string][]byte {
1062 if m != nil {
1063 return m.MapStringBytes
1064 }
1065 return nil
1066 }
1067
1068 func (m *TestAllTypes) GetMapStringNestedMessage() map[string]*TestAllTypes_NestedMessage {
1069 if m != nil {
1070 return m.MapStringNestedMessage
1071 }
1072 return nil
1073 }
1074
1075 func (m *TestAllTypes) GetMapStringForeignMessage() map[string]*ForeignMessage {
1076 if m != nil {
1077 return m.MapStringForeignMessage
1078 }
1079 return nil
1080 }
1081
1082 func (m *TestAllTypes) GetMapStringNestedEnum() map[string]TestAllTypes_NestedEnum {
1083 if m != nil {
1084 return m.MapStringNestedEnum
1085 }
1086 return nil
1087 }
1088
1089 func (m *TestAllTypes) GetMapStringForeignEnum() map[string]ForeignEnum {
1090 if m != nil {
1091 return m.MapStringForeignEnum
1092 }
1093 return nil
1094 }
1095
1096 type isTestAllTypes_OneofField interface {
1097 isTestAllTypes_OneofField()
1098 }
1099
1100 type TestAllTypes_OneofUint32 struct {
1101 OneofUint32 uint32 `protobuf:"varint,111,opt,name=oneof_uint32,json=oneofUint32,proto3,oneof"`
1102 }
1103
1104 type TestAllTypes_OneofNestedMessage struct {
1105 OneofNestedMessage *TestAllTypes_NestedMessage `protobuf:"bytes,112,opt,name=oneof_nested_message,json=oneofNestedMessage,proto3,oneof"`
1106 }
1107
1108 type TestAllTypes_OneofString struct {
1109 OneofString string `protobuf:"bytes,113,opt,name=oneof_string,json=oneofString,proto3,oneof"`
1110 }
1111
1112 type TestAllTypes_OneofBytes struct {
1113 OneofBytes []byte `protobuf:"bytes,114,opt,name=oneof_bytes,json=oneofBytes,proto3,oneof"`
1114 }
1115
1116 func (*TestAllTypes_OneofUint32) isTestAllTypes_OneofField() {}
1117
1118 func (*TestAllTypes_OneofNestedMessage) isTestAllTypes_OneofField() {}
1119
1120 func (*TestAllTypes_OneofString) isTestAllTypes_OneofField() {}
1121
1122 func (*TestAllTypes_OneofBytes) isTestAllTypes_OneofField() {}
1123
1124 func (m *TestAllTypes) GetOneofField() isTestAllTypes_OneofField {
1125 if m != nil {
1126 return m.OneofField
1127 }
1128 return nil
1129 }
1130
1131 func (m *TestAllTypes) GetOneofUint32() uint32 {
1132 if x, ok := m.GetOneofField().(*TestAllTypes_OneofUint32); ok {
1133 return x.OneofUint32
1134 }
1135 return 0
1136 }
1137
1138 func (m *TestAllTypes) GetOneofNestedMessage() *TestAllTypes_NestedMessage {
1139 if x, ok := m.GetOneofField().(*TestAllTypes_OneofNestedMessage); ok {
1140 return x.OneofNestedMessage
1141 }
1142 return nil
1143 }
1144
1145 func (m *TestAllTypes) GetOneofString() string {
1146 if x, ok := m.GetOneofField().(*TestAllTypes_OneofString); ok {
1147 return x.OneofString
1148 }
1149 return ""
1150 }
1151
1152 func (m *TestAllTypes) GetOneofBytes() []byte {
1153 if x, ok := m.GetOneofField().(*TestAllTypes_OneofBytes); ok {
1154 return x.OneofBytes
1155 }
1156 return nil
1157 }
1158
1159 func (m *TestAllTypes) GetOptionalBoolWrapper() *wrappers.BoolValue {
1160 if m != nil {
1161 return m.OptionalBoolWrapper
1162 }
1163 return nil
1164 }
1165
1166 func (m *TestAllTypes) GetOptionalInt32Wrapper() *wrappers.Int32Value {
1167 if m != nil {
1168 return m.OptionalInt32Wrapper
1169 }
1170 return nil
1171 }
1172
1173 func (m *TestAllTypes) GetOptionalInt64Wrapper() *wrappers.Int64Value {
1174 if m != nil {
1175 return m.OptionalInt64Wrapper
1176 }
1177 return nil
1178 }
1179
1180 func (m *TestAllTypes) GetOptionalUint32Wrapper() *wrappers.UInt32Value {
1181 if m != nil {
1182 return m.OptionalUint32Wrapper
1183 }
1184 return nil
1185 }
1186
1187 func (m *TestAllTypes) GetOptionalUint64Wrapper() *wrappers.UInt64Value {
1188 if m != nil {
1189 return m.OptionalUint64Wrapper
1190 }
1191 return nil
1192 }
1193
1194 func (m *TestAllTypes) GetOptionalFloatWrapper() *wrappers.FloatValue {
1195 if m != nil {
1196 return m.OptionalFloatWrapper
1197 }
1198 return nil
1199 }
1200
1201 func (m *TestAllTypes) GetOptionalDoubleWrapper() *wrappers.DoubleValue {
1202 if m != nil {
1203 return m.OptionalDoubleWrapper
1204 }
1205 return nil
1206 }
1207
1208 func (m *TestAllTypes) GetOptionalStringWrapper() *wrappers.StringValue {
1209 if m != nil {
1210 return m.OptionalStringWrapper
1211 }
1212 return nil
1213 }
1214
1215 func (m *TestAllTypes) GetOptionalBytesWrapper() *wrappers.BytesValue {
1216 if m != nil {
1217 return m.OptionalBytesWrapper
1218 }
1219 return nil
1220 }
1221
1222 func (m *TestAllTypes) GetRepeatedBoolWrapper() []*wrappers.BoolValue {
1223 if m != nil {
1224 return m.RepeatedBoolWrapper
1225 }
1226 return nil
1227 }
1228
1229 func (m *TestAllTypes) GetRepeatedInt32Wrapper() []*wrappers.Int32Value {
1230 if m != nil {
1231 return m.RepeatedInt32Wrapper
1232 }
1233 return nil
1234 }
1235
1236 func (m *TestAllTypes) GetRepeatedInt64Wrapper() []*wrappers.Int64Value {
1237 if m != nil {
1238 return m.RepeatedInt64Wrapper
1239 }
1240 return nil
1241 }
1242
1243 func (m *TestAllTypes) GetRepeatedUint32Wrapper() []*wrappers.UInt32Value {
1244 if m != nil {
1245 return m.RepeatedUint32Wrapper
1246 }
1247 return nil
1248 }
1249
1250 func (m *TestAllTypes) GetRepeatedUint64Wrapper() []*wrappers.UInt64Value {
1251 if m != nil {
1252 return m.RepeatedUint64Wrapper
1253 }
1254 return nil
1255 }
1256
1257 func (m *TestAllTypes) GetRepeatedFloatWrapper() []*wrappers.FloatValue {
1258 if m != nil {
1259 return m.RepeatedFloatWrapper
1260 }
1261 return nil
1262 }
1263
1264 func (m *TestAllTypes) GetRepeatedDoubleWrapper() []*wrappers.DoubleValue {
1265 if m != nil {
1266 return m.RepeatedDoubleWrapper
1267 }
1268 return nil
1269 }
1270
1271 func (m *TestAllTypes) GetRepeatedStringWrapper() []*wrappers.StringValue {
1272 if m != nil {
1273 return m.RepeatedStringWrapper
1274 }
1275 return nil
1276 }
1277
1278 func (m *TestAllTypes) GetRepeatedBytesWrapper() []*wrappers.BytesValue {
1279 if m != nil {
1280 return m.RepeatedBytesWrapper
1281 }
1282 return nil
1283 }
1284
1285 func (m *TestAllTypes) GetOptionalDuration() *duration.Duration {
1286 if m != nil {
1287 return m.OptionalDuration
1288 }
1289 return nil
1290 }
1291
1292 func (m *TestAllTypes) GetOptionalTimestamp() *timestamp.Timestamp {
1293 if m != nil {
1294 return m.OptionalTimestamp
1295 }
1296 return nil
1297 }
1298
1299 func (m *TestAllTypes) GetOptionalFieldMask() *field_mask.FieldMask {
1300 if m != nil {
1301 return m.OptionalFieldMask
1302 }
1303 return nil
1304 }
1305
1306 func (m *TestAllTypes) GetOptionalStruct() *_struct.Struct {
1307 if m != nil {
1308 return m.OptionalStruct
1309 }
1310 return nil
1311 }
1312
1313 func (m *TestAllTypes) GetOptionalAny() *any.Any {
1314 if m != nil {
1315 return m.OptionalAny
1316 }
1317 return nil
1318 }
1319
1320 func (m *TestAllTypes) GetOptionalValue() *_struct.Value {
1321 if m != nil {
1322 return m.OptionalValue
1323 }
1324 return nil
1325 }
1326
1327 func (m *TestAllTypes) GetRepeatedDuration() []*duration.Duration {
1328 if m != nil {
1329 return m.RepeatedDuration
1330 }
1331 return nil
1332 }
1333
1334 func (m *TestAllTypes) GetRepeatedTimestamp() []*timestamp.Timestamp {
1335 if m != nil {
1336 return m.RepeatedTimestamp
1337 }
1338 return nil
1339 }
1340
1341 func (m *TestAllTypes) GetRepeatedFieldmask() []*field_mask.FieldMask {
1342 if m != nil {
1343 return m.RepeatedFieldmask
1344 }
1345 return nil
1346 }
1347
1348 func (m *TestAllTypes) GetRepeatedStruct() []*_struct.Struct {
1349 if m != nil {
1350 return m.RepeatedStruct
1351 }
1352 return nil
1353 }
1354
1355 func (m *TestAllTypes) GetRepeatedAny() []*any.Any {
1356 if m != nil {
1357 return m.RepeatedAny
1358 }
1359 return nil
1360 }
1361
1362 func (m *TestAllTypes) GetRepeatedValue() []*_struct.Value {
1363 if m != nil {
1364 return m.RepeatedValue
1365 }
1366 return nil
1367 }
1368
1369 func (m *TestAllTypes) GetFieldname1() int32 {
1370 if m != nil {
1371 return m.Fieldname1
1372 }
1373 return 0
1374 }
1375
1376 func (m *TestAllTypes) GetFieldName2() int32 {
1377 if m != nil {
1378 return m.FieldName2
1379 }
1380 return 0
1381 }
1382
1383 func (m *TestAllTypes) GetXFieldName3() int32 {
1384 if m != nil {
1385 return m.XFieldName3
1386 }
1387 return 0
1388 }
1389
1390 func (m *TestAllTypes) GetField_Name4_() int32 {
1391 if m != nil {
1392 return m.Field_Name4_
1393 }
1394 return 0
1395 }
1396
1397 func (m *TestAllTypes) GetField0Name5() int32 {
1398 if m != nil {
1399 return m.Field0Name5
1400 }
1401 return 0
1402 }
1403
1404 func (m *TestAllTypes) GetField_0Name6() int32 {
1405 if m != nil {
1406 return m.Field_0Name6
1407 }
1408 return 0
1409 }
1410
1411 func (m *TestAllTypes) GetFieldName7() int32 {
1412 if m != nil {
1413 return m.FieldName7
1414 }
1415 return 0
1416 }
1417
1418 func (m *TestAllTypes) GetFieldName8() int32 {
1419 if m != nil {
1420 return m.FieldName8
1421 }
1422 return 0
1423 }
1424
1425 func (m *TestAllTypes) GetField_Name9() int32 {
1426 if m != nil {
1427 return m.Field_Name9
1428 }
1429 return 0
1430 }
1431
1432 func (m *TestAllTypes) GetField_Name10() int32 {
1433 if m != nil {
1434 return m.Field_Name10
1435 }
1436 return 0
1437 }
1438
1439 func (m *TestAllTypes) GetFIELD_NAME11() int32 {
1440 if m != nil {
1441 return m.FIELD_NAME11
1442 }
1443 return 0
1444 }
1445
1446 func (m *TestAllTypes) GetFIELDName12() int32 {
1447 if m != nil {
1448 return m.FIELDName12
1449 }
1450 return 0
1451 }
1452
1453 // XXX_OneofFuncs is for the internal use of the proto package.
1454 func (*TestAllTypes) 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{}) {
1455 return _TestAllTypes_OneofMarshaler, _TestAllTypes_OneofUnmarshaler, _TestAllTypes_OneofSizer, []interface{}{
1456 (*TestAllTypes_OneofUint32)(nil),
1457 (*TestAllTypes_OneofNestedMessage)(nil),
1458 (*TestAllTypes_OneofString)(nil),
1459 (*TestAllTypes_OneofBytes)(nil),
1460 }
1461 }
1462
1463 func _TestAllTypes_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
1464 m := msg.(*TestAllTypes)
1465 // oneof_field
1466 switch x := m.OneofField.(type) {
1467 case *TestAllTypes_OneofUint32:
1468 b.EncodeVarint(111<<3 | proto.WireVarint)
1469 b.EncodeVarint(uint64(x.OneofUint32))
1470 case *TestAllTypes_OneofNestedMessage:
1471 b.EncodeVarint(112<<3 | proto.WireBytes)
1472 if err := b.EncodeMessage(x.OneofNestedMessage); err != nil {
1473 return err
1474 }
1475 case *TestAllTypes_OneofString:
1476 b.EncodeVarint(113<<3 | proto.WireBytes)
1477 b.EncodeStringBytes(x.OneofString)
1478 case *TestAllTypes_OneofBytes:
1479 b.EncodeVarint(114<<3 | proto.WireBytes)
1480 b.EncodeRawBytes(x.OneofBytes)
1481 case nil:
1482 default:
1483 return fmt.Errorf("TestAllTypes.OneofField has unexpected type %T", x)
1484 }
1485 return nil
1486 }
1487
1488 func _TestAllTypes_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
1489 m := msg.(*TestAllTypes)
1490 switch tag {
1491 case 111: // oneof_field.oneof_uint32
1492 if wire != proto.WireVarint {
1493 return true, proto.ErrInternalBadWireType
1494 }
1495 x, err := b.DecodeVarint()
1496 m.OneofField = &TestAllTypes_OneofUint32{uint32(x)}
1497 return true, err
1498 case 112: // oneof_field.oneof_nested_message
1499 if wire != proto.WireBytes {
1500 return true, proto.ErrInternalBadWireType
1501 }
1502 msg := new(TestAllTypes_NestedMessage)
1503 err := b.DecodeMessage(msg)
1504 m.OneofField = &TestAllTypes_OneofNestedMessage{msg}
1505 return true, err
1506 case 113: // oneof_field.oneof_string
1507 if wire != proto.WireBytes {
1508 return true, proto.ErrInternalBadWireType
1509 }
1510 x, err := b.DecodeStringBytes()
1511 m.OneofField = &TestAllTypes_OneofString{x}
1512 return true, err
1513 case 114: // oneof_field.oneof_bytes
1514 if wire != proto.WireBytes {
1515 return true, proto.ErrInternalBadWireType
1516 }
1517 x, err := b.DecodeRawBytes(true)
1518 m.OneofField = &TestAllTypes_OneofBytes{x}
1519 return true, err
1520 default:
1521 return false, nil
1522 }
1523 }
1524
1525 func _TestAllTypes_OneofSizer(msg proto.Message) (n int) {
1526 m := msg.(*TestAllTypes)
1527 // oneof_field
1528 switch x := m.OneofField.(type) {
1529 case *TestAllTypes_OneofUint32:
1530 n += 2 // tag and wire
1531 n += proto.SizeVarint(uint64(x.OneofUint32))
1532 case *TestAllTypes_OneofNestedMessage:
1533 s := proto.Size(x.OneofNestedMessage)
1534 n += 2 // tag and wire
1535 n += proto.SizeVarint(uint64(s))
1536 n += s
1537 case *TestAllTypes_OneofString:
1538 n += 2 // tag and wire
1539 n += proto.SizeVarint(uint64(len(x.OneofString)))
1540 n += len(x.OneofString)
1541 case *TestAllTypes_OneofBytes:
1542 n += 2 // tag and wire
1543 n += proto.SizeVarint(uint64(len(x.OneofBytes)))
1544 n += len(x.OneofBytes)
1545 case nil:
1546 default:
1547 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
1548 }
1549 return n
1550 }
1551
1552 type TestAllTypes_NestedMessage struct {
1553 A int32 `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"`
1554 Corecursive *TestAllTypes `protobuf:"bytes,2,opt,name=corecursive,proto3" json:"corecursive,omitempty"`
1555 XXX_NoUnkeyedLiteral struct{} `json:"-"`
1556 XXX_unrecognized []byte `json:"-"`
1557 XXX_sizecache int32 `json:"-"`
1558 }
1559
1560 func (m *TestAllTypes_NestedMessage) Reset() { *m = TestAllTypes_NestedMessage{} }
1561 func (m *TestAllTypes_NestedMessage) String() string { return proto.CompactTextString(m) }
1562 func (*TestAllTypes_NestedMessage) ProtoMessage() {}
1563 func (*TestAllTypes_NestedMessage) Descriptor() ([]byte, []int) {
1564 return fileDescriptor_conformance_48ac832451f5d6c3, []int{2, 0}
1565 }
1566 func (m *TestAllTypes_NestedMessage) XXX_Unmarshal(b []byte) error {
1567 return xxx_messageInfo_TestAllTypes_NestedMessage.Unmarshal(m, b)
1568 }
1569 func (m *TestAllTypes_NestedMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
1570 return xxx_messageInfo_TestAllTypes_NestedMessage.Marshal(b, m, deterministic)
1571 }
1572 func (dst *TestAllTypes_NestedMessage) XXX_Merge(src proto.Message) {
1573 xxx_messageInfo_TestAllTypes_NestedMessage.Merge(dst, src)
1574 }
1575 func (m *TestAllTypes_NestedMessage) XXX_Size() int {
1576 return xxx_messageInfo_TestAllTypes_NestedMessage.Size(m)
1577 }
1578 func (m *TestAllTypes_NestedMessage) XXX_DiscardUnknown() {
1579 xxx_messageInfo_TestAllTypes_NestedMessage.DiscardUnknown(m)
1580 }
1581
1582 var xxx_messageInfo_TestAllTypes_NestedMessage proto.InternalMessageInfo
1583
1584 func (m *TestAllTypes_NestedMessage) GetA() int32 {
1585 if m != nil {
1586 return m.A
1587 }
1588 return 0
1589 }
1590
1591 func (m *TestAllTypes_NestedMessage) GetCorecursive() *TestAllTypes {
1592 if m != nil {
1593 return m.Corecursive
1594 }
1595 return nil
1596 }
1597
1598 type ForeignMessage struct {
1599 C int32 `protobuf:"varint,1,opt,name=c,proto3" json:"c,omitempty"`
1600 XXX_NoUnkeyedLiteral struct{} `json:"-"`
1601 XXX_unrecognized []byte `json:"-"`
1602 XXX_sizecache int32 `json:"-"`
1603 }
1604
1605 func (m *ForeignMessage) Reset() { *m = ForeignMessage{} }
1606 func (m *ForeignMessage) String() string { return proto.CompactTextString(m) }
1607 func (*ForeignMessage) ProtoMessage() {}
1608 func (*ForeignMessage) Descriptor() ([]byte, []int) {
1609 return fileDescriptor_conformance_48ac832451f5d6c3, []int{3}
1610 }
1611 func (m *ForeignMessage) XXX_Unmarshal(b []byte) error {
1612 return xxx_messageInfo_ForeignMessage.Unmarshal(m, b)
1613 }
1614 func (m *ForeignMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
1615 return xxx_messageInfo_ForeignMessage.Marshal(b, m, deterministic)
1616 }
1617 func (dst *ForeignMessage) XXX_Merge(src proto.Message) {
1618 xxx_messageInfo_ForeignMessage.Merge(dst, src)
1619 }
1620 func (m *ForeignMessage) XXX_Size() int {
1621 return xxx_messageInfo_ForeignMessage.Size(m)
1622 }
1623 func (m *ForeignMessage) XXX_DiscardUnknown() {
1624 xxx_messageInfo_ForeignMessage.DiscardUnknown(m)
1625 }
1626
1627 var xxx_messageInfo_ForeignMessage proto.InternalMessageInfo
1628
1629 func (m *ForeignMessage) GetC() int32 {
1630 if m != nil {
1631 return m.C
1632 }
1633 return 0
1634 }
1635
1636 func init() {
1637 proto.RegisterType((*ConformanceRequest)(nil), "conformance.ConformanceRequest")
1638 proto.RegisterType((*ConformanceResponse)(nil), "conformance.ConformanceResponse")
1639 proto.RegisterType((*TestAllTypes)(nil), "conformance.TestAllTypes")
1640 proto.RegisterMapType((map[bool]bool)(nil), "conformance.TestAllTypes.MapBoolBoolEntry")
1641 proto.RegisterMapType((map[uint32]uint32)(nil), "conformance.TestAllTypes.MapFixed32Fixed32Entry")
1642 proto.RegisterMapType((map[uint64]uint64)(nil), "conformance.TestAllTypes.MapFixed64Fixed64Entry")
1643 proto.RegisterMapType((map[int32]float64)(nil), "conformance.TestAllTypes.MapInt32DoubleEntry")
1644 proto.RegisterMapType((map[int32]float32)(nil), "conformance.TestAllTypes.MapInt32FloatEntry")
1645 proto.RegisterMapType((map[int32]int32)(nil), "conformance.TestAllTypes.MapInt32Int32Entry")
1646 proto.RegisterMapType((map[int64]int64)(nil), "conformance.TestAllTypes.MapInt64Int64Entry")
1647 proto.RegisterMapType((map[int32]int32)(nil), "conformance.TestAllTypes.MapSfixed32Sfixed32Entry")
1648 proto.RegisterMapType((map[int64]int64)(nil), "conformance.TestAllTypes.MapSfixed64Sfixed64Entry")
1649 proto.RegisterMapType((map[int32]int32)(nil), "conformance.TestAllTypes.MapSint32Sint32Entry")
1650 proto.RegisterMapType((map[int64]int64)(nil), "conformance.TestAllTypes.MapSint64Sint64Entry")
1651 proto.RegisterMapType((map[string][]byte)(nil), "conformance.TestAllTypes.MapStringBytesEntry")
1652 proto.RegisterMapType((map[string]ForeignEnum)(nil), "conformance.TestAllTypes.MapStringForeignEnumEntry")
1653 proto.RegisterMapType((map[string]*ForeignMessage)(nil), "conformance.TestAllTypes.MapStringForeignMessageEntry")
1654 proto.RegisterMapType((map[string]TestAllTypes_NestedEnum)(nil), "conformance.TestAllTypes.MapStringNestedEnumEntry")
1655 proto.RegisterMapType((map[string]*TestAllTypes_NestedMessage)(nil), "conformance.TestAllTypes.MapStringNestedMessageEntry")
1656 proto.RegisterMapType((map[string]string)(nil), "conformance.TestAllTypes.MapStringStringEntry")
1657 proto.RegisterMapType((map[uint32]uint32)(nil), "conformance.TestAllTypes.MapUint32Uint32Entry")
1658 proto.RegisterMapType((map[uint64]uint64)(nil), "conformance.TestAllTypes.MapUint64Uint64Entry")
1659 proto.RegisterType((*TestAllTypes_NestedMessage)(nil), "conformance.TestAllTypes.NestedMessage")
1660 proto.RegisterType((*ForeignMessage)(nil), "conformance.ForeignMessage")
1661 proto.RegisterEnum("conformance.WireFormat", WireFormat_name, WireFormat_value)
1662 proto.RegisterEnum("conformance.ForeignEnum", ForeignEnum_name, ForeignEnum_value)
1663 proto.RegisterEnum("conformance.TestAllTypes_NestedEnum", TestAllTypes_NestedEnum_name, TestAllTypes_NestedEnum_value)
1664 }
1665
1666 func init() { proto.RegisterFile("conformance.proto", fileDescriptor_conformance_48ac832451f5d6c3) }
1667
1668 var fileDescriptor_conformance_48ac832451f5d6c3 = []byte{
1669 // 2600 bytes of a gzipped FileDescriptorProto
1670 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x5a, 0x5b, 0x73, 0x13, 0xc9,
1671 0x15, 0xf6, 0x68, 0xc0, 0x36, 0x2d, 0xd9, 0x96, 0xdb, 0xb7, 0xc6, 0x50, 0xcb, 0x60, 0x96, 0x20,
1672 0x60, 0xd7, 0xeb, 0xcb, 0x30, 0x5c, 0x36, 0x4b, 0xb0, 0xc0, 0x02, 0x93, 0xc5, 0xa2, 0xc6, 0x78,
1673 0xa9, 0x22, 0x0f, 0xca, 0x20, 0x8f, 0x5d, 0x5a, 0x24, 0x8d, 0x76, 0x66, 0xb4, 0x89, 0xf3, 0x98,
1674 0x7f, 0x90, 0xfb, 0xf5, 0x2f, 0xe4, 0x5a, 0x95, 0x4a, 0x52, 0xc9, 0x53, 0x2a, 0x2f, 0xb9, 0x27,
1675 0x95, 0x7b, 0xf2, 0x63, 0x92, 0xea, 0xeb, 0x74, 0xb7, 0x7a, 0x64, 0xb1, 0x55, 0x2b, 0x5b, 0xa7,
1676 0xbf, 0xfe, 0xce, 0xe9, 0xd3, 0x67, 0xbe, 0x76, 0x9f, 0x01, 0xcc, 0x36, 0xa3, 0xee, 0x61, 0x14,
1677 0x77, 0x82, 0x6e, 0x33, 0x5c, 0xed, 0xc5, 0x51, 0x1a, 0xc1, 0xa2, 0x64, 0x5a, 0x3e, 0x7b, 0x14,
1678 0x45, 0x47, 0xed, 0xf0, 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a, 0x51, 0x37, 0x09, 0xe1, 0x45, 0x50, 0xec, 0x05, 0x71, 0x12, 0x36,
1690 0xc2, 0x38, 0x8e, 0x62, 0xb2, 0x00, 0x1c, 0x17, 0x20, 0xc6, 0x6d, 0x6c, 0x83, 0x57, 0xc1, 0x4c,
1691 0x12, 0xc6, 0xad, 0xa0, 0xdd, 0xfa, 0x02, 0x87, 0x8d, 0x33, 0xd8, 0xb4, 0x18, 0xa0, 0xd0, 0xcb,
1692 0x60, 0x2a, 0xee, 0x77, 0x71, 0x82, 0x19, 0x90, 0xaf, 0xb3, 0xc4, 0xcc, 0x14, 0x66, 0x4a, 0x9d,
1693 0x3d, 0x6a, 0xea, 0x4e, 0x99, 0x52, 0xb7, 0x0c, 0x26, 0x92, 0x57, 0xad, 0x5e, 0x2f, 0x3c, 0x40,
1694 0xa7, 0xd9, 0x38, 0x37, 0x54, 0x27, 0xc1, 0x78, 0x1c, 0x26, 0xfd, 0x76, 0xba, 0xf2, 0x93, 0xfb,
1695 0xa0, 0xf4, 0x2c, 0x4c, 0xd2, 0xad, 0x76, 0xfb, 0xd9, 0x71, 0x2f, 0x4c, 0xe0, 0x65, 0x30, 0x1d,
1696 0xf5, 0x70, 0xad, 0x05, 0xed, 0x46, 0xab, 0x9b, 0x6e, 0x6e, 0x90, 0x04, 0x9c, 0xf6, 0xa7, 0xb8,
1697 0x75, 0x07, 0x1b, 0x75, 0x98, 0xe7, 0x92, 0x75, 0xd9, 0x0a, 0xcc, 0x73, 0xe1, 0x15, 0x30, 0x23,
1698 0x60, 0x7d, 0x4a, 0x87, 0x57, 0x35, 0xe5, 0x8b, 0xd9, 0xfb, 0xc4, 0x3a, 0x00, 0xf4, 0x5c, 0xb2,
1699 0xaa, 0x53, 0x2a, 0x50, 0x63, 0x4c, 0x28, 0x23, 0x5e, 0xde, 0x6c, 0x06, 0xdc, 0x1b, 0x64, 0x4c,
1700 0x28, 0x23, 0xde, 0x23, 0xa8, 0x02, 0x3d, 0x17, 0x5e, 0x05, 0x65, 0x01, 0x3c, 0x6c, 0x7d, 0x3e,
1701 0x3c, 0xd8, 0xdc, 0x40, 0x13, 0x8e, 0x55, 0x99, 0xf0, 0x05, 0x41, 0x8d, 0x9a, 0x07, 0xa1, 0x9e,
1702 0x8b, 0x26, 0x1d, 0xab, 0x32, 0xae, 0x41, 0x3d, 0x17, 0x5e, 0x07, 0xb3, 0x99, 0x7b, 0x4e, 0x7b,
1703 0xc6, 0xb1, 0x2a, 0x33, 0xbe, 0xe0, 0xd8, 0x63, 0x76, 0x03, 0xd8, 0x73, 0x11, 0x70, 0xac, 0x4a,
1704 0x59, 0x07, 0x7b, 0xae, 0x92, 0xfa, 0xc3, 0x76, 0x14, 0xa4, 0xa8, 0xe8, 0x58, 0x95, 0x42, 0x96,
1705 0xfa, 0x1a, 0x36, 0x2a, 0xeb, 0x3f, 0x88, 0xfa, 0x2f, 0xdb, 0x21, 0x2a, 0x39, 0x56, 0xc5, 0xca,
1706 0xd6, 0xff, 0x80, 0x58, 0xe1, 0x25, 0x20, 0x66, 0x36, 0x5e, 0x46, 0x51, 0x1b, 0x4d, 0x39, 0x56,
1707 0x65, 0xd2, 0x2f, 0x71, 0x63, 0x35, 0x8a, 0xda, 0x6a, 0x36, 0xd3, 0xb8, 0xd5, 0x3d, 0x42, 0xd3,
1708 0xb8, 0xaa, 0xa4, 0x6c, 0x12, 0xab, 0x12, 0xdd, 0xcb, 0xe3, 0x34, 0x4c, 0xd0, 0x0c, 0x2e, 0xe3,
1709 0x2c, 0xba, 0x2a, 0x36, 0xc2, 0x06, 0x58, 0x12, 0xb0, 0x2e, 0x7d, 0xbc, 0x3b, 0x61, 0x92, 0x04,
1710 0x47, 0x21, 0x82, 0x8e, 0x55, 0x29, 0x6e, 0x5c, 0x51, 0x1e, 0x6c, 0xb9, 0x44, 0x57, 0x77, 0x09,
1711 0xfe, 0x09, 0x85, 0xfb, 0x0b, 0x9c, 0x47, 0x31, 0xc3, 0x7d, 0x80, 0xb2, 0x2c, 0x45, 0x71, 0xd8,
1712 0x3a, 0xea, 0x0a, 0x0f, 0x73, 0xc4, 0xc3, 0x39, 0xc5, 0x43, 0x8d, 0x62, 0x38, 0xeb, 0xa2, 0x48,
1713 0xa6, 0x62, 0x87, 0x1f, 0x80, 0x79, 0x3d, 0xee, 0xb0, 0xdb, 0xef, 0xa0, 0x05, 0xa2, 0x46, 0x6f,
1714 0x9e, 0x14, 0xf4, 0x76, 0xb7, 0xdf, 0xf1, 0xa1, 0x1a, 0x31, 0xb6, 0xc1, 0xf7, 0xc1, 0xc2, 0x40,
1715 0xb8, 0x84, 0x78, 0x91, 0x10, 0x23, 0x53, 0xac, 0x84, 0x6c, 0x4e, 0x0b, 0x94, 0xb0, 0x79, 0x12,
1716 0x1b, 0xdd, 0xad, 0x46, 0xaf, 0x15, 0x36, 0x43, 0x84, 0xf0, 0x9e, 0x55, 0x0b, 0x93, 0x85, 0x6c,
1717 0x1e, 0xdd, 0xb7, 0xa7, 0x78, 0x18, 0x5e, 0x91, 0x4a, 0xa1, 0x19, 0xc5, 0x07, 0xe8, 0x2c, 0xc3,
1718 0x5b, 0x59, 0x39, 0xdc, 0x8f, 0xe2, 0x03, 0x58, 0x03, 0xb3, 0x71, 0xd8, 0xec, 0xc7, 0x49, 0xeb,
1719 0xe3, 0x50, 0xa4, 0xf5, 0x1c, 0x49, 0xeb, 0xd9, 0xdc, 0x1c, 0xf8, 0x65, 0x31, 0x87, 0xa7, 0xf3,
1720 0x32, 0x98, 0x8e, 0xc3, 0x5e, 0x18, 0xe0, 0x3c, 0xd2, 0x87, 0xf9, 0x82, 0x63, 0x63, 0xb5, 0xe1,
1721 0x56, 0xa1, 0x36, 0x32, 0xcc, 0x73, 0x91, 0xe3, 0xd8, 0x58, 0x6d, 0x24, 0x18, 0xd5, 0x06, 0x01,
1722 0x63, 0x6a, 0x73, 0xd1, 0xb1, 0xb1, 0xda, 0x70, 0x73, 0xa6, 0x36, 0x0a, 0xd0, 0x73, 0xd1, 0x8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x51, 0x23, 0xe6, 0x6a, 0x33, 0x10, 0x2e, 0x21, 0x76, 0x09, 0xf1, 0x10, 0xb5, 0xd1, 0x02,
1735 0xe5, 0x6a, 0xa3, 0xed, 0x16, 0x53, 0x1b, 0x0f, 0xef, 0x19, 0x55, 0x1b, 0x75, 0xdf, 0x84, 0xda,
1736 0x88, 0x79, 0x44, 0x6d, 0x6e, 0x32, 0xbc, 0x95, 0x95, 0x03, 0x51, 0x9b, 0x67, 0x60, 0xa6, 0x13,
1737 0xf4, 0xa8, 0x40, 0x30, 0x99, 0xb8, 0x45, 0x92, 0xfa, 0x56, 0x7e, 0x06, 0x9e, 0x04, 0x3d, 0xa2,
1738 0x1d, 0xe4, 0x63, 0xbb, 0x9b, 0xc6, 0xc7, 0xfe, 0x54, 0x47, 0xb6, 0x49, 0xac, 0x9e, 0xcb, 0x54,
1739 0xe5, 0xf6, 0x68, 0xac, 0x9e, 0x4b, 0x3e, 0x14, 0x56, 0x66, 0x83, 0x2f, 0xc0, 0x2c, 0x66, 0xa5,
1740 0xf2, 0xc3, 0x55, 0xe8, 0x0e, 0xe1, 0x5d, 0x1d, 0xca, 0x4b, 0xa5, 0x89, 0x7e, 0x52, 0x66, 0x1c,
1741 0x9e, 0x6c, 0x95, 0xb9, 0x3d, 0x97, 0x0b, 0xd7, 0xbb, 0x23, 0x72, 0x7b, 0x2e, 0xfd, 0x54, 0xb9,
1742 0xb9, 0x95, 0x73, 0x53, 0x91, 0xe3, 0x5a, 0xf7, 0xc9, 0x11, 0xb8, 0xa9, 0x00, 0xee, 0x69, 0x71,
1743 0xcb, 0x56, 0x99, 0xdb, 0x73, 0xb9, 0x3c, 0xbe, 0x37, 0x22, 0xb7, 0xe7, 0xee, 0x69, 0x71, 0xcb,
1744 0x56, 0xf8, 0x59, 0x30, 0x87, 0xb9, 0x99, 0xb6, 0x09, 0x49, 0xbd, 0x4b, 0xd8, 0xd7, 0x86, 0xb2,
1745 0x33, 0x9d, 0x65, 0x3f, 0x28, 0x3f, 0x0e, 0x54, 0xb5, 0x2b, 0x1e, 0x3c, 0x57, 0x28, 0xf1, 0xa7,
1746 0x46, 0xf5, 0xe0, 0xb9, 0xec, 0x87, 0xe6, 0x41, 0xd8, 0xe1, 0x21, 0x58, 0x20, 0xf9, 0xe1, 0x8b,
1747 0x10, 0x0a, 0x7e, 0x8f, 0xf8, 0xd8, 0x18, 0x9e, 0x23, 0x06, 0xe6, 0x3f, 0xa9, 0x17, 0x1c, 0xb2,
1748 0x3e, 0xa2, 0xfa, 0xc1, 0x3b, 0xc1, 0xd7, 0xb2, 0x35, 0xb2, 0x1f, 0xcf, 0xe5, 0x3f, 0x75, 0x3f,
1749 0xd9, 0x88, 0xfa, 0xbc, 0xd2, 0x43, 0xa3, 0x3a, 0xea, 0xf3, 0x4a, 0x8e, 0x13, 0xed, 0x79, 0xa5,
1750 0x47, 0xcc, 0x73, 0x50, 0xce, 0x58, 0xd9, 0x19, 0x73, 0x9f, 0xd0, 0xbe, 0x7d, 0x32, 0x2d, 0x3d,
1751 0x7d, 0x28, 0xef, 0x74, 0x47, 0x31, 0xc2, 0x5d, 0x80, 0x3d, 0x91, 0xd3, 0x88, 0x1e, 0x49, 0x0f,
1752 0x08, 0xeb, 0xb5, 0xa1, 0xac, 0xf8, 0x9c, 0xc2, 0xff, 0x53, 0xca, 0x62, 0x27, 0xb3, 0x88, 0x72,
1753 0xa7, 0x52, 0xc8, 0xce, 0xaf, 0xed, 0x51, 0xca, 0x9d, 0x40, 0xe9, 0xa7, 0x54, 0xee, 0x92, 0x95,
1754 0x27, 0x81, 0x71, 0xd3, 0x23, 0xaf, 0x36, 0x42, 0x12, 0xe8, 0x74, 0x72, 0x1a, 0x66, 0x49, 0x90,
1755 0x8c, 0xb0, 0x07, 0xce, 0x4a, 0xc4, 0xda, 0x21, 0xf9, 0x90, 0x78, 0xb8, 0x31, 0x82, 0x07, 0xe5,
1756 0x58, 0xa4, 0x9e, 0x16, 0x3b, 0xc6, 0x41, 0x98, 0x80, 0x65, 0xc9, 0xa3, 0x7e, 0x6a, 0x3e, 0x22,
1757 0x2e, 0xbd, 0x11, 0x5c, 0xaa, 0x67, 0x26, 0xf5, 0xb9, 0xd4, 0x31, 0x8f, 0xc2, 0x23, 0xb0, 0x38,
1758 0xb8, 0x4c, 0x72, 0xf4, 0xed, 0x8c, 0xf2, 0x0c, 0x48, 0xcb, 0xc0, 0x47, 0x9f, 0xf4, 0x0c, 0x68,
1759 0x23, 0xf0, 0x43, 0xb0, 0x64, 0x58, 0x1d, 0xf1, 0xf4, 0x98, 0x78, 0xda, 0x1c, 0x7d, 0x69, 0x99,
1760 0xab, 0xf9, 0x8e, 0x61, 0x08, 0x5e, 0x02, 0xa5, 0xa8, 0x1b, 0x46, 0x87, 0xfc, 0xb8, 0x89, 0xf0,
1761 0x15, 0xfb, 0xd1, 0x98, 0x5f, 0x24, 0x56, 0x76, 0x78, 0x7c, 0x06, 0xcc, 0x53, 0x90, 0xb6, 0xb7,
1762 0xbd, 0xd7, 0xba, 0x6e, 0x3d, 0x1a, 0xf3, 0x21, 0xa1, 0x51, 0xf7, 0x52, 0x44, 0xc0, 0xaa, 0xfd,
1763 0x23, 0xde, 0x91, 0x20, 0x56, 0x56, 0xbb, 0x17, 0x01, 0xfd, 0xca, 0xca, 0x36, 0x66, 0xed, 0x0d,
1764 0x40, 0x8c, 0xb4, 0x0a, 0xeb, 0xd2, 0xc5, 0x85, 0x3c, 0x8f, 0xac, 0xf1, 0x84, 0x7e, 0x63, 0x91,
1765 0x30, 0x97, 0x57, 0x69, 0x67, 0x6a, 0x95, 0xb7, 0x44, 0x56, 0xf1, 0x13, 0xf7, 0x41, 0xd0, 0xee,
1766 0x87, 0xd9, 0x8d, 0x06, 0x9b, 0x9e, 0xd3, 0x79, 0xd0, 0x07, 0x8b, 0x6a, 0x3b, 0x43, 0x30, 0xfe,
1767 0xd6, 0x62, 0xb7, 0x40, 0x9d, 0x91, 0x48, 0x03, 0xa5, 0x9c, 0x57, 0x9a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1801 0x43, 0x5f, 0x57, 0x40, 0x98, 0xc7, 0x13, 0x2b, 0xc2, 0xdf, 0x6e, 0xa2, 0x6f, 0xe8, 0x8e, 0x6e,
1802 0x62, 0x80, 0x08, 0xed, 0x16, 0xfa, 0xa6, 0x1e, 0xed, 0xad, 0x6c, 0xc9, 0xf8, 0xeb, 0x6d, 0xf4,
1803 0x2d, 0x9d, 0xe2, 0x36, 0x5c, 0x01, 0xa5, 0x9a, 0x40, 0xac, 0xaf, 0xa1, 0x6f, 0xb3, 0x38, 0x04,
1804 0xc9, 0xfa, 0x1a, 0xc1, 0xec, 0x6c, 0xbf, 0xff, 0xa0, 0xb1, 0xbb, 0xf5, 0x64, 0x7b, 0x7d, 0x1d,
1805 0x7d, 0x87, 0x63, 0xb0, 0x91, 0xda, 0x32, 0x0c, 0xc9, 0xf5, 0x06, 0xfa, 0xae, 0x82, 0x21, 0xb6,
1806 0xe5, 0x17, 0x60, 0x4a, 0xfd, 0x8b, 0xb9, 0x04, 0xac, 0x80, 0xbd, 0x5a, 0xb3, 0x02, 0xf8, 0x2e,
1807 0x28, 0x36, 0x23, 0xd1, 0x1d, 0x47, 0x85, 0x93, 0x3a, 0xe9, 0x32, 0x7a, 0xf9, 0x1e, 0x80, 0x83,
1808 0xdd, 0x2e, 0x58, 0x06, 0xf6, 0xab, 0xf0, 0x98, 0xb9, 0xc0, 0xbf, 0xc2, 0x79, 0x70, 0x9a, 0x16,
1809 0x57, 0x81, 0xd8, 0xe8, 0x97, 0x3b, 0x85, 0x5b, 0x56, 0xc6, 0x20, 0x77, 0xb6, 0x64, 0x06, 0xdb,
1810 0xc0, 0x60, 0xcb, 0x0c, 0x55, 0x30, 0x6f, 0xea, 0x61, 0xc9, 0x1c, 0x53, 0x06, 0x8e, 0x29, 0x33,
1811 0x87, 0xd2, 0xab, 0x92, 0x39, 0x4e, 0x19, 0x38, 0x4e, 0x0d, 0x72, 0x0c, 0xf4, 0xa4, 0x64, 0x8e,
1812 0x59, 0x03, 0xc7, 0xac, 0x99, 0x43, 0xe9, 0x3d, 0xc9, 0x1c, 0xd0, 0xc0, 0x01, 0x65, 0x8e, 0x07,
1813 0x60, 0xd1, 0xdc, 0x61, 0x92, 0x59, 0x26, 0x0c, 0x2c, 0x13, 0x39, 0x2c, 0x6a, 0x17, 0x49, 0x66,
1814 0x19, 0x37, 0xb0, 0x8c, 0xcb, 0x2c, 0x35, 0x80, 0xf2, 0xfa, 0x44, 0x32, 0xcf, 0x8c, 0x81, 0x67,
1815 0x26, 0x8f, 0x47, 0xeb, 0x03, 0xc9, 0x3c, 0x65, 0x03, 0x4f, 0xd9, 0x58, 0x6d, 0x72, 0xb7, 0xe7,
1816 0xa4, 0x7a, 0x2d, 0xc8, 0x0c, 0x5b, 0x60, 0xce, 0xd0, 0xd8, 0x39, 0x89, 0xc2, 0x92, 0x29, 0xee,
1817 0x82, 0xb2, 0xde, 0xc5, 0x91, 0xe7, 0x4f, 0x1a, 0xe6, 0x4f, 0x1a, 0x8a, 0x44, 0xef, 0xd8, 0xc8,
1818 0x1c, 0x67, 0x0c, 0x1c, 0x67, 0x06, 0x97, 0xa1, 0xb7, 0x66, 0x4e, 0xa2, 0x28, 0xc9, 0x14, 0x31,
1819 0x38, 0x37, 0xa4, 0xf7, 0x62, 0xa0, 0x7a, 0x4f, 0xa6, 0x7a, 0x8d, 0x17, 0x1f, 0x92, 0xcf, 0x23,
1820 0x70, 0x7e, 0x58, 0xf3, 0xc5, 0xe0, 0x74, 0x5d, 0x75, 0x3a, 0xf4, 0x5d, 0x88, 0xe4, 0xa8, 0x4d,
1821 0x0b, 0xce, 0xd4, 0x74, 0x31, 0x38, 0xb9, 0x23, 0x3b, 0x19, 0xf5, 0xed, 0x88, 0xe4, 0x2d, 0x00,
1822 0x67, 0x73, 0x1b, 0x2f, 0x06, 0x77, 0xab, 0xaa, 0xbb, 0xfc, 0x77, 0x26, 0x99, 0x8b, 0x95, 0xdb,
1823 0x00, 0x48, 0x2d, 0xa2, 0x09, 0x60, 0xd7, 0xea, 0xf5, 0xf2, 0x18, 0xfe, 0xa5, 0xba, 0xe5, 0x97,
1824 0x2d, 0xfa, 0xcb, 0x8b, 0x72, 0x01, 0xbb, 0xdb, 0xdd, 0x7e, 0x58, 0xfe, 0x1f, 0xff, 0xcf, 0xaa,
1825 0x4e, 0xf1, 0xe6, 0x09, 0x39, 0xc0, 0x56, 0xde, 0x00, 0xd3, 0x5a, 0x67, 0xab, 0x04, 0xac, 0x26,
1826 0x3f, 0x50, 0x9a, 0xd7, 0x6e, 0x00, 0x90, 0xfd, 0x63, 0x18, 0x38, 0x03, 0x8a, 0xfb, 0xbb, 0x7b,
1827 0x4f, 0xb7, 0xef, 0xef, 0xd4, 0x76, 0xb6, 0x1f, 0x94, 0xc7, 0x60, 0x09, 0x4c, 0x3e, 0xf5, 0xeb,
1828 0xcf, 0xea, 0xd5, 0xfd, 0x5a, 0xd9, 0x82, 0x93, 0xe0, 0xd4, 0xe3, 0xbd, 0xfa, 0x6e, 0xb9, 0x70,
1829 0xed, 0x1e, 0x28, 0xca, 0x8d, 0xa5, 0x19, 0x50, 0xac, 0xd5, 0xfd, 0xed, 0x9d, 0x87, 0xbb, 0x0d,
1830 0x1a, 0xa9, 0x64, 0xa0, 0x11, 0x2b, 0x86, 0x17, 0xe5, 0x42, 0xf5, 0x22, 0xb8, 0xd0, 0x8c, 0x3a,
1831 0x03, 0x7f, 0xb6, 0x48, 0xc9, 0x79, 0x39, 0x4e, 0xac, 0x9b, 0xff, 0x0f, 0x00, 0x00, 0xff, 0xff,
1832 0x29, 0x30, 0x51, 0x54, 0x22, 0x25, 0x00, 0x00,
1833 }
+0
-273
conformance/internal/conformance_proto/conformance.proto less more
0 // Protocol Buffers - Google's data interchange format
1 // Copyright 2008 Google Inc. All rights reserved.
2 // https://developers.google.com/protocol-buffers/
3 //
4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are
6 // met:
7 //
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above
11 // copyright notice, this list of conditions and the following disclaimer
12 // in the documentation and/or other materials provided with the
13 // distribution.
14 // * Neither the name of Google Inc. nor the names of its
15 // contributors may be used to endorse or promote products derived from
16 // this software without specific prior written permission.
17 //
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
30 syntax = "proto3";
31 package conformance;
32 option java_package = "com.google.protobuf.conformance";
33
34 import "google/protobuf/any.proto";
35 import "google/protobuf/duration.proto";
36 import "google/protobuf/field_mask.proto";
37 import "google/protobuf/struct.proto";
38 import "google/protobuf/timestamp.proto";
39 import "google/protobuf/wrappers.proto";
40
41 // This defines the conformance testing protocol. This protocol exists between
42 // the conformance test suite itself and the code being tested. For each test,
43 // the suite will send a ConformanceRequest message and expect a
44 // ConformanceResponse message.
45 //
46 // You can either run the tests in two different ways:
47 //
48 // 1. in-process (using the interface in conformance_test.h).
49 //
50 // 2. as a sub-process communicating over a pipe. Information about how to
51 // do this is in conformance_test_runner.cc.
52 //
53 // Pros/cons of the two approaches:
54 //
55 // - running as a sub-process is much simpler for languages other than C/C++.
56 //
57 // - running as a sub-process may be more tricky in unusual environments like
58 // iOS apps, where fork/stdin/stdout are not available.
59
60 enum WireFormat {
61 UNSPECIFIED = 0;
62 PROTOBUF = 1;
63 JSON = 2;
64 }
65
66 // Represents a single test case's input. The testee should:
67 //
68 // 1. parse this proto (which should always succeed)
69 // 2. parse the protobuf or JSON payload in "payload" (which may fail)
70 // 3. if the parse succeeded, serialize the message in the requested format.
71 message ConformanceRequest {
72 // The payload (whether protobuf of JSON) is always for a TestAllTypes proto
73 // (see below).
74 oneof payload {
75 bytes protobuf_payload = 1;
76 string json_payload = 2;
77 }
78
79 // Which format should the testee serialize its message to?
80 WireFormat requested_output_format = 3;
81 }
82
83 // Represents a single test case's output.
84 message ConformanceResponse {
85 oneof result {
86 // This string should be set to indicate parsing failed. The string can
87 // provide more information about the parse error if it is available.
88 //
89 // Setting this string does not necessarily mean the testee failed the
90 // test. Some of the test cases are intentionally invalid input.
91 string parse_error = 1;
92
93 // If the input was successfully parsed but errors occurred when
94 // serializing it to the requested output format, set the error message in
95 // this field.
96 string serialize_error = 6;
97
98 // This should be set if some other error occurred. This will always
99 // indicate that the test failed. The string can provide more information
100 // about the failure.
101 string runtime_error = 2;
102
103 // If the input was successfully parsed and the requested output was
104 // protobuf, serialize it to protobuf and set it in this field.
105 bytes protobuf_payload = 3;
106
107 // If the input was successfully parsed and the requested output was JSON,
108 // serialize to JSON and set it in this field.
109 string json_payload = 4;
110
111 // For when the testee skipped the test, likely because a certain feature
112 // wasn't supported, like JSON input/output.
113 string skipped = 5;
114 }
115 }
116
117 // This proto includes every type of field in both singular and repeated
118 // forms.
119 message TestAllTypes {
120 message NestedMessage {
121 int32 a = 1;
122 TestAllTypes corecursive = 2;
123 }
124
125 enum NestedEnum {
126 FOO = 0;
127 BAR = 1;
128 BAZ = 2;
129 NEG = -1; // Intentionally negative.
130 }
131
132 // Singular
133 int32 optional_int32 = 1;
134 int64 optional_int64 = 2;
135 uint32 optional_uint32 = 3;
136 uint64 optional_uint64 = 4;
137 sint32 optional_sint32 = 5;
138 sint64 optional_sint64 = 6;
139 fixed32 optional_fixed32 = 7;
140 fixed64 optional_fixed64 = 8;
141 sfixed32 optional_sfixed32 = 9;
142 sfixed64 optional_sfixed64 = 10;
143 float optional_float = 11;
144 double optional_double = 12;
145 bool optional_bool = 13;
146 string optional_string = 14;
147 bytes optional_bytes = 15;
148
149 NestedMessage optional_nested_message = 18;
150 ForeignMessage optional_foreign_message = 19;
151
152 NestedEnum optional_nested_enum = 21;
153 ForeignEnum optional_foreign_enum = 22;
154
155 string optional_string_piece = 24 [ctype=STRING_PIECE];
156 string optional_cord = 25 [ctype=CORD];
157
158 TestAllTypes recursive_message = 27;
159
160 // Repeated
161 repeated int32 repeated_int32 = 31;
162 repeated int64 repeated_int64 = 32;
163 repeated uint32 repeated_uint32 = 33;
164 repeated uint64 repeated_uint64 = 34;
165 repeated sint32 repeated_sint32 = 35;
166 repeated sint64 repeated_sint64 = 36;
167 repeated fixed32 repeated_fixed32 = 37;
168 repeated fixed64 repeated_fixed64 = 38;
169 repeated sfixed32 repeated_sfixed32 = 39;
170 repeated sfixed64 repeated_sfixed64 = 40;
171 repeated float repeated_float = 41;
172 repeated double repeated_double = 42;
173 repeated bool repeated_bool = 43;
174 repeated string repeated_string = 44;
175 repeated bytes repeated_bytes = 45;
176
177 repeated NestedMessage repeated_nested_message = 48;
178 repeated ForeignMessage repeated_foreign_message = 49;
179
180 repeated NestedEnum repeated_nested_enum = 51;
181 repeated ForeignEnum repeated_foreign_enum = 52;
182
183 repeated string repeated_string_piece = 54 [ctype=STRING_PIECE];
184 repeated string repeated_cord = 55 [ctype=CORD];
185
186 // Map
187 map < int32, int32> map_int32_int32 = 56;
188 map < int64, int64> map_int64_int64 = 57;
189 map < uint32, uint32> map_uint32_uint32 = 58;
190 map < uint64, uint64> map_uint64_uint64 = 59;
191 map < sint32, sint32> map_sint32_sint32 = 60;
192 map < sint64, sint64> map_sint64_sint64 = 61;
193 map < fixed32, fixed32> map_fixed32_fixed32 = 62;
194 map < fixed64, fixed64> map_fixed64_fixed64 = 63;
195 map <sfixed32, sfixed32> map_sfixed32_sfixed32 = 64;
196 map <sfixed64, sfixed64> map_sfixed64_sfixed64 = 65;
197 map < int32, float> map_int32_float = 66;
198 map < int32, double> map_int32_double = 67;
199 map < bool, bool> map_bool_bool = 68;
200 map < string, string> map_string_string = 69;
201 map < string, bytes> map_string_bytes = 70;
202 map < string, NestedMessage> map_string_nested_message = 71;
203 map < string, ForeignMessage> map_string_foreign_message = 72;
204 map < string, NestedEnum> map_string_nested_enum = 73;
205 map < string, ForeignEnum> map_string_foreign_enum = 74;
206
207 oneof oneof_field {
208 uint32 oneof_uint32 = 111;
209 NestedMessage oneof_nested_message = 112;
210 string oneof_string = 113;
211 bytes oneof_bytes = 114;
212 }
213
214 // Well-known types
215 google.protobuf.BoolValue optional_bool_wrapper = 201;
216 google.protobuf.Int32Value optional_int32_wrapper = 202;
217 google.protobuf.Int64Value optional_int64_wrapper = 203;
218 google.protobuf.UInt32Value optional_uint32_wrapper = 204;
219 google.protobuf.UInt64Value optional_uint64_wrapper = 205;
220 google.protobuf.FloatValue optional_float_wrapper = 206;
221 google.protobuf.DoubleValue optional_double_wrapper = 207;
222 google.protobuf.StringValue optional_string_wrapper = 208;
223 google.protobuf.BytesValue optional_bytes_wrapper = 209;
224
225 repeated google.protobuf.BoolValue repeated_bool_wrapper = 211;
226 repeated google.protobuf.Int32Value repeated_int32_wrapper = 212;
227 repeated google.protobuf.Int64Value repeated_int64_wrapper = 213;
228 repeated google.protobuf.UInt32Value repeated_uint32_wrapper = 214;
229 repeated google.protobuf.UInt64Value repeated_uint64_wrapper = 215;
230 repeated google.protobuf.FloatValue repeated_float_wrapper = 216;
231 repeated google.protobuf.DoubleValue repeated_double_wrapper = 217;
232 repeated google.protobuf.StringValue repeated_string_wrapper = 218;
233 repeated google.protobuf.BytesValue repeated_bytes_wrapper = 219;
234
235 google.protobuf.Duration optional_duration = 301;
236 google.protobuf.Timestamp optional_timestamp = 302;
237 google.protobuf.FieldMask optional_field_mask = 303;
238 google.protobuf.Struct optional_struct = 304;
239 google.protobuf.Any optional_any = 305;
240 google.protobuf.Value optional_value = 306;
241
242 repeated google.protobuf.Duration repeated_duration = 311;
243 repeated google.protobuf.Timestamp repeated_timestamp = 312;
244 repeated google.protobuf.FieldMask repeated_fieldmask = 313;
245 repeated google.protobuf.Struct repeated_struct = 324;
246 repeated google.protobuf.Any repeated_any = 315;
247 repeated google.protobuf.Value repeated_value = 316;
248
249 // Test field-name-to-JSON-name convention.
250 int32 fieldname1 = 401;
251 int32 field_name2 = 402;
252 int32 _field_name3 = 403;
253 int32 field__name4_ = 404;
254 int32 field0name5 = 405;
255 int32 field_0_name6 = 406;
256 int32 fieldName7 = 407;
257 int32 FieldName8 = 408;
258 int32 field_Name9 = 409;
259 int32 Field_Name10 = 410;
260 int32 FIELD_NAME11 = 411;
261 int32 FIELD_name12 = 412;
262 }
263
264 message ForeignMessage {
265 int32 c = 1;
266 }
267
268 enum ForeignEnum {
269 FOREIGN_FOO = 0;
270 FOREIGN_BAR = 1;
271 FOREIGN_BAZ = 2;
272 }
+0
-26
conformance/test.sh less more
0 #!/bin/bash
1
2 PROTOBUF_ROOT=$1
3 CONFORMANCE_ROOT=$1/conformance
4 CONFORMANCE_TEST_RUNNER=$CONFORMANCE_ROOT/conformance-test-runner
5
6 cd $(dirname $0)
7
8 if [[ $PROTOBUF_ROOT == "" ]]; then
9 echo "usage: test.sh <protobuf-root>" >/dev/stderr
10 exit 1
11 fi
12
13 if [[ ! -x $CONFORMANCE_TEST_RUNNER ]]; then
14 echo "SKIP: conformance test runner not installed" >/dev/stderr
15 exit 0
16 fi
17
18 a=$CONFORMANCE_ROOT/conformance.proto
19 b=internal/conformance_proto/conformance.proto
20 if [[ $(diff $a $b) != "" ]]; then
21 cp $a $b
22 echo "WARNING: conformance.proto is out of date" >/dev/stderr
23 fi
24
25 $CONFORMANCE_TEST_RUNNER --failure_list failure_list_go.txt ./conformance.sh
0 module github.com/golang/protobuf
(New empty file)
5656 )
5757
5858 const secondInNanos = int64(time.Second / time.Nanosecond)
59 const maxSecondsInDuration = 315576000000
5960
6061 // Marshaler is a configurable object for converting between
6162 // protocol buffer objects and a JSON representation for them.
181182 return fmt.Errorf("failed to marshal type URL %q to JSON: %v", typeURL, err)
182183 }
183184 js["@type"] = (*json.RawMessage)(&turl)
184 if b, err = json.Marshal(js); err != nil {
185 if m.Indent != "" {
186 b, err = json.MarshalIndent(js, indent, m.Indent)
187 } else {
188 b, err = json.Marshal(js)
189 }
190 if err != nil {
185191 return err
186192 }
187193 }
205211 // Any is a bit more involved.
206212 return m.marshalAny(out, v, indent)
207213 case "Duration":
208 // "Generated output always contains 0, 3, 6, or 9 fractional digits,
209 // depending on required precision."
210214 s, ns := s.Field(0).Int(), s.Field(1).Int()
215 if s < -maxSecondsInDuration || s > maxSecondsInDuration {
216 return fmt.Errorf("seconds out of range %v", s)
217 }
211218 if ns <= -secondInNanos || ns >= secondInNanos {
212219 return fmt.Errorf("ns out of range (%v, %v)", -secondInNanos, secondInNanos)
213220 }
214221 if (s > 0 && ns < 0) || (s < 0 && ns > 0) {
215222 return errors.New("signs of seconds and nanos do not match")
216223 }
217 if s < 0 {
224 // Generated output always contains 0, 3, 6, or 9 fractional digits,
225 // depending on required precision, followed by the suffix "s".
226 f := "%d.%09d"
227 if ns < 0 {
218228 ns = -ns
219 }
220 x := fmt.Sprintf("%d.%09d", s, ns)
229 if s == 0 {
230 f = "-%d.%09d"
231 }
232 }
233 x := fmt.Sprintf(f, s, ns)
221234 x = strings.TrimSuffix(x, "000")
222235 x = strings.TrimSuffix(x, "000")
223236 x = strings.TrimSuffix(x, ".000")
472472 {"Any with message and indent", marshalerAllOptions, anySimple, anySimplePrettyJSON},
473473 {"Any with WKT", marshaler, anyWellKnown, anyWellKnownJSON},
474474 {"Any with WKT and indent", marshalerAllOptions, anyWellKnown, anyWellKnownPrettyJSON},
475 {"Duration", marshaler, &pb.KnownTypes{Dur: &durpb.Duration{Seconds: 3}}, `{"dur":"3s"}`},
476 {"Duration", marshaler, &pb.KnownTypes{Dur: &durpb.Duration{Seconds: 3, Nanos: 1e6}}, `{"dur":"3.001s"}`},
477 {"Duration beyond float64 precision", marshaler, &pb.KnownTypes{Dur: &durpb.Duration{Seconds: 100000000, Nanos: 1}}, `{"dur":"100000000.000000001s"}`},
478 {"negative Duration", marshaler, &pb.KnownTypes{Dur: &durpb.Duration{Seconds: -123, Nanos: -456}}, `{"dur":"-123.000000456s"}`},
475 {"Duration empty", marshaler, &durpb.Duration{}, `"0s"`},
476 {"Duration with secs", marshaler, &durpb.Duration{Seconds: 3}, `"3s"`},
477 {"Duration with -secs", marshaler, &durpb.Duration{Seconds: -3}, `"-3s"`},
478 {"Duration with nanos", marshaler, &durpb.Duration{Nanos: 1e6}, `"0.001s"`},
479 {"Duration with -nanos", marshaler, &durpb.Duration{Nanos: -1e6}, `"-0.001s"`},
480 {"Duration with large secs", marshaler, &durpb.Duration{Seconds: 1e10, Nanos: 1}, `"10000000000.000000001s"`},
481 {"Duration with 6-digit nanos", marshaler, &durpb.Duration{Nanos: 1e4}, `"0.000010s"`},
482 {"Duration with 3-digit nanos", marshaler, &durpb.Duration{Nanos: 1e6}, `"0.001s"`},
483 {"Duration with -secs -nanos", marshaler, &durpb.Duration{Seconds: -123, Nanos: -450}, `"-123.000000450s"`},
484 {"Duration max value", marshaler, &durpb.Duration{Seconds: 315576000000, Nanos: 999999999}, `"315576000000.999999999s"`},
485 {"Duration min value", marshaler, &durpb.Duration{Seconds: -315576000000, Nanos: -999999999}, `"-315576000000.999999999s"`},
479486 {"Struct", marshaler, &pb.KnownTypes{St: &stpb.Struct{
480487 Fields: map[string]*stpb.Value{
481488 "one": {Kind: &stpb.Value_StringValue{"loneliest number"}},
548555 pb proto.Message
549556 fail bool
550557 }{
551 {&pb.KnownTypes{Dur: &durpb.Duration{Seconds: 1, Nanos: 0}}, false},
552 {&pb.KnownTypes{Dur: &durpb.Duration{Seconds: -1, Nanos: 0}}, false},
553 {&pb.KnownTypes{Dur: &durpb.Duration{Seconds: 1, Nanos: -1}}, true},
554 {&pb.KnownTypes{Dur: &durpb.Duration{Seconds: -1, Nanos: 1}}, true},
555 {&pb.KnownTypes{Dur: &durpb.Duration{Seconds: 1, Nanos: 1000000000}}, true},
556 {&pb.KnownTypes{Dur: &durpb.Duration{Seconds: -1, Nanos: -1000000000}}, true},
557 {&pb.KnownTypes{Ts: &tspb.Timestamp{Seconds: 1, Nanos: 1}}, false},
558 {&pb.KnownTypes{Ts: &tspb.Timestamp{Seconds: 1, Nanos: -1}}, true},
559 {&pb.KnownTypes{Ts: &tspb.Timestamp{Seconds: 1, Nanos: 1000000000}}, true},
558 {&durpb.Duration{Seconds: 1, Nanos: 0}, false},
559 {&durpb.Duration{Seconds: -1, Nanos: 0}, false},
560 {&durpb.Duration{Seconds: 1, Nanos: -1}, true},
561 {&durpb.Duration{Seconds: -1, Nanos: 1}, true},
562 {&durpb.Duration{Seconds: 315576000001}, true},
563 {&durpb.Duration{Seconds: -315576000001}, true},
564 {&durpb.Duration{Seconds: 1, Nanos: 1000000000}, true},
565 {&durpb.Duration{Seconds: -1, Nanos: -1000000000}, true},
566 {&tspb.Timestamp{Seconds: 1, Nanos: 1}, false},
567 {&tspb.Timestamp{Seconds: 1, Nanos: -1}, true},
568 {&tspb.Timestamp{Seconds: 1, Nanos: 1000000000}, true},
560569 }
561570 for _, tt := range tests {
562571 _, err := marshaler.MarshalToString(tt.pb)
594603 // after custom marshaling, it's round-tripped through JSON decoding/encoding already,
595604 // so the keys are sorted, whitespace is compacted, and "@type" key has been added
596605 expected := `{"@type":"type.googleapis.com/` + dynamicMessageName + `","baz":[0,1,2,3],"foo":"bar"}`
606 if str != expected {
607 t.Errorf("marshalling JSON produced incorrect output: got %s, wanted %s", str, expected)
608 }
609
610 // Do it again, but this time with indentation:
611
612 marshaler := Marshaler{Indent: " "}
613 str, err = marshaler.MarshalToString(a)
614 if err != nil {
615 t.Errorf("an unexpected error occurred when marshalling Any to JSON: %v", err)
616 }
617 // same as expected above, but pretty-printed w/ indentation
618 expected = `{
619 "@type": "type.googleapis.com/` + dynamicMessageName + `",
620 "baz": [
621 0,
622 1,
623 2,
624 3
625 ],
626 "foo": "bar"
627 }`
597628 if str != expected {
598629 t.Errorf("marshalling JSON produced incorrect output: got %s, wanted %s", str, expected)
599630 }
22
33 package jsonpb
44
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 math "math"
9 )
810
911 // Reference imports to suppress errors if they are not otherwise used.
1012 var _ = proto.Marshal
1517 // is compatible with the proto package it is being compiled against.
1618 // A compilation error at this line likely means your copy of the
1719 // proto package needs to be updated.
18 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
20 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
1921
2022 type Numeral int32
2123
3032 1: "ARABIC",
3133 2: "ROMAN",
3234 }
35
3336 var Numeral_value = map[string]int32{
3437 "UNKNOWN": 0,
3538 "ARABIC": 1,
3942 func (x Numeral) String() string {
4043 return proto.EnumName(Numeral_name, int32(x))
4144 }
45
4246 func (Numeral) EnumDescriptor() ([]byte, []int) {
43 return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{0}
47 return fileDescriptor_e6c135db3023e377, []int{0}
4448 }
4549
4650 type Simple3 struct {
5458 func (m *Simple3) String() string { return proto.CompactTextString(m) }
5559 func (*Simple3) ProtoMessage() {}
5660 func (*Simple3) Descriptor() ([]byte, []int) {
57 return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{0}
58 }
61 return fileDescriptor_e6c135db3023e377, []int{0}
62 }
63
5964 func (m *Simple3) XXX_Unmarshal(b []byte) error {
6065 return xxx_messageInfo_Simple3.Unmarshal(m, b)
6166 }
6267 func (m *Simple3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
6368 return xxx_messageInfo_Simple3.Marshal(b, m, deterministic)
6469 }
65 func (dst *Simple3) XXX_Merge(src proto.Message) {
66 xxx_messageInfo_Simple3.Merge(dst, src)
70 func (m *Simple3) XXX_Merge(src proto.Message) {
71 xxx_messageInfo_Simple3.Merge(m, src)
6772 }
6873 func (m *Simple3) XXX_Size() int {
6974 return xxx_messageInfo_Simple3.Size(m)
9297 func (m *SimpleSlice3) String() string { return proto.CompactTextString(m) }
9398 func (*SimpleSlice3) ProtoMessage() {}
9499 func (*SimpleSlice3) Descriptor() ([]byte, []int) {
95 return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{1}
96 }
100 return fileDescriptor_e6c135db3023e377, []int{1}
101 }
102
97103 func (m *SimpleSlice3) XXX_Unmarshal(b []byte) error {
98104 return xxx_messageInfo_SimpleSlice3.Unmarshal(m, b)
99105 }
100106 func (m *SimpleSlice3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
101107 return xxx_messageInfo_SimpleSlice3.Marshal(b, m, deterministic)
102108 }
103 func (dst *SimpleSlice3) XXX_Merge(src proto.Message) {
104 xxx_messageInfo_SimpleSlice3.Merge(dst, src)
109 func (m *SimpleSlice3) XXX_Merge(src proto.Message) {
110 xxx_messageInfo_SimpleSlice3.Merge(m, src)
105111 }
106112 func (m *SimpleSlice3) XXX_Size() int {
107113 return xxx_messageInfo_SimpleSlice3.Size(m)
130136 func (m *SimpleMap3) String() string { return proto.CompactTextString(m) }
131137 func (*SimpleMap3) ProtoMessage() {}
132138 func (*SimpleMap3) Descriptor() ([]byte, []int) {
133 return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{2}
134 }
139 return fileDescriptor_e6c135db3023e377, []int{2}
140 }
141
135142 func (m *SimpleMap3) XXX_Unmarshal(b []byte) error {
136143 return xxx_messageInfo_SimpleMap3.Unmarshal(m, b)
137144 }
138145 func (m *SimpleMap3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
139146 return xxx_messageInfo_SimpleMap3.Marshal(b, m, deterministic)
140147 }
141 func (dst *SimpleMap3) XXX_Merge(src proto.Message) {
142 xxx_messageInfo_SimpleMap3.Merge(dst, src)
148 func (m *SimpleMap3) XXX_Merge(src proto.Message) {
149 xxx_messageInfo_SimpleMap3.Merge(m, src)
143150 }
144151 func (m *SimpleMap3) XXX_Size() int {
145152 return xxx_messageInfo_SimpleMap3.Size(m)
168175 func (m *SimpleNull3) String() string { return proto.CompactTextString(m) }
169176 func (*SimpleNull3) ProtoMessage() {}
170177 func (*SimpleNull3) Descriptor() ([]byte, []int) {
171 return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{3}
172 }
178 return fileDescriptor_e6c135db3023e377, []int{3}
179 }
180
173181 func (m *SimpleNull3) XXX_Unmarshal(b []byte) error {
174182 return xxx_messageInfo_SimpleNull3.Unmarshal(m, b)
175183 }
176184 func (m *SimpleNull3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
177185 return xxx_messageInfo_SimpleNull3.Marshal(b, m, deterministic)
178186 }
179 func (dst *SimpleNull3) XXX_Merge(src proto.Message) {
180 xxx_messageInfo_SimpleNull3.Merge(dst, src)
187 func (m *SimpleNull3) XXX_Merge(src proto.Message) {
188 xxx_messageInfo_SimpleNull3.Merge(m, src)
181189 }
182190 func (m *SimpleNull3) XXX_Size() int {
183191 return xxx_messageInfo_SimpleNull3.Size(m)
215223 func (m *Mappy) String() string { return proto.CompactTextString(m) }
216224 func (*Mappy) ProtoMessage() {}
217225 func (*Mappy) Descriptor() ([]byte, []int) {
218 return fileDescriptor_more_test_objects_bef0d79b901f4c4a, []int{4}
219 }
226 return fileDescriptor_e6c135db3023e377, []int{4}
227 }
228
220229 func (m *Mappy) XXX_Unmarshal(b []byte) error {
221230 return xxx_messageInfo_Mappy.Unmarshal(m, b)
222231 }
223232 func (m *Mappy) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
224233 return xxx_messageInfo_Mappy.Marshal(b, m, deterministic)
225234 }
226 func (dst *Mappy) XXX_Merge(src proto.Message) {
227 xxx_messageInfo_Mappy.Merge(dst, src)
235 func (m *Mappy) XXX_Merge(src proto.Message) {
236 xxx_messageInfo_Mappy.Merge(m, src)
228237 }
229238 func (m *Mappy) XXX_Size() int {
230239 return xxx_messageInfo_Mappy.Size(m)
306315 }
307316
308317 func init() {
318 proto.RegisterEnum("jsonpb.Numeral", Numeral_name, Numeral_value)
309319 proto.RegisterType((*Simple3)(nil), "jsonpb.Simple3")
310320 proto.RegisterType((*SimpleSlice3)(nil), "jsonpb.SimpleSlice3")
311321 proto.RegisterType((*SimpleMap3)(nil), "jsonpb.SimpleMap3")
322332 proto.RegisterMapType((map[string]string)(nil), "jsonpb.Mappy.StrryEntry")
323333 proto.RegisterMapType((map[uint32]bool)(nil), "jsonpb.Mappy.U32boolyEntry")
324334 proto.RegisterMapType((map[uint64]bool)(nil), "jsonpb.Mappy.U64boolyEntry")
325 proto.RegisterEnum("jsonpb.Numeral", Numeral_name, Numeral_value)
326 }
327
328 func init() {
329 proto.RegisterFile("more_test_objects.proto", fileDescriptor_more_test_objects_bef0d79b901f4c4a)
330 }
331
332 var fileDescriptor_more_test_objects_bef0d79b901f4c4a = []byte{
335 }
336
337 func init() { proto.RegisterFile("more_test_objects.proto", fileDescriptor_e6c135db3023e377) }
338
339 var fileDescriptor_e6c135db3023e377 = []byte{
333340 // 526 bytes of a gzipped FileDescriptorProto
334341 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0xdd, 0x6b, 0xdb, 0x3c,
335342 0x14, 0x87, 0x5f, 0x27, 0xf5, 0xd7, 0x49, 0xfb, 0x2e, 0x88, 0xb1, 0x99, 0xf4, 0x62, 0xc5, 0xb0,
22
33 package jsonpb
44
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
8 import any "github.com/golang/protobuf/ptypes/any"
9 import duration "github.com/golang/protobuf/ptypes/duration"
10 import _struct "github.com/golang/protobuf/ptypes/struct"
11 import timestamp "github.com/golang/protobuf/ptypes/timestamp"
12 import wrappers "github.com/golang/protobuf/ptypes/wrappers"
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 any "github.com/golang/protobuf/ptypes/any"
9 duration "github.com/golang/protobuf/ptypes/duration"
10 _struct "github.com/golang/protobuf/ptypes/struct"
11 timestamp "github.com/golang/protobuf/ptypes/timestamp"
12 wrappers "github.com/golang/protobuf/ptypes/wrappers"
13 math "math"
14 )
1315
1416 // Reference imports to suppress errors if they are not otherwise used.
1517 var _ = proto.Marshal
2022 // is compatible with the proto package it is being compiled against.
2123 // A compilation error at this line likely means your copy of the
2224 // proto package needs to be updated.
23 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
25 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
2426
2527 type Widget_Color int32
2628
3537 1: "GREEN",
3638 2: "BLUE",
3739 }
40
3841 var Widget_Color_value = map[string]int32{
3942 "RED": 0,
4043 "GREEN": 1,
4649 *p = x
4750 return p
4851 }
52
4953 func (x Widget_Color) String() string {
5054 return proto.EnumName(Widget_Color_name, int32(x))
5155 }
56
5257 func (x *Widget_Color) UnmarshalJSON(data []byte) error {
5358 value, err := proto.UnmarshalJSONEnum(Widget_Color_value, data, "Widget_Color")
5459 if err != nil {
5762 *x = Widget_Color(value)
5863 return nil
5964 }
65
6066 func (Widget_Color) EnumDescriptor() ([]byte, []int) {
61 return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{3, 0}
67 return fileDescriptor_e97c739a0ce14cc6, []int{3, 0}
6268 }
6369
6470 // Test message for holding primitive types.
9197 func (m *Simple) String() string { return proto.CompactTextString(m) }
9298 func (*Simple) ProtoMessage() {}
9399 func (*Simple) Descriptor() ([]byte, []int) {
94 return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{0}
95 }
100 return fileDescriptor_e97c739a0ce14cc6, []int{0}
101 }
102
96103 func (m *Simple) XXX_Unmarshal(b []byte) error {
97104 return xxx_messageInfo_Simple.Unmarshal(m, b)
98105 }
99106 func (m *Simple) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
100107 return xxx_messageInfo_Simple.Marshal(b, m, deterministic)
101108 }
102 func (dst *Simple) XXX_Merge(src proto.Message) {
103 xxx_messageInfo_Simple.Merge(dst, src)
109 func (m *Simple) XXX_Merge(src proto.Message) {
110 xxx_messageInfo_Simple.Merge(m, src)
104111 }
105112 func (m *Simple) XXX_Size() int {
106113 return xxx_messageInfo_Simple.Size(m)
261268 func (m *NonFinites) String() string { return proto.CompactTextString(m) }
262269 func (*NonFinites) ProtoMessage() {}
263270 func (*NonFinites) Descriptor() ([]byte, []int) {
264 return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{1}
265 }
271 return fileDescriptor_e97c739a0ce14cc6, []int{1}
272 }
273
266274 func (m *NonFinites) XXX_Unmarshal(b []byte) error {
267275 return xxx_messageInfo_NonFinites.Unmarshal(m, b)
268276 }
269277 func (m *NonFinites) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
270278 return xxx_messageInfo_NonFinites.Marshal(b, m, deterministic)
271279 }
272 func (dst *NonFinites) XXX_Merge(src proto.Message) {
273 xxx_messageInfo_NonFinites.Merge(dst, src)
280 func (m *NonFinites) XXX_Merge(src proto.Message) {
281 xxx_messageInfo_NonFinites.Merge(m, src)
274282 }
275283 func (m *NonFinites) XXX_Size() int {
276284 return xxx_messageInfo_NonFinites.Size(m)
345353 func (m *Repeats) String() string { return proto.CompactTextString(m) }
346354 func (*Repeats) ProtoMessage() {}
347355 func (*Repeats) Descriptor() ([]byte, []int) {
348 return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{2}
349 }
356 return fileDescriptor_e97c739a0ce14cc6, []int{2}
357 }
358
350359 func (m *Repeats) XXX_Unmarshal(b []byte) error {
351360 return xxx_messageInfo_Repeats.Unmarshal(m, b)
352361 }
353362 func (m *Repeats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
354363 return xxx_messageInfo_Repeats.Marshal(b, m, deterministic)
355364 }
356 func (dst *Repeats) XXX_Merge(src proto.Message) {
357 xxx_messageInfo_Repeats.Merge(dst, src)
365 func (m *Repeats) XXX_Merge(src proto.Message) {
366 xxx_messageInfo_Repeats.Merge(m, src)
358367 }
359368 func (m *Repeats) XXX_Size() int {
360369 return xxx_messageInfo_Repeats.Size(m)
459468 func (m *Widget) String() string { return proto.CompactTextString(m) }
460469 func (*Widget) ProtoMessage() {}
461470 func (*Widget) Descriptor() ([]byte, []int) {
462 return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{3}
463 }
471 return fileDescriptor_e97c739a0ce14cc6, []int{3}
472 }
473
464474 func (m *Widget) XXX_Unmarshal(b []byte) error {
465475 return xxx_messageInfo_Widget.Unmarshal(m, b)
466476 }
467477 func (m *Widget) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
468478 return xxx_messageInfo_Widget.Marshal(b, m, deterministic)
469479 }
470 func (dst *Widget) XXX_Merge(src proto.Message) {
471 xxx_messageInfo_Widget.Merge(dst, src)
480 func (m *Widget) XXX_Merge(src proto.Message) {
481 xxx_messageInfo_Widget.Merge(m, src)
472482 }
473483 func (m *Widget) XXX_Size() int {
474484 return xxx_messageInfo_Widget.Size(m)
533543 func (m *Maps) String() string { return proto.CompactTextString(m) }
534544 func (*Maps) ProtoMessage() {}
535545 func (*Maps) Descriptor() ([]byte, []int) {
536 return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{4}
537 }
546 return fileDescriptor_e97c739a0ce14cc6, []int{4}
547 }
548
538549 func (m *Maps) XXX_Unmarshal(b []byte) error {
539550 return xxx_messageInfo_Maps.Unmarshal(m, b)
540551 }
541552 func (m *Maps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
542553 return xxx_messageInfo_Maps.Marshal(b, m, deterministic)
543554 }
544 func (dst *Maps) XXX_Merge(src proto.Message) {
545 xxx_messageInfo_Maps.Merge(dst, src)
555 func (m *Maps) XXX_Merge(src proto.Message) {
556 xxx_messageInfo_Maps.Merge(m, src)
546557 }
547558 func (m *Maps) XXX_Size() int {
548559 return xxx_messageInfo_Maps.Size(m)
584595 func (m *MsgWithOneof) String() string { return proto.CompactTextString(m) }
585596 func (*MsgWithOneof) ProtoMessage() {}
586597 func (*MsgWithOneof) Descriptor() ([]byte, []int) {
587 return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{5}
588 }
598 return fileDescriptor_e97c739a0ce14cc6, []int{5}
599 }
600
589601 func (m *MsgWithOneof) XXX_Unmarshal(b []byte) error {
590602 return xxx_messageInfo_MsgWithOneof.Unmarshal(m, b)
591603 }
592604 func (m *MsgWithOneof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
593605 return xxx_messageInfo_MsgWithOneof.Marshal(b, m, deterministic)
594606 }
595 func (dst *MsgWithOneof) XXX_Merge(src proto.Message) {
596 xxx_messageInfo_MsgWithOneof.Merge(dst, src)
607 func (m *MsgWithOneof) XXX_Merge(src proto.Message) {
608 xxx_messageInfo_MsgWithOneof.Merge(m, src)
597609 }
598610 func (m *MsgWithOneof) XXX_Size() int {
599611 return xxx_messageInfo_MsgWithOneof.Size(m)
680692 return nil
681693 }
682694
683 // XXX_OneofFuncs is for the internal use of the proto package.
684 func (*MsgWithOneof) 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{}) {
685 return _MsgWithOneof_OneofMarshaler, _MsgWithOneof_OneofUnmarshaler, _MsgWithOneof_OneofSizer, []interface{}{
695 // XXX_OneofWrappers is for the internal use of the proto package.
696 func (*MsgWithOneof) XXX_OneofWrappers() []interface{} {
697 return []interface{}{
686698 (*MsgWithOneof_Title)(nil),
687699 (*MsgWithOneof_Salary)(nil),
688700 (*MsgWithOneof_Country)(nil),
689701 (*MsgWithOneof_HomeAddress)(nil),
690702 (*MsgWithOneof_MsgWithRequired)(nil),
691703 }
692 }
693
694 func _MsgWithOneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
695 m := msg.(*MsgWithOneof)
696 // union
697 switch x := m.Union.(type) {
698 case *MsgWithOneof_Title:
699 b.EncodeVarint(1<<3 | proto.WireBytes)
700 b.EncodeStringBytes(x.Title)
701 case *MsgWithOneof_Salary:
702 b.EncodeVarint(2<<3 | proto.WireVarint)
703 b.EncodeVarint(uint64(x.Salary))
704 case *MsgWithOneof_Country:
705 b.EncodeVarint(3<<3 | proto.WireBytes)
706 b.EncodeStringBytes(x.Country)
707 case *MsgWithOneof_HomeAddress:
708 b.EncodeVarint(4<<3 | proto.WireBytes)
709 b.EncodeStringBytes(x.HomeAddress)
710 case *MsgWithOneof_MsgWithRequired:
711 b.EncodeVarint(5<<3 | proto.WireBytes)
712 if err := b.EncodeMessage(x.MsgWithRequired); err != nil {
713 return err
714 }
715 case nil:
716 default:
717 return fmt.Errorf("MsgWithOneof.Union has unexpected type %T", x)
718 }
719 return nil
720 }
721
722 func _MsgWithOneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
723 m := msg.(*MsgWithOneof)
724 switch tag {
725 case 1: // union.title
726 if wire != proto.WireBytes {
727 return true, proto.ErrInternalBadWireType
728 }
729 x, err := b.DecodeStringBytes()
730 m.Union = &MsgWithOneof_Title{x}
731 return true, err
732 case 2: // union.salary
733 if wire != proto.WireVarint {
734 return true, proto.ErrInternalBadWireType
735 }
736 x, err := b.DecodeVarint()
737 m.Union = &MsgWithOneof_Salary{int64(x)}
738 return true, err
739 case 3: // union.Country
740 if wire != proto.WireBytes {
741 return true, proto.ErrInternalBadWireType
742 }
743 x, err := b.DecodeStringBytes()
744 m.Union = &MsgWithOneof_Country{x}
745 return true, err
746 case 4: // union.home_address
747 if wire != proto.WireBytes {
748 return true, proto.ErrInternalBadWireType
749 }
750 x, err := b.DecodeStringBytes()
751 m.Union = &MsgWithOneof_HomeAddress{x}
752 return true, err
753 case 5: // union.msg_with_required
754 if wire != proto.WireBytes {
755 return true, proto.ErrInternalBadWireType
756 }
757 msg := new(MsgWithRequired)
758 err := b.DecodeMessage(msg)
759 m.Union = &MsgWithOneof_MsgWithRequired{msg}
760 return true, err
761 default:
762 return false, nil
763 }
764 }
765
766 func _MsgWithOneof_OneofSizer(msg proto.Message) (n int) {
767 m := msg.(*MsgWithOneof)
768 // union
769 switch x := m.Union.(type) {
770 case *MsgWithOneof_Title:
771 n += 1 // tag and wire
772 n += proto.SizeVarint(uint64(len(x.Title)))
773 n += len(x.Title)
774 case *MsgWithOneof_Salary:
775 n += 1 // tag and wire
776 n += proto.SizeVarint(uint64(x.Salary))
777 case *MsgWithOneof_Country:
778 n += 1 // tag and wire
779 n += proto.SizeVarint(uint64(len(x.Country)))
780 n += len(x.Country)
781 case *MsgWithOneof_HomeAddress:
782 n += 1 // tag and wire
783 n += proto.SizeVarint(uint64(len(x.HomeAddress)))
784 n += len(x.HomeAddress)
785 case *MsgWithOneof_MsgWithRequired:
786 s := proto.Size(x.MsgWithRequired)
787 n += 1 // tag and wire
788 n += proto.SizeVarint(uint64(s))
789 n += s
790 case nil:
791 default:
792 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
793 }
794 return n
795704 }
796705
797706 type Real struct {
806715 func (m *Real) String() string { return proto.CompactTextString(m) }
807716 func (*Real) ProtoMessage() {}
808717 func (*Real) Descriptor() ([]byte, []int) {
809 return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{6}
718 return fileDescriptor_e97c739a0ce14cc6, []int{6}
810719 }
811720
812721 var extRange_Real = []proto.ExtensionRange{
816725 func (*Real) ExtensionRangeArray() []proto.ExtensionRange {
817726 return extRange_Real
818727 }
728
819729 func (m *Real) XXX_Unmarshal(b []byte) error {
820730 return xxx_messageInfo_Real.Unmarshal(m, b)
821731 }
822732 func (m *Real) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
823733 return xxx_messageInfo_Real.Marshal(b, m, deterministic)
824734 }
825 func (dst *Real) XXX_Merge(src proto.Message) {
826 xxx_messageInfo_Real.Merge(dst, src)
735 func (m *Real) XXX_Merge(src proto.Message) {
736 xxx_messageInfo_Real.Merge(m, src)
827737 }
828738 func (m *Real) XXX_Size() int {
829739 return xxx_messageInfo_Real.Size(m)
853763 func (m *Complex) String() string { return proto.CompactTextString(m) }
854764 func (*Complex) ProtoMessage() {}
855765 func (*Complex) Descriptor() ([]byte, []int) {
856 return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{7}
766 return fileDescriptor_e97c739a0ce14cc6, []int{7}
857767 }
858768
859769 var extRange_Complex = []proto.ExtensionRange{
863773 func (*Complex) ExtensionRangeArray() []proto.ExtensionRange {
864774 return extRange_Complex
865775 }
776
866777 func (m *Complex) XXX_Unmarshal(b []byte) error {
867778 return xxx_messageInfo_Complex.Unmarshal(m, b)
868779 }
869780 func (m *Complex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
870781 return xxx_messageInfo_Complex.Marshal(b, m, deterministic)
871782 }
872 func (dst *Complex) XXX_Merge(src proto.Message) {
873 xxx_messageInfo_Complex.Merge(dst, src)
783 func (m *Complex) XXX_Merge(src proto.Message) {
784 xxx_messageInfo_Complex.Merge(m, src)
874785 }
875786 func (m *Complex) XXX_Size() int {
876787 return xxx_messageInfo_Complex.Size(m)
893804 ExtensionType: (*Complex)(nil),
894805 Field: 123,
895806 Name: "jsonpb.Complex.real_extension",
896 Tag: "bytes,123,opt,name=real_extension,json=realExtension",
807 Tag: "bytes,123,opt,name=real_extension",
897808 Filename: "test_objects.proto",
898809 }
899810
922833 func (m *KnownTypes) String() string { return proto.CompactTextString(m) }
923834 func (*KnownTypes) ProtoMessage() {}
924835 func (*KnownTypes) Descriptor() ([]byte, []int) {
925 return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{8}
926 }
836 return fileDescriptor_e97c739a0ce14cc6, []int{8}
837 }
838
927839 func (m *KnownTypes) XXX_Unmarshal(b []byte) error {
928840 return xxx_messageInfo_KnownTypes.Unmarshal(m, b)
929841 }
930842 func (m *KnownTypes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
931843 return xxx_messageInfo_KnownTypes.Marshal(b, m, deterministic)
932844 }
933 func (dst *KnownTypes) XXX_Merge(src proto.Message) {
934 xxx_messageInfo_KnownTypes.Merge(dst, src)
845 func (m *KnownTypes) XXX_Merge(src proto.Message) {
846 xxx_messageInfo_KnownTypes.Merge(m, src)
935847 }
936848 func (m *KnownTypes) XXX_Size() int {
937849 return xxx_messageInfo_KnownTypes.Size(m)
1059971 func (m *MsgWithRequired) String() string { return proto.CompactTextString(m) }
1060972 func (*MsgWithRequired) ProtoMessage() {}
1061973 func (*MsgWithRequired) Descriptor() ([]byte, []int) {
1062 return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{9}
1063 }
974 return fileDescriptor_e97c739a0ce14cc6, []int{9}
975 }
976
1064977 func (m *MsgWithRequired) XXX_Unmarshal(b []byte) error {
1065978 return xxx_messageInfo_MsgWithRequired.Unmarshal(m, b)
1066979 }
1067980 func (m *MsgWithRequired) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
1068981 return xxx_messageInfo_MsgWithRequired.Marshal(b, m, deterministic)
1069982 }
1070 func (dst *MsgWithRequired) XXX_Merge(src proto.Message) {
1071 xxx_messageInfo_MsgWithRequired.Merge(dst, src)
983 func (m *MsgWithRequired) XXX_Merge(src proto.Message) {
984 xxx_messageInfo_MsgWithRequired.Merge(m, src)
1072985 }
1073986 func (m *MsgWithRequired) XXX_Size() int {
1074987 return xxx_messageInfo_MsgWithRequired.Size(m)
10991012 func (m *MsgWithIndirectRequired) String() string { return proto.CompactTextString(m) }
11001013 func (*MsgWithIndirectRequired) ProtoMessage() {}
11011014 func (*MsgWithIndirectRequired) Descriptor() ([]byte, []int) {
1102 return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{10}
1103 }
1015 return fileDescriptor_e97c739a0ce14cc6, []int{10}
1016 }
1017
11041018 func (m *MsgWithIndirectRequired) XXX_Unmarshal(b []byte) error {
11051019 return xxx_messageInfo_MsgWithIndirectRequired.Unmarshal(m, b)
11061020 }
11071021 func (m *MsgWithIndirectRequired) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
11081022 return xxx_messageInfo_MsgWithIndirectRequired.Marshal(b, m, deterministic)
11091023 }
1110 func (dst *MsgWithIndirectRequired) XXX_Merge(src proto.Message) {
1111 xxx_messageInfo_MsgWithIndirectRequired.Merge(dst, src)
1024 func (m *MsgWithIndirectRequired) XXX_Merge(src proto.Message) {
1025 xxx_messageInfo_MsgWithIndirectRequired.Merge(m, src)
11121026 }
11131027 func (m *MsgWithIndirectRequired) XXX_Size() int {
11141028 return xxx_messageInfo_MsgWithIndirectRequired.Size(m)
11511065 func (m *MsgWithRequiredBytes) String() string { return proto.CompactTextString(m) }
11521066 func (*MsgWithRequiredBytes) ProtoMessage() {}
11531067 func (*MsgWithRequiredBytes) Descriptor() ([]byte, []int) {
1154 return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{11}
1155 }
1068 return fileDescriptor_e97c739a0ce14cc6, []int{11}
1069 }
1070
11561071 func (m *MsgWithRequiredBytes) XXX_Unmarshal(b []byte) error {
11571072 return xxx_messageInfo_MsgWithRequiredBytes.Unmarshal(m, b)
11581073 }
11591074 func (m *MsgWithRequiredBytes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
11601075 return xxx_messageInfo_MsgWithRequiredBytes.Marshal(b, m, deterministic)
11611076 }
1162 func (dst *MsgWithRequiredBytes) XXX_Merge(src proto.Message) {
1163 xxx_messageInfo_MsgWithRequiredBytes.Merge(dst, src)
1077 func (m *MsgWithRequiredBytes) XXX_Merge(src proto.Message) {
1078 xxx_messageInfo_MsgWithRequiredBytes.Merge(m, src)
11641079 }
11651080 func (m *MsgWithRequiredBytes) XXX_Size() int {
11661081 return xxx_messageInfo_MsgWithRequiredBytes.Size(m)
11891104 func (m *MsgWithRequiredWKT) String() string { return proto.CompactTextString(m) }
11901105 func (*MsgWithRequiredWKT) ProtoMessage() {}
11911106 func (*MsgWithRequiredWKT) Descriptor() ([]byte, []int) {
1192 return fileDescriptor_test_objects_a4d3e593ea3c686f, []int{12}
1193 }
1107 return fileDescriptor_e97c739a0ce14cc6, []int{12}
1108 }
1109
11941110 func (m *MsgWithRequiredWKT) XXX_Unmarshal(b []byte) error {
11951111 return xxx_messageInfo_MsgWithRequiredWKT.Unmarshal(m, b)
11961112 }
11971113 func (m *MsgWithRequiredWKT) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
11981114 return xxx_messageInfo_MsgWithRequiredWKT.Marshal(b, m, deterministic)
11991115 }
1200 func (dst *MsgWithRequiredWKT) XXX_Merge(src proto.Message) {
1201 xxx_messageInfo_MsgWithRequiredWKT.Merge(dst, src)
1116 func (m *MsgWithRequiredWKT) XXX_Merge(src proto.Message) {
1117 xxx_messageInfo_MsgWithRequiredWKT.Merge(m, src)
12021118 }
12031119 func (m *MsgWithRequiredWKT) XXX_Size() int {
12041120 return xxx_messageInfo_MsgWithRequiredWKT.Size(m)
12351151 }
12361152
12371153 func init() {
1154 proto.RegisterEnum("jsonpb.Widget_Color", Widget_Color_name, Widget_Color_value)
12381155 proto.RegisterType((*Simple)(nil), "jsonpb.Simple")
12391156 proto.RegisterType((*NonFinites)(nil), "jsonpb.NonFinites")
12401157 proto.RegisterType((*Repeats)(nil), "jsonpb.Repeats")
12441161 proto.RegisterMapType((map[int64]string)(nil), "jsonpb.Maps.MInt64StrEntry")
12451162 proto.RegisterType((*MsgWithOneof)(nil), "jsonpb.MsgWithOneof")
12461163 proto.RegisterType((*Real)(nil), "jsonpb.Real")
1164 proto.RegisterExtension(E_Complex_RealExtension)
12471165 proto.RegisterType((*Complex)(nil), "jsonpb.Complex")
12481166 proto.RegisterType((*KnownTypes)(nil), "jsonpb.KnownTypes")
12491167 proto.RegisterType((*MsgWithRequired)(nil), "jsonpb.MsgWithRequired")
12511169 proto.RegisterMapType((map[string]*MsgWithRequired)(nil), "jsonpb.MsgWithIndirectRequired.MapFieldEntry")
12521170 proto.RegisterType((*MsgWithRequiredBytes)(nil), "jsonpb.MsgWithRequiredBytes")
12531171 proto.RegisterType((*MsgWithRequiredWKT)(nil), "jsonpb.MsgWithRequiredWKT")
1254 proto.RegisterEnum("jsonpb.Widget_Color", Widget_Color_name, Widget_Color_value)
1255 proto.RegisterExtension(E_Complex_RealExtension)
12561172 proto.RegisterExtension(E_Name)
12571173 proto.RegisterExtension(E_Extm)
12581174 }
12591175
1260 func init() { proto.RegisterFile("test_objects.proto", fileDescriptor_test_objects_a4d3e593ea3c686f) }
1261
1262 var fileDescriptor_test_objects_a4d3e593ea3c686f = []byte{
1176 func init() { proto.RegisterFile("test_objects.proto", fileDescriptor_e97c739a0ce14cc6) }
1177
1178 var fileDescriptor_e97c739a0ce14cc6 = []byte{
12631179 // 1460 bytes of a gzipped FileDescriptorProto
12641180 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0xdd, 0x72, 0xdb, 0x44,
12651181 0x14, 0x8e, 0x24, 0xcb, 0xb6, 0x8e, 0xf3, 0xd7, 0x6d, 0xda, 0x2a, 0xa1, 0x14, 0x8d, 0x5b, 0x8a,
6666 if err := proto.SetExtension(cloneTestMessage, pb.E_Ext_More, ext); err != nil {
6767 panic("SetExtension: " + err.Error())
6868 }
69 if err := proto.SetExtension(cloneTestMessage, pb.E_Ext_Text, proto.String("hello")); err != nil {
70 panic("SetExtension: " + err.Error())
71 }
72 if err := proto.SetExtension(cloneTestMessage, pb.E_Greeting, []string{"one", "two"}); err != nil {
73 panic("SetExtension: " + err.Error())
74 }
6975 }
7076
7177 func TestClone(t *testing.T) {
78 // Create a clone using a marshal/unmarshal roundtrip.
79 vanilla := new(pb.MyMessage)
80 b, err := proto.Marshal(cloneTestMessage)
81 if err != nil {
82 t.Errorf("unexpected Marshal error: %v", err)
83 }
84 if err := proto.Unmarshal(b, vanilla); err != nil {
85 t.Errorf("unexpected Unarshal error: %v", err)
86 }
87
88 // Create a clone using Clone and verify that it is equal to the original.
7289 m := proto.Clone(cloneTestMessage).(*pb.MyMessage)
7390 if !proto.Equal(m, cloneTestMessage) {
7491 t.Fatalf("Clone(%v) = %v", cloneTestMessage, m)
7592 }
7693
77 // Verify it was a deep copy.
94 // Mutate the clone, which should not affect the original.
95 x1, err := proto.GetExtension(m, pb.E_Ext_More)
96 if err != nil {
97 t.Errorf("unexpected GetExtension(%v) error: %v", pb.E_Ext_More.Name, err)
98 }
99 x2, err := proto.GetExtension(m, pb.E_Ext_Text)
100 if err != nil {
101 t.Errorf("unexpected GetExtension(%v) error: %v", pb.E_Ext_Text.Name, err)
102 }
103 x3, err := proto.GetExtension(m, pb.E_Greeting)
104 if err != nil {
105 t.Errorf("unexpected GetExtension(%v) error: %v", pb.E_Greeting.Name, err)
106 }
78107 *m.Inner.Port++
79 if proto.Equal(m, cloneTestMessage) {
80 t.Error("Mutating clone changed the original")
81 }
82 // Byte fields and repeated fields should be copied.
83 if &m.Pet[0] == &cloneTestMessage.Pet[0] {
84 t.Error("Pet: repeated field not copied")
85 }
86 if &m.Others[0] == &cloneTestMessage.Others[0] {
87 t.Error("Others: repeated field not copied")
88 }
89 if &m.Others[0].Value[0] == &cloneTestMessage.Others[0].Value[0] {
90 t.Error("Others[0].Value: bytes field not copied")
91 }
92 if &m.RepBytes[0] == &cloneTestMessage.RepBytes[0] {
93 t.Error("RepBytes: repeated field not copied")
94 }
95 if &m.RepBytes[0][0] == &cloneTestMessage.RepBytes[0][0] {
96 t.Error("RepBytes[0]: bytes field not copied")
108 *(x1.(*pb.Ext)).Data = "blah blah"
109 *(x2.(*string)) = "goodbye"
110 x3.([]string)[0] = "zero"
111 if !proto.Equal(cloneTestMessage, vanilla) {
112 t.Fatalf("mutation on original detected:\ngot %v\nwant %v", cloneTestMessage, vanilla)
97113 }
98114 }
99115
185185 if b&0x80 == 0 {
186186 goto done
187187 }
188 // x -= 0x80 << 63 // Always zero.
189188
190189 return 0, errOverflow
191190
0 // Go support for Protocol Buffers - Google's data interchange format
1 //
2 // Copyright 2018 The Go Authors. All rights reserved.
3 // https://github.com/golang/protobuf
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
7 // met:
8 //
9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 // * Redistributions in binary form must reproduce the above
12 // copyright notice, this list of conditions and the following disclaimer
13 // in the documentation and/or other materials provided with the
14 // distribution.
15 // * Neither the name of Google Inc. nor the names of its
16 // contributors may be used to endorse or promote products derived from
17 // this software without specific prior written permission.
18 //
19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
31 package proto
32
33 import "errors"
34
35 // Deprecated: do not use.
36 type Stats struct{ Emalloc, Dmalloc, Encode, Decode, Chit, Cmiss, Size uint64 }
37
38 // Deprecated: do not use.
39 func GetStats() Stats { return Stats{} }
40
41 // Deprecated: do not use.
42 func MarshalMessageSet(interface{}) ([]byte, error) {
43 return nil, errors.New("proto: not implemented")
44 }
45
46 // Deprecated: do not use.
47 func UnmarshalMessageSet([]byte, interface{}) error {
48 return errors.New("proto: not implemented")
49 }
50
51 // Deprecated: do not use.
52 func MarshalMessageSetJSON(interface{}) ([]byte, error) {
53 return nil, errors.New("proto: not implemented")
54 }
55
56 // Deprecated: do not use.
57 func UnmarshalMessageSetJSON([]byte, interface{}) error {
58 return errors.New("proto: not implemented")
59 }
60
61 // Deprecated: do not use.
62 func RegisterMessageSetType(Message, int32, string) {}
245245 return false
246246 }
247247
248 m1, m2 := e1.value, e2.value
248 m1 := extensionAsLegacyType(e1.value)
249 m2 := extensionAsLegacyType(e2.value)
249250
250251 if m1 == nil && m2 == nil {
251252 // Both have only encoded form.
184184 // extension will have only enc set. When such an extension is
185185 // accessed using GetExtension (or GetExtensions) desc and value
186186 // will be set.
187 desc *ExtensionDesc
187 desc *ExtensionDesc
188
189 // value is a concrete value for the extension field. Let the type of
190 // desc.ExtensionType be the "API type" and the type of Extension.value
191 // be the "storage type". The API type and storage type are the same except:
192 // * For scalars (except []byte), the API type uses *T,
193 // while the storage type uses T.
194 // * For repeated fields, the API type uses []T, while the storage type
195 // uses *[]T.
196 //
197 // The reason for the divergence is so that the storage type more naturally
198 // matches what is expected of when retrieving the values through the
199 // protobuf reflection APIs.
200 //
201 // The value may only be populated if desc is also populated.
188202 value interface{}
189 enc []byte
203
204 // enc is the raw bytes for the extension field.
205 enc []byte
190206 }
191207
192208 // SetRawExtension is for testing only.
333349 // descriptors with the same field number.
334350 return nil, errors.New("proto: descriptor conflict")
335351 }
336 return e.value, nil
352 return extensionAsLegacyType(e.value), nil
337353 }
338354
339355 if extension.ExtensionType == nil {
348364
349365 // Remember the decoded version and drop the encoded version.
350366 // That way it is safe to mutate what we return.
351 e.value = v
367 e.value = extensionAsStorageType(v)
352368 e.desc = extension
353369 e.enc = nil
354370 emap[extension.Field] = e
355 return e.value, nil
371 return extensionAsLegacyType(e.value), nil
356372 }
357373
358374 // defaultExtensionValue returns the default value for extension.
487503 }
488504 typ := reflect.TypeOf(extension.ExtensionType)
489505 if typ != reflect.TypeOf(value) {
490 return errors.New("proto: bad extension value type")
506 return fmt.Errorf("proto: bad extension value type. got: %T, want: %T", value, extension.ExtensionType)
491507 }
492508 // nil extension values need to be caught early, because the
493509 // encoder can't distinguish an ErrNil due to a nil extension
499515 }
500516
501517 extmap := epb.extensionsWrite()
502 extmap[extension.Field] = Extension{desc: extension, value: value}
518 extmap[extension.Field] = Extension{desc: extension, value: extensionAsStorageType(value)}
503519 return nil
504520 }
505521
540556 func RegisteredExtensions(pb Message) map[int32]*ExtensionDesc {
541557 return extensionMaps[reflect.TypeOf(pb).Elem()]
542558 }
559
560 // extensionAsLegacyType converts an value in the storage type as the API type.
561 // See Extension.value.
562 func extensionAsLegacyType(v interface{}) interface{} {
563 switch rv := reflect.ValueOf(v); rv.Kind() {
564 case reflect.Bool, reflect.Int32, reflect.Int64, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64, reflect.String:
565 // Represent primitive types as a pointer to the value.
566 rv2 := reflect.New(rv.Type())
567 rv2.Elem().Set(rv)
568 v = rv2.Interface()
569 case reflect.Ptr:
570 // Represent slice types as the value itself.
571 switch rv.Type().Elem().Kind() {
572 case reflect.Slice:
573 if rv.IsNil() {
574 v = reflect.Zero(rv.Type().Elem()).Interface()
575 } else {
576 v = rv.Elem().Interface()
577 }
578 }
579 }
580 return v
581 }
582
583 // extensionAsStorageType converts an value in the API type as the storage type.
584 // See Extension.value.
585 func extensionAsStorageType(v interface{}) interface{} {
586 switch rv := reflect.ValueOf(v); rv.Kind() {
587 case reflect.Ptr:
588 // Represent slice types as the value itself.
589 switch rv.Type().Elem().Kind() {
590 case reflect.Bool, reflect.Int32, reflect.Int64, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64, reflect.String:
591 if rv.IsNil() {
592 v = reflect.Zero(rv.Type().Elem()).Interface()
593 } else {
594 v = rv.Elem().Interface()
595 }
596 }
597 case reflect.Slice:
598 // Represent slice types as a pointer to the value.
599 if rv.Type().Elem().Kind() != reflect.Uint8 {
600 rv2 := reflect.New(rv.Type())
601 rv2.Elem().Set(rv)
602 v = rv2.Interface()
603 }
604 }
605 return v
606 }
3737 "reflect"
3838 "sort"
3939 "strings"
40 "sync"
4041 "testing"
4142
4243 "github.com/golang/protobuf/proto"
4344 pb "github.com/golang/protobuf/proto/test_proto"
44 "golang.org/x/sync/errgroup"
4545 )
4646
4747 func TestGetExtensionsWithMissingExtensions(t *testing.T) {
670670 // GetExtension will decode it lazily. Make sure this does
671671 // not race against Marshal.
672672
673 var g errgroup.Group
673 wg := sync.WaitGroup{}
674 errs := make(chan error, 3)
674675 for n := 3; n > 0; n-- {
675 g.Go(func() error {
676 wg.Add(1)
677 go func() {
678 defer wg.Done()
676679 _, err := proto.Marshal(m)
677 return err
678 })
679 g.Go(func() error {
680 _, err := proto.GetExtension(m, pb.E_Ext_More)
681 return err
682 })
683 }
684 if err := g.Wait(); err != nil {
685 t.Fatal(err)
686 }
687 }
680 errs <- err
681 }()
682 }
683 wg.Wait()
684 close(errs)
685
686 for err = range errs {
687 if err != nil {
688 t.Fatal(err)
689 }
690 }
691 }
340340 ProtoMessage()
341341 }
342342
343 // Stats records allocation details about the protocol buffer encoders
344 // and decoders. Useful for tuning the library itself.
345 type Stats struct {
346 Emalloc uint64 // mallocs in encode
347 Dmalloc uint64 // mallocs in decode
348 Encode uint64 // number of encodes
349 Decode uint64 // number of decodes
350 Chit uint64 // number of cache hits
351 Cmiss uint64 // number of cache misses
352 Size uint64 // number of sizes
353 }
354
355 // Set to true to enable stats collection.
356 const collectStats = false
357
358 var stats Stats
359
360 // GetStats returns a copy of the global Stats structure.
361 func GetStats() Stats { return stats }
362
363343 // A Buffer is a buffer manager for marshaling and unmarshaling
364344 // protocol buffers. It may be reused between invocations to
365345 // reduce memory usage. It is not necessary to use a Buffer;
959939 return false
960940 }
961941
962 // ProtoPackageIsVersion2 is referenced from generated protocol buffer files
963 // to assert that that code is compatible with this version of the proto package.
964 const ProtoPackageIsVersion2 = true
965
966 // ProtoPackageIsVersion1 is referenced from generated protocol buffer files
967 // to assert that that code is compatible with this version of the proto package.
968 const ProtoPackageIsVersion1 = true
942 const (
943 // ProtoPackageIsVersion3 is referenced from generated protocol buffer files
944 // to assert that that code is compatible with this version of the proto package.
945 ProtoPackageIsVersion3 = true
946
947 // ProtoPackageIsVersion2 is referenced from generated protocol buffer files
948 // to assert that that code is compatible with this version of the proto package.
949 ProtoPackageIsVersion2 = true
950
951 // ProtoPackageIsVersion1 is referenced from generated protocol buffer files
952 // to assert that that code is compatible with this version of the proto package.
953 ProtoPackageIsVersion1 = true
954 )
969955
970956 // InternalMessageInfo is a type used internally by generated .pb.go files.
971957 // This type is not intended to be used by non-generated code.
3535 */
3636
3737 import (
38 "bytes"
39 "encoding/json"
4038 "errors"
41 "fmt"
42 "reflect"
43 "sort"
44 "sync"
4539 )
4640
4741 // errNoMessageTypeID occurs when a protocol buffer does not have a message type ID.
144138 return buf[i+1:]
145139 }
146140
147 // MarshalMessageSet encodes the extension map represented by m in the message set wire format.
148 // It is called by generated Marshal methods on protocol buffer messages with the message_set_wire_format option.
149 func MarshalMessageSet(exts interface{}) ([]byte, error) {
150 return marshalMessageSet(exts, false)
151 }
152
153 // marshaMessageSet implements above function, with the opt to turn on / off deterministic during Marshal.
154 func marshalMessageSet(exts interface{}, deterministic bool) ([]byte, error) {
155 switch exts := exts.(type) {
156 case *XXX_InternalExtensions:
157 var u marshalInfo
158 siz := u.sizeMessageSet(exts)
159 b := make([]byte, 0, siz)
160 return u.appendMessageSet(b, exts, deterministic)
161
162 case map[int32]Extension:
163 // This is an old-style extension map.
164 // Wrap it in a new-style XXX_InternalExtensions.
165 ie := XXX_InternalExtensions{
166 p: &struct {
167 mu sync.Mutex
168 extensionMap map[int32]Extension
169 }{
170 extensionMap: exts,
171 },
172 }
173
174 var u marshalInfo
175 siz := u.sizeMessageSet(&ie)
176 b := make([]byte, 0, siz)
177 return u.appendMessageSet(b, &ie, deterministic)
178
179 default:
180 return nil, errors.New("proto: not an extension map")
181 }
182 }
183
184 // UnmarshalMessageSet decodes the extension map encoded in buf in the message set wire format.
141 // unmarshalMessageSet decodes the extension map encoded in buf in the message set wire format.
185142 // It is called by Unmarshal methods on protocol buffer messages with the message_set_wire_format option.
186 func UnmarshalMessageSet(buf []byte, exts interface{}) error {
143 func unmarshalMessageSet(buf []byte, exts interface{}) error {
187144 var m map[int32]Extension
188145 switch exts := exts.(type) {
189146 case *XXX_InternalExtensions:
221178 }
222179 return nil
223180 }
224
225 // MarshalMessageSetJSON encodes the extension map represented by m in JSON format.
226 // It is called by generated MarshalJSON methods on protocol buffer messages with the message_set_wire_format option.
227 func MarshalMessageSetJSON(exts interface{}) ([]byte, error) {
228 var m map[int32]Extension
229 switch exts := exts.(type) {
230 case *XXX_InternalExtensions:
231 var mu sync.Locker
232 m, mu = exts.extensionsRead()
233 if m != nil {
234 // Keep the extensions map locked until we're done marshaling to prevent
235 // races between marshaling and unmarshaling the lazily-{en,de}coded
236 // values.
237 mu.Lock()
238 defer mu.Unlock()
239 }
240 case map[int32]Extension:
241 m = exts
242 default:
243 return nil, errors.New("proto: not an extension map")
244 }
245 var b bytes.Buffer
246 b.WriteByte('{')
247
248 // Process the map in key order for deterministic output.
249 ids := make([]int32, 0, len(m))
250 for id := range m {
251 ids = append(ids, id)
252 }
253 sort.Sort(int32Slice(ids)) // int32Slice defined in text.go
254
255 for i, id := range ids {
256 ext := m[id]
257 msd, ok := messageSetMap[id]
258 if !ok {
259 // Unknown type; we can't render it, so skip it.
260 continue
261 }
262
263 if i > 0 && b.Len() > 1 {
264 b.WriteByte(',')
265 }
266
267 fmt.Fprintf(&b, `"[%s]":`, msd.name)
268
269 x := ext.value
270 if x == nil {
271 x = reflect.New(msd.t.Elem()).Interface()
272 if err := Unmarshal(ext.enc, x.(Message)); err != nil {
273 return nil, err
274 }
275 }
276 d, err := json.Marshal(x)
277 if err != nil {
278 return nil, err
279 }
280 b.Write(d)
281 }
282 b.WriteByte('}')
283 return b.Bytes(), nil
284 }
285
286 // UnmarshalMessageSetJSON decodes the extension map encoded in buf in JSON format.
287 // It is called by generated UnmarshalJSON methods on protocol buffer messages with the message_set_wire_format option.
288 func UnmarshalMessageSetJSON(buf []byte, exts interface{}) error {
289 // Common-case fast path.
290 if len(buf) == 0 || bytes.Equal(buf, []byte("{}")) {
291 return nil
292 }
293
294 // This is fairly tricky, and it's not clear that it is needed.
295 return errors.New("TODO: UnmarshalMessageSetJSON not yet implemented")
296 }
297
298 // A global registry of types that can be used in a MessageSet.
299
300 var messageSetMap = make(map[int32]messageSetDesc)
301
302 type messageSetDesc struct {
303 t reflect.Type // pointer to struct
304 name string
305 }
306
307 // RegisterMessageSetType is called from the generated code.
308 func RegisterMessageSetType(m Message, fieldNum int32, name string) {
309 messageSetMap[fieldNum] = messageSetDesc{
310 t: reflect.TypeOf(m),
311 name: name,
312 }
313 }
2828 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2929 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3030
31 package proto
31 package proto_test
3232
3333 import (
3434 "bytes"
35 "fmt"
3536 "testing"
37
38 "github.com/golang/protobuf/proto"
39 . "github.com/golang/protobuf/proto/test_proto"
3640 )
3741
3842 func TestUnmarshalMessageSetWithDuplicate(t *testing.T) {
39 // Check that a repeated message set entry will be concatenated.
40 in := &messageSet{
41 Item: []*_MessageSet_Item{
42 {TypeId: Int32(12345), Message: []byte("hoo")},
43 {TypeId: Int32(12345), Message: []byte("hah")},
44 },
43 /*
44 Message{
45 Tag{1, StartGroup},
46 Message{
47 Tag{2, Varint}, Uvarint(12345),
48 Tag{3, Bytes}, Bytes("hoo"),
49 },
50 Tag{1, EndGroup},
51 Tag{1, StartGroup},
52 Message{
53 Tag{2, Varint}, Uvarint(12345),
54 Tag{3, Bytes}, Bytes("hah"),
55 },
56 Tag{1, EndGroup},
57 }
58 */
59 var in []byte
60 fmt.Sscanf("0b10b9601a03686f6f0c0b10b9601a036861680c", "%x", &in)
61
62 /*
63 Message{
64 Tag{1, StartGroup},
65 Message{
66 Tag{2, Varint}, Uvarint(12345),
67 Tag{3, Bytes}, Bytes("hoohah"),
68 },
69 Tag{1, EndGroup},
70 }
71 */
72 var want []byte
73 fmt.Sscanf("0b10b9601a06686f6f6861680c", "%x", &want)
74
75 var m MyMessageSet
76 if err := proto.Unmarshal(in, &m); err != nil {
77 t.Fatalf("unexpected Unmarshal error: %v", err)
4578 }
46 b, err := Marshal(in)
79 got, err := proto.Marshal(&m)
4780 if err != nil {
48 t.Fatalf("Marshal: %v", err)
81 t.Fatalf("unexpected Marshal error: %v", err)
4982 }
50 t.Logf("Marshaled bytes: %q", b)
5183
52 var extensions XXX_InternalExtensions
53 if err := UnmarshalMessageSet(b, &extensions); err != nil {
54 t.Fatalf("UnmarshalMessageSet: %v", err)
55 }
56 ext, ok := extensions.p.extensionMap[12345]
57 if !ok {
58 t.Fatalf("Didn't retrieve extension 12345; map is %v", extensions.p.extensionMap)
59 }
60 // Skip wire type/field number and length varints.
61 got := skipVarint(skipVarint(ext.enc))
62 if want := []byte("hoohah"); !bytes.Equal(got, want) {
63 t.Errorf("Combined extension is %q, want %q", got, want)
84 if !bytes.Equal(got, want) {
85 t.Errorf("output mismatch:\ngot %x\nwant %x", got, want)
6486 }
6587 }
66
67 func TestMarshalMessageSetJSON_UnknownType(t *testing.T) {
68 extMap := map[int32]Extension{12345: Extension{}}
69 got, err := MarshalMessageSetJSON(extMap)
70 if err != nil {
71 t.Fatalf("MarshalMessageSetJSON: %v", err)
72 }
73 if want := []byte("{}"); !bytes.Equal(got, want) {
74 t.Errorf("MarshalMessageSetJSON(%v) = %q, want %q", extMap, got, want)
75 }
76 }
7878
7979 // toAddrPointer converts an interface to a pointer that points to
8080 // the interface data.
81 func toAddrPointer(i *interface{}, isptr bool) pointer {
81 func toAddrPointer(i *interface{}, isptr, deref bool) pointer {
8282 v := reflect.ValueOf(*i)
8383 u := reflect.New(v.Type())
8484 u.Elem().Set(v)
85 if deref {
86 u = u.Elem()
87 }
8588 return pointer{v: u}
8689 }
8790
8484
8585 // toAddrPointer converts an interface to a pointer that points to
8686 // the interface data.
87 func toAddrPointer(i *interface{}, isptr bool) pointer {
87 func toAddrPointer(i *interface{}, isptr, deref bool) (p pointer) {
8888 // Super-tricky - read or get the address of data word of interface value.
8989 if isptr {
9090 // The interface is of pointer type, thus it is a direct interface.
9191 // The data word is the pointer data itself. We take its address.
92 return pointer{p: unsafe.Pointer(uintptr(unsafe.Pointer(i)) + ptrSize)}
92 p = pointer{p: unsafe.Pointer(uintptr(unsafe.Pointer(i)) + ptrSize)}
93 } else {
94 // The interface is not of pointer type. The data word is the pointer
95 // to the data.
96 p = pointer{p: (*[2]unsafe.Pointer)(unsafe.Pointer(i))[1]}
9397 }
94 // The interface is not of pointer type. The data word is the pointer
95 // to the data.
96 return pointer{p: (*[2]unsafe.Pointer)(unsafe.Pointer(i))[1]}
98 if deref {
99 p.p = *(*unsafe.Pointer)(p.p)
100 }
101 return p
97102 }
98103
99104 // valToPointer converts v to a pointer. v must be of pointer type.
3737 import (
3838 "fmt"
3939 "log"
40 "os"
4140 "reflect"
4241 "sort"
4342 "strconv"
193192 // "bytes,49,opt,name=foo,def=hello!"
194193 fields := strings.Split(s, ",") // breaks def=, but handled below.
195194 if len(fields) < 2 {
196 fmt.Fprintf(os.Stderr, "proto: tag has too few fields: %q\n", s)
195 log.Printf("proto: tag has too few fields: %q", s)
197196 return
198197 }
199198
213212 p.WireType = WireBytes
214213 // no numeric converter for non-numeric types
215214 default:
216 fmt.Fprintf(os.Stderr, "proto: tag has unknown wire type: %q\n", s)
215 log.Printf("proto: tag has unknown wire type: %q", s)
217216 return
218217 }
219218
333332 sprop, ok := propertiesMap[t]
334333 propertiesMu.RUnlock()
335334 if ok {
336 if collectStats {
337 stats.Chit++
338 }
339335 return sprop
340336 }
341337
345341 return sprop
346342 }
347343
344 type (
345 oneofFuncsIface interface {
346 XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{})
347 }
348 oneofWrappersIface interface {
349 XXX_OneofWrappers() []interface{}
350 }
351 )
352
348353 // getPropertiesLocked requires that propertiesMu is held.
349354 func getPropertiesLocked(t reflect.Type) *StructProperties {
350355 if prop, ok := propertiesMap[t]; ok {
351 if collectStats {
352 stats.Chit++
353 }
354356 return prop
355 }
356 if collectStats {
357 stats.Cmiss++
358357 }
359358
360359 prop := new(StructProperties)
390389 // Re-order prop.order.
391390 sort.Sort(prop)
392391
393 type oneofMessage interface {
394 XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{})
395 }
396 if om, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); ok {
397 var oots []interface{}
398 _, _, _, oots = om.XXX_OneofFuncs()
399
392 var oots []interface{}
393 switch m := reflect.Zero(reflect.PtrTo(t)).Interface().(type) {
394 case oneofFuncsIface:
395 _, _, _, oots = m.XXX_OneofFuncs()
396 case oneofWrappersIface:
397 oots = m.XXX_OneofWrappers()
398 }
399 if len(oots) > 0 {
400400 // Interpret oneof metadata.
401401 prop.OneofTypes = make(map[string]*OneofProperties)
402402 for _, oot := range oots {
22
33 package proto3_proto
44
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
8 import test_proto "github.com/golang/protobuf/proto/test_proto"
9 import any "github.com/golang/protobuf/ptypes/any"
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 test_proto "github.com/golang/protobuf/proto/test_proto"
9 any "github.com/golang/protobuf/ptypes/any"
10 math "math"
11 )
1012
1113 // Reference imports to suppress errors if they are not otherwise used.
1214 var _ = proto.Marshal
1719 // is compatible with the proto package it is being compiled against.
1820 // A compilation error at this line likely means your copy of the
1921 // proto package needs to be updated.
20 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
22 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
2123
2224 type Message_Humour int32
2325
3436 2: "SLAPSTICK",
3537 3: "BILL_BAILEY",
3638 }
39
3740 var Message_Humour_value = map[string]int32{
3841 "UNKNOWN": 0,
3942 "PUNS": 1,
4447 func (x Message_Humour) String() string {
4548 return proto.EnumName(Message_Humour_name, int32(x))
4649 }
50
4751 func (Message_Humour) EnumDescriptor() ([]byte, []int) {
48 return fileDescriptor_proto3_78ae00cd7e6e5e35, []int{0, 0}
52 return fileDescriptor_1c50d9b824d4ac38, []int{0, 0}
4953 }
5054
5155 type Message struct {
7781 func (m *Message) String() string { return proto.CompactTextString(m) }
7882 func (*Message) ProtoMessage() {}
7983 func (*Message) Descriptor() ([]byte, []int) {
80 return fileDescriptor_proto3_78ae00cd7e6e5e35, []int{0}
81 }
84 return fileDescriptor_1c50d9b824d4ac38, []int{0}
85 }
86
8287 func (m *Message) XXX_Unmarshal(b []byte) error {
8388 return xxx_messageInfo_Message.Unmarshal(m, b)
8489 }
8590 func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
8691 return xxx_messageInfo_Message.Marshal(b, m, deterministic)
8792 }
88 func (dst *Message) XXX_Merge(src proto.Message) {
89 xxx_messageInfo_Message.Merge(dst, src)
93 func (m *Message) XXX_Merge(src proto.Message) {
94 xxx_messageInfo_Message.Merge(m, src)
9095 }
9196 func (m *Message) XXX_Size() int {
9297 return xxx_messageInfo_Message.Size(m)
242247 func (m *Nested) String() string { return proto.CompactTextString(m) }
243248 func (*Nested) ProtoMessage() {}
244249 func (*Nested) Descriptor() ([]byte, []int) {
245 return fileDescriptor_proto3_78ae00cd7e6e5e35, []int{1}
246 }
250 return fileDescriptor_1c50d9b824d4ac38, []int{1}
251 }
252
247253 func (m *Nested) XXX_Unmarshal(b []byte) error {
248254 return xxx_messageInfo_Nested.Unmarshal(m, b)
249255 }
250256 func (m *Nested) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
251257 return xxx_messageInfo_Nested.Marshal(b, m, deterministic)
252258 }
253 func (dst *Nested) XXX_Merge(src proto.Message) {
254 xxx_messageInfo_Nested.Merge(dst, src)
259 func (m *Nested) XXX_Merge(src proto.Message) {
260 xxx_messageInfo_Nested.Merge(m, src)
255261 }
256262 func (m *Nested) XXX_Size() int {
257263 return xxx_messageInfo_Nested.Size(m)
287293 func (m *MessageWithMap) String() string { return proto.CompactTextString(m) }
288294 func (*MessageWithMap) ProtoMessage() {}
289295 func (*MessageWithMap) Descriptor() ([]byte, []int) {
290 return fileDescriptor_proto3_78ae00cd7e6e5e35, []int{2}
291 }
296 return fileDescriptor_1c50d9b824d4ac38, []int{2}
297 }
298
292299 func (m *MessageWithMap) XXX_Unmarshal(b []byte) error {
293300 return xxx_messageInfo_MessageWithMap.Unmarshal(m, b)
294301 }
295302 func (m *MessageWithMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
296303 return xxx_messageInfo_MessageWithMap.Marshal(b, m, deterministic)
297304 }
298 func (dst *MessageWithMap) XXX_Merge(src proto.Message) {
299 xxx_messageInfo_MessageWithMap.Merge(dst, src)
305 func (m *MessageWithMap) XXX_Merge(src proto.Message) {
306 xxx_messageInfo_MessageWithMap.Merge(m, src)
300307 }
301308 func (m *MessageWithMap) XXX_Size() int {
302309 return xxx_messageInfo_MessageWithMap.Size(m)
325332 func (m *IntMap) String() string { return proto.CompactTextString(m) }
326333 func (*IntMap) ProtoMessage() {}
327334 func (*IntMap) Descriptor() ([]byte, []int) {
328 return fileDescriptor_proto3_78ae00cd7e6e5e35, []int{3}
329 }
335 return fileDescriptor_1c50d9b824d4ac38, []int{3}
336 }
337
330338 func (m *IntMap) XXX_Unmarshal(b []byte) error {
331339 return xxx_messageInfo_IntMap.Unmarshal(m, b)
332340 }
333341 func (m *IntMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
334342 return xxx_messageInfo_IntMap.Marshal(b, m, deterministic)
335343 }
336 func (dst *IntMap) XXX_Merge(src proto.Message) {
337 xxx_messageInfo_IntMap.Merge(dst, src)
344 func (m *IntMap) XXX_Merge(src proto.Message) {
345 xxx_messageInfo_IntMap.Merge(m, src)
338346 }
339347 func (m *IntMap) XXX_Size() int {
340348 return xxx_messageInfo_IntMap.Size(m)
363371 func (m *IntMaps) String() string { return proto.CompactTextString(m) }
364372 func (*IntMaps) ProtoMessage() {}
365373 func (*IntMaps) Descriptor() ([]byte, []int) {
366 return fileDescriptor_proto3_78ae00cd7e6e5e35, []int{4}
367 }
374 return fileDescriptor_1c50d9b824d4ac38, []int{4}
375 }
376
368377 func (m *IntMaps) XXX_Unmarshal(b []byte) error {
369378 return xxx_messageInfo_IntMaps.Unmarshal(m, b)
370379 }
371380 func (m *IntMaps) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
372381 return xxx_messageInfo_IntMaps.Marshal(b, m, deterministic)
373382 }
374 func (dst *IntMaps) XXX_Merge(src proto.Message) {
375 xxx_messageInfo_IntMaps.Merge(dst, src)
383 func (m *IntMaps) XXX_Merge(src proto.Message) {
384 xxx_messageInfo_IntMaps.Merge(m, src)
376385 }
377386 func (m *IntMaps) XXX_Size() int {
378387 return xxx_messageInfo_IntMaps.Size(m)
407416 func (m *TestUTF8) String() string { return proto.CompactTextString(m) }
408417 func (*TestUTF8) ProtoMessage() {}
409418 func (*TestUTF8) Descriptor() ([]byte, []int) {
410 return fileDescriptor_proto3_78ae00cd7e6e5e35, []int{5}
411 }
419 return fileDescriptor_1c50d9b824d4ac38, []int{5}
420 }
421
412422 func (m *TestUTF8) XXX_Unmarshal(b []byte) error {
413423 return xxx_messageInfo_TestUTF8.Unmarshal(m, b)
414424 }
415425 func (m *TestUTF8) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
416426 return xxx_messageInfo_TestUTF8.Marshal(b, m, deterministic)
417427 }
418 func (dst *TestUTF8) XXX_Merge(src proto.Message) {
419 xxx_messageInfo_TestUTF8.Merge(dst, src)
428 func (m *TestUTF8) XXX_Merge(src proto.Message) {
429 xxx_messageInfo_TestUTF8.Merge(m, src)
420430 }
421431 func (m *TestUTF8) XXX_Size() int {
422432 return xxx_messageInfo_TestUTF8.Size(m)
479489 return nil
480490 }
481491
482 // XXX_OneofFuncs is for the internal use of the proto package.
483 func (*TestUTF8) 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{}) {
484 return _TestUTF8_OneofMarshaler, _TestUTF8_OneofUnmarshaler, _TestUTF8_OneofSizer, []interface{}{
492 // XXX_OneofWrappers is for the internal use of the proto package.
493 func (*TestUTF8) XXX_OneofWrappers() []interface{} {
494 return []interface{}{
485495 (*TestUTF8_Field)(nil),
486496 }
487497 }
488498
489 func _TestUTF8_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
490 m := msg.(*TestUTF8)
491 // oneof
492 switch x := m.Oneof.(type) {
493 case *TestUTF8_Field:
494 b.EncodeVarint(3<<3 | proto.WireBytes)
495 b.EncodeStringBytes(x.Field)
496 case nil:
497 default:
498 return fmt.Errorf("TestUTF8.Oneof has unexpected type %T", x)
499 }
500 return nil
501 }
502
503 func _TestUTF8_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
504 m := msg.(*TestUTF8)
505 switch tag {
506 case 3: // oneof.field
507 if wire != proto.WireBytes {
508 return true, proto.ErrInternalBadWireType
509 }
510 x, err := b.DecodeStringBytes()
511 m.Oneof = &TestUTF8_Field{x}
512 return true, err
513 default:
514 return false, nil
515 }
516 }
517
518 func _TestUTF8_OneofSizer(msg proto.Message) (n int) {
519 m := msg.(*TestUTF8)
520 // oneof
521 switch x := m.Oneof.(type) {
522 case *TestUTF8_Field:
523 n += 1 // tag and wire
524 n += proto.SizeVarint(uint64(len(x.Field)))
525 n += len(x.Field)
526 case nil:
527 default:
528 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
529 }
530 return n
531 }
532
533499 func init() {
500 proto.RegisterEnum("proto3_proto.Message_Humour", Message_Humour_name, Message_Humour_value)
534501 proto.RegisterType((*Message)(nil), "proto3_proto.Message")
535502 proto.RegisterMapType((map[string]*test_proto.SubDefaults)(nil), "proto3_proto.Message.Proto2ValueEntry")
536503 proto.RegisterMapType((map[string]string)(nil), "proto3_proto.Message.StringMapEntry")
544511 proto.RegisterType((*TestUTF8)(nil), "proto3_proto.TestUTF8")
545512 proto.RegisterMapType((map[string]int64)(nil), "proto3_proto.TestUTF8.MapKeyEntry")
546513 proto.RegisterMapType((map[int64]string)(nil), "proto3_proto.TestUTF8.MapValueEntry")
547 proto.RegisterEnum("proto3_proto.Message_Humour", Message_Humour_name, Message_Humour_value)
548 }
549
550 func init() { proto.RegisterFile("proto3_proto/proto3.proto", fileDescriptor_proto3_78ae00cd7e6e5e35) }
551
552 var fileDescriptor_proto3_78ae00cd7e6e5e35 = []byte{
514 }
515
516 func init() { proto.RegisterFile("proto3_proto/proto3.proto", fileDescriptor_1c50d9b824d4ac38) }
517
518 var fileDescriptor_1c50d9b824d4ac38 = []byte{
553519 // 896 bytes of a gzipped FileDescriptorProto
554520 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0x6f, 0x6f, 0xdb, 0xb6,
555521 0x13, 0xae, 0x2c, 0xff, 0x91, 0xcf, 0x76, 0xea, 0x1f, 0x7f, 0x6e, 0xc7, 0x7a, 0x1b, 0xa0, 0x79,
3131 package proto
3232
3333 import (
34 "math"
3435 "testing"
3536 )
3637
5051 {128, 2},
5152 {16383, 2},
5253 {16384, 3},
53 {1<<63 - 1, 9},
54 {1 << 63, 10},
54 {math.MaxInt64, 9},
55 {math.MaxInt64 + 1, 10},
5556 }
5657 for _, tc := range testCases {
5758 size := SizeVarint(tc.n)
8686 sizer sizer
8787 marshaler marshaler
8888 isptr bool // elem is pointer typed, thus interface of this type is a direct interface (extension only)
89 deref bool // dereference the pointer before operating on it; implies isptr
8990 }
9091
9192 var (
319320
320321 // get oneof implementers
321322 var oneofImplementers []interface{}
322 if m, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); ok {
323 switch m := reflect.Zero(reflect.PtrTo(t)).Interface().(type) {
324 case oneofFuncsIface:
323325 _, _, _, oneofImplementers = m.XXX_OneofFuncs()
326 case oneofWrappersIface:
327 oneofImplementers = m.XXX_OneofWrappers()
324328 }
325329
326330 n := t.NumField()
406410 panic("tag is not an integer")
407411 }
408412 wt := wiretype(tags[0])
413 if t.Kind() == reflect.Ptr && t.Elem().Kind() != reflect.Struct {
414 t = t.Elem()
415 }
409416 sizer, marshaler := typeMarshaler(t, tags, false, false)
417 var deref bool
418 if t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 {
419 t = reflect.PtrTo(t)
420 deref = true
421 }
410422 e = &marshalElemInfo{
411423 wiretag: uint64(tag)<<3 | wt,
412424 tagsize: SizeVarint(uint64(tag) << 3),
413425 sizer: sizer,
414426 marshaler: marshaler,
415427 isptr: t.Kind() == reflect.Ptr,
428 deref: deref,
416429 }
417430
418431 // update cache
447460
448461 func (fi *marshalFieldInfo) computeOneofFieldInfo(f *reflect.StructField, oneofImplementers []interface{}) {
449462 fi.field = toField(f)
450 fi.wiretag = 1<<31 - 1 // Use a large tag number, make oneofs sorted at the end. This tag will not appear on the wire.
463 fi.wiretag = math.MaxInt32 // Use a large tag number, make oneofs sorted at the end. This tag will not appear on the wire.
451464 fi.isPointer = true
452465 fi.sizer, fi.marshaler = makeOneOfMarshaler(fi, f)
453466 fi.oneofElems = make(map[reflect.Type]*marshalElemInfo)
473486 marshaler: marshaler,
474487 }
475488 }
476 }
477
478 type oneofMessage interface {
479 XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{})
480489 }
481490
482491 // wiretype returns the wire encoding of the type.
23092318 for _, k := range m.MapKeys() {
23102319 ki := k.Interface()
23112320 vi := m.MapIndex(k).Interface()
2312 kaddr := toAddrPointer(&ki, false) // pointer to key
2313 vaddr := toAddrPointer(&vi, valIsPtr) // pointer to value
2321 kaddr := toAddrPointer(&ki, false, false) // pointer to key
2322 vaddr := toAddrPointer(&vi, valIsPtr, false) // pointer to value
23142323 siz := keySizer(kaddr, 1) + valSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1)
23152324 n += siz + SizeVarint(uint64(siz)) + tagsize
23162325 }
23282337 for _, k := range keys {
23292338 ki := k.Interface()
23302339 vi := m.MapIndex(k).Interface()
2331 kaddr := toAddrPointer(&ki, false) // pointer to key
2332 vaddr := toAddrPointer(&vi, valIsPtr) // pointer to value
2340 kaddr := toAddrPointer(&ki, false, false) // pointer to key
2341 vaddr := toAddrPointer(&vi, valIsPtr, false) // pointer to value
23332342 b = appendVarint(b, tag)
23342343 siz := keySizer(kaddr, 1) + valCachedSizer(vaddr, 1) // tag of key = 1 (size=1), tag of val = 2 (size=1)
23352344 b = appendVarint(b, uint64(siz))
23982407 // the last time this function was called.
23992408 ei := u.getExtElemInfo(e.desc)
24002409 v := e.value
2401 p := toAddrPointer(&v, ei.isptr)
2410 p := toAddrPointer(&v, ei.isptr, ei.deref)
24022411 n += ei.sizer(p, ei.tagsize)
24032412 }
24042413 mu.Unlock()
24332442
24342443 ei := u.getExtElemInfo(e.desc)
24352444 v := e.value
2436 p := toAddrPointer(&v, ei.isptr)
2445 p := toAddrPointer(&v, ei.isptr, ei.deref)
24372446 b, err = ei.marshaler(b, p, ei.wiretag, deterministic)
24382447 if !nerr.Merge(err) {
24392448 return b, err
24642473
24652474 ei := u.getExtElemInfo(e.desc)
24662475 v := e.value
2467 p := toAddrPointer(&v, ei.isptr)
2476 p := toAddrPointer(&v, ei.isptr, ei.deref)
24682477 b, err = ei.marshaler(b, p, ei.wiretag, deterministic)
24692478 if !nerr.Merge(err) {
24702479 return b, err
25092518
25102519 ei := u.getExtElemInfo(e.desc)
25112520 v := e.value
2512 p := toAddrPointer(&v, ei.isptr)
2521 p := toAddrPointer(&v, ei.isptr, ei.deref)
25132522 n += ei.sizer(p, 1) // message, tag = 3 (size=1)
25142523 }
25152524 mu.Unlock()
25522561
25532562 ei := u.getExtElemInfo(e.desc)
25542563 v := e.value
2555 p := toAddrPointer(&v, ei.isptr)
2564 p := toAddrPointer(&v, ei.isptr, ei.deref)
25562565 b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic)
25572566 if !nerr.Merge(err) {
25582567 return b, err
25902599
25912600 ei := u.getExtElemInfo(e.desc)
25922601 v := e.value
2593 p := toAddrPointer(&v, ei.isptr)
2602 p := toAddrPointer(&v, ei.isptr, ei.deref)
25942603 b, err = ei.marshaler(b, p, 3<<3|WireBytes, deterministic)
25952604 b = append(b, 1<<3|WireEndGroup)
25962605 if !nerr.Merge(err) {
26202629
26212630 ei := u.getExtElemInfo(e.desc)
26222631 v := e.value
2623 p := toAddrPointer(&v, ei.isptr)
2632 p := toAddrPointer(&v, ei.isptr, ei.deref)
26242633 n += ei.sizer(p, ei.tagsize)
26252634 }
26262635 return n
26552664
26562665 ei := u.getExtElemInfo(e.desc)
26572666 v := e.value
2658 p := toAddrPointer(&v, ei.isptr)
2667 p := toAddrPointer(&v, ei.isptr, ei.deref)
26592668 b, err = ei.marshaler(b, p, ei.wiretag, deterministic)
26602669 if !nerr.Merge(err) {
26612670 return b, err
135135 u.computeUnmarshalInfo()
136136 }
137137 if u.isMessageSet {
138 return UnmarshalMessageSet(b, m.offset(u.extensions).toExtensions())
138 return unmarshalMessageSet(b, m.offset(u.extensions).toExtensions())
139139 }
140140 var reqMask uint64 // bitmask of required fields we've seen.
141141 var errLater error
361361 }
362362
363363 // Find any types associated with oneof fields.
364 // TODO: XXX_OneofFuncs returns more info than we need. Get rid of some of it?
365 fn := reflect.Zero(reflect.PtrTo(t)).MethodByName("XXX_OneofFuncs")
366 if fn.IsValid() {
367 res := fn.Call(nil)[3] // last return value from XXX_OneofFuncs: []interface{}
368 for i := res.Len() - 1; i >= 0; i-- {
369 v := res.Index(i) // interface{}
370 tptr := reflect.ValueOf(v.Interface()).Type() // *Msg_X
371 typ := tptr.Elem() // Msg_X
372
373 f := typ.Field(0) // oneof implementers have one field
374 baseUnmarshal := fieldUnmarshaler(&f)
375 tags := strings.Split(f.Tag.Get("protobuf"), ",")
376 fieldNum, err := strconv.Atoi(tags[1])
377 if err != nil {
378 panic("protobuf tag field not an integer: " + tags[1])
379 }
380 var name string
381 for _, tag := range tags {
382 if strings.HasPrefix(tag, "name=") {
383 name = strings.TrimPrefix(tag, "name=")
384 break
385 }
386 }
387
388 // Find the oneof field that this struct implements.
389 // Might take O(n^2) to process all of the oneofs, but who cares.
390 for _, of := range oneofFields {
391 if tptr.Implements(of.ityp) {
392 // We have found the corresponding interface for this struct.
393 // That lets us know where this struct should be stored
394 // when we encounter it during unmarshaling.
395 unmarshal := makeUnmarshalOneof(typ, of.ityp, baseUnmarshal)
396 u.setTag(fieldNum, of.field, unmarshal, 0, name)
397 }
398 }
399 }
364 var oneofImplementers []interface{}
365 switch m := reflect.Zero(reflect.PtrTo(t)).Interface().(type) {
366 case oneofFuncsIface:
367 _, _, _, oneofImplementers = m.XXX_OneofFuncs()
368 case oneofWrappersIface:
369 oneofImplementers = m.XXX_OneofWrappers()
370 }
371 for _, v := range oneofImplementers {
372 tptr := reflect.TypeOf(v) // *Msg_X
373 typ := tptr.Elem() // Msg_X
374
375 f := typ.Field(0) // oneof implementers have one field
376 baseUnmarshal := fieldUnmarshaler(&f)
377 tags := strings.Split(f.Tag.Get("protobuf"), ",")
378 fieldNum, err := strconv.Atoi(tags[1])
379 if err != nil {
380 panic("protobuf tag field not an integer: " + tags[1])
381 }
382 var name string
383 for _, tag := range tags {
384 if strings.HasPrefix(tag, "name=") {
385 name = strings.TrimPrefix(tag, "name=")
386 break
387 }
388 }
389
390 // Find the oneof field that this struct implements.
391 // Might take O(n^2) to process all of the oneofs, but who cares.
392 for _, of := range oneofFields {
393 if tptr.Implements(of.ityp) {
394 // We have found the corresponding interface for this struct.
395 // That lets us know where this struct should be stored
396 // when we encounter it during unmarshaling.
397 unmarshal := makeUnmarshalOneof(typ, of.ityp, baseUnmarshal)
398 u.setTag(fieldNum, of.field, unmarshal, 0, name)
399 }
400 }
401
400402 }
401403
402404 // Get extension ranges, if any.
403 fn = reflect.Zero(reflect.PtrTo(t)).MethodByName("ExtensionRangeArray")
405 fn := reflect.Zero(reflect.PtrTo(t)).MethodByName("ExtensionRangeArray")
404406 if fn.IsValid() {
405407 if !u.extensions.IsValid() && !u.oldExtensions.IsValid() {
406408 panic("a message with extensions, but no extensions field in " + t.Name())
19471949 // If there is an error, it returns 0,0.
19481950 func decodeVarint(b []byte) (uint64, int) {
19491951 var x, y uint64
1950 if len(b) <= 0 {
1952 if len(b) == 0 {
19511953 goto bad
19521954 }
19531955 x = uint64(b[0])
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: test_proto/test.proto
22
3 package test_proto // import "github.com/golang/protobuf/proto/test_proto"
4
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
3 package test_proto
4
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 math "math"
9 )
810
911 // Reference imports to suppress errors if they are not otherwise used.
1012 var _ = proto.Marshal
1517 // is compatible with the proto package it is being compiled against.
1618 // A compilation error at this line likely means your copy of the
1719 // proto package needs to be updated.
18 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
20 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
1921
2022 type FOO int32
2123
2628 var FOO_name = map[int32]string{
2729 1: "FOO1",
2830 }
31
2932 var FOO_value = map[string]int32{
3033 "FOO1": 1,
3134 }
3538 *p = x
3639 return p
3740 }
41
3842 func (x FOO) String() string {
3943 return proto.EnumName(FOO_name, int32(x))
4044 }
45
4146 func (x *FOO) UnmarshalJSON(data []byte) error {
4247 value, err := proto.UnmarshalJSONEnum(FOO_value, data, "FOO")
4348 if err != nil {
4651 *x = FOO(value)
4752 return nil
4853 }
54
4955 func (FOO) EnumDescriptor() ([]byte, []int) {
50 return fileDescriptor_test_ee9f66cbbebc227c, []int{0}
56 return fileDescriptor_8ca34d01332f1402, []int{0}
5157 }
5258
5359 // An enum, for completeness.
8894 11: "TABLE",
8995 12: "FUNCTION",
9096 }
97
9198 var GoTest_KIND_value = map[string]int32{
9299 "VOID": 0,
93100 "BOOL": 1,
109116 *p = x
110117 return p
111118 }
119
112120 func (x GoTest_KIND) String() string {
113121 return proto.EnumName(GoTest_KIND_name, int32(x))
114122 }
123
115124 func (x *GoTest_KIND) UnmarshalJSON(data []byte) error {
116125 value, err := proto.UnmarshalJSONEnum(GoTest_KIND_value, data, "GoTest_KIND")
117126 if err != nil {
120129 *x = GoTest_KIND(value)
121130 return nil
122131 }
132
123133 func (GoTest_KIND) EnumDescriptor() ([]byte, []int) {
124 return fileDescriptor_test_ee9f66cbbebc227c, []int{2, 0}
134 return fileDescriptor_8ca34d01332f1402, []int{2, 0}
125135 }
126136
127137 type MyMessage_Color int32
137147 1: "GREEN",
138148 2: "BLUE",
139149 }
150
140151 var MyMessage_Color_value = map[string]int32{
141152 "RED": 0,
142153 "GREEN": 1,
148159 *p = x
149160 return p
150161 }
162
151163 func (x MyMessage_Color) String() string {
152164 return proto.EnumName(MyMessage_Color_name, int32(x))
153165 }
166
154167 func (x *MyMessage_Color) UnmarshalJSON(data []byte) error {
155168 value, err := proto.UnmarshalJSONEnum(MyMessage_Color_value, data, "MyMessage_Color")
156169 if err != nil {
159172 *x = MyMessage_Color(value)
160173 return nil
161174 }
175
162176 func (MyMessage_Color) EnumDescriptor() ([]byte, []int) {
163 return fileDescriptor_test_ee9f66cbbebc227c, []int{13, 0}
177 return fileDescriptor_8ca34d01332f1402, []int{13, 0}
164178 }
165179
166180 type DefaultsMessage_DefaultsEnum int32
176190 1: "ONE",
177191 2: "TWO",
178192 }
193
179194 var DefaultsMessage_DefaultsEnum_value = map[string]int32{
180195 "ZERO": 0,
181196 "ONE": 1,
187202 *p = x
188203 return p
189204 }
205
190206 func (x DefaultsMessage_DefaultsEnum) String() string {
191207 return proto.EnumName(DefaultsMessage_DefaultsEnum_name, int32(x))
192208 }
209
193210 func (x *DefaultsMessage_DefaultsEnum) UnmarshalJSON(data []byte) error {
194211 value, err := proto.UnmarshalJSONEnum(DefaultsMessage_DefaultsEnum_value, data, "DefaultsMessage_DefaultsEnum")
195212 if err != nil {
198215 *x = DefaultsMessage_DefaultsEnum(value)
199216 return nil
200217 }
218
201219 func (DefaultsMessage_DefaultsEnum) EnumDescriptor() ([]byte, []int) {
202 return fileDescriptor_test_ee9f66cbbebc227c, []int{16, 0}
220 return fileDescriptor_8ca34d01332f1402, []int{16, 0}
203221 }
204222
205223 type Defaults_Color int32
215233 1: "GREEN",
216234 2: "BLUE",
217235 }
236
218237 var Defaults_Color_value = map[string]int32{
219238 "RED": 0,
220239 "GREEN": 1,
226245 *p = x
227246 return p
228247 }
248
229249 func (x Defaults_Color) String() string {
230250 return proto.EnumName(Defaults_Color_name, int32(x))
231251 }
252
232253 func (x *Defaults_Color) UnmarshalJSON(data []byte) error {
233254 value, err := proto.UnmarshalJSONEnum(Defaults_Color_value, data, "Defaults_Color")
234255 if err != nil {
237258 *x = Defaults_Color(value)
238259 return nil
239260 }
261
240262 func (Defaults_Color) EnumDescriptor() ([]byte, []int) {
241 return fileDescriptor_test_ee9f66cbbebc227c, []int{21, 0}
263 return fileDescriptor_8ca34d01332f1402, []int{21, 0}
242264 }
243265
244266 type RepeatedEnum_Color int32
250272 var RepeatedEnum_Color_name = map[int32]string{
251273 1: "RED",
252274 }
275
253276 var RepeatedEnum_Color_value = map[string]int32{
254277 "RED": 1,
255278 }
259282 *p = x
260283 return p
261284 }
285
262286 func (x RepeatedEnum_Color) String() string {
263287 return proto.EnumName(RepeatedEnum_Color_name, int32(x))
264288 }
289
265290 func (x *RepeatedEnum_Color) UnmarshalJSON(data []byte) error {
266291 value, err := proto.UnmarshalJSONEnum(RepeatedEnum_Color_value, data, "RepeatedEnum_Color")
267292 if err != nil {
270295 *x = RepeatedEnum_Color(value)
271296 return nil
272297 }
298
273299 func (RepeatedEnum_Color) EnumDescriptor() ([]byte, []int) {
274 return fileDescriptor_test_ee9f66cbbebc227c, []int{23, 0}
300 return fileDescriptor_8ca34d01332f1402, []int{23, 0}
275301 }
276302
277303 type GoEnum struct {
285311 func (m *GoEnum) String() string { return proto.CompactTextString(m) }
286312 func (*GoEnum) ProtoMessage() {}
287313 func (*GoEnum) Descriptor() ([]byte, []int) {
288 return fileDescriptor_test_ee9f66cbbebc227c, []int{0}
289 }
314 return fileDescriptor_8ca34d01332f1402, []int{0}
315 }
316
290317 func (m *GoEnum) XXX_Unmarshal(b []byte) error {
291318 return xxx_messageInfo_GoEnum.Unmarshal(m, b)
292319 }
293320 func (m *GoEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
294321 return xxx_messageInfo_GoEnum.Marshal(b, m, deterministic)
295322 }
296 func (dst *GoEnum) XXX_Merge(src proto.Message) {
297 xxx_messageInfo_GoEnum.Merge(dst, src)
323 func (m *GoEnum) XXX_Merge(src proto.Message) {
324 xxx_messageInfo_GoEnum.Merge(m, src)
298325 }
299326 func (m *GoEnum) XXX_Size() int {
300327 return xxx_messageInfo_GoEnum.Size(m)
324351 func (m *GoTestField) String() string { return proto.CompactTextString(m) }
325352 func (*GoTestField) ProtoMessage() {}
326353 func (*GoTestField) Descriptor() ([]byte, []int) {
327 return fileDescriptor_test_ee9f66cbbebc227c, []int{1}
328 }
354 return fileDescriptor_8ca34d01332f1402, []int{1}
355 }
356
329357 func (m *GoTestField) XXX_Unmarshal(b []byte) error {
330358 return xxx_messageInfo_GoTestField.Unmarshal(m, b)
331359 }
332360 func (m *GoTestField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
333361 return xxx_messageInfo_GoTestField.Marshal(b, m, deterministic)
334362 }
335 func (dst *GoTestField) XXX_Merge(src proto.Message) {
336 xxx_messageInfo_GoTestField.Merge(dst, src)
363 func (m *GoTestField) XXX_Merge(src proto.Message) {
364 xxx_messageInfo_GoTestField.Merge(m, src)
337365 }
338366 func (m *GoTestField) XXX_Size() int {
339367 return xxx_messageInfo_GoTestField.Size(m)
457485 func (m *GoTest) String() string { return proto.CompactTextString(m) }
458486 func (*GoTest) ProtoMessage() {}
459487 func (*GoTest) Descriptor() ([]byte, []int) {
460 return fileDescriptor_test_ee9f66cbbebc227c, []int{2}
461 }
488 return fileDescriptor_8ca34d01332f1402, []int{2}
489 }
490
462491 func (m *GoTest) XXX_Unmarshal(b []byte) error {
463492 return xxx_messageInfo_GoTest.Unmarshal(m, b)
464493 }
465494 func (m *GoTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
466495 return xxx_messageInfo_GoTest.Marshal(b, m, deterministic)
467496 }
468 func (dst *GoTest) XXX_Merge(src proto.Message) {
469 xxx_messageInfo_GoTest.Merge(dst, src)
497 func (m *GoTest) XXX_Merge(src proto.Message) {
498 xxx_messageInfo_GoTest.Merge(m, src)
470499 }
471500 func (m *GoTest) XXX_Size() int {
472501 return xxx_messageInfo_GoTest.Size(m)
10811110 func (m *GoTest_RequiredGroup) String() string { return proto.CompactTextString(m) }
10821111 func (*GoTest_RequiredGroup) ProtoMessage() {}
10831112 func (*GoTest_RequiredGroup) Descriptor() ([]byte, []int) {
1084 return fileDescriptor_test_ee9f66cbbebc227c, []int{2, 0}
1085 }
1113 return fileDescriptor_8ca34d01332f1402, []int{2, 0}
1114 }
1115
10861116 func (m *GoTest_RequiredGroup) XXX_Unmarshal(b []byte) error {
10871117 return xxx_messageInfo_GoTest_RequiredGroup.Unmarshal(m, b)
10881118 }
10891119 func (m *GoTest_RequiredGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
10901120 return xxx_messageInfo_GoTest_RequiredGroup.Marshal(b, m, deterministic)
10911121 }
1092 func (dst *GoTest_RequiredGroup) XXX_Merge(src proto.Message) {
1093 xxx_messageInfo_GoTest_RequiredGroup.Merge(dst, src)
1122 func (m *GoTest_RequiredGroup) XXX_Merge(src proto.Message) {
1123 xxx_messageInfo_GoTest_RequiredGroup.Merge(m, src)
10941124 }
10951125 func (m *GoTest_RequiredGroup) XXX_Size() int {
10961126 return xxx_messageInfo_GoTest_RequiredGroup.Size(m)
11191149 func (m *GoTest_RepeatedGroup) String() string { return proto.CompactTextString(m) }
11201150 func (*GoTest_RepeatedGroup) ProtoMessage() {}
11211151 func (*GoTest_RepeatedGroup) Descriptor() ([]byte, []int) {
1122 return fileDescriptor_test_ee9f66cbbebc227c, []int{2, 1}
1123 }
1152 return fileDescriptor_8ca34d01332f1402, []int{2, 1}
1153 }
1154
11241155 func (m *GoTest_RepeatedGroup) XXX_Unmarshal(b []byte) error {
11251156 return xxx_messageInfo_GoTest_RepeatedGroup.Unmarshal(m, b)
11261157 }
11271158 func (m *GoTest_RepeatedGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
11281159 return xxx_messageInfo_GoTest_RepeatedGroup.Marshal(b, m, deterministic)
11291160 }
1130 func (dst *GoTest_RepeatedGroup) XXX_Merge(src proto.Message) {
1131 xxx_messageInfo_GoTest_RepeatedGroup.Merge(dst, src)
1161 func (m *GoTest_RepeatedGroup) XXX_Merge(src proto.Message) {
1162 xxx_messageInfo_GoTest_RepeatedGroup.Merge(m, src)
11321163 }
11331164 func (m *GoTest_RepeatedGroup) XXX_Size() int {
11341165 return xxx_messageInfo_GoTest_RepeatedGroup.Size(m)
11571188 func (m *GoTest_OptionalGroup) String() string { return proto.CompactTextString(m) }
11581189 func (*GoTest_OptionalGroup) ProtoMessage() {}
11591190 func (*GoTest_OptionalGroup) Descriptor() ([]byte, []int) {
1160 return fileDescriptor_test_ee9f66cbbebc227c, []int{2, 2}
1161 }
1191 return fileDescriptor_8ca34d01332f1402, []int{2, 2}
1192 }
1193
11621194 func (m *GoTest_OptionalGroup) XXX_Unmarshal(b []byte) error {
11631195 return xxx_messageInfo_GoTest_OptionalGroup.Unmarshal(m, b)
11641196 }
11651197 func (m *GoTest_OptionalGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
11661198 return xxx_messageInfo_GoTest_OptionalGroup.Marshal(b, m, deterministic)
11671199 }
1168 func (dst *GoTest_OptionalGroup) XXX_Merge(src proto.Message) {
1169 xxx_messageInfo_GoTest_OptionalGroup.Merge(dst, src)
1200 func (m *GoTest_OptionalGroup) XXX_Merge(src proto.Message) {
1201 xxx_messageInfo_GoTest_OptionalGroup.Merge(m, src)
11701202 }
11711203 func (m *GoTest_OptionalGroup) XXX_Size() int {
11721204 return xxx_messageInfo_GoTest_OptionalGroup.Size(m)
11961228 func (m *GoTestRequiredGroupField) String() string { return proto.CompactTextString(m) }
11971229 func (*GoTestRequiredGroupField) ProtoMessage() {}
11981230 func (*GoTestRequiredGroupField) Descriptor() ([]byte, []int) {
1199 return fileDescriptor_test_ee9f66cbbebc227c, []int{3}
1200 }
1231 return fileDescriptor_8ca34d01332f1402, []int{3}
1232 }
1233
12011234 func (m *GoTestRequiredGroupField) XXX_Unmarshal(b []byte) error {
12021235 return xxx_messageInfo_GoTestRequiredGroupField.Unmarshal(m, b)
12031236 }
12041237 func (m *GoTestRequiredGroupField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
12051238 return xxx_messageInfo_GoTestRequiredGroupField.Marshal(b, m, deterministic)
12061239 }
1207 func (dst *GoTestRequiredGroupField) XXX_Merge(src proto.Message) {
1208 xxx_messageInfo_GoTestRequiredGroupField.Merge(dst, src)
1240 func (m *GoTestRequiredGroupField) XXX_Merge(src proto.Message) {
1241 xxx_messageInfo_GoTestRequiredGroupField.Merge(m, src)
12091242 }
12101243 func (m *GoTestRequiredGroupField) XXX_Size() int {
12111244 return xxx_messageInfo_GoTestRequiredGroupField.Size(m)
12341267 func (m *GoTestRequiredGroupField_Group) String() string { return proto.CompactTextString(m) }
12351268 func (*GoTestRequiredGroupField_Group) ProtoMessage() {}
12361269 func (*GoTestRequiredGroupField_Group) Descriptor() ([]byte, []int) {
1237 return fileDescriptor_test_ee9f66cbbebc227c, []int{3, 0}
1238 }
1270 return fileDescriptor_8ca34d01332f1402, []int{3, 0}
1271 }
1272
12391273 func (m *GoTestRequiredGroupField_Group) XXX_Unmarshal(b []byte) error {
12401274 return xxx_messageInfo_GoTestRequiredGroupField_Group.Unmarshal(m, b)
12411275 }
12421276 func (m *GoTestRequiredGroupField_Group) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
12431277 return xxx_messageInfo_GoTestRequiredGroupField_Group.Marshal(b, m, deterministic)
12441278 }
1245 func (dst *GoTestRequiredGroupField_Group) XXX_Merge(src proto.Message) {
1246 xxx_messageInfo_GoTestRequiredGroupField_Group.Merge(dst, src)
1279 func (m *GoTestRequiredGroupField_Group) XXX_Merge(src proto.Message) {
1280 xxx_messageInfo_GoTestRequiredGroupField_Group.Merge(m, src)
12471281 }
12481282 func (m *GoTestRequiredGroupField_Group) XXX_Size() int {
12491283 return xxx_messageInfo_GoTestRequiredGroupField_Group.Size(m)
12791313 func (m *GoSkipTest) String() string { return proto.CompactTextString(m) }
12801314 func (*GoSkipTest) ProtoMessage() {}
12811315 func (*GoSkipTest) Descriptor() ([]byte, []int) {
1282 return fileDescriptor_test_ee9f66cbbebc227c, []int{4}
1283 }
1316 return fileDescriptor_8ca34d01332f1402, []int{4}
1317 }
1318
12841319 func (m *GoSkipTest) XXX_Unmarshal(b []byte) error {
12851320 return xxx_messageInfo_GoSkipTest.Unmarshal(m, b)
12861321 }
12871322 func (m *GoSkipTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
12881323 return xxx_messageInfo_GoSkipTest.Marshal(b, m, deterministic)
12891324 }
1290 func (dst *GoSkipTest) XXX_Merge(src proto.Message) {
1291 xxx_messageInfo_GoSkipTest.Merge(dst, src)
1325 func (m *GoSkipTest) XXX_Merge(src proto.Message) {
1326 xxx_messageInfo_GoSkipTest.Merge(m, src)
12921327 }
12931328 func (m *GoSkipTest) XXX_Size() int {
12941329 return xxx_messageInfo_GoSkipTest.Size(m)
13461381 func (m *GoSkipTest_SkipGroup) String() string { return proto.CompactTextString(m) }
13471382 func (*GoSkipTest_SkipGroup) ProtoMessage() {}
13481383 func (*GoSkipTest_SkipGroup) Descriptor() ([]byte, []int) {
1349 return fileDescriptor_test_ee9f66cbbebc227c, []int{4, 0}
1350 }
1384 return fileDescriptor_8ca34d01332f1402, []int{4, 0}
1385 }
1386
13511387 func (m *GoSkipTest_SkipGroup) XXX_Unmarshal(b []byte) error {
13521388 return xxx_messageInfo_GoSkipTest_SkipGroup.Unmarshal(m, b)
13531389 }
13541390 func (m *GoSkipTest_SkipGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
13551391 return xxx_messageInfo_GoSkipTest_SkipGroup.Marshal(b, m, deterministic)
13561392 }
1357 func (dst *GoSkipTest_SkipGroup) XXX_Merge(src proto.Message) {
1358 xxx_messageInfo_GoSkipTest_SkipGroup.Merge(dst, src)
1393 func (m *GoSkipTest_SkipGroup) XXX_Merge(src proto.Message) {
1394 xxx_messageInfo_GoSkipTest_SkipGroup.Merge(m, src)
13591395 }
13601396 func (m *GoSkipTest_SkipGroup) XXX_Size() int {
13611397 return xxx_messageInfo_GoSkipTest_SkipGroup.Size(m)
13931429 func (m *NonPackedTest) String() string { return proto.CompactTextString(m) }
13941430 func (*NonPackedTest) ProtoMessage() {}
13951431 func (*NonPackedTest) Descriptor() ([]byte, []int) {
1396 return fileDescriptor_test_ee9f66cbbebc227c, []int{5}
1397 }
1432 return fileDescriptor_8ca34d01332f1402, []int{5}
1433 }
1434
13981435 func (m *NonPackedTest) XXX_Unmarshal(b []byte) error {
13991436 return xxx_messageInfo_NonPackedTest.Unmarshal(m, b)
14001437 }
14011438 func (m *NonPackedTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
14021439 return xxx_messageInfo_NonPackedTest.Marshal(b, m, deterministic)
14031440 }
1404 func (dst *NonPackedTest) XXX_Merge(src proto.Message) {
1405 xxx_messageInfo_NonPackedTest.Merge(dst, src)
1441 func (m *NonPackedTest) XXX_Merge(src proto.Message) {
1442 xxx_messageInfo_NonPackedTest.Merge(m, src)
14061443 }
14071444 func (m *NonPackedTest) XXX_Size() int {
14081445 return xxx_messageInfo_NonPackedTest.Size(m)
14311468 func (m *PackedTest) String() string { return proto.CompactTextString(m) }
14321469 func (*PackedTest) ProtoMessage() {}
14331470 func (*PackedTest) Descriptor() ([]byte, []int) {
1434 return fileDescriptor_test_ee9f66cbbebc227c, []int{6}
1435 }
1471 return fileDescriptor_8ca34d01332f1402, []int{6}
1472 }
1473
14361474 func (m *PackedTest) XXX_Unmarshal(b []byte) error {
14371475 return xxx_messageInfo_PackedTest.Unmarshal(m, b)
14381476 }
14391477 func (m *PackedTest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
14401478 return xxx_messageInfo_PackedTest.Marshal(b, m, deterministic)
14411479 }
1442 func (dst *PackedTest) XXX_Merge(src proto.Message) {
1443 xxx_messageInfo_PackedTest.Merge(dst, src)
1480 func (m *PackedTest) XXX_Merge(src proto.Message) {
1481 xxx_messageInfo_PackedTest.Merge(m, src)
14441482 }
14451483 func (m *PackedTest) XXX_Size() int {
14461484 return xxx_messageInfo_PackedTest.Size(m)
14701508 func (m *MaxTag) String() string { return proto.CompactTextString(m) }
14711509 func (*MaxTag) ProtoMessage() {}
14721510 func (*MaxTag) Descriptor() ([]byte, []int) {
1473 return fileDescriptor_test_ee9f66cbbebc227c, []int{7}
1474 }
1511 return fileDescriptor_8ca34d01332f1402, []int{7}
1512 }
1513
14751514 func (m *MaxTag) XXX_Unmarshal(b []byte) error {
14761515 return xxx_messageInfo_MaxTag.Unmarshal(m, b)
14771516 }
14781517 func (m *MaxTag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
14791518 return xxx_messageInfo_MaxTag.Marshal(b, m, deterministic)
14801519 }
1481 func (dst *MaxTag) XXX_Merge(src proto.Message) {
1482 xxx_messageInfo_MaxTag.Merge(dst, src)
1520 func (m *MaxTag) XXX_Merge(src proto.Message) {
1521 xxx_messageInfo_MaxTag.Merge(m, src)
14831522 }
14841523 func (m *MaxTag) XXX_Size() int {
14851524 return xxx_messageInfo_MaxTag.Size(m)
15091548 func (m *OldMessage) String() string { return proto.CompactTextString(m) }
15101549 func (*OldMessage) ProtoMessage() {}
15111550 func (*OldMessage) Descriptor() ([]byte, []int) {
1512 return fileDescriptor_test_ee9f66cbbebc227c, []int{8}
1513 }
1551 return fileDescriptor_8ca34d01332f1402, []int{8}
1552 }
1553
15141554 func (m *OldMessage) XXX_Unmarshal(b []byte) error {
15151555 return xxx_messageInfo_OldMessage.Unmarshal(m, b)
15161556 }
15171557 func (m *OldMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
15181558 return xxx_messageInfo_OldMessage.Marshal(b, m, deterministic)
15191559 }
1520 func (dst *OldMessage) XXX_Merge(src proto.Message) {
1521 xxx_messageInfo_OldMessage.Merge(dst, src)
1560 func (m *OldMessage) XXX_Merge(src proto.Message) {
1561 xxx_messageInfo_OldMessage.Merge(m, src)
15221562 }
15231563 func (m *OldMessage) XXX_Size() int {
15241564 return xxx_messageInfo_OldMessage.Size(m)
15541594 func (m *OldMessage_Nested) String() string { return proto.CompactTextString(m) }
15551595 func (*OldMessage_Nested) ProtoMessage() {}
15561596 func (*OldMessage_Nested) Descriptor() ([]byte, []int) {
1557 return fileDescriptor_test_ee9f66cbbebc227c, []int{8, 0}
1558 }
1597 return fileDescriptor_8ca34d01332f1402, []int{8, 0}
1598 }
1599
15591600 func (m *OldMessage_Nested) XXX_Unmarshal(b []byte) error {
15601601 return xxx_messageInfo_OldMessage_Nested.Unmarshal(m, b)
15611602 }
15621603 func (m *OldMessage_Nested) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
15631604 return xxx_messageInfo_OldMessage_Nested.Marshal(b, m, deterministic)
15641605 }
1565 func (dst *OldMessage_Nested) XXX_Merge(src proto.Message) {
1566 xxx_messageInfo_OldMessage_Nested.Merge(dst, src)
1606 func (m *OldMessage_Nested) XXX_Merge(src proto.Message) {
1607 xxx_messageInfo_OldMessage_Nested.Merge(m, src)
15671608 }
15681609 func (m *OldMessage_Nested) XXX_Size() int {
15691610 return xxx_messageInfo_OldMessage_Nested.Size(m)
15961637 func (m *NewMessage) String() string { return proto.CompactTextString(m) }
15971638 func (*NewMessage) ProtoMessage() {}
15981639 func (*NewMessage) Descriptor() ([]byte, []int) {
1599 return fileDescriptor_test_ee9f66cbbebc227c, []int{9}
1600 }
1640 return fileDescriptor_8ca34d01332f1402, []int{9}
1641 }
1642
16011643 func (m *NewMessage) XXX_Unmarshal(b []byte) error {
16021644 return xxx_messageInfo_NewMessage.Unmarshal(m, b)
16031645 }
16041646 func (m *NewMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
16051647 return xxx_messageInfo_NewMessage.Marshal(b, m, deterministic)
16061648 }
1607 func (dst *NewMessage) XXX_Merge(src proto.Message) {
1608 xxx_messageInfo_NewMessage.Merge(dst, src)
1649 func (m *NewMessage) XXX_Merge(src proto.Message) {
1650 xxx_messageInfo_NewMessage.Merge(m, src)
16091651 }
16101652 func (m *NewMessage) XXX_Size() int {
16111653 return xxx_messageInfo_NewMessage.Size(m)
16421684 func (m *NewMessage_Nested) String() string { return proto.CompactTextString(m) }
16431685 func (*NewMessage_Nested) ProtoMessage() {}
16441686 func (*NewMessage_Nested) Descriptor() ([]byte, []int) {
1645 return fileDescriptor_test_ee9f66cbbebc227c, []int{9, 0}
1646 }
1687 return fileDescriptor_8ca34d01332f1402, []int{9, 0}
1688 }
1689
16471690 func (m *NewMessage_Nested) XXX_Unmarshal(b []byte) error {
16481691 return xxx_messageInfo_NewMessage_Nested.Unmarshal(m, b)
16491692 }
16501693 func (m *NewMessage_Nested) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
16511694 return xxx_messageInfo_NewMessage_Nested.Marshal(b, m, deterministic)
16521695 }
1653 func (dst *NewMessage_Nested) XXX_Merge(src proto.Message) {
1654 xxx_messageInfo_NewMessage_Nested.Merge(dst, src)
1696 func (m *NewMessage_Nested) XXX_Merge(src proto.Message) {
1697 xxx_messageInfo_NewMessage_Nested.Merge(m, src)
16551698 }
16561699 func (m *NewMessage_Nested) XXX_Size() int {
16571700 return xxx_messageInfo_NewMessage_Nested.Size(m)
16891732 func (m *InnerMessage) String() string { return proto.CompactTextString(m) }
16901733 func (*InnerMessage) ProtoMessage() {}
16911734 func (*InnerMessage) Descriptor() ([]byte, []int) {
1692 return fileDescriptor_test_ee9f66cbbebc227c, []int{10}
1693 }
1735 return fileDescriptor_8ca34d01332f1402, []int{10}
1736 }
1737
16941738 func (m *InnerMessage) XXX_Unmarshal(b []byte) error {
16951739 return xxx_messageInfo_InnerMessage.Unmarshal(m, b)
16961740 }
16971741 func (m *InnerMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
16981742 return xxx_messageInfo_InnerMessage.Marshal(b, m, deterministic)
16991743 }
1700 func (dst *InnerMessage) XXX_Merge(src proto.Message) {
1701 xxx_messageInfo_InnerMessage.Merge(dst, src)
1744 func (m *InnerMessage) XXX_Merge(src proto.Message) {
1745 xxx_messageInfo_InnerMessage.Merge(m, src)
17021746 }
17031747 func (m *InnerMessage) XXX_Size() int {
17041748 return xxx_messageInfo_InnerMessage.Size(m)
17471791 func (m *OtherMessage) String() string { return proto.CompactTextString(m) }
17481792 func (*OtherMessage) ProtoMessage() {}
17491793 func (*OtherMessage) Descriptor() ([]byte, []int) {
1750 return fileDescriptor_test_ee9f66cbbebc227c, []int{11}
1794 return fileDescriptor_8ca34d01332f1402, []int{11}
17511795 }
17521796
17531797 var extRange_OtherMessage = []proto.ExtensionRange{
17571801 func (*OtherMessage) ExtensionRangeArray() []proto.ExtensionRange {
17581802 return extRange_OtherMessage
17591803 }
1804
17601805 func (m *OtherMessage) XXX_Unmarshal(b []byte) error {
17611806 return xxx_messageInfo_OtherMessage.Unmarshal(m, b)
17621807 }
17631808 func (m *OtherMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
17641809 return xxx_messageInfo_OtherMessage.Marshal(b, m, deterministic)
17651810 }
1766 func (dst *OtherMessage) XXX_Merge(src proto.Message) {
1767 xxx_messageInfo_OtherMessage.Merge(dst, src)
1811 func (m *OtherMessage) XXX_Merge(src proto.Message) {
1812 xxx_messageInfo_OtherMessage.Merge(m, src)
17681813 }
17691814 func (m *OtherMessage) XXX_Size() int {
17701815 return xxx_messageInfo_OtherMessage.Size(m)
18141859 func (m *RequiredInnerMessage) String() string { return proto.CompactTextString(m) }
18151860 func (*RequiredInnerMessage) ProtoMessage() {}
18161861 func (*RequiredInnerMessage) Descriptor() ([]byte, []int) {
1817 return fileDescriptor_test_ee9f66cbbebc227c, []int{12}
1818 }
1862 return fileDescriptor_8ca34d01332f1402, []int{12}
1863 }
1864
18191865 func (m *RequiredInnerMessage) XXX_Unmarshal(b []byte) error {
18201866 return xxx_messageInfo_RequiredInnerMessage.Unmarshal(m, b)
18211867 }
18221868 func (m *RequiredInnerMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
18231869 return xxx_messageInfo_RequiredInnerMessage.Marshal(b, m, deterministic)
18241870 }
1825 func (dst *RequiredInnerMessage) XXX_Merge(src proto.Message) {
1826 xxx_messageInfo_RequiredInnerMessage.Merge(dst, src)
1871 func (m *RequiredInnerMessage) XXX_Merge(src proto.Message) {
1872 xxx_messageInfo_RequiredInnerMessage.Merge(m, src)
18271873 }
18281874 func (m *RequiredInnerMessage) XXX_Size() int {
18291875 return xxx_messageInfo_RequiredInnerMessage.Size(m)
18651911 func (m *MyMessage) String() string { return proto.CompactTextString(m) }
18661912 func (*MyMessage) ProtoMessage() {}
18671913 func (*MyMessage) Descriptor() ([]byte, []int) {
1868 return fileDescriptor_test_ee9f66cbbebc227c, []int{13}
1914 return fileDescriptor_8ca34d01332f1402, []int{13}
18691915 }
18701916
18711917 var extRange_MyMessage = []proto.ExtensionRange{
18751921 func (*MyMessage) ExtensionRangeArray() []proto.ExtensionRange {
18761922 return extRange_MyMessage
18771923 }
1924
18781925 func (m *MyMessage) XXX_Unmarshal(b []byte) error {
18791926 return xxx_messageInfo_MyMessage.Unmarshal(m, b)
18801927 }
18811928 func (m *MyMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
18821929 return xxx_messageInfo_MyMessage.Marshal(b, m, deterministic)
18831930 }
1884 func (dst *MyMessage) XXX_Merge(src proto.Message) {
1885 xxx_messageInfo_MyMessage.Merge(dst, src)
1931 func (m *MyMessage) XXX_Merge(src proto.Message) {
1932 xxx_messageInfo_MyMessage.Merge(m, src)
18861933 }
18871934 func (m *MyMessage) XXX_Size() int {
18881935 return xxx_messageInfo_MyMessage.Size(m)
19882035 func (m *MyMessage_SomeGroup) String() string { return proto.CompactTextString(m) }
19892036 func (*MyMessage_SomeGroup) ProtoMessage() {}
19902037 func (*MyMessage_SomeGroup) Descriptor() ([]byte, []int) {
1991 return fileDescriptor_test_ee9f66cbbebc227c, []int{13, 0}
1992 }
2038 return fileDescriptor_8ca34d01332f1402, []int{13, 0}
2039 }
2040
19932041 func (m *MyMessage_SomeGroup) XXX_Unmarshal(b []byte) error {
19942042 return xxx_messageInfo_MyMessage_SomeGroup.Unmarshal(m, b)
19952043 }
19962044 func (m *MyMessage_SomeGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
19972045 return xxx_messageInfo_MyMessage_SomeGroup.Marshal(b, m, deterministic)
19982046 }
1999 func (dst *MyMessage_SomeGroup) XXX_Merge(src proto.Message) {
2000 xxx_messageInfo_MyMessage_SomeGroup.Merge(dst, src)
2047 func (m *MyMessage_SomeGroup) XXX_Merge(src proto.Message) {
2048 xxx_messageInfo_MyMessage_SomeGroup.Merge(m, src)
20012049 }
20022050 func (m *MyMessage_SomeGroup) XXX_Size() int {
20032051 return xxx_messageInfo_MyMessage_SomeGroup.Size(m)
20272075 func (m *Ext) String() string { return proto.CompactTextString(m) }
20282076 func (*Ext) ProtoMessage() {}
20292077 func (*Ext) Descriptor() ([]byte, []int) {
2030 return fileDescriptor_test_ee9f66cbbebc227c, []int{14}
2031 }
2078 return fileDescriptor_8ca34d01332f1402, []int{14}
2079 }
2080
20322081 func (m *Ext) XXX_Unmarshal(b []byte) error {
20332082 return xxx_messageInfo_Ext.Unmarshal(m, b)
20342083 }
20352084 func (m *Ext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
20362085 return xxx_messageInfo_Ext.Marshal(b, m, deterministic)
20372086 }
2038 func (dst *Ext) XXX_Merge(src proto.Message) {
2039 xxx_messageInfo_Ext.Merge(dst, src)
2087 func (m *Ext) XXX_Merge(src proto.Message) {
2088 xxx_messageInfo_Ext.Merge(m, src)
20402089 }
20412090 func (m *Ext) XXX_Size() int {
20422091 return xxx_messageInfo_Ext.Size(m)
21012150 func (m *ComplexExtension) String() string { return proto.CompactTextString(m) }
21022151 func (*ComplexExtension) ProtoMessage() {}
21032152 func (*ComplexExtension) Descriptor() ([]byte, []int) {
2104 return fileDescriptor_test_ee9f66cbbebc227c, []int{15}
2105 }
2153 return fileDescriptor_8ca34d01332f1402, []int{15}
2154 }
2155
21062156 func (m *ComplexExtension) XXX_Unmarshal(b []byte) error {
21072157 return xxx_messageInfo_ComplexExtension.Unmarshal(m, b)
21082158 }
21092159 func (m *ComplexExtension) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
21102160 return xxx_messageInfo_ComplexExtension.Marshal(b, m, deterministic)
21112161 }
2112 func (dst *ComplexExtension) XXX_Merge(src proto.Message) {
2113 xxx_messageInfo_ComplexExtension.Merge(dst, src)
2162 func (m *ComplexExtension) XXX_Merge(src proto.Message) {
2163 xxx_messageInfo_ComplexExtension.Merge(m, src)
21142164 }
21152165 func (m *ComplexExtension) XXX_Size() int {
21162166 return xxx_messageInfo_ComplexExtension.Size(m)
21532203 func (m *DefaultsMessage) String() string { return proto.CompactTextString(m) }
21542204 func (*DefaultsMessage) ProtoMessage() {}
21552205 func (*DefaultsMessage) Descriptor() ([]byte, []int) {
2156 return fileDescriptor_test_ee9f66cbbebc227c, []int{16}
2206 return fileDescriptor_8ca34d01332f1402, []int{16}
21572207 }
21582208
21592209 var extRange_DefaultsMessage = []proto.ExtensionRange{
21632213 func (*DefaultsMessage) ExtensionRangeArray() []proto.ExtensionRange {
21642214 return extRange_DefaultsMessage
21652215 }
2216
21662217 func (m *DefaultsMessage) XXX_Unmarshal(b []byte) error {
21672218 return xxx_messageInfo_DefaultsMessage.Unmarshal(m, b)
21682219 }
21692220 func (m *DefaultsMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
21702221 return xxx_messageInfo_DefaultsMessage.Marshal(b, m, deterministic)
21712222 }
2172 func (dst *DefaultsMessage) XXX_Merge(src proto.Message) {
2173 xxx_messageInfo_DefaultsMessage.Merge(dst, src)
2223 func (m *DefaultsMessage) XXX_Merge(src proto.Message) {
2224 xxx_messageInfo_DefaultsMessage.Merge(m, src)
21742225 }
21752226 func (m *DefaultsMessage) XXX_Size() int {
21762227 return xxx_messageInfo_DefaultsMessage.Size(m)
21922243 func (m *MyMessageSet) String() string { return proto.CompactTextString(m) }
21932244 func (*MyMessageSet) ProtoMessage() {}
21942245 func (*MyMessageSet) Descriptor() ([]byte, []int) {
2195 return fileDescriptor_test_ee9f66cbbebc227c, []int{17}
2196 }
2197
2198 func (m *MyMessageSet) MarshalJSON() ([]byte, error) {
2199 return proto.MarshalMessageSetJSON(&m.XXX_InternalExtensions)
2200 }
2201 func (m *MyMessageSet) UnmarshalJSON(buf []byte) error {
2202 return proto.UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions)
2246 return fileDescriptor_8ca34d01332f1402, []int{17}
22032247 }
22042248
22052249 var extRange_MyMessageSet = []proto.ExtensionRange{
22092253 func (*MyMessageSet) ExtensionRangeArray() []proto.ExtensionRange {
22102254 return extRange_MyMessageSet
22112255 }
2256
22122257 func (m *MyMessageSet) XXX_Unmarshal(b []byte) error {
22132258 return xxx_messageInfo_MyMessageSet.Unmarshal(m, b)
22142259 }
22152260 func (m *MyMessageSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
22162261 return xxx_messageInfo_MyMessageSet.Marshal(b, m, deterministic)
22172262 }
2218 func (dst *MyMessageSet) XXX_Merge(src proto.Message) {
2219 xxx_messageInfo_MyMessageSet.Merge(dst, src)
2263 func (m *MyMessageSet) XXX_Merge(src proto.Message) {
2264 xxx_messageInfo_MyMessageSet.Merge(m, src)
22202265 }
22212266 func (m *MyMessageSet) XXX_Size() int {
22222267 return xxx_messageInfo_MyMessageSet.Size(m)
22372282 func (m *Empty) String() string { return proto.CompactTextString(m) }
22382283 func (*Empty) ProtoMessage() {}
22392284 func (*Empty) Descriptor() ([]byte, []int) {
2240 return fileDescriptor_test_ee9f66cbbebc227c, []int{18}
2241 }
2285 return fileDescriptor_8ca34d01332f1402, []int{18}
2286 }
2287
22422288 func (m *Empty) XXX_Unmarshal(b []byte) error {
22432289 return xxx_messageInfo_Empty.Unmarshal(m, b)
22442290 }
22452291 func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
22462292 return xxx_messageInfo_Empty.Marshal(b, m, deterministic)
22472293 }
2248 func (dst *Empty) XXX_Merge(src proto.Message) {
2249 xxx_messageInfo_Empty.Merge(dst, src)
2294 func (m *Empty) XXX_Merge(src proto.Message) {
2295 xxx_messageInfo_Empty.Merge(m, src)
22502296 }
22512297 func (m *Empty) XXX_Size() int {
22522298 return xxx_messageInfo_Empty.Size(m)
22682314 func (m *MessageList) String() string { return proto.CompactTextString(m) }
22692315 func (*MessageList) ProtoMessage() {}
22702316 func (*MessageList) Descriptor() ([]byte, []int) {
2271 return fileDescriptor_test_ee9f66cbbebc227c, []int{19}
2272 }
2317 return fileDescriptor_8ca34d01332f1402, []int{19}
2318 }
2319
22732320 func (m *MessageList) XXX_Unmarshal(b []byte) error {
22742321 return xxx_messageInfo_MessageList.Unmarshal(m, b)
22752322 }
22762323 func (m *MessageList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
22772324 return xxx_messageInfo_MessageList.Marshal(b, m, deterministic)
22782325 }
2279 func (dst *MessageList) XXX_Merge(src proto.Message) {
2280 xxx_messageInfo_MessageList.Merge(dst, src)
2326 func (m *MessageList) XXX_Merge(src proto.Message) {
2327 xxx_messageInfo_MessageList.Merge(m, src)
22812328 }
22822329 func (m *MessageList) XXX_Size() int {
22832330 return xxx_messageInfo_MessageList.Size(m)
23072354 func (m *MessageList_Message) String() string { return proto.CompactTextString(m) }
23082355 func (*MessageList_Message) ProtoMessage() {}
23092356 func (*MessageList_Message) Descriptor() ([]byte, []int) {
2310 return fileDescriptor_test_ee9f66cbbebc227c, []int{19, 0}
2311 }
2357 return fileDescriptor_8ca34d01332f1402, []int{19, 0}
2358 }
2359
23122360 func (m *MessageList_Message) XXX_Unmarshal(b []byte) error {
23132361 return xxx_messageInfo_MessageList_Message.Unmarshal(m, b)
23142362 }
23152363 func (m *MessageList_Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
23162364 return xxx_messageInfo_MessageList_Message.Marshal(b, m, deterministic)
23172365 }
2318 func (dst *MessageList_Message) XXX_Merge(src proto.Message) {
2319 xxx_messageInfo_MessageList_Message.Merge(dst, src)
2366 func (m *MessageList_Message) XXX_Merge(src proto.Message) {
2367 xxx_messageInfo_MessageList_Message.Merge(m, src)
23202368 }
23212369 func (m *MessageList_Message) XXX_Size() int {
23222370 return xxx_messageInfo_MessageList_Message.Size(m)
23532401 func (m *Strings) String() string { return proto.CompactTextString(m) }
23542402 func (*Strings) ProtoMessage() {}
23552403 func (*Strings) Descriptor() ([]byte, []int) {
2356 return fileDescriptor_test_ee9f66cbbebc227c, []int{20}
2357 }
2404 return fileDescriptor_8ca34d01332f1402, []int{20}
2405 }
2406
23582407 func (m *Strings) XXX_Unmarshal(b []byte) error {
23592408 return xxx_messageInfo_Strings.Unmarshal(m, b)
23602409 }
23612410 func (m *Strings) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
23622411 return xxx_messageInfo_Strings.Marshal(b, m, deterministic)
23632412 }
2364 func (dst *Strings) XXX_Merge(src proto.Message) {
2365 xxx_messageInfo_Strings.Merge(dst, src)
2413 func (m *Strings) XXX_Merge(src proto.Message) {
2414 xxx_messageInfo_Strings.Merge(m, src)
23662415 }
23672416 func (m *Strings) XXX_Size() int {
23682417 return xxx_messageInfo_Strings.Size(m)
24212470 func (m *Defaults) String() string { return proto.CompactTextString(m) }
24222471 func (*Defaults) ProtoMessage() {}
24232472 func (*Defaults) Descriptor() ([]byte, []int) {
2424 return fileDescriptor_test_ee9f66cbbebc227c, []int{21}
2425 }
2473 return fileDescriptor_8ca34d01332f1402, []int{21}
2474 }
2475
24262476 func (m *Defaults) XXX_Unmarshal(b []byte) error {
24272477 return xxx_messageInfo_Defaults.Unmarshal(m, b)
24282478 }
24292479 func (m *Defaults) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
24302480 return xxx_messageInfo_Defaults.Marshal(b, m, deterministic)
24312481 }
2432 func (dst *Defaults) XXX_Merge(src proto.Message) {
2433 xxx_messageInfo_Defaults.Merge(dst, src)
2482 func (m *Defaults) XXX_Merge(src proto.Message) {
2483 xxx_messageInfo_Defaults.Merge(m, src)
24342484 }
24352485 func (m *Defaults) XXX_Size() int {
24362486 return xxx_messageInfo_Defaults.Size(m)
26062656 func (m *SubDefaults) String() string { return proto.CompactTextString(m) }
26072657 func (*SubDefaults) ProtoMessage() {}
26082658 func (*SubDefaults) Descriptor() ([]byte, []int) {
2609 return fileDescriptor_test_ee9f66cbbebc227c, []int{22}
2610 }
2659 return fileDescriptor_8ca34d01332f1402, []int{22}
2660 }
2661
26112662 func (m *SubDefaults) XXX_Unmarshal(b []byte) error {
26122663 return xxx_messageInfo_SubDefaults.Unmarshal(m, b)
26132664 }
26142665 func (m *SubDefaults) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
26152666 return xxx_messageInfo_SubDefaults.Marshal(b, m, deterministic)
26162667 }
2617 func (dst *SubDefaults) XXX_Merge(src proto.Message) {
2618 xxx_messageInfo_SubDefaults.Merge(dst, src)
2668 func (m *SubDefaults) XXX_Merge(src proto.Message) {
2669 xxx_messageInfo_SubDefaults.Merge(m, src)
26192670 }
26202671 func (m *SubDefaults) XXX_Size() int {
26212672 return xxx_messageInfo_SubDefaults.Size(m)
26462697 func (m *RepeatedEnum) String() string { return proto.CompactTextString(m) }
26472698 func (*RepeatedEnum) ProtoMessage() {}
26482699 func (*RepeatedEnum) Descriptor() ([]byte, []int) {
2649 return fileDescriptor_test_ee9f66cbbebc227c, []int{23}
2650 }
2700 return fileDescriptor_8ca34d01332f1402, []int{23}
2701 }
2702
26512703 func (m *RepeatedEnum) XXX_Unmarshal(b []byte) error {
26522704 return xxx_messageInfo_RepeatedEnum.Unmarshal(m, b)
26532705 }
26542706 func (m *RepeatedEnum) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
26552707 return xxx_messageInfo_RepeatedEnum.Marshal(b, m, deterministic)
26562708 }
2657 func (dst *RepeatedEnum) XXX_Merge(src proto.Message) {
2658 xxx_messageInfo_RepeatedEnum.Merge(dst, src)
2709 func (m *RepeatedEnum) XXX_Merge(src proto.Message) {
2710 xxx_messageInfo_RepeatedEnum.Merge(m, src)
26592711 }
26602712 func (m *RepeatedEnum) XXX_Size() int {
26612713 return xxx_messageInfo_RepeatedEnum.Size(m)
26902742 func (m *MoreRepeated) String() string { return proto.CompactTextString(m) }
26912743 func (*MoreRepeated) ProtoMessage() {}
26922744 func (*MoreRepeated) Descriptor() ([]byte, []int) {
2693 return fileDescriptor_test_ee9f66cbbebc227c, []int{24}
2694 }
2745 return fileDescriptor_8ca34d01332f1402, []int{24}
2746 }
2747
26952748 func (m *MoreRepeated) XXX_Unmarshal(b []byte) error {
26962749 return xxx_messageInfo_MoreRepeated.Unmarshal(m, b)
26972750 }
26982751 func (m *MoreRepeated) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
26992752 return xxx_messageInfo_MoreRepeated.Marshal(b, m, deterministic)
27002753 }
2701 func (dst *MoreRepeated) XXX_Merge(src proto.Message) {
2702 xxx_messageInfo_MoreRepeated.Merge(dst, src)
2754 func (m *MoreRepeated) XXX_Merge(src proto.Message) {
2755 xxx_messageInfo_MoreRepeated.Merge(m, src)
27032756 }
27042757 func (m *MoreRepeated) XXX_Size() int {
27052758 return xxx_messageInfo_MoreRepeated.Size(m)
27702823 func (m *GroupOld) String() string { return proto.CompactTextString(m) }
27712824 func (*GroupOld) ProtoMessage() {}
27722825 func (*GroupOld) Descriptor() ([]byte, []int) {
2773 return fileDescriptor_test_ee9f66cbbebc227c, []int{25}
2774 }
2826 return fileDescriptor_8ca34d01332f1402, []int{25}
2827 }
2828
27752829 func (m *GroupOld) XXX_Unmarshal(b []byte) error {
27762830 return xxx_messageInfo_GroupOld.Unmarshal(m, b)
27772831 }
27782832 func (m *GroupOld) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
27792833 return xxx_messageInfo_GroupOld.Marshal(b, m, deterministic)
27802834 }
2781 func (dst *GroupOld) XXX_Merge(src proto.Message) {
2782 xxx_messageInfo_GroupOld.Merge(dst, src)
2835 func (m *GroupOld) XXX_Merge(src proto.Message) {
2836 xxx_messageInfo_GroupOld.Merge(m, src)
27832837 }
27842838 func (m *GroupOld) XXX_Size() int {
27852839 return xxx_messageInfo_GroupOld.Size(m)
28082862 func (m *GroupOld_G) String() string { return proto.CompactTextString(m) }
28092863 func (*GroupOld_G) ProtoMessage() {}
28102864 func (*GroupOld_G) Descriptor() ([]byte, []int) {
2811 return fileDescriptor_test_ee9f66cbbebc227c, []int{25, 0}
2812 }
2865 return fileDescriptor_8ca34d01332f1402, []int{25, 0}
2866 }
2867
28132868 func (m *GroupOld_G) XXX_Unmarshal(b []byte) error {
28142869 return xxx_messageInfo_GroupOld_G.Unmarshal(m, b)
28152870 }
28162871 func (m *GroupOld_G) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
28172872 return xxx_messageInfo_GroupOld_G.Marshal(b, m, deterministic)
28182873 }
2819 func (dst *GroupOld_G) XXX_Merge(src proto.Message) {
2820 xxx_messageInfo_GroupOld_G.Merge(dst, src)
2874 func (m *GroupOld_G) XXX_Merge(src proto.Message) {
2875 xxx_messageInfo_GroupOld_G.Merge(m, src)
28212876 }
28222877 func (m *GroupOld_G) XXX_Size() int {
28232878 return xxx_messageInfo_GroupOld_G.Size(m)
28462901 func (m *GroupNew) String() string { return proto.CompactTextString(m) }
28472902 func (*GroupNew) ProtoMessage() {}
28482903 func (*GroupNew) Descriptor() ([]byte, []int) {
2849 return fileDescriptor_test_ee9f66cbbebc227c, []int{26}
2850 }
2904 return fileDescriptor_8ca34d01332f1402, []int{26}
2905 }
2906
28512907 func (m *GroupNew) XXX_Unmarshal(b []byte) error {
28522908 return xxx_messageInfo_GroupNew.Unmarshal(m, b)
28532909 }
28542910 func (m *GroupNew) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
28552911 return xxx_messageInfo_GroupNew.Marshal(b, m, deterministic)
28562912 }
2857 func (dst *GroupNew) XXX_Merge(src proto.Message) {
2858 xxx_messageInfo_GroupNew.Merge(dst, src)
2913 func (m *GroupNew) XXX_Merge(src proto.Message) {
2914 xxx_messageInfo_GroupNew.Merge(m, src)
28592915 }
28602916 func (m *GroupNew) XXX_Size() int {
28612917 return xxx_messageInfo_GroupNew.Size(m)
28852941 func (m *GroupNew_G) String() string { return proto.CompactTextString(m) }
28862942 func (*GroupNew_G) ProtoMessage() {}
28872943 func (*GroupNew_G) Descriptor() ([]byte, []int) {
2888 return fileDescriptor_test_ee9f66cbbebc227c, []int{26, 0}
2889 }
2944 return fileDescriptor_8ca34d01332f1402, []int{26, 0}
2945 }
2946
28902947 func (m *GroupNew_G) XXX_Unmarshal(b []byte) error {
28912948 return xxx_messageInfo_GroupNew_G.Unmarshal(m, b)
28922949 }
28932950 func (m *GroupNew_G) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
28942951 return xxx_messageInfo_GroupNew_G.Marshal(b, m, deterministic)
28952952 }
2896 func (dst *GroupNew_G) XXX_Merge(src proto.Message) {
2897 xxx_messageInfo_GroupNew_G.Merge(dst, src)
2953 func (m *GroupNew_G) XXX_Merge(src proto.Message) {
2954 xxx_messageInfo_GroupNew_G.Merge(m, src)
28982955 }
28992956 func (m *GroupNew_G) XXX_Size() int {
29002957 return xxx_messageInfo_GroupNew_G.Size(m)
29312988 func (m *FloatingPoint) String() string { return proto.CompactTextString(m) }
29322989 func (*FloatingPoint) ProtoMessage() {}
29332990 func (*FloatingPoint) Descriptor() ([]byte, []int) {
2934 return fileDescriptor_test_ee9f66cbbebc227c, []int{27}
2935 }
2991 return fileDescriptor_8ca34d01332f1402, []int{27}
2992 }
2993
29362994 func (m *FloatingPoint) XXX_Unmarshal(b []byte) error {
29372995 return xxx_messageInfo_FloatingPoint.Unmarshal(m, b)
29382996 }
29392997 func (m *FloatingPoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
29402998 return xxx_messageInfo_FloatingPoint.Marshal(b, m, deterministic)
29412999 }
2942 func (dst *FloatingPoint) XXX_Merge(src proto.Message) {
2943 xxx_messageInfo_FloatingPoint.Merge(dst, src)
3000 func (m *FloatingPoint) XXX_Merge(src proto.Message) {
3001 xxx_messageInfo_FloatingPoint.Merge(m, src)
29443002 }
29453003 func (m *FloatingPoint) XXX_Size() int {
29463004 return xxx_messageInfo_FloatingPoint.Size(m)
29793037 func (m *MessageWithMap) String() string { return proto.CompactTextString(m) }
29803038 func (*MessageWithMap) ProtoMessage() {}
29813039 func (*MessageWithMap) Descriptor() ([]byte, []int) {
2982 return fileDescriptor_test_ee9f66cbbebc227c, []int{28}
2983 }
3040 return fileDescriptor_8ca34d01332f1402, []int{28}
3041 }
3042
29843043 func (m *MessageWithMap) XXX_Unmarshal(b []byte) error {
29853044 return xxx_messageInfo_MessageWithMap.Unmarshal(m, b)
29863045 }
29873046 func (m *MessageWithMap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
29883047 return xxx_messageInfo_MessageWithMap.Marshal(b, m, deterministic)
29893048 }
2990 func (dst *MessageWithMap) XXX_Merge(src proto.Message) {
2991 xxx_messageInfo_MessageWithMap.Merge(dst, src)
3049 func (m *MessageWithMap) XXX_Merge(src proto.Message) {
3050 xxx_messageInfo_MessageWithMap.Merge(m, src)
29923051 }
29933052 func (m *MessageWithMap) XXX_Size() int {
29943053 return xxx_messageInfo_MessageWithMap.Size(m)
30593118 func (m *Oneof) String() string { return proto.CompactTextString(m) }
30603119 func (*Oneof) ProtoMessage() {}
30613120 func (*Oneof) Descriptor() ([]byte, []int) {
3062 return fileDescriptor_test_ee9f66cbbebc227c, []int{29}
3063 }
3121 return fileDescriptor_8ca34d01332f1402, []int{29}
3122 }
3123
30643124 func (m *Oneof) XXX_Unmarshal(b []byte) error {
30653125 return xxx_messageInfo_Oneof.Unmarshal(m, b)
30663126 }
30673127 func (m *Oneof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
30683128 return xxx_messageInfo_Oneof.Marshal(b, m, deterministic)
30693129 }
3070 func (dst *Oneof) XXX_Merge(src proto.Message) {
3071 xxx_messageInfo_Oneof.Merge(dst, src)
3130 func (m *Oneof) XXX_Merge(src proto.Message) {
3131 xxx_messageInfo_Oneof.Merge(m, src)
30723132 }
30733133 func (m *Oneof) XXX_Size() int {
30743134 return xxx_messageInfo_Oneof.Size(m)
33353395 return 0
33363396 }
33373397
3338 // XXX_OneofFuncs is for the internal use of the proto package.
3339 func (*Oneof) 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{}) {
3340 return _Oneof_OneofMarshaler, _Oneof_OneofUnmarshaler, _Oneof_OneofSizer, []interface{}{
3398 // XXX_OneofWrappers is for the internal use of the proto package.
3399 func (*Oneof) XXX_OneofWrappers() []interface{} {
3400 return []interface{}{
33413401 (*Oneof_F_Bool)(nil),
33423402 (*Oneof_F_Int32)(nil),
33433403 (*Oneof_F_Int64)(nil),
33593419 }
33603420 }
33613421
3362 func _Oneof_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
3363 m := msg.(*Oneof)
3364 // union
3365 switch x := m.Union.(type) {
3366 case *Oneof_F_Bool:
3367 t := uint64(0)
3368 if x.F_Bool {
3369 t = 1
3370 }
3371 b.EncodeVarint(1<<3 | proto.WireVarint)
3372 b.EncodeVarint(t)
3373 case *Oneof_F_Int32:
3374 b.EncodeVarint(2<<3 | proto.WireVarint)
3375 b.EncodeVarint(uint64(x.F_Int32))
3376 case *Oneof_F_Int64:
3377 b.EncodeVarint(3<<3 | proto.WireVarint)
3378 b.EncodeVarint(uint64(x.F_Int64))
3379 case *Oneof_F_Fixed32:
3380 b.EncodeVarint(4<<3 | proto.WireFixed32)
3381 b.EncodeFixed32(uint64(x.F_Fixed32))
3382 case *Oneof_F_Fixed64:
3383 b.EncodeVarint(5<<3 | proto.WireFixed64)
3384 b.EncodeFixed64(uint64(x.F_Fixed64))
3385 case *Oneof_F_Uint32:
3386 b.EncodeVarint(6<<3 | proto.WireVarint)
3387 b.EncodeVarint(uint64(x.F_Uint32))
3388 case *Oneof_F_Uint64:
3389 b.EncodeVarint(7<<3 | proto.WireVarint)
3390 b.EncodeVarint(uint64(x.F_Uint64))
3391 case *Oneof_F_Float:
3392 b.EncodeVarint(8<<3 | proto.WireFixed32)
3393 b.EncodeFixed32(uint64(math.Float32bits(x.F_Float)))
3394 case *Oneof_F_Double:
3395 b.EncodeVarint(9<<3 | proto.WireFixed64)
3396 b.EncodeFixed64(math.Float64bits(x.F_Double))
3397 case *Oneof_F_String:
3398 b.EncodeVarint(10<<3 | proto.WireBytes)
3399 b.EncodeStringBytes(x.F_String)
3400 case *Oneof_F_Bytes:
3401 b.EncodeVarint(11<<3 | proto.WireBytes)
3402 b.EncodeRawBytes(x.F_Bytes)
3403 case *Oneof_F_Sint32:
3404 b.EncodeVarint(12<<3 | proto.WireVarint)
3405 b.EncodeZigzag32(uint64(x.F_Sint32))
3406 case *Oneof_F_Sint64:
3407 b.EncodeVarint(13<<3 | proto.WireVarint)
3408 b.EncodeZigzag64(uint64(x.F_Sint64))
3409 case *Oneof_F_Enum:
3410 b.EncodeVarint(14<<3 | proto.WireVarint)
3411 b.EncodeVarint(uint64(x.F_Enum))
3412 case *Oneof_F_Message:
3413 b.EncodeVarint(15<<3 | proto.WireBytes)
3414 if err := b.EncodeMessage(x.F_Message); err != nil {
3415 return err
3416 }
3417 case *Oneof_FGroup:
3418 b.EncodeVarint(16<<3 | proto.WireStartGroup)
3419 if err := b.Marshal(x.FGroup); err != nil {
3420 return err
3421 }
3422 b.EncodeVarint(16<<3 | proto.WireEndGroup)
3423 case *Oneof_F_Largest_Tag:
3424 b.EncodeVarint(536870911<<3 | proto.WireVarint)
3425 b.EncodeVarint(uint64(x.F_Largest_Tag))
3426 case nil:
3427 default:
3428 return fmt.Errorf("Oneof.Union has unexpected type %T", x)
3429 }
3430 // tormato
3431 switch x := m.Tormato.(type) {
3432 case *Oneof_Value:
3433 b.EncodeVarint(100<<3 | proto.WireVarint)
3434 b.EncodeVarint(uint64(x.Value))
3435 case nil:
3436 default:
3437 return fmt.Errorf("Oneof.Tormato has unexpected type %T", x)
3438 }
3439 return nil
3440 }
3441
3442 func _Oneof_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
3443 m := msg.(*Oneof)
3444 switch tag {
3445 case 1: // union.F_Bool
3446 if wire != proto.WireVarint {
3447 return true, proto.ErrInternalBadWireType
3448 }
3449 x, err := b.DecodeVarint()
3450 m.Union = &Oneof_F_Bool{x != 0}
3451 return true, err
3452 case 2: // union.F_Int32
3453 if wire != proto.WireVarint {
3454 return true, proto.ErrInternalBadWireType
3455 }
3456 x, err := b.DecodeVarint()
3457 m.Union = &Oneof_F_Int32{int32(x)}
3458 return true, err
3459 case 3: // union.F_Int64
3460 if wire != proto.WireVarint {
3461 return true, proto.ErrInternalBadWireType
3462 }
3463 x, err := b.DecodeVarint()
3464 m.Union = &Oneof_F_Int64{int64(x)}
3465 return true, err
3466 case 4: // union.F_Fixed32
3467 if wire != proto.WireFixed32 {
3468 return true, proto.ErrInternalBadWireType
3469 }
3470 x, err := b.DecodeFixed32()
3471 m.Union = &Oneof_F_Fixed32{uint32(x)}
3472 return true, err
3473 case 5: // union.F_Fixed64
3474 if wire != proto.WireFixed64 {
3475 return true, proto.ErrInternalBadWireType
3476 }
3477 x, err := b.DecodeFixed64()
3478 m.Union = &Oneof_F_Fixed64{x}
3479 return true, err
3480 case 6: // union.F_Uint32
3481 if wire != proto.WireVarint {
3482 return true, proto.ErrInternalBadWireType
3483 }
3484 x, err := b.DecodeVarint()
3485 m.Union = &Oneof_F_Uint32{uint32(x)}
3486 return true, err
3487 case 7: // union.F_Uint64
3488 if wire != proto.WireVarint {
3489 return true, proto.ErrInternalBadWireType
3490 }
3491 x, err := b.DecodeVarint()
3492 m.Union = &Oneof_F_Uint64{x}
3493 return true, err
3494 case 8: // union.F_Float
3495 if wire != proto.WireFixed32 {
3496 return true, proto.ErrInternalBadWireType
3497 }
3498 x, err := b.DecodeFixed32()
3499 m.Union = &Oneof_F_Float{math.Float32frombits(uint32(x))}
3500 return true, err
3501 case 9: // union.F_Double
3502 if wire != proto.WireFixed64 {
3503 return true, proto.ErrInternalBadWireType
3504 }
3505 x, err := b.DecodeFixed64()
3506 m.Union = &Oneof_F_Double{math.Float64frombits(x)}
3507 return true, err
3508 case 10: // union.F_String
3509 if wire != proto.WireBytes {
3510 return true, proto.ErrInternalBadWireType
3511 }
3512 x, err := b.DecodeStringBytes()
3513 m.Union = &Oneof_F_String{x}
3514 return true, err
3515 case 11: // union.F_Bytes
3516 if wire != proto.WireBytes {
3517 return true, proto.ErrInternalBadWireType
3518 }
3519 x, err := b.DecodeRawBytes(true)
3520 m.Union = &Oneof_F_Bytes{x}
3521 return true, err
3522 case 12: // union.F_Sint32
3523 if wire != proto.WireVarint {
3524 return true, proto.ErrInternalBadWireType
3525 }
3526 x, err := b.DecodeZigzag32()
3527 m.Union = &Oneof_F_Sint32{int32(x)}
3528 return true, err
3529 case 13: // union.F_Sint64
3530 if wire != proto.WireVarint {
3531 return true, proto.ErrInternalBadWireType
3532 }
3533 x, err := b.DecodeZigzag64()
3534 m.Union = &Oneof_F_Sint64{int64(x)}
3535 return true, err
3536 case 14: // union.F_Enum
3537 if wire != proto.WireVarint {
3538 return true, proto.ErrInternalBadWireType
3539 }
3540 x, err := b.DecodeVarint()
3541 m.Union = &Oneof_F_Enum{MyMessage_Color(x)}
3542 return true, err
3543 case 15: // union.F_Message
3544 if wire != proto.WireBytes {
3545 return true, proto.ErrInternalBadWireType
3546 }
3547 msg := new(GoTestField)
3548 err := b.DecodeMessage(msg)
3549 m.Union = &Oneof_F_Message{msg}
3550 return true, err
3551 case 16: // union.f_group
3552 if wire != proto.WireStartGroup {
3553 return true, proto.ErrInternalBadWireType
3554 }
3555 msg := new(Oneof_F_Group)
3556 err := b.DecodeGroup(msg)
3557 m.Union = &Oneof_FGroup{msg}
3558 return true, err
3559 case 536870911: // union.F_Largest_Tag
3560 if wire != proto.WireVarint {
3561 return true, proto.ErrInternalBadWireType
3562 }
3563 x, err := b.DecodeVarint()
3564 m.Union = &Oneof_F_Largest_Tag{int32(x)}
3565 return true, err
3566 case 100: // tormato.value
3567 if wire != proto.WireVarint {
3568 return true, proto.ErrInternalBadWireType
3569 }
3570 x, err := b.DecodeVarint()
3571 m.Tormato = &Oneof_Value{int32(x)}
3572 return true, err
3573 default:
3574 return false, nil
3575 }
3576 }
3577
3578 func _Oneof_OneofSizer(msg proto.Message) (n int) {
3579 m := msg.(*Oneof)
3580 // union
3581 switch x := m.Union.(type) {
3582 case *Oneof_F_Bool:
3583 n += 1 // tag and wire
3584 n += 1
3585 case *Oneof_F_Int32:
3586 n += 1 // tag and wire
3587 n += proto.SizeVarint(uint64(x.F_Int32))
3588 case *Oneof_F_Int64:
3589 n += 1 // tag and wire
3590 n += proto.SizeVarint(uint64(x.F_Int64))
3591 case *Oneof_F_Fixed32:
3592 n += 1 // tag and wire
3593 n += 4
3594 case *Oneof_F_Fixed64:
3595 n += 1 // tag and wire
3596 n += 8
3597 case *Oneof_F_Uint32:
3598 n += 1 // tag and wire
3599 n += proto.SizeVarint(uint64(x.F_Uint32))
3600 case *Oneof_F_Uint64:
3601 n += 1 // tag and wire
3602 n += proto.SizeVarint(uint64(x.F_Uint64))
3603 case *Oneof_F_Float:
3604 n += 1 // tag and wire
3605 n += 4
3606 case *Oneof_F_Double:
3607 n += 1 // tag and wire
3608 n += 8
3609 case *Oneof_F_String:
3610 n += 1 // tag and wire
3611 n += proto.SizeVarint(uint64(len(x.F_String)))
3612 n += len(x.F_String)
3613 case *Oneof_F_Bytes:
3614 n += 1 // tag and wire
3615 n += proto.SizeVarint(uint64(len(x.F_Bytes)))
3616 n += len(x.F_Bytes)
3617 case *Oneof_F_Sint32:
3618 n += 1 // tag and wire
3619 n += proto.SizeVarint(uint64((uint32(x.F_Sint32) << 1) ^ uint32((int32(x.F_Sint32) >> 31))))
3620 case *Oneof_F_Sint64:
3621 n += 1 // tag and wire
3622 n += proto.SizeVarint(uint64(uint64(x.F_Sint64<<1) ^ uint64((int64(x.F_Sint64) >> 63))))
3623 case *Oneof_F_Enum:
3624 n += 1 // tag and wire
3625 n += proto.SizeVarint(uint64(x.F_Enum))
3626 case *Oneof_F_Message:
3627 s := proto.Size(x.F_Message)
3628 n += 1 // tag and wire
3629 n += proto.SizeVarint(uint64(s))
3630 n += s
3631 case *Oneof_FGroup:
3632 n += 2 // tag and wire
3633 n += proto.Size(x.FGroup)
3634 n += 2 // tag and wire
3635 case *Oneof_F_Largest_Tag:
3636 n += 5 // tag and wire
3637 n += proto.SizeVarint(uint64(x.F_Largest_Tag))
3638 case nil:
3639 default:
3640 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
3641 }
3642 // tormato
3643 switch x := m.Tormato.(type) {
3644 case *Oneof_Value:
3645 n += 2 // tag and wire
3646 n += proto.SizeVarint(uint64(x.Value))
3647 case nil:
3648 default:
3649 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
3650 }
3651 return n
3652 }
3653
36543422 type Oneof_F_Group struct {
36553423 X *int32 `protobuf:"varint,17,opt,name=x" json:"x,omitempty"`
36563424 XXX_NoUnkeyedLiteral struct{} `json:"-"`
36623430 func (m *Oneof_F_Group) String() string { return proto.CompactTextString(m) }
36633431 func (*Oneof_F_Group) ProtoMessage() {}
36643432 func (*Oneof_F_Group) Descriptor() ([]byte, []int) {
3665 return fileDescriptor_test_ee9f66cbbebc227c, []int{29, 0}
3666 }
3433 return fileDescriptor_8ca34d01332f1402, []int{29, 0}
3434 }
3435
36673436 func (m *Oneof_F_Group) XXX_Unmarshal(b []byte) error {
36683437 return xxx_messageInfo_Oneof_F_Group.Unmarshal(m, b)
36693438 }
36703439 func (m *Oneof_F_Group) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
36713440 return xxx_messageInfo_Oneof_F_Group.Marshal(b, m, deterministic)
36723441 }
3673 func (dst *Oneof_F_Group) XXX_Merge(src proto.Message) {
3674 xxx_messageInfo_Oneof_F_Group.Merge(dst, src)
3442 func (m *Oneof_F_Group) XXX_Merge(src proto.Message) {
3443 xxx_messageInfo_Oneof_F_Group.Merge(m, src)
36753444 }
36763445 func (m *Oneof_F_Group) XXX_Size() int {
36773446 return xxx_messageInfo_Oneof_F_Group.Size(m)
37103479 func (m *Communique) String() string { return proto.CompactTextString(m) }
37113480 func (*Communique) ProtoMessage() {}
37123481 func (*Communique) Descriptor() ([]byte, []int) {
3713 return fileDescriptor_test_ee9f66cbbebc227c, []int{30}
3714 }
3482 return fileDescriptor_8ca34d01332f1402, []int{30}
3483 }
3484
37153485 func (m *Communique) XXX_Unmarshal(b []byte) error {
37163486 return xxx_messageInfo_Communique.Unmarshal(m, b)
37173487 }
37183488 func (m *Communique) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
37193489 return xxx_messageInfo_Communique.Marshal(b, m, deterministic)
37203490 }
3721 func (dst *Communique) XXX_Merge(src proto.Message) {
3722 xxx_messageInfo_Communique.Merge(dst, src)
3491 func (m *Communique) XXX_Merge(src proto.Message) {
3492 xxx_messageInfo_Communique.Merge(m, src)
37233493 }
37243494 func (m *Communique) XXX_Size() int {
37253495 return xxx_messageInfo_Communique.Size(m)
38263596 return nil
38273597 }
38283598
3829 // XXX_OneofFuncs is for the internal use of the proto package.
3830 func (*Communique) 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{}) {
3831 return _Communique_OneofMarshaler, _Communique_OneofUnmarshaler, _Communique_OneofSizer, []interface{}{
3599 // XXX_OneofWrappers is for the internal use of the proto package.
3600 func (*Communique) XXX_OneofWrappers() []interface{} {
3601 return []interface{}{
38323602 (*Communique_Number)(nil),
38333603 (*Communique_Name)(nil),
38343604 (*Communique_Data)(nil),
38363606 (*Communique_Col)(nil),
38373607 (*Communique_Msg)(nil),
38383608 }
3839 }
3840
3841 func _Communique_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
3842 m := msg.(*Communique)
3843 // union
3844 switch x := m.Union.(type) {
3845 case *Communique_Number:
3846 b.EncodeVarint(5<<3 | proto.WireVarint)
3847 b.EncodeVarint(uint64(x.Number))
3848 case *Communique_Name:
3849 b.EncodeVarint(6<<3 | proto.WireBytes)
3850 b.EncodeStringBytes(x.Name)
3851 case *Communique_Data:
3852 b.EncodeVarint(7<<3 | proto.WireBytes)
3853 b.EncodeRawBytes(x.Data)
3854 case *Communique_TempC:
3855 b.EncodeVarint(8<<3 | proto.WireFixed64)
3856 b.EncodeFixed64(math.Float64bits(x.TempC))
3857 case *Communique_Col:
3858 b.EncodeVarint(9<<3 | proto.WireVarint)
3859 b.EncodeVarint(uint64(x.Col))
3860 case *Communique_Msg:
3861 b.EncodeVarint(10<<3 | proto.WireBytes)
3862 if err := b.EncodeMessage(x.Msg); err != nil {
3863 return err
3864 }
3865 case nil:
3866 default:
3867 return fmt.Errorf("Communique.Union has unexpected type %T", x)
3868 }
3869 return nil
3870 }
3871
3872 func _Communique_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
3873 m := msg.(*Communique)
3874 switch tag {
3875 case 5: // union.number
3876 if wire != proto.WireVarint {
3877 return true, proto.ErrInternalBadWireType
3878 }
3879 x, err := b.DecodeVarint()
3880 m.Union = &Communique_Number{int32(x)}
3881 return true, err
3882 case 6: // union.name
3883 if wire != proto.WireBytes {
3884 return true, proto.ErrInternalBadWireType
3885 }
3886 x, err := b.DecodeStringBytes()
3887 m.Union = &Communique_Name{x}
3888 return true, err
3889 case 7: // union.data
3890 if wire != proto.WireBytes {
3891 return true, proto.ErrInternalBadWireType
3892 }
3893 x, err := b.DecodeRawBytes(true)
3894 m.Union = &Communique_Data{x}
3895 return true, err
3896 case 8: // union.temp_c
3897 if wire != proto.WireFixed64 {
3898 return true, proto.ErrInternalBadWireType
3899 }
3900 x, err := b.DecodeFixed64()
3901 m.Union = &Communique_TempC{math.Float64frombits(x)}
3902 return true, err
3903 case 9: // union.col
3904 if wire != proto.WireVarint {
3905 return true, proto.ErrInternalBadWireType
3906 }
3907 x, err := b.DecodeVarint()
3908 m.Union = &Communique_Col{MyMessage_Color(x)}
3909 return true, err
3910 case 10: // union.msg
3911 if wire != proto.WireBytes {
3912 return true, proto.ErrInternalBadWireType
3913 }
3914 msg := new(Strings)
3915 err := b.DecodeMessage(msg)
3916 m.Union = &Communique_Msg{msg}
3917 return true, err
3918 default:
3919 return false, nil
3920 }
3921 }
3922
3923 func _Communique_OneofSizer(msg proto.Message) (n int) {
3924 m := msg.(*Communique)
3925 // union
3926 switch x := m.Union.(type) {
3927 case *Communique_Number:
3928 n += 1 // tag and wire
3929 n += proto.SizeVarint(uint64(x.Number))
3930 case *Communique_Name:
3931 n += 1 // tag and wire
3932 n += proto.SizeVarint(uint64(len(x.Name)))
3933 n += len(x.Name)
3934 case *Communique_Data:
3935 n += 1 // tag and wire
3936 n += proto.SizeVarint(uint64(len(x.Data)))
3937 n += len(x.Data)
3938 case *Communique_TempC:
3939 n += 1 // tag and wire
3940 n += 8
3941 case *Communique_Col:
3942 n += 1 // tag and wire
3943 n += proto.SizeVarint(uint64(x.Col))
3944 case *Communique_Msg:
3945 s := proto.Size(x.Msg)
3946 n += 1 // tag and wire
3947 n += proto.SizeVarint(uint64(s))
3948 n += s
3949 case nil:
3950 default:
3951 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
3952 }
3953 return n
39543609 }
39553610
39563611 type TestUTF8 struct {
39703625 func (m *TestUTF8) String() string { return proto.CompactTextString(m) }
39713626 func (*TestUTF8) ProtoMessage() {}
39723627 func (*TestUTF8) Descriptor() ([]byte, []int) {
3973 return fileDescriptor_test_ee9f66cbbebc227c, []int{31}
3974 }
3628 return fileDescriptor_8ca34d01332f1402, []int{31}
3629 }
3630
39753631 func (m *TestUTF8) XXX_Unmarshal(b []byte) error {
39763632 return xxx_messageInfo_TestUTF8.Unmarshal(m, b)
39773633 }
39783634 func (m *TestUTF8) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
39793635 return xxx_messageInfo_TestUTF8.Marshal(b, m, deterministic)
39803636 }
3981 func (dst *TestUTF8) XXX_Merge(src proto.Message) {
3982 xxx_messageInfo_TestUTF8.Merge(dst, src)
3637 func (m *TestUTF8) XXX_Merge(src proto.Message) {
3638 xxx_messageInfo_TestUTF8.Merge(m, src)
39833639 }
39843640 func (m *TestUTF8) XXX_Size() int {
39853641 return xxx_messageInfo_TestUTF8.Size(m)
40423698 return nil
40433699 }
40443700
4045 // XXX_OneofFuncs is for the internal use of the proto package.
4046 func (*TestUTF8) 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{}) {
4047 return _TestUTF8_OneofMarshaler, _TestUTF8_OneofUnmarshaler, _TestUTF8_OneofSizer, []interface{}{
3701 // XXX_OneofWrappers is for the internal use of the proto package.
3702 func (*TestUTF8) XXX_OneofWrappers() []interface{} {
3703 return []interface{}{
40483704 (*TestUTF8_Field)(nil),
40493705 }
4050 }
4051
4052 func _TestUTF8_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
4053 m := msg.(*TestUTF8)
4054 // oneof
4055 switch x := m.Oneof.(type) {
4056 case *TestUTF8_Field:
4057 b.EncodeVarint(3<<3 | proto.WireBytes)
4058 b.EncodeStringBytes(x.Field)
4059 case nil:
4060 default:
4061 return fmt.Errorf("TestUTF8.Oneof has unexpected type %T", x)
4062 }
4063 return nil
4064 }
4065
4066 func _TestUTF8_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
4067 m := msg.(*TestUTF8)
4068 switch tag {
4069 case 3: // oneof.field
4070 if wire != proto.WireBytes {
4071 return true, proto.ErrInternalBadWireType
4072 }
4073 x, err := b.DecodeStringBytes()
4074 m.Oneof = &TestUTF8_Field{x}
4075 return true, err
4076 default:
4077 return false, nil
4078 }
4079 }
4080
4081 func _TestUTF8_OneofSizer(msg proto.Message) (n int) {
4082 m := msg.(*TestUTF8)
4083 // oneof
4084 switch x := m.Oneof.(type) {
4085 case *TestUTF8_Field:
4086 n += 1 // tag and wire
4087 n += proto.SizeVarint(uint64(len(x.Field)))
4088 n += len(x.Field)
4089 case nil:
4090 default:
4091 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
4092 }
4093 return n
40943706 }
40953707
40963708 var E_Greeting = &proto.ExtensionDesc{
41163728 ExtensionType: ([]*ComplexExtension)(nil),
41173729 Field: 201,
41183730 Name: "test_proto.r_complex",
4119 Tag: "bytes,201,rep,name=r_complex,json=rComplex",
3731 Tag: "bytes,201,rep,name=r_complex",
41203732 Filename: "test_proto/test.proto",
41213733 }
41223734
41253737 ExtensionType: (*float64)(nil),
41263738 Field: 101,
41273739 Name: "test_proto.no_default_double",
4128 Tag: "fixed64,101,opt,name=no_default_double,json=noDefaultDouble",
3740 Tag: "fixed64,101,opt,name=no_default_double",
41293741 Filename: "test_proto/test.proto",
41303742 }
41313743
41343746 ExtensionType: (*float32)(nil),
41353747 Field: 102,
41363748 Name: "test_proto.no_default_float",
4137 Tag: "fixed32,102,opt,name=no_default_float,json=noDefaultFloat",
3749 Tag: "fixed32,102,opt,name=no_default_float",
41383750 Filename: "test_proto/test.proto",
41393751 }
41403752
41433755 ExtensionType: (*int32)(nil),
41443756 Field: 103,
41453757 Name: "test_proto.no_default_int32",
4146 Tag: "varint,103,opt,name=no_default_int32,json=noDefaultInt32",
3758 Tag: "varint,103,opt,name=no_default_int32",
41473759 Filename: "test_proto/test.proto",
41483760 }
41493761
41523764 ExtensionType: (*int64)(nil),
41533765 Field: 104,
41543766 Name: "test_proto.no_default_int64",
4155 Tag: "varint,104,opt,name=no_default_int64,json=noDefaultInt64",
3767 Tag: "varint,104,opt,name=no_default_int64",
41563768 Filename: "test_proto/test.proto",
41573769 }
41583770
41613773 ExtensionType: (*uint32)(nil),
41623774 Field: 105,
41633775 Name: "test_proto.no_default_uint32",
4164 Tag: "varint,105,opt,name=no_default_uint32,json=noDefaultUint32",
3776 Tag: "varint,105,opt,name=no_default_uint32",
41653777 Filename: "test_proto/test.proto",
41663778 }
41673779
41703782 ExtensionType: (*uint64)(nil),
41713783 Field: 106,
41723784 Name: "test_proto.no_default_uint64",
4173 Tag: "varint,106,opt,name=no_default_uint64,json=noDefaultUint64",
3785 Tag: "varint,106,opt,name=no_default_uint64",
41743786 Filename: "test_proto/test.proto",
41753787 }
41763788
41793791 ExtensionType: (*int32)(nil),
41803792 Field: 107,
41813793 Name: "test_proto.no_default_sint32",
4182 Tag: "zigzag32,107,opt,name=no_default_sint32,json=noDefaultSint32",
3794 Tag: "zigzag32,107,opt,name=no_default_sint32",
41833795 Filename: "test_proto/test.proto",
41843796 }
41853797
41883800 ExtensionType: (*int64)(nil),
41893801 Field: 108,
41903802 Name: "test_proto.no_default_sint64",
4191 Tag: "zigzag64,108,opt,name=no_default_sint64,json=noDefaultSint64",
3803 Tag: "zigzag64,108,opt,name=no_default_sint64",
41923804 Filename: "test_proto/test.proto",
41933805 }
41943806
41973809 ExtensionType: (*uint32)(nil),
41983810 Field: 109,
41993811 Name: "test_proto.no_default_fixed32",
4200 Tag: "fixed32,109,opt,name=no_default_fixed32,json=noDefaultFixed32",
3812 Tag: "fixed32,109,opt,name=no_default_fixed32",
42013813 Filename: "test_proto/test.proto",
42023814 }
42033815
42063818 ExtensionType: (*uint64)(nil),
42073819 Field: 110,
42083820 Name: "test_proto.no_default_fixed64",
4209 Tag: "fixed64,110,opt,name=no_default_fixed64,json=noDefaultFixed64",
3821 Tag: "fixed64,110,opt,name=no_default_fixed64",
42103822 Filename: "test_proto/test.proto",
42113823 }
42123824
42153827 ExtensionType: (*int32)(nil),
42163828 Field: 111,
42173829 Name: "test_proto.no_default_sfixed32",
4218 Tag: "fixed32,111,opt,name=no_default_sfixed32,json=noDefaultSfixed32",
3830 Tag: "fixed32,111,opt,name=no_default_sfixed32",
42193831 Filename: "test_proto/test.proto",
42203832 }
42213833
42243836 ExtensionType: (*int64)(nil),
42253837 Field: 112,
42263838 Name: "test_proto.no_default_sfixed64",
4227 Tag: "fixed64,112,opt,name=no_default_sfixed64,json=noDefaultSfixed64",
3839 Tag: "fixed64,112,opt,name=no_default_sfixed64",
42283840 Filename: "test_proto/test.proto",
42293841 }
42303842
42333845 ExtensionType: (*bool)(nil),
42343846 Field: 113,
42353847 Name: "test_proto.no_default_bool",
4236 Tag: "varint,113,opt,name=no_default_bool,json=noDefaultBool",
3848 Tag: "varint,113,opt,name=no_default_bool",
42373849 Filename: "test_proto/test.proto",
42383850 }
42393851
42423854 ExtensionType: (*string)(nil),
42433855 Field: 114,
42443856 Name: "test_proto.no_default_string",
4245 Tag: "bytes,114,opt,name=no_default_string,json=noDefaultString",
3857 Tag: "bytes,114,opt,name=no_default_string",
42463858 Filename: "test_proto/test.proto",
42473859 }
42483860
42513863 ExtensionType: ([]byte)(nil),
42523864 Field: 115,
42533865 Name: "test_proto.no_default_bytes",
4254 Tag: "bytes,115,opt,name=no_default_bytes,json=noDefaultBytes",
3866 Tag: "bytes,115,opt,name=no_default_bytes",
42553867 Filename: "test_proto/test.proto",
42563868 }
42573869
42603872 ExtensionType: (*DefaultsMessage_DefaultsEnum)(nil),
42613873 Field: 116,
42623874 Name: "test_proto.no_default_enum",
4263 Tag: "varint,116,opt,name=no_default_enum,json=noDefaultEnum,enum=test_proto.DefaultsMessage_DefaultsEnum",
3875 Tag: "varint,116,opt,name=no_default_enum,enum=test_proto.DefaultsMessage_DefaultsEnum",
42643876 Filename: "test_proto/test.proto",
42653877 }
42663878
42693881 ExtensionType: (*float64)(nil),
42703882 Field: 201,
42713883 Name: "test_proto.default_double",
4272 Tag: "fixed64,201,opt,name=default_double,json=defaultDouble,def=3.1415",
3884 Tag: "fixed64,201,opt,name=default_double,def=3.1415",
42733885 Filename: "test_proto/test.proto",
42743886 }
42753887
42783890 ExtensionType: (*float32)(nil),
42793891 Field: 202,
42803892 Name: "test_proto.default_float",
4281 Tag: "fixed32,202,opt,name=default_float,json=defaultFloat,def=3.14",
3893 Tag: "fixed32,202,opt,name=default_float,def=3.14",
42823894 Filename: "test_proto/test.proto",
42833895 }
42843896
42873899 ExtensionType: (*int32)(nil),
42883900 Field: 203,
42893901 Name: "test_proto.default_int32",
4290 Tag: "varint,203,opt,name=default_int32,json=defaultInt32,def=42",
3902 Tag: "varint,203,opt,name=default_int32,def=42",
42913903 Filename: "test_proto/test.proto",
42923904 }
42933905
42963908 ExtensionType: (*int64)(nil),
42973909 Field: 204,
42983910 Name: "test_proto.default_int64",
4299 Tag: "varint,204,opt,name=default_int64,json=defaultInt64,def=43",
3911 Tag: "varint,204,opt,name=default_int64,def=43",
43003912 Filename: "test_proto/test.proto",
43013913 }
43023914
43053917 ExtensionType: (*uint32)(nil),
43063918 Field: 205,
43073919 Name: "test_proto.default_uint32",
4308 Tag: "varint,205,opt,name=default_uint32,json=defaultUint32,def=44",
3920 Tag: "varint,205,opt,name=default_uint32,def=44",
43093921 Filename: "test_proto/test.proto",
43103922 }
43113923
43143926 ExtensionType: (*uint64)(nil),
43153927 Field: 206,
43163928 Name: "test_proto.default_uint64",
4317 Tag: "varint,206,opt,name=default_uint64,json=defaultUint64,def=45",
3929 Tag: "varint,206,opt,name=default_uint64,def=45",
43183930 Filename: "test_proto/test.proto",
43193931 }
43203932
43233935 ExtensionType: (*int32)(nil),
43243936 Field: 207,
43253937 Name: "test_proto.default_sint32",
4326 Tag: "zigzag32,207,opt,name=default_sint32,json=defaultSint32,def=46",
3938 Tag: "zigzag32,207,opt,name=default_sint32,def=46",
43273939 Filename: "test_proto/test.proto",
43283940 }
43293941
43323944 ExtensionType: (*int64)(nil),
43333945 Field: 208,
43343946 Name: "test_proto.default_sint64",
4335 Tag: "zigzag64,208,opt,name=default_sint64,json=defaultSint64,def=47",
3947 Tag: "zigzag64,208,opt,name=default_sint64,def=47",
43363948 Filename: "test_proto/test.proto",
43373949 }
43383950
43413953 ExtensionType: (*uint32)(nil),
43423954 Field: 209,
43433955 Name: "test_proto.default_fixed32",
4344 Tag: "fixed32,209,opt,name=default_fixed32,json=defaultFixed32,def=48",
3956 Tag: "fixed32,209,opt,name=default_fixed32,def=48",
43453957 Filename: "test_proto/test.proto",
43463958 }
43473959
43503962 ExtensionType: (*uint64)(nil),
43513963 Field: 210,
43523964 Name: "test_proto.default_fixed64",
4353 Tag: "fixed64,210,opt,name=default_fixed64,json=defaultFixed64,def=49",
3965 Tag: "fixed64,210,opt,name=default_fixed64,def=49",
43543966 Filename: "test_proto/test.proto",
43553967 }
43563968
43593971 ExtensionType: (*int32)(nil),
43603972 Field: 211,
43613973 Name: "test_proto.default_sfixed32",
4362 Tag: "fixed32,211,opt,name=default_sfixed32,json=defaultSfixed32,def=50",
3974 Tag: "fixed32,211,opt,name=default_sfixed32,def=50",
43633975 Filename: "test_proto/test.proto",
43643976 }
43653977
43683980 ExtensionType: (*int64)(nil),
43693981 Field: 212,
43703982 Name: "test_proto.default_sfixed64",
4371 Tag: "fixed64,212,opt,name=default_sfixed64,json=defaultSfixed64,def=51",
3983 Tag: "fixed64,212,opt,name=default_sfixed64,def=51",
43723984 Filename: "test_proto/test.proto",
43733985 }
43743986
43773989 ExtensionType: (*bool)(nil),
43783990 Field: 213,
43793991 Name: "test_proto.default_bool",
4380 Tag: "varint,213,opt,name=default_bool,json=defaultBool,def=1",
3992 Tag: "varint,213,opt,name=default_bool,def=1",
43813993 Filename: "test_proto/test.proto",
43823994 }
43833995
43863998 ExtensionType: (*string)(nil),
43873999 Field: 214,
43884000 Name: "test_proto.default_string",
4389 Tag: "bytes,214,opt,name=default_string,json=defaultString,def=Hello, string,def=foo",
4001 Tag: "bytes,214,opt,name=default_string,def=Hello, string,def=foo",
43904002 Filename: "test_proto/test.proto",
43914003 }
43924004
43954007 ExtensionType: ([]byte)(nil),
43964008 Field: 215,
43974009 Name: "test_proto.default_bytes",
4398 Tag: "bytes,215,opt,name=default_bytes,json=defaultBytes,def=Hello, bytes",
4010 Tag: "bytes,215,opt,name=default_bytes,def=Hello, bytes",
43994011 Filename: "test_proto/test.proto",
44004012 }
44014013
44044016 ExtensionType: (*DefaultsMessage_DefaultsEnum)(nil),
44054017 Field: 216,
44064018 Name: "test_proto.default_enum",
4407 Tag: "varint,216,opt,name=default_enum,json=defaultEnum,enum=test_proto.DefaultsMessage_DefaultsEnum,def=1",
4019 Tag: "varint,216,opt,name=default_enum,enum=test_proto.DefaultsMessage_DefaultsEnum,def=1",
44084020 Filename: "test_proto/test.proto",
44094021 }
44104022
48594471 }
48604472
48614473 func init() {
4474 proto.RegisterEnum("test_proto.FOO", FOO_name, FOO_value)
4475 proto.RegisterEnum("test_proto.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value)
4476 proto.RegisterEnum("test_proto.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value)
4477 proto.RegisterEnum("test_proto.DefaultsMessage_DefaultsEnum", DefaultsMessage_DefaultsEnum_name, DefaultsMessage_DefaultsEnum_value)
4478 proto.RegisterEnum("test_proto.Defaults_Color", Defaults_Color_name, Defaults_Color_value)
4479 proto.RegisterEnum("test_proto.RepeatedEnum_Color", RepeatedEnum_Color_name, RepeatedEnum_Color_value)
48624480 proto.RegisterType((*GoEnum)(nil), "test_proto.GoEnum")
48634481 proto.RegisterType((*GoTestField)(nil), "test_proto.GoTestField")
48644482 proto.RegisterType((*GoTest)(nil), "test_proto.GoTest")
48814499 proto.RegisterType((*RequiredInnerMessage)(nil), "test_proto.RequiredInnerMessage")
48824500 proto.RegisterType((*MyMessage)(nil), "test_proto.MyMessage")
48834501 proto.RegisterType((*MyMessage_SomeGroup)(nil), "test_proto.MyMessage.SomeGroup")
4502 proto.RegisterExtension(E_Ext_More)
4503 proto.RegisterExtension(E_Ext_Text)
4504 proto.RegisterExtension(E_Ext_Number)
48844505 proto.RegisterType((*Ext)(nil), "test_proto.Ext")
48854506 proto.RegisterMapType((map[int32]int32)(nil), "test_proto.Ext.MapFieldEntry")
48864507 proto.RegisterType((*ComplexExtension)(nil), "test_proto.ComplexExtension")
49104531 proto.RegisterType((*TestUTF8)(nil), "test_proto.TestUTF8")
49114532 proto.RegisterMapType((map[string]int64)(nil), "test_proto.TestUTF8.MapKeyEntry")
49124533 proto.RegisterMapType((map[int64]string)(nil), "test_proto.TestUTF8.MapValueEntry")
4913 proto.RegisterEnum("test_proto.FOO", FOO_name, FOO_value)
4914 proto.RegisterEnum("test_proto.GoTest_KIND", GoTest_KIND_name, GoTest_KIND_value)
4915 proto.RegisterEnum("test_proto.MyMessage_Color", MyMessage_Color_name, MyMessage_Color_value)
4916 proto.RegisterEnum("test_proto.DefaultsMessage_DefaultsEnum", DefaultsMessage_DefaultsEnum_name, DefaultsMessage_DefaultsEnum_value)
4917 proto.RegisterEnum("test_proto.Defaults_Color", Defaults_Color_name, Defaults_Color_value)
4918 proto.RegisterEnum("test_proto.RepeatedEnum_Color", RepeatedEnum_Color_name, RepeatedEnum_Color_value)
4919 proto.RegisterExtension(E_Ext_More)
4920 proto.RegisterExtension(E_Ext_Text)
4921 proto.RegisterExtension(E_Ext_Number)
49224534 proto.RegisterExtension(E_Greeting)
49234535 proto.RegisterExtension(E_Complex)
49244536 proto.RegisterExtension(E_RComplex)
50064618 proto.RegisterExtension(E_X250)
50074619 }
50084620
5009 func init() { proto.RegisterFile("test_proto/test.proto", fileDescriptor_test_ee9f66cbbebc227c) }
5010
5011 var fileDescriptor_test_ee9f66cbbebc227c = []byte{
4621 func init() { proto.RegisterFile("test_proto/test.proto", fileDescriptor_8ca34d01332f1402) }
4622
4623 var fileDescriptor_8ca34d01332f1402 = []byte{
50124624 // 4795 bytes of a gzipped FileDescriptorProto
50134625 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x5b, 0xd9, 0x73, 0x1b, 0x47,
50144626 0x7a, 0xd7, 0x0c, 0xee, 0x0f, 0x20, 0x31, 0x6c, 0xc9, 0x12, 0x44, 0x59, 0xd2, 0x08, 0x6b, 0xaf,
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: google/protobuf/descriptor.proto
22
3 package descriptor // import "github.com/golang/protobuf/protoc-gen-go/descriptor"
4
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
3 package descriptor
4
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 math "math"
9 )
810
911 // Reference imports to suppress errors if they are not otherwise used.
1012 var _ = proto.Marshal
1517 // is compatible with the proto package it is being compiled against.
1618 // A compilation error at this line likely means your copy of the
1719 // proto package needs to be updated.
18 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
20 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
1921
2022 type FieldDescriptorProto_Type int32
2123
7173 17: "TYPE_SINT32",
7274 18: "TYPE_SINT64",
7375 }
76
7477 var FieldDescriptorProto_Type_value = map[string]int32{
7578 "TYPE_DOUBLE": 1,
7679 "TYPE_FLOAT": 2,
97100 *p = x
98101 return p
99102 }
103
100104 func (x FieldDescriptorProto_Type) String() string {
101105 return proto.EnumName(FieldDescriptorProto_Type_name, int32(x))
102106 }
107
103108 func (x *FieldDescriptorProto_Type) UnmarshalJSON(data []byte) error {
104109 value, err := proto.UnmarshalJSONEnum(FieldDescriptorProto_Type_value, data, "FieldDescriptorProto_Type")
105110 if err != nil {
108113 *x = FieldDescriptorProto_Type(value)
109114 return nil
110115 }
116
111117 func (FieldDescriptorProto_Type) EnumDescriptor() ([]byte, []int) {
112 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{4, 0}
118 return fileDescriptor_e5baabe45344a177, []int{4, 0}
113119 }
114120
115121 type FieldDescriptorProto_Label int32
126132 2: "LABEL_REQUIRED",
127133 3: "LABEL_REPEATED",
128134 }
135
129136 var FieldDescriptorProto_Label_value = map[string]int32{
130137 "LABEL_OPTIONAL": 1,
131138 "LABEL_REQUIRED": 2,
137144 *p = x
138145 return p
139146 }
147
140148 func (x FieldDescriptorProto_Label) String() string {
141149 return proto.EnumName(FieldDescriptorProto_Label_name, int32(x))
142150 }
151
143152 func (x *FieldDescriptorProto_Label) UnmarshalJSON(data []byte) error {
144153 value, err := proto.UnmarshalJSONEnum(FieldDescriptorProto_Label_value, data, "FieldDescriptorProto_Label")
145154 if err != nil {
148157 *x = FieldDescriptorProto_Label(value)
149158 return nil
150159 }
160
151161 func (FieldDescriptorProto_Label) EnumDescriptor() ([]byte, []int) {
152 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{4, 1}
162 return fileDescriptor_e5baabe45344a177, []int{4, 1}
153163 }
154164
155165 // Generated classes can be optimized for speed or code size.
167177 2: "CODE_SIZE",
168178 3: "LITE_RUNTIME",
169179 }
180
170181 var FileOptions_OptimizeMode_value = map[string]int32{
171182 "SPEED": 1,
172183 "CODE_SIZE": 2,
178189 *p = x
179190 return p
180191 }
192
181193 func (x FileOptions_OptimizeMode) String() string {
182194 return proto.EnumName(FileOptions_OptimizeMode_name, int32(x))
183195 }
196
184197 func (x *FileOptions_OptimizeMode) UnmarshalJSON(data []byte) error {
185198 value, err := proto.UnmarshalJSONEnum(FileOptions_OptimizeMode_value, data, "FileOptions_OptimizeMode")
186199 if err != nil {
189202 *x = FileOptions_OptimizeMode(value)
190203 return nil
191204 }
205
192206 func (FileOptions_OptimizeMode) EnumDescriptor() ([]byte, []int) {
193 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{10, 0}
207 return fileDescriptor_e5baabe45344a177, []int{10, 0}
194208 }
195209
196210 type FieldOptions_CType int32
207221 1: "CORD",
208222 2: "STRING_PIECE",
209223 }
224
210225 var FieldOptions_CType_value = map[string]int32{
211226 "STRING": 0,
212227 "CORD": 1,
218233 *p = x
219234 return p
220235 }
236
221237 func (x FieldOptions_CType) String() string {
222238 return proto.EnumName(FieldOptions_CType_name, int32(x))
223239 }
240
224241 func (x *FieldOptions_CType) UnmarshalJSON(data []byte) error {
225242 value, err := proto.UnmarshalJSONEnum(FieldOptions_CType_value, data, "FieldOptions_CType")
226243 if err != nil {
229246 *x = FieldOptions_CType(value)
230247 return nil
231248 }
249
232250 func (FieldOptions_CType) EnumDescriptor() ([]byte, []int) {
233 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{12, 0}
251 return fileDescriptor_e5baabe45344a177, []int{12, 0}
234252 }
235253
236254 type FieldOptions_JSType int32
249267 1: "JS_STRING",
250268 2: "JS_NUMBER",
251269 }
270
252271 var FieldOptions_JSType_value = map[string]int32{
253272 "JS_NORMAL": 0,
254273 "JS_STRING": 1,
260279 *p = x
261280 return p
262281 }
282
263283 func (x FieldOptions_JSType) String() string {
264284 return proto.EnumName(FieldOptions_JSType_name, int32(x))
265285 }
286
266287 func (x *FieldOptions_JSType) UnmarshalJSON(data []byte) error {
267288 value, err := proto.UnmarshalJSONEnum(FieldOptions_JSType_value, data, "FieldOptions_JSType")
268289 if err != nil {
271292 *x = FieldOptions_JSType(value)
272293 return nil
273294 }
295
274296 func (FieldOptions_JSType) EnumDescriptor() ([]byte, []int) {
275 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{12, 1}
297 return fileDescriptor_e5baabe45344a177, []int{12, 1}
276298 }
277299
278300 // Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
291313 1: "NO_SIDE_EFFECTS",
292314 2: "IDEMPOTENT",
293315 }
316
294317 var MethodOptions_IdempotencyLevel_value = map[string]int32{
295318 "IDEMPOTENCY_UNKNOWN": 0,
296319 "NO_SIDE_EFFECTS": 1,
302325 *p = x
303326 return p
304327 }
328
305329 func (x MethodOptions_IdempotencyLevel) String() string {
306330 return proto.EnumName(MethodOptions_IdempotencyLevel_name, int32(x))
307331 }
332
308333 func (x *MethodOptions_IdempotencyLevel) UnmarshalJSON(data []byte) error {
309334 value, err := proto.UnmarshalJSONEnum(MethodOptions_IdempotencyLevel_value, data, "MethodOptions_IdempotencyLevel")
310335 if err != nil {
313338 *x = MethodOptions_IdempotencyLevel(value)
314339 return nil
315340 }
341
316342 func (MethodOptions_IdempotencyLevel) EnumDescriptor() ([]byte, []int) {
317 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{17, 0}
343 return fileDescriptor_e5baabe45344a177, []int{17, 0}
318344 }
319345
320346 // The protocol compiler can output a FileDescriptorSet containing the .proto
330356 func (m *FileDescriptorSet) String() string { return proto.CompactTextString(m) }
331357 func (*FileDescriptorSet) ProtoMessage() {}
332358 func (*FileDescriptorSet) Descriptor() ([]byte, []int) {
333 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{0}
334 }
359 return fileDescriptor_e5baabe45344a177, []int{0}
360 }
361
335362 func (m *FileDescriptorSet) XXX_Unmarshal(b []byte) error {
336363 return xxx_messageInfo_FileDescriptorSet.Unmarshal(m, b)
337364 }
338365 func (m *FileDescriptorSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
339366 return xxx_messageInfo_FileDescriptorSet.Marshal(b, m, deterministic)
340367 }
341 func (dst *FileDescriptorSet) XXX_Merge(src proto.Message) {
342 xxx_messageInfo_FileDescriptorSet.Merge(dst, src)
368 func (m *FileDescriptorSet) XXX_Merge(src proto.Message) {
369 xxx_messageInfo_FileDescriptorSet.Merge(m, src)
343370 }
344371 func (m *FileDescriptorSet) XXX_Size() int {
345372 return xxx_messageInfo_FileDescriptorSet.Size(m)
391418 func (m *FileDescriptorProto) String() string { return proto.CompactTextString(m) }
392419 func (*FileDescriptorProto) ProtoMessage() {}
393420 func (*FileDescriptorProto) Descriptor() ([]byte, []int) {
394 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{1}
395 }
421 return fileDescriptor_e5baabe45344a177, []int{1}
422 }
423
396424 func (m *FileDescriptorProto) XXX_Unmarshal(b []byte) error {
397425 return xxx_messageInfo_FileDescriptorProto.Unmarshal(m, b)
398426 }
399427 func (m *FileDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
400428 return xxx_messageInfo_FileDescriptorProto.Marshal(b, m, deterministic)
401429 }
402 func (dst *FileDescriptorProto) XXX_Merge(src proto.Message) {
403 xxx_messageInfo_FileDescriptorProto.Merge(dst, src)
430 func (m *FileDescriptorProto) XXX_Merge(src proto.Message) {
431 xxx_messageInfo_FileDescriptorProto.Merge(m, src)
404432 }
405433 func (m *FileDescriptorProto) XXX_Size() int {
406434 return xxx_messageInfo_FileDescriptorProto.Size(m)
518546 func (m *DescriptorProto) String() string { return proto.CompactTextString(m) }
519547 func (*DescriptorProto) ProtoMessage() {}
520548 func (*DescriptorProto) Descriptor() ([]byte, []int) {
521 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{2}
522 }
549 return fileDescriptor_e5baabe45344a177, []int{2}
550 }
551
523552 func (m *DescriptorProto) XXX_Unmarshal(b []byte) error {
524553 return xxx_messageInfo_DescriptorProto.Unmarshal(m, b)
525554 }
526555 func (m *DescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
527556 return xxx_messageInfo_DescriptorProto.Marshal(b, m, deterministic)
528557 }
529 func (dst *DescriptorProto) XXX_Merge(src proto.Message) {
530 xxx_messageInfo_DescriptorProto.Merge(dst, src)
558 func (m *DescriptorProto) XXX_Merge(src proto.Message) {
559 xxx_messageInfo_DescriptorProto.Merge(m, src)
531560 }
532561 func (m *DescriptorProto) XXX_Size() int {
533562 return xxx_messageInfo_DescriptorProto.Size(m)
621650 func (m *DescriptorProto_ExtensionRange) String() string { return proto.CompactTextString(m) }
622651 func (*DescriptorProto_ExtensionRange) ProtoMessage() {}
623652 func (*DescriptorProto_ExtensionRange) Descriptor() ([]byte, []int) {
624 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{2, 0}
625 }
653 return fileDescriptor_e5baabe45344a177, []int{2, 0}
654 }
655
626656 func (m *DescriptorProto_ExtensionRange) XXX_Unmarshal(b []byte) error {
627657 return xxx_messageInfo_DescriptorProto_ExtensionRange.Unmarshal(m, b)
628658 }
629659 func (m *DescriptorProto_ExtensionRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
630660 return xxx_messageInfo_DescriptorProto_ExtensionRange.Marshal(b, m, deterministic)
631661 }
632 func (dst *DescriptorProto_ExtensionRange) XXX_Merge(src proto.Message) {
633 xxx_messageInfo_DescriptorProto_ExtensionRange.Merge(dst, src)
662 func (m *DescriptorProto_ExtensionRange) XXX_Merge(src proto.Message) {
663 xxx_messageInfo_DescriptorProto_ExtensionRange.Merge(m, src)
634664 }
635665 func (m *DescriptorProto_ExtensionRange) XXX_Size() int {
636666 return xxx_messageInfo_DescriptorProto_ExtensionRange.Size(m)
677707 func (m *DescriptorProto_ReservedRange) String() string { return proto.CompactTextString(m) }
678708 func (*DescriptorProto_ReservedRange) ProtoMessage() {}
679709 func (*DescriptorProto_ReservedRange) Descriptor() ([]byte, []int) {
680 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{2, 1}
681 }
710 return fileDescriptor_e5baabe45344a177, []int{2, 1}
711 }
712
682713 func (m *DescriptorProto_ReservedRange) XXX_Unmarshal(b []byte) error {
683714 return xxx_messageInfo_DescriptorProto_ReservedRange.Unmarshal(m, b)
684715 }
685716 func (m *DescriptorProto_ReservedRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
686717 return xxx_messageInfo_DescriptorProto_ReservedRange.Marshal(b, m, deterministic)
687718 }
688 func (dst *DescriptorProto_ReservedRange) XXX_Merge(src proto.Message) {
689 xxx_messageInfo_DescriptorProto_ReservedRange.Merge(dst, src)
719 func (m *DescriptorProto_ReservedRange) XXX_Merge(src proto.Message) {
720 xxx_messageInfo_DescriptorProto_ReservedRange.Merge(m, src)
690721 }
691722 func (m *DescriptorProto_ReservedRange) XXX_Size() int {
692723 return xxx_messageInfo_DescriptorProto_ReservedRange.Size(m)
724755 func (m *ExtensionRangeOptions) String() string { return proto.CompactTextString(m) }
725756 func (*ExtensionRangeOptions) ProtoMessage() {}
726757 func (*ExtensionRangeOptions) Descriptor() ([]byte, []int) {
727 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{3}
758 return fileDescriptor_e5baabe45344a177, []int{3}
728759 }
729760
730761 var extRange_ExtensionRangeOptions = []proto.ExtensionRange{
734765 func (*ExtensionRangeOptions) ExtensionRangeArray() []proto.ExtensionRange {
735766 return extRange_ExtensionRangeOptions
736767 }
768
737769 func (m *ExtensionRangeOptions) XXX_Unmarshal(b []byte) error {
738770 return xxx_messageInfo_ExtensionRangeOptions.Unmarshal(m, b)
739771 }
740772 func (m *ExtensionRangeOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
741773 return xxx_messageInfo_ExtensionRangeOptions.Marshal(b, m, deterministic)
742774 }
743 func (dst *ExtensionRangeOptions) XXX_Merge(src proto.Message) {
744 xxx_messageInfo_ExtensionRangeOptions.Merge(dst, src)
775 func (m *ExtensionRangeOptions) XXX_Merge(src proto.Message) {
776 xxx_messageInfo_ExtensionRangeOptions.Merge(m, src)
745777 }
746778 func (m *ExtensionRangeOptions) XXX_Size() int {
747779 return xxx_messageInfo_ExtensionRangeOptions.Size(m)
800832 func (m *FieldDescriptorProto) String() string { return proto.CompactTextString(m) }
801833 func (*FieldDescriptorProto) ProtoMessage() {}
802834 func (*FieldDescriptorProto) Descriptor() ([]byte, []int) {
803 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{4}
804 }
835 return fileDescriptor_e5baabe45344a177, []int{4}
836 }
837
805838 func (m *FieldDescriptorProto) XXX_Unmarshal(b []byte) error {
806839 return xxx_messageInfo_FieldDescriptorProto.Unmarshal(m, b)
807840 }
808841 func (m *FieldDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
809842 return xxx_messageInfo_FieldDescriptorProto.Marshal(b, m, deterministic)
810843 }
811 func (dst *FieldDescriptorProto) XXX_Merge(src proto.Message) {
812 xxx_messageInfo_FieldDescriptorProto.Merge(dst, src)
844 func (m *FieldDescriptorProto) XXX_Merge(src proto.Message) {
845 xxx_messageInfo_FieldDescriptorProto.Merge(m, src)
813846 }
814847 func (m *FieldDescriptorProto) XXX_Size() int {
815848 return xxx_messageInfo_FieldDescriptorProto.Size(m)
903936 func (m *OneofDescriptorProto) String() string { return proto.CompactTextString(m) }
904937 func (*OneofDescriptorProto) ProtoMessage() {}
905938 func (*OneofDescriptorProto) Descriptor() ([]byte, []int) {
906 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{5}
907 }
939 return fileDescriptor_e5baabe45344a177, []int{5}
940 }
941
908942 func (m *OneofDescriptorProto) XXX_Unmarshal(b []byte) error {
909943 return xxx_messageInfo_OneofDescriptorProto.Unmarshal(m, b)
910944 }
911945 func (m *OneofDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
912946 return xxx_messageInfo_OneofDescriptorProto.Marshal(b, m, deterministic)
913947 }
914 func (dst *OneofDescriptorProto) XXX_Merge(src proto.Message) {
915 xxx_messageInfo_OneofDescriptorProto.Merge(dst, src)
948 func (m *OneofDescriptorProto) XXX_Merge(src proto.Message) {
949 xxx_messageInfo_OneofDescriptorProto.Merge(m, src)
916950 }
917951 func (m *OneofDescriptorProto) XXX_Size() int {
918952 return xxx_messageInfo_OneofDescriptorProto.Size(m)
958992 func (m *EnumDescriptorProto) String() string { return proto.CompactTextString(m) }
959993 func (*EnumDescriptorProto) ProtoMessage() {}
960994 func (*EnumDescriptorProto) Descriptor() ([]byte, []int) {
961 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{6}
962 }
995 return fileDescriptor_e5baabe45344a177, []int{6}
996 }
997
963998 func (m *EnumDescriptorProto) XXX_Unmarshal(b []byte) error {
964999 return xxx_messageInfo_EnumDescriptorProto.Unmarshal(m, b)
9651000 }
9661001 func (m *EnumDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
9671002 return xxx_messageInfo_EnumDescriptorProto.Marshal(b, m, deterministic)
9681003 }
969 func (dst *EnumDescriptorProto) XXX_Merge(src proto.Message) {
970 xxx_messageInfo_EnumDescriptorProto.Merge(dst, src)
1004 func (m *EnumDescriptorProto) XXX_Merge(src proto.Message) {
1005 xxx_messageInfo_EnumDescriptorProto.Merge(m, src)
9711006 }
9721007 func (m *EnumDescriptorProto) XXX_Size() int {
9731008 return xxx_messageInfo_EnumDescriptorProto.Size(m)
10311066 func (m *EnumDescriptorProto_EnumReservedRange) String() string { return proto.CompactTextString(m) }
10321067 func (*EnumDescriptorProto_EnumReservedRange) ProtoMessage() {}
10331068 func (*EnumDescriptorProto_EnumReservedRange) Descriptor() ([]byte, []int) {
1034 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{6, 0}
1035 }
1069 return fileDescriptor_e5baabe45344a177, []int{6, 0}
1070 }
1071
10361072 func (m *EnumDescriptorProto_EnumReservedRange) XXX_Unmarshal(b []byte) error {
10371073 return xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Unmarshal(m, b)
10381074 }
10391075 func (m *EnumDescriptorProto_EnumReservedRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
10401076 return xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Marshal(b, m, deterministic)
10411077 }
1042 func (dst *EnumDescriptorProto_EnumReservedRange) XXX_Merge(src proto.Message) {
1043 xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Merge(dst, src)
1078 func (m *EnumDescriptorProto_EnumReservedRange) XXX_Merge(src proto.Message) {
1079 xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Merge(m, src)
10441080 }
10451081 func (m *EnumDescriptorProto_EnumReservedRange) XXX_Size() int {
10461082 return xxx_messageInfo_EnumDescriptorProto_EnumReservedRange.Size(m)
10791115 func (m *EnumValueDescriptorProto) String() string { return proto.CompactTextString(m) }
10801116 func (*EnumValueDescriptorProto) ProtoMessage() {}
10811117 func (*EnumValueDescriptorProto) Descriptor() ([]byte, []int) {
1082 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{7}
1083 }
1118 return fileDescriptor_e5baabe45344a177, []int{7}
1119 }
1120
10841121 func (m *EnumValueDescriptorProto) XXX_Unmarshal(b []byte) error {
10851122 return xxx_messageInfo_EnumValueDescriptorProto.Unmarshal(m, b)
10861123 }
10871124 func (m *EnumValueDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
10881125 return xxx_messageInfo_EnumValueDescriptorProto.Marshal(b, m, deterministic)
10891126 }
1090 func (dst *EnumValueDescriptorProto) XXX_Merge(src proto.Message) {
1091 xxx_messageInfo_EnumValueDescriptorProto.Merge(dst, src)
1127 func (m *EnumValueDescriptorProto) XXX_Merge(src proto.Message) {
1128 xxx_messageInfo_EnumValueDescriptorProto.Merge(m, src)
10921129 }
10931130 func (m *EnumValueDescriptorProto) XXX_Size() int {
10941131 return xxx_messageInfo_EnumValueDescriptorProto.Size(m)
11341171 func (m *ServiceDescriptorProto) String() string { return proto.CompactTextString(m) }
11351172 func (*ServiceDescriptorProto) ProtoMessage() {}
11361173 func (*ServiceDescriptorProto) Descriptor() ([]byte, []int) {
1137 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{8}
1138 }
1174 return fileDescriptor_e5baabe45344a177, []int{8}
1175 }
1176
11391177 func (m *ServiceDescriptorProto) XXX_Unmarshal(b []byte) error {
11401178 return xxx_messageInfo_ServiceDescriptorProto.Unmarshal(m, b)
11411179 }
11421180 func (m *ServiceDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
11431181 return xxx_messageInfo_ServiceDescriptorProto.Marshal(b, m, deterministic)
11441182 }
1145 func (dst *ServiceDescriptorProto) XXX_Merge(src proto.Message) {
1146 xxx_messageInfo_ServiceDescriptorProto.Merge(dst, src)
1183 func (m *ServiceDescriptorProto) XXX_Merge(src proto.Message) {
1184 xxx_messageInfo_ServiceDescriptorProto.Merge(m, src)
11471185 }
11481186 func (m *ServiceDescriptorProto) XXX_Size() int {
11491187 return xxx_messageInfo_ServiceDescriptorProto.Size(m)
11961234 func (m *MethodDescriptorProto) String() string { return proto.CompactTextString(m) }
11971235 func (*MethodDescriptorProto) ProtoMessage() {}
11981236 func (*MethodDescriptorProto) Descriptor() ([]byte, []int) {
1199 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{9}
1200 }
1237 return fileDescriptor_e5baabe45344a177, []int{9}
1238 }
1239
12011240 func (m *MethodDescriptorProto) XXX_Unmarshal(b []byte) error {
12021241 return xxx_messageInfo_MethodDescriptorProto.Unmarshal(m, b)
12031242 }
12041243 func (m *MethodDescriptorProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
12051244 return xxx_messageInfo_MethodDescriptorProto.Marshal(b, m, deterministic)
12061245 }
1207 func (dst *MethodDescriptorProto) XXX_Merge(src proto.Message) {
1208 xxx_messageInfo_MethodDescriptorProto.Merge(dst, src)
1246 func (m *MethodDescriptorProto) XXX_Merge(src proto.Message) {
1247 xxx_messageInfo_MethodDescriptorProto.Merge(m, src)
12091248 }
12101249 func (m *MethodDescriptorProto) XXX_Size() int {
12111250 return xxx_messageInfo_MethodDescriptorProto.Size(m)
13351374 // is empty. When this option is empty, the package name will be used for
13361375 // determining the namespace.
13371376 PhpNamespace *string `protobuf:"bytes,41,opt,name=php_namespace,json=phpNamespace" json:"php_namespace,omitempty"`
1377 // Use this option to change the namespace of php generated metadata classes.
1378 // Default is empty. When this option is empty, the proto file name will be used
1379 // for determining the namespace.
1380 PhpMetadataNamespace *string `protobuf:"bytes,44,opt,name=php_metadata_namespace,json=phpMetadataNamespace" json:"php_metadata_namespace,omitempty"`
1381 // Use this option to change the package of ruby generated classes. Default
1382 // is empty. When this option is not set, the package name will be used for
1383 // determining the ruby package.
1384 RubyPackage *string `protobuf:"bytes,45,opt,name=ruby_package,json=rubyPackage" json:"ruby_package,omitempty"`
13381385 // The parser stores options it doesn't recognize here.
13391386 // See the documentation for the "Options" section above.
13401387 UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"`
13481395 func (m *FileOptions) String() string { return proto.CompactTextString(m) }
13491396 func (*FileOptions) ProtoMessage() {}
13501397 func (*FileOptions) Descriptor() ([]byte, []int) {
1351 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{10}
1398 return fileDescriptor_e5baabe45344a177, []int{10}
13521399 }
13531400
13541401 var extRange_FileOptions = []proto.ExtensionRange{
13581405 func (*FileOptions) ExtensionRangeArray() []proto.ExtensionRange {
13591406 return extRange_FileOptions
13601407 }
1408
13611409 func (m *FileOptions) XXX_Unmarshal(b []byte) error {
13621410 return xxx_messageInfo_FileOptions.Unmarshal(m, b)
13631411 }
13641412 func (m *FileOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
13651413 return xxx_messageInfo_FileOptions.Marshal(b, m, deterministic)
13661414 }
1367 func (dst *FileOptions) XXX_Merge(src proto.Message) {
1368 xxx_messageInfo_FileOptions.Merge(dst, src)
1415 func (m *FileOptions) XXX_Merge(src proto.Message) {
1416 xxx_messageInfo_FileOptions.Merge(m, src)
13691417 }
13701418 func (m *FileOptions) XXX_Size() int {
13711419 return xxx_messageInfo_FileOptions.Size(m)
15091557 func (m *FileOptions) GetPhpNamespace() string {
15101558 if m != nil && m.PhpNamespace != nil {
15111559 return *m.PhpNamespace
1560 }
1561 return ""
1562 }
1563
1564 func (m *FileOptions) GetPhpMetadataNamespace() string {
1565 if m != nil && m.PhpMetadataNamespace != nil {
1566 return *m.PhpMetadataNamespace
1567 }
1568 return ""
1569 }
1570
1571 func (m *FileOptions) GetRubyPackage() string {
1572 if m != nil && m.RubyPackage != nil {
1573 return *m.RubyPackage
15121574 }
15131575 return ""
15141576 }
15831645 func (m *MessageOptions) String() string { return proto.CompactTextString(m) }
15841646 func (*MessageOptions) ProtoMessage() {}
15851647 func (*MessageOptions) Descriptor() ([]byte, []int) {
1586 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{11}
1648 return fileDescriptor_e5baabe45344a177, []int{11}
15871649 }
15881650
15891651 var extRange_MessageOptions = []proto.ExtensionRange{
15931655 func (*MessageOptions) ExtensionRangeArray() []proto.ExtensionRange {
15941656 return extRange_MessageOptions
15951657 }
1658
15961659 func (m *MessageOptions) XXX_Unmarshal(b []byte) error {
15971660 return xxx_messageInfo_MessageOptions.Unmarshal(m, b)
15981661 }
15991662 func (m *MessageOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
16001663 return xxx_messageInfo_MessageOptions.Marshal(b, m, deterministic)
16011664 }
1602 func (dst *MessageOptions) XXX_Merge(src proto.Message) {
1603 xxx_messageInfo_MessageOptions.Merge(dst, src)
1665 func (m *MessageOptions) XXX_Merge(src proto.Message) {
1666 xxx_messageInfo_MessageOptions.Merge(m, src)
16041667 }
16051668 func (m *MessageOptions) XXX_Size() int {
16061669 return xxx_messageInfo_MessageOptions.Size(m)
17221785 func (m *FieldOptions) String() string { return proto.CompactTextString(m) }
17231786 func (*FieldOptions) ProtoMessage() {}
17241787 func (*FieldOptions) Descriptor() ([]byte, []int) {
1725 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{12}
1788 return fileDescriptor_e5baabe45344a177, []int{12}
17261789 }
17271790
17281791 var extRange_FieldOptions = []proto.ExtensionRange{
17321795 func (*FieldOptions) ExtensionRangeArray() []proto.ExtensionRange {
17331796 return extRange_FieldOptions
17341797 }
1798
17351799 func (m *FieldOptions) XXX_Unmarshal(b []byte) error {
17361800 return xxx_messageInfo_FieldOptions.Unmarshal(m, b)
17371801 }
17381802 func (m *FieldOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
17391803 return xxx_messageInfo_FieldOptions.Marshal(b, m, deterministic)
17401804 }
1741 func (dst *FieldOptions) XXX_Merge(src proto.Message) {
1742 xxx_messageInfo_FieldOptions.Merge(dst, src)
1805 func (m *FieldOptions) XXX_Merge(src proto.Message) {
1806 xxx_messageInfo_FieldOptions.Merge(m, src)
17431807 }
17441808 func (m *FieldOptions) XXX_Size() int {
17451809 return xxx_messageInfo_FieldOptions.Size(m)
18181882 func (m *OneofOptions) String() string { return proto.CompactTextString(m) }
18191883 func (*OneofOptions) ProtoMessage() {}
18201884 func (*OneofOptions) Descriptor() ([]byte, []int) {
1821 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{13}
1885 return fileDescriptor_e5baabe45344a177, []int{13}
18221886 }
18231887
18241888 var extRange_OneofOptions = []proto.ExtensionRange{
18281892 func (*OneofOptions) ExtensionRangeArray() []proto.ExtensionRange {
18291893 return extRange_OneofOptions
18301894 }
1895
18311896 func (m *OneofOptions) XXX_Unmarshal(b []byte) error {
18321897 return xxx_messageInfo_OneofOptions.Unmarshal(m, b)
18331898 }
18341899 func (m *OneofOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
18351900 return xxx_messageInfo_OneofOptions.Marshal(b, m, deterministic)
18361901 }
1837 func (dst *OneofOptions) XXX_Merge(src proto.Message) {
1838 xxx_messageInfo_OneofOptions.Merge(dst, src)
1902 func (m *OneofOptions) XXX_Merge(src proto.Message) {
1903 xxx_messageInfo_OneofOptions.Merge(m, src)
18391904 }
18401905 func (m *OneofOptions) XXX_Size() int {
18411906 return xxx_messageInfo_OneofOptions.Size(m)
18741939 func (m *EnumOptions) String() string { return proto.CompactTextString(m) }
18751940 func (*EnumOptions) ProtoMessage() {}
18761941 func (*EnumOptions) Descriptor() ([]byte, []int) {
1877 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{14}
1942 return fileDescriptor_e5baabe45344a177, []int{14}
18781943 }
18791944
18801945 var extRange_EnumOptions = []proto.ExtensionRange{
18841949 func (*EnumOptions) ExtensionRangeArray() []proto.ExtensionRange {
18851950 return extRange_EnumOptions
18861951 }
1952
18871953 func (m *EnumOptions) XXX_Unmarshal(b []byte) error {
18881954 return xxx_messageInfo_EnumOptions.Unmarshal(m, b)
18891955 }
18901956 func (m *EnumOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
18911957 return xxx_messageInfo_EnumOptions.Marshal(b, m, deterministic)
18921958 }
1893 func (dst *EnumOptions) XXX_Merge(src proto.Message) {
1894 xxx_messageInfo_EnumOptions.Merge(dst, src)
1959 func (m *EnumOptions) XXX_Merge(src proto.Message) {
1960 xxx_messageInfo_EnumOptions.Merge(m, src)
18951961 }
18961962 func (m *EnumOptions) XXX_Size() int {
18971963 return xxx_messageInfo_EnumOptions.Size(m)
19432009 func (m *EnumValueOptions) String() string { return proto.CompactTextString(m) }
19442010 func (*EnumValueOptions) ProtoMessage() {}
19452011 func (*EnumValueOptions) Descriptor() ([]byte, []int) {
1946 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{15}
2012 return fileDescriptor_e5baabe45344a177, []int{15}
19472013 }
19482014
19492015 var extRange_EnumValueOptions = []proto.ExtensionRange{
19532019 func (*EnumValueOptions) ExtensionRangeArray() []proto.ExtensionRange {
19542020 return extRange_EnumValueOptions
19552021 }
2022
19562023 func (m *EnumValueOptions) XXX_Unmarshal(b []byte) error {
19572024 return xxx_messageInfo_EnumValueOptions.Unmarshal(m, b)
19582025 }
19592026 func (m *EnumValueOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
19602027 return xxx_messageInfo_EnumValueOptions.Marshal(b, m, deterministic)
19612028 }
1962 func (dst *EnumValueOptions) XXX_Merge(src proto.Message) {
1963 xxx_messageInfo_EnumValueOptions.Merge(dst, src)
2029 func (m *EnumValueOptions) XXX_Merge(src proto.Message) {
2030 xxx_messageInfo_EnumValueOptions.Merge(m, src)
19642031 }
19652032 func (m *EnumValueOptions) XXX_Size() int {
19662033 return xxx_messageInfo_EnumValueOptions.Size(m)
20052072 func (m *ServiceOptions) String() string { return proto.CompactTextString(m) }
20062073 func (*ServiceOptions) ProtoMessage() {}
20072074 func (*ServiceOptions) Descriptor() ([]byte, []int) {
2008 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{16}
2075 return fileDescriptor_e5baabe45344a177, []int{16}
20092076 }
20102077
20112078 var extRange_ServiceOptions = []proto.ExtensionRange{
20152082 func (*ServiceOptions) ExtensionRangeArray() []proto.ExtensionRange {
20162083 return extRange_ServiceOptions
20172084 }
2085
20182086 func (m *ServiceOptions) XXX_Unmarshal(b []byte) error {
20192087 return xxx_messageInfo_ServiceOptions.Unmarshal(m, b)
20202088 }
20212089 func (m *ServiceOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
20222090 return xxx_messageInfo_ServiceOptions.Marshal(b, m, deterministic)
20232091 }
2024 func (dst *ServiceOptions) XXX_Merge(src proto.Message) {
2025 xxx_messageInfo_ServiceOptions.Merge(dst, src)
2092 func (m *ServiceOptions) XXX_Merge(src proto.Message) {
2093 xxx_messageInfo_ServiceOptions.Merge(m, src)
20262094 }
20272095 func (m *ServiceOptions) XXX_Size() int {
20282096 return xxx_messageInfo_ServiceOptions.Size(m)
20682136 func (m *MethodOptions) String() string { return proto.CompactTextString(m) }
20692137 func (*MethodOptions) ProtoMessage() {}
20702138 func (*MethodOptions) Descriptor() ([]byte, []int) {
2071 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{17}
2139 return fileDescriptor_e5baabe45344a177, []int{17}
20722140 }
20732141
20742142 var extRange_MethodOptions = []proto.ExtensionRange{
20782146 func (*MethodOptions) ExtensionRangeArray() []proto.ExtensionRange {
20792147 return extRange_MethodOptions
20802148 }
2149
20812150 func (m *MethodOptions) XXX_Unmarshal(b []byte) error {
20822151 return xxx_messageInfo_MethodOptions.Unmarshal(m, b)
20832152 }
20842153 func (m *MethodOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
20852154 return xxx_messageInfo_MethodOptions.Marshal(b, m, deterministic)
20862155 }
2087 func (dst *MethodOptions) XXX_Merge(src proto.Message) {
2088 xxx_messageInfo_MethodOptions.Merge(dst, src)
2156 func (m *MethodOptions) XXX_Merge(src proto.Message) {
2157 xxx_messageInfo_MethodOptions.Merge(m, src)
20892158 }
20902159 func (m *MethodOptions) XXX_Size() int {
20912160 return xxx_messageInfo_MethodOptions.Size(m)
21452214 func (m *UninterpretedOption) String() string { return proto.CompactTextString(m) }
21462215 func (*UninterpretedOption) ProtoMessage() {}
21472216 func (*UninterpretedOption) Descriptor() ([]byte, []int) {
2148 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{18}
2149 }
2217 return fileDescriptor_e5baabe45344a177, []int{18}
2218 }
2219
21502220 func (m *UninterpretedOption) XXX_Unmarshal(b []byte) error {
21512221 return xxx_messageInfo_UninterpretedOption.Unmarshal(m, b)
21522222 }
21532223 func (m *UninterpretedOption) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
21542224 return xxx_messageInfo_UninterpretedOption.Marshal(b, m, deterministic)
21552225 }
2156 func (dst *UninterpretedOption) XXX_Merge(src proto.Message) {
2157 xxx_messageInfo_UninterpretedOption.Merge(dst, src)
2226 func (m *UninterpretedOption) XXX_Merge(src proto.Message) {
2227 xxx_messageInfo_UninterpretedOption.Merge(m, src)
21582228 }
21592229 func (m *UninterpretedOption) XXX_Size() int {
21602230 return xxx_messageInfo_UninterpretedOption.Size(m)
22312301 func (m *UninterpretedOption_NamePart) String() string { return proto.CompactTextString(m) }
22322302 func (*UninterpretedOption_NamePart) ProtoMessage() {}
22332303 func (*UninterpretedOption_NamePart) Descriptor() ([]byte, []int) {
2234 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{18, 0}
2235 }
2304 return fileDescriptor_e5baabe45344a177, []int{18, 0}
2305 }
2306
22362307 func (m *UninterpretedOption_NamePart) XXX_Unmarshal(b []byte) error {
22372308 return xxx_messageInfo_UninterpretedOption_NamePart.Unmarshal(m, b)
22382309 }
22392310 func (m *UninterpretedOption_NamePart) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
22402311 return xxx_messageInfo_UninterpretedOption_NamePart.Marshal(b, m, deterministic)
22412312 }
2242 func (dst *UninterpretedOption_NamePart) XXX_Merge(src proto.Message) {
2243 xxx_messageInfo_UninterpretedOption_NamePart.Merge(dst, src)
2313 func (m *UninterpretedOption_NamePart) XXX_Merge(src proto.Message) {
2314 xxx_messageInfo_UninterpretedOption_NamePart.Merge(m, src)
22442315 }
22452316 func (m *UninterpretedOption_NamePart) XXX_Size() int {
22462317 return xxx_messageInfo_UninterpretedOption_NamePart.Size(m)
23212392 func (m *SourceCodeInfo) String() string { return proto.CompactTextString(m) }
23222393 func (*SourceCodeInfo) ProtoMessage() {}
23232394 func (*SourceCodeInfo) Descriptor() ([]byte, []int) {
2324 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{19}
2325 }
2395 return fileDescriptor_e5baabe45344a177, []int{19}
2396 }
2397
23262398 func (m *SourceCodeInfo) XXX_Unmarshal(b []byte) error {
23272399 return xxx_messageInfo_SourceCodeInfo.Unmarshal(m, b)
23282400 }
23292401 func (m *SourceCodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
23302402 return xxx_messageInfo_SourceCodeInfo.Marshal(b, m, deterministic)
23312403 }
2332 func (dst *SourceCodeInfo) XXX_Merge(src proto.Message) {
2333 xxx_messageInfo_SourceCodeInfo.Merge(dst, src)
2404 func (m *SourceCodeInfo) XXX_Merge(src proto.Message) {
2405 xxx_messageInfo_SourceCodeInfo.Merge(m, src)
23342406 }
23352407 func (m *SourceCodeInfo) XXX_Size() int {
23362408 return xxx_messageInfo_SourceCodeInfo.Size(m)
24382510 func (m *SourceCodeInfo_Location) String() string { return proto.CompactTextString(m) }
24392511 func (*SourceCodeInfo_Location) ProtoMessage() {}
24402512 func (*SourceCodeInfo_Location) Descriptor() ([]byte, []int) {
2441 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{19, 0}
2442 }
2513 return fileDescriptor_e5baabe45344a177, []int{19, 0}
2514 }
2515
24432516 func (m *SourceCodeInfo_Location) XXX_Unmarshal(b []byte) error {
24442517 return xxx_messageInfo_SourceCodeInfo_Location.Unmarshal(m, b)
24452518 }
24462519 func (m *SourceCodeInfo_Location) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
24472520 return xxx_messageInfo_SourceCodeInfo_Location.Marshal(b, m, deterministic)
24482521 }
2449 func (dst *SourceCodeInfo_Location) XXX_Merge(src proto.Message) {
2450 xxx_messageInfo_SourceCodeInfo_Location.Merge(dst, src)
2522 func (m *SourceCodeInfo_Location) XXX_Merge(src proto.Message) {
2523 xxx_messageInfo_SourceCodeInfo_Location.Merge(m, src)
24512524 }
24522525 func (m *SourceCodeInfo_Location) XXX_Size() int {
24532526 return xxx_messageInfo_SourceCodeInfo_Location.Size(m)
25092582 func (m *GeneratedCodeInfo) String() string { return proto.CompactTextString(m) }
25102583 func (*GeneratedCodeInfo) ProtoMessage() {}
25112584 func (*GeneratedCodeInfo) Descriptor() ([]byte, []int) {
2512 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{20}
2513 }
2585 return fileDescriptor_e5baabe45344a177, []int{20}
2586 }
2587
25142588 func (m *GeneratedCodeInfo) XXX_Unmarshal(b []byte) error {
25152589 return xxx_messageInfo_GeneratedCodeInfo.Unmarshal(m, b)
25162590 }
25172591 func (m *GeneratedCodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
25182592 return xxx_messageInfo_GeneratedCodeInfo.Marshal(b, m, deterministic)
25192593 }
2520 func (dst *GeneratedCodeInfo) XXX_Merge(src proto.Message) {
2521 xxx_messageInfo_GeneratedCodeInfo.Merge(dst, src)
2594 func (m *GeneratedCodeInfo) XXX_Merge(src proto.Message) {
2595 xxx_messageInfo_GeneratedCodeInfo.Merge(m, src)
25222596 }
25232597 func (m *GeneratedCodeInfo) XXX_Size() int {
25242598 return xxx_messageInfo_GeneratedCodeInfo.Size(m)
25582632 func (m *GeneratedCodeInfo_Annotation) String() string { return proto.CompactTextString(m) }
25592633 func (*GeneratedCodeInfo_Annotation) ProtoMessage() {}
25602634 func (*GeneratedCodeInfo_Annotation) Descriptor() ([]byte, []int) {
2561 return fileDescriptor_descriptor_4df4cb5f42392df6, []int{20, 0}
2562 }
2635 return fileDescriptor_e5baabe45344a177, []int{20, 0}
2636 }
2637
25632638 func (m *GeneratedCodeInfo_Annotation) XXX_Unmarshal(b []byte) error {
25642639 return xxx_messageInfo_GeneratedCodeInfo_Annotation.Unmarshal(m, b)
25652640 }
25662641 func (m *GeneratedCodeInfo_Annotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
25672642 return xxx_messageInfo_GeneratedCodeInfo_Annotation.Marshal(b, m, deterministic)
25682643 }
2569 func (dst *GeneratedCodeInfo_Annotation) XXX_Merge(src proto.Message) {
2570 xxx_messageInfo_GeneratedCodeInfo_Annotation.Merge(dst, src)
2644 func (m *GeneratedCodeInfo_Annotation) XXX_Merge(src proto.Message) {
2645 xxx_messageInfo_GeneratedCodeInfo_Annotation.Merge(m, src)
25712646 }
25722647 func (m *GeneratedCodeInfo_Annotation) XXX_Size() int {
25732648 return xxx_messageInfo_GeneratedCodeInfo_Annotation.Size(m)
26072682 }
26082683
26092684 func init() {
2685 proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Type", FieldDescriptorProto_Type_name, FieldDescriptorProto_Type_value)
2686 proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Label", FieldDescriptorProto_Label_name, FieldDescriptorProto_Label_value)
2687 proto.RegisterEnum("google.protobuf.FileOptions_OptimizeMode", FileOptions_OptimizeMode_name, FileOptions_OptimizeMode_value)
2688 proto.RegisterEnum("google.protobuf.FieldOptions_CType", FieldOptions_CType_name, FieldOptions_CType_value)
2689 proto.RegisterEnum("google.protobuf.FieldOptions_JSType", FieldOptions_JSType_name, FieldOptions_JSType_value)
2690 proto.RegisterEnum("google.protobuf.MethodOptions_IdempotencyLevel", MethodOptions_IdempotencyLevel_name, MethodOptions_IdempotencyLevel_value)
26102691 proto.RegisterType((*FileDescriptorSet)(nil), "google.protobuf.FileDescriptorSet")
26112692 proto.RegisterType((*FileDescriptorProto)(nil), "google.protobuf.FileDescriptorProto")
26122693 proto.RegisterType((*DescriptorProto)(nil), "google.protobuf.DescriptorProto")
26342715 proto.RegisterType((*SourceCodeInfo_Location)(nil), "google.protobuf.SourceCodeInfo.Location")
26352716 proto.RegisterType((*GeneratedCodeInfo)(nil), "google.protobuf.GeneratedCodeInfo")
26362717 proto.RegisterType((*GeneratedCodeInfo_Annotation)(nil), "google.protobuf.GeneratedCodeInfo.Annotation")
2637 proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Type", FieldDescriptorProto_Type_name, FieldDescriptorProto_Type_value)
2638 proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Label", FieldDescriptorProto_Label_name, FieldDescriptorProto_Label_value)
2639 proto.RegisterEnum("google.protobuf.FileOptions_OptimizeMode", FileOptions_OptimizeMode_name, FileOptions_OptimizeMode_value)
2640 proto.RegisterEnum("google.protobuf.FieldOptions_CType", FieldOptions_CType_name, FieldOptions_CType_value)
2641 proto.RegisterEnum("google.protobuf.FieldOptions_JSType", FieldOptions_JSType_name, FieldOptions_JSType_value)
2642 proto.RegisterEnum("google.protobuf.MethodOptions_IdempotencyLevel", MethodOptions_IdempotencyLevel_name, MethodOptions_IdempotencyLevel_value)
2643 }
2644
2645 func init() {
2646 proto.RegisterFile("google/protobuf/descriptor.proto", fileDescriptor_descriptor_4df4cb5f42392df6)
2647 }
2648
2649 var fileDescriptor_descriptor_4df4cb5f42392df6 = []byte{
2650 // 2555 bytes of a gzipped FileDescriptorProto
2651 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xdd, 0x6e, 0x1b, 0xc7,
2652 0xf5, 0xcf, 0xf2, 0x4b, 0xe4, 0x21, 0x45, 0x8d, 0x46, 0x8a, 0xbd, 0x56, 0x3e, 0x2c, 0x33, 0x1f,
2653 0x96, 0x9d, 0x7f, 0xa8, 0xc0, 0xb1, 0x1d, 0x47, 0xfe, 0x23, 0x2d, 0x45, 0xae, 0x15, 0xaa, 0x12,
2654 0xc9, 0x2e, 0xa9, 0xe6, 0x03, 0x28, 0x16, 0xa3, 0xdd, 0x21, 0xb9, 0xf6, 0x72, 0x77, 0xb3, 0xbb,
2655 0xb4, 0xad, 0xa0, 0x17, 0x06, 0x7a, 0xd5, 0xab, 0xde, 0x16, 0x45, 0xd1, 0x8b, 0xde, 0x04, 0xe8,
2656 0x03, 0x14, 0xc8, 0x5d, 0x9f, 0xa0, 0x40, 0xde, 0xa0, 0x68, 0x0b, 0xb4, 0x8f, 0xd0, 0xcb, 0x62,
2657 0x66, 0x76, 0x97, 0xbb, 0x24, 0x15, 0x2b, 0x01, 0xe2, 0x5c, 0x91, 0xf3, 0x9b, 0xdf, 0x39, 0x73,
2658 0xe6, 0xcc, 0x99, 0x33, 0x67, 0x66, 0x61, 0x7b, 0xe4, 0x38, 0x23, 0x8b, 0xee, 0xba, 0x9e, 0x13,
2659 0x38, 0xa7, 0xd3, 0xe1, 0xae, 0x41, 0x7d, 0xdd, 0x33, 0xdd, 0xc0, 0xf1, 0xea, 0x1c, 0xc3, 0x6b,
2660 0x82, 0x51, 0x8f, 0x18, 0xb5, 0x63, 0x58, 0x7f, 0x60, 0x5a, 0xb4, 0x15, 0x13, 0xfb, 0x34, 0xc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c7, 0x08, 0x2a, 0x42, 0x41, 0xfb, 0x53, 0xa5, 0x75, 0xf7, 0x36,
2706 0x2a, 0xa4, 0x91, 0xf7, 0x6f, 0xa1, 0x15, 0xbc, 0x0a, 0x25, 0x8e, 0xec, 0x77, 0xbb, 0x47, 0xa8,
2707 0x18, 0xeb, 0xec, 0x0f, 0xd4, 0x76, 0xe7, 0x00, 0x95, 0x62, 0x9d, 0x07, 0x6a, 0xf7, 0xa4, 0x87,
2708 0x20, 0xd6, 0x70, 0xac, 0xf4, 0xfb, 0x8d, 0x03, 0x05, 0x95, 0x63, 0xc6, 0xfe, 0x67, 0x03, 0xa5,
2709 0x8f, 0x2a, 0x29, 0xb3, 0xde, 0xbf, 0x85, 0x56, 0xe3, 0x21, 0x94, 0xce, 0xc9, 0x31, 0xaa, 0xe2,
2710 0x75, 0x58, 0x15, 0x43, 0x44, 0x46, 0xac, 0xcd, 0x41, 0x77, 0x6f, 0x23, 0x34, 0x33, 0x44, 0x68,
2711 0x59, 0x4f, 0x01, 0x77, 0x6f, 0x23, 0x5c, 0x6b, 0x42, 0x9e, 0x47, 0x17, 0xc6, 0x50, 0x3d, 0x6a,
2712 0xec, 0x2b, 0x47, 0x5a, 0xb7, 0x37, 0x68, 0x77, 0x3b, 0x8d, 0x23, 0x24, 0xcd, 0x30, 0x55, 0xf9,
2713 0xf9, 0x49, 0x5b, 0x55, 0x5a, 0x28, 0x93, 0xc4, 0x7a, 0x4a, 0x63, 0xa0, 0xb4, 0x50, 0xb6, 0xa6,
2714 0xc3, 0xe6, 0xb2, 0x3c, 0xb9, 0x74, 0x67, 0x24, 0x96, 0x38, 0x73, 0xce, 0x12, 0x73, 0x5d, 0x0b,
2715 0x4b, 0xfc, 0xcf, 0x0c, 0x6c, 0x2c, 0x39, 0x2b, 0x96, 0x0e, 0xf2, 0x13, 0xc8, 0x8b, 0x10, 0x15,
2716 0xa7, 0xe7, 0x8d, 0xa5, 0x87, 0x0e, 0x0f, 0xd8, 0x85, 0x13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50, 0xb4, 0x1c, 0x9d, 0xf0, 0xd0, 0x12, 0x1f, 0xa0, 0x76, 0x9e, 0xf3, 0xd9,
2795 0xa0, 0x7e, 0x14, 0xf2, 0xd5, 0x58, 0x72, 0xeb, 0x6f, 0x12, 0x14, 0x23, 0x18, 0x5f, 0x82, 0x9c,
2796 0x4b, 0x82, 0x31, 0x57, 0x97, 0xdf, 0xcf, 0x20, 0x49, 0xe5, 0x6d, 0x86, 0xfb, 0x2e, 0xb1, 0x79,
2797 0x08, 0x84, 0x38, 0x6b, 0xb3, 0x75, 0xb5, 0x28, 0x31, 0xf8, 0xe5, 0xc4, 0x99, 0x4c, 0xa8, 0x1d,
2798 0xf8, 0xd1, 0xba, 0x86, 0x78, 0x33, 0x84, 0xf1, 0x3b, 0xb0, 0x1e, 0x78, 0xc4, 0xb4, 0x52, 0xdc,
2799 0x1c, 0xe7, 0xa2, 0xa8, 0x23, 0x26, 0xef, 0xc1, 0x95, 0x48, 0xaf, 0x41, 0x03, 0xa2, 0x8f, 0xa9,
2800 0x31, 0x13, 0x2a, 0xf0, 0x47, 0x88, 0xcb, 0x21, 0xa1, 0x15, 0xf6, 0x47, 0xb2, 0xb5, 0x6f, 0x24,
2801 0x58, 0x8f, 0xae, 0x53, 0x46, 0xec, 0xac, 0x63, 0x00, 0x62, 0xdb, 0x4e, 0x90, 0x74, 0xd7, 0x62,
2802 0x28, 0x2f, 0xc8, 0xd5, 0x1b, 0xb1, 0x90, 0x9a, 0x50, 0xb0, 0x35, 0x01, 0x98, 0xf5, 0x9c, 0xeb,
2803 0xb6, 0xab, 0x50, 0x0e, 0x3f, 0xf0, 0xf0, 0xaf, 0x84, 0xe2, 0x02, 0x0e, 0x02, 0x62, 0xf7, 0x2e,
2804 0xbc, 0x09, 0xf9, 0x53, 0x3a, 0x32, 0xed, 0xf0, 0xd9, 0x56, 0x34, 0xa2, 0x67, 0x92, 0x5c, 0xfc,
2805 0x4c, 0xb2, 0xff, 0x5b, 0x09, 0x36, 0x74, 0x67, 0x32, 0x6f, 0xef, 0x3e, 0x9a, 0x7b, 0x05, 0xf0,
2806 0x3f, 0x96, 0x3e, 0xff, 0x68, 0x64, 0x06, 0xe3, 0xe9, 0x69, 0x5d, 0x77, 0x26, 0xbb, 0x23, 0xc7,
2807 0x22, 0xf6, 0x68, 0xf6, 0x99, 0x93, 0xff, 0xd1, 0xdf, 0x1d, 0x51, 0xfb, 0xdd, 0x91, 0x93, 0xf8,
2808 0xe8, 0x79, 0x7f, 0xf6, 0xf7, 0xbf, 0x92, 0xf4, 0xa7, 0x4c, 0xf6, 0xa0, 0xb7, 0xff, 0xe7, 0xcc,
2809 0xd6, 0x81, 0x18, 0xae, 0x17, 0xb9, 0x47, 0xa5, 0x43, 0x8b, 0xea, 0x6c, 0xca, 0xff, 0x0b, 0x00,
2810 0x00, 0xff, 0xff, 0x1a, 0x28, 0x25, 0x79, 0x42, 0x1d, 0x00, 0x00,
2811 }
2718 }
2719
2720 func init() { proto.RegisterFile("google/protobuf/descriptor.proto", fileDescriptor_e5baabe45344a177) }
2721
2722 var fileDescriptor_e5baabe45344a177 = []byte{
2723 // 2589 bytes of a gzipped FileDescriptorProto
2724 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xdd, 0x8e, 0xdb, 0xc6,
2725 0x15, 0x0e, 0xf5, 0xb7, 0xd2, 0x91, 0x56, 0x3b, 0x3b, 0xbb, 0xb1, 0xe9, 0xcd, 0x8f, 0xd7, 0xca,
2726 0x8f, 0xd7, 0x4e, 0xac, 0x0d, 0x1c, 0xdb, 0x71, 0xd6, 0x45, 0x5a, 0xad, 0x44, 0x6f, 0xe4, 0xee,
2727 0x4a, 0x2a, 0xa5, 0x6d, 0x7e, 0x80, 0x82, 0x98, 0x25, 0x47, 0x12, 0x6d, 0x8a, 0x64, 0x48, 0xca,
2728 0xf6, 0x06, 0xbd, 0x30, 0xd0, 0xab, 0x5e, 0x15, 0xe8, 0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fb, 0x6b, 0x01, 0xd6,
2751 0xce, 0x93, 0x62, 0xf7, 0x20, 0x3f, 0x64, 0xa3, 0x94, 0x33, 0xdf, 0x26, 0x06, 0x42, 0x27, 0x1d,
2752 0xc4, 0xc2, 0x77, 0x0c, 0x62, 0x03, 0xca, 0x36, 0xf5, 0x03, 0x6a, 0x88, 0x8c, 0xc8, 0x9e, 0x33,
2753 0xa7, 0x40, 0x28, 0x2d, 0xa6, 0x54, 0xee, 0x3b, 0xa5, 0xd4, 0xa7, 0xb0, 0x16, 0xbb, 0xa4, 0x79,
2754 0xc4, 0x1e, 0x45, 0xb9, 0xb9, 0xfb, 0x3c, 0x4f, 0xea, 0x4a, 0xa4, 0xa7, 0x32, 0x35, 0xb5, 0x4a,
2755 0x53, 0x6d, 0xdc, 0x02, 0x70, 0x6c, 0xea, 0x0c, 0x35, 0x83, 0xea, 0x96, 0x5c, 0x3c, 0x23, 0x4a,
2756 0x5d, 0x46, 0x59, 0x88, 0x92, 0x23, 0x50, 0xdd, 0xc2, 0x1f, 0xce, 0x52, 0x6d, 0xe5, 0x8c, 0x4c,
2757 0x39, 0x12, 0x8b, 0x6c, 0x21, 0xdb, 0x8e, 0xa1, 0xea, 0x51, 0x96, 0xf7, 0xd4, 0x08, 0x47, 0x56,
2758 0xe2, 0x4e, 0xd4, 0x9f, 0x3b, 0x32, 0x35, 0x54, 0x13, 0x03, 0x5b, 0xf5, 0x92, 0x4d, 0xfc, 0x06,
2759 0xc4, 0x80, 0xc6, 0xd3, 0x0a, 0xf8, 0x2e, 0x54, 0x89, 0xc0, 0x0e, 0x99, 0xd0, 0xad, 0x2f, 0xa1,
2760 0x9a, 0x0e, 0x0f, 0xde, 0x84, 0xbc, 0x1f, 0x10, 0x2f, 0xe0, 0x59, 0x98, 0x57, 0x45, 0x03, 0x23,
2761 0xc8, 0x52, 0xdb, 0xe0, 0xbb, 0x5c, 0x5e, 0x65, 0x7f, 0xf1, 0x4f, 0x66, 0x03, 0xce, 0xf2, 0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, 0x64, 0x87, 0x5a, 0xc9, 0x43, 0x3c, 0x7b, 0x56, 0xb9, 0x27, 0xbc, 0x59, 0xf0, 0xf4,
2796 0xd7, 0x19, 0x78, 0x79, 0xa9, 0xf1, 0xa5, 0x8e, 0xbe, 0x06, 0x60, 0xda, 0xee, 0x34, 0x10, 0x15,
2797 0x91, 0xd8, 0x60, 0x4b, 0x1c, 0xe1, 0x9b, 0x17, 0xdb, 0x3c, 0xa7, 0x41, 0x2c, 0xcf, 0x72, 0x39,
2798 0x08, 0x88, 0x13, 0xee, 0xce, 0x1c, 0xcd, 0x71, 0x47, 0x5f, 0x3f, 0x63, 0xa4, 0x0b, 0x89, 0xf9,
2799 0x1e, 0x20, 0xdd, 0x32, 0xa9, 0x1d, 0x68, 0x7e, 0xe0, 0x51, 0x32, 0x31, 0xed, 0x11, 0x3f, 0x41,
2800 0x8a, 0x7b, 0xf9, 0x21, 0xb1, 0x7c, 0xaa, 0xae, 0x09, 0x71, 0x3f, 0x92, 0x32, 0x0d, 0x9e, 0x40,
2801 0x5e, 0x42, 0xa3, 0x90, 0xd2, 0x10, 0xe2, 0x58, 0xa3, 0xf6, 0xdb, 0x12, 0x94, 0x13, 0x75, 0x35,
2802 0xbe, 0x02, 0x95, 0x87, 0xe4, 0x31, 0xd1, 0xa2, 0xbb, 0x92, 0x88, 0x44, 0x99, 0x61, 0xbd, 0xf0,
2803 0xbe, 0xf4, 0x1e, 0x6c, 0x72, 0x8a, 0x33, 0x0d, 0xa8, 0xa7, 0xe9, 0x16, 0xf1, 0x7d, 0x1e, 0xb4,
2804 0x22, 0xa7, 0x62, 0x26, 0xeb, 0x32, 0x51, 0x33, 0x92, 0xe0, 0xdb, 0xb0, 0xc1, 0x35, 0x26, 0x53,
2805 0x2b, 0x30, 0x5d, 0x8b, 0x6a, 0xec, 0xf6, 0xe6, 0xf3, 0x93, 0x24, 0xf6, 0x6c, 0x9d, 0x31, 0x8e,
2806 0x42, 0x02, 0xf3, 0xc8, 0xc7, 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, 0x99,
2873 0x50, 0x3b, 0xf0, 0xa3, 0x79, 0x0d, 0xf1, 0x66, 0x08, 0xe3, 0x77, 0x60, 0x3d, 0xf0, 0x88, 0x69,
2874 0xa5, 0xb8, 0x39, 0xce, 0x45, 0x91, 0x20, 0x26, 0xef, 0xc1, 0xa5, 0xc8, 0xae, 0x41, 0x03, 0xa2,
2875 0x8f, 0xa9, 0x31, 0x53, 0x2a, 0xf0, 0xd7, 0x8d, 0x8b, 0x21, 0xa1, 0x15, 0xca, 0x23, 0xdd, 0xda,
2876 0xd7, 0x12, 0xac, 0x47, 0xf7, 0x34, 0x23, 0x0e, 0xd6, 0x11, 0x00, 0xb1, 0x6d, 0x27, 0x48, 0x86,
2877 0x6b, 0x31, 0x95, 0x17, 0xf4, 0xea, 0x8d, 0x58, 0x49, 0x4d, 0x18, 0xd8, 0x9a, 0x00, 0xcc, 0x24,
2878 0x67, 0x86, 0xed, 0x32, 0x94, 0xc3, 0x2f, 0x47, 0xfc, 0xf3, 0xa3, 0xb8, 0xd9, 0x83, 0x80, 0xd8,
2879 0x85, 0x0e, 0x6f, 0x42, 0xfe, 0x84, 0x8e, 0x4c, 0x3b, 0x7c, 0x0f, 0x16, 0x8d, 0xe8, 0xfd, 0x25,
2880 0x17, 0xbf, 0xbf, 0xec, 0xff, 0x46, 0x82, 0x0d, 0xdd, 0x99, 0xcc, 0xfb, 0xbb, 0x8f, 0xe6, 0x9e,
2881 0x17, 0xfc, 0x8f, 0xa5, 0xcf, 0x3f, 0x1a, 0x99, 0xc1, 0x78, 0x7a, 0x52, 0xd7, 0x9d, 0xc9, 0xee,
2882 0xc8, 0xb1, 0x88, 0x3d, 0x9a, 0x7d, 0x3f, 0xe5, 0x7f, 0xf4, 0x1b, 0x23, 0x6a, 0xdf, 0x18, 0x39,
2883 0x89, 0xaf, 0xa9, 0xf7, 0x66, 0x7f, 0xff, 0x27, 0x49, 0x7f, 0xca, 0x64, 0x0f, 0x7a, 0xfb, 0x7f,
2884 0xce, 0x6c, 0x1d, 0x88, 0xee, 0x7a, 0x51, 0x78, 0x54, 0x3a, 0xb4, 0xa8, 0xce, 0x86, 0xfc, 0xff,
2885 0x00, 0x00, 0x00, 0xff, 0xff, 0x3e, 0xe8, 0xef, 0xc4, 0x9b, 0x1d, 0x00, 0x00,
2886 }
416416 // determining the namespace.
417417 optional string php_namespace = 41;
418418
419
420 // Use this option to change the namespace of php generated metadata classes.
421 // Default is empty. When this option is empty, the proto file name will be used
422 // for determining the namespace.
423 optional string php_metadata_namespace = 44;
424
425 // Use this option to change the package of ruby generated classes. Default
426 // is empty. When this option is not set, the package name will be used for
427 // determining the ruby package.
428 optional string ruby_package = 45;
429
419430 // The parser stores options it doesn't recognize here.
420431 // See the documentation for the "Options" section above.
421432 repeated UninterpretedOption uninterpreted_option = 999;
4242 "crypto/sha256"
4343 "encoding/hex"
4444 "fmt"
45 "go/ast"
4546 "go/build"
4647 "go/parser"
4748 "go/printer"
6667 // It is incremented whenever an incompatibility between the generated code and
6768 // proto package is introduced; the generated code references
6869 // a constant, proto.ProtoPackageIsVersionN (where N is generatedCodeVersion).
69 const generatedCodeVersion = 2
70 const generatedCodeVersion = 3
7071
7172 // A Plugin provides functionality to add to the output during Go code generation,
7273 // such as to produce RPC stubs.
270271 // This is used for supporting public imports.
271272 exported map[Object][]symbol
272273
273 fingerprint string // Fingerprint of this file's contents.
274274 importPath GoImportPath // Import path of this file's package.
275275 packageName GoPackageName // Name of this file's Go package.
276276
281281 // to the compressed bytes of this descriptor. It is not exported, so
282282 // it is only valid inside the generated package.
283283 func (d *FileDescriptor) VarName() string {
284 name := strings.Map(badToUnderscore, baseName(d.GetName()))
285 return fmt.Sprintf("fileDescriptor_%s_%s", name, d.fingerprint)
284 h := sha256.Sum256([]byte(d.GetName()))
285 return fmt.Sprintf("fileDescriptor_%s", hex.EncodeToString(h[:8]))
286286 }
287287
288288 // goPackageOption interprets the file's go_package option.
339339 type symbol interface {
340340 // GenerateAlias should generate an appropriate alias
341341 // for the symbol from the named package.
342 GenerateAlias(g *Generator, pkg GoPackageName)
342 GenerateAlias(g *Generator, filename string, pkg GoPackageName)
343343 }
344344
345345 type messageSymbol struct {
355355 genType bool // whether typ contains a generated type (message/group/enum)
356356 }
357357
358 func (ms *messageSymbol) GenerateAlias(g *Generator, pkg GoPackageName) {
358 func (ms *messageSymbol) GenerateAlias(g *Generator, filename string, pkg GoPackageName) {
359 g.P("// ", ms.sym, " from public import ", filename)
359360 g.P("type ", ms.sym, " = ", pkg, ".", ms.sym)
360361 for _, name := range ms.oneofTypes {
361362 g.P("type ", name, " = ", pkg, ".", name)
367368 proto3 bool // Whether this came from a proto3 file.
368369 }
369370
370 func (es enumSymbol) GenerateAlias(g *Generator, pkg GoPackageName) {
371 func (es enumSymbol) GenerateAlias(g *Generator, filename string, pkg GoPackageName) {
371372 s := es.name
373 g.P("// ", s, " from public import ", filename)
372374 g.P("type ", s, " = ", pkg, ".", s)
373375 g.P("var ", s, "_name = ", pkg, ".", s, "_name")
374376 g.P("var ", s, "_value = ", pkg, ".", s, "_value")
380382 cast string // if non-empty, a type cast is required (used for enums)
381383 }
382384
383 func (cs constOrVarSymbol) GenerateAlias(g *Generator, pkg GoPackageName) {
385 func (cs constOrVarSymbol) GenerateAlias(g *Generator, filename string, pkg GoPackageName) {
384386 v := string(pkg) + "." + cs.sym
385387 if cs.cast != "" {
386388 v = cs.cast + "(" + v + ")"
417419 packageNames map[GoImportPath]GoPackageName // Imported package names in the current file.
418420 usedPackages map[GoImportPath]bool // Packages used in current file.
419421 usedPackageNames map[GoPackageName]bool // Package names used in the current file.
422 addedImports map[GoImportPath]bool // Additional imports to emit.
420423 typeNameToObject map[string]Object // Key is a fully-qualified name in input syntax.
421424 init []string // Lines to emit in the init function.
422425 indent string
531534 return name
532535 }
533536 name := cleanPackageName(baseName(string(importPath)))
534 for i, orig := 1, name; g.usedPackageNames[name]; i++ {
537 for i, orig := 1, name; g.usedPackageNames[name] || isGoPredeclaredIdentifier[string(name)]; i++ {
535538 name = orig + GoPackageName(strconv.Itoa(i))
536539 }
537540 g.packageNames[importPath] = name
538541 g.usedPackageNames[name] = true
539542 return name
543 }
544
545 // AddImport adds a package to the generated file's import section.
546 // It returns the name used for the package.
547 func (g *Generator) AddImport(importPath GoImportPath) GoPackageName {
548 g.addedImports[importPath] = true
549 return g.GoPackageName(importPath)
540550 }
541551
542552 var globalPackageNames = map[GoPackageName]bool{
584594 "var": true,
585595 }
586596
597 var isGoPredeclaredIdentifier = map[string]bool{
598 "append": true,
599 "bool": true,
600 "byte": true,
601 "cap": true,
602 "close": true,
603 "complex": true,
604 "complex128": true,
605 "complex64": true,
606 "copy": true,
607 "delete": true,
608 "error": true,
609 "false": true,
610 "float32": true,
611 "float64": true,
612 "imag": true,
613 "int": true,
614 "int16": true,
615 "int32": true,
616 "int64": true,
617 "int8": true,
618 "iota": true,
619 "len": true,
620 "make": true,
621 "new": true,
622 "nil": true,
623 "panic": true,
624 "print": true,
625 "println": true,
626 "real": true,
627 "recover": true,
628 "rune": true,
629 "string": true,
630 "true": true,
631 "uint": true,
632 "uint16": true,
633 "uint32": true,
634 "uint64": true,
635 "uint8": true,
636 "uintptr": true,
637 }
638
587639 func cleanPackageName(name string) GoPackageName {
588640 name = strings.Map(badToUnderscore, name)
589 // Identifier must not be keyword: insert _.
641 // Identifier must not be keyword or predeclared identifier: insert _.
590642 if isGoKeyword[name] {
591643 name = "_" + name
592644 }
723775 if fd == nil {
724776 g.Fail("could not find file named", fileName)
725777 }
726 fingerprint, err := fingerprintProto(fd.FileDescriptorProto)
727 if err != nil {
728 g.Error(err)
729 }
730 fd.fingerprint = fingerprint
731778 g.genFiles = append(g.genFiles, fd)
732779 }
733 }
734
735 // fingerprintProto returns a fingerprint for a message.
736 // The fingerprint is intended to prevent conflicts between generated fileds,
737 // not to provide cryptographic security.
738 func fingerprintProto(m proto.Message) (string, error) {
739 b, err := proto.Marshal(m)
740 if err != nil {
741 return "", err
742 }
743 h := sha256.Sum256(b)
744 return hex.EncodeToString(h[:8]), nil
745780 }
746781
747782 // Scan the descriptors in this file. For each one, build the slice of nested descriptors
937972 if !ok {
938973 g.Fail("can't find object with type", typeName)
939974 }
940
941 // If the file of this object isn't a direct dependency of the current file,
942 // or in the current file, then this object has been publicly imported into
943 // a dependency of the current file.
944 // We should return the ImportedDescriptor object for it instead.
945 direct := *o.File().Name == *g.file.Name
946 if !direct {
947 for _, dep := range g.file.Dependency {
948 if *g.fileByName(dep).Name == *o.File().Name {
949 direct = true
950 break
951 }
952 }
953 }
954 if !direct {
955 found := false
956 Loop:
957 for _, dep := range g.file.Dependency {
958 df := g.fileByName(*g.fileByName(dep).Name)
959 for _, td := range df.imp {
960 if td.o == o {
961 // Found it!
962 o = td
963 found = true
964 break Loop
965 }
966 }
967 }
968 if !found {
969 log.Printf("protoc-gen-go: WARNING: failed finding publicly imported dependency for %v, used in %v", typeName, *g.file.Name)
970 }
971 }
972
973975 return o
974976 }
975977
11231125 g.usedPackages = make(map[GoImportPath]bool)
11241126 g.packageNames = make(map[GoImportPath]GoPackageName)
11251127 g.usedPackageNames = make(map[GoPackageName]bool)
1128 g.addedImports = make(map[GoImportPath]bool)
11261129 for name := range globalPackageNames {
11271130 g.usedPackageNames[name] = true
11281131 }
11511154 g.generateExtension(ext)
11521155 }
11531156 g.generateInitFunction()
1157 g.generateFileDescriptor(file)
11541158
11551159 // Run the plugins before the imports so we know which imports are necessary.
11561160 g.runPlugins(file)
1157
1158 g.generateFileDescriptor(file)
11591161
11601162 // Generate header and imports last, though they appear first in the output.
11611163 rem := g.Buffer
11821184 // make a copy independent of g; we'll need it after Reset.
11831185 original = append([]byte(nil), original...)
11841186 }
1185 ast, err := parser.ParseFile(fset, "", original, parser.ParseComments)
1187 fileAST, err := parser.ParseFile(fset, "", original, parser.ParseComments)
11861188 if err != nil {
11871189 // Print out the bad code with line numbers.
11881190 // This should never happen in practice, but it can while changing generated code,
11941196 }
11951197 g.Fail("bad Go source code was generated:", err.Error(), "\n"+src.String())
11961198 }
1199 ast.SortImports(fset, fileAST)
11971200 g.Reset()
1198 err = (&printer.Config{Mode: printer.TabIndent | printer.UseSpaces, Tabwidth: 8}).Fprint(g, fset, ast)
1201 err = (&printer.Config{Mode: printer.TabIndent | printer.UseSpaces, Tabwidth: 8}).Fprint(g, fset, fileAST)
11991202 if err != nil {
12001203 g.Fail("generated Go source code could not be reformatted:", err.Error())
12011204 }
12241227 g.P("// source: ", g.file.Name)
12251228 }
12261229 g.P()
1227
1228 importPath, _, _ := g.file.goPackageOption()
1229 if importPath == "" {
1230 g.P("package ", g.file.packageName)
1231 } else {
1232 g.P("package ", g.file.packageName, " // import ", GoImportPath(g.ImportPrefix)+importPath)
1233 }
1230 g.PrintComments(strconv.Itoa(packagePath))
12341231 g.P()
1235
1236 if loc, ok := g.file.comments[strconv.Itoa(packagePath)]; ok {
1237 g.P("/*")
1238 // not using g.PrintComments because this is a /* */ comment block.
1239 text := strings.TrimSuffix(loc.GetLeadingComments(), "\n")
1240 for _, line := range strings.Split(text, "\n") {
1241 line = strings.TrimPrefix(line, " ")
1242 // ensure we don't escape from the block comment
1243 line = strings.Replace(line, "*/", "* /", -1)
1244 g.P(line)
1245 }
1246 g.P("*/")
1247 g.P()
1248 }
1232 g.P("package ", g.file.packageName)
1233 g.P()
12491234 }
12501235
12511236 // deprecationComment is the standard comment added to deprecated
12761261 w := new(bytes.Buffer)
12771262 nl := ""
12781263 for _, line := range strings.Split(strings.TrimSuffix(loc.GetLeadingComments(), "\n"), "\n") {
1279 fmt.Fprintf(w, "%s// %s", nl, strings.TrimPrefix(line, " "))
1264 fmt.Fprintf(w, "%s//%s", nl, line)
12801265 nl = "\n"
12811266 }
12821267 return w.String(), true
12981283
12991284 // Generate the imports
13001285 func (g *Generator) generateImports() {
1301 // We almost always need a proto import. Rather than computing when we
1302 // do, which is tricky when there's a plugin, just import it and
1303 // reference it later. The same argument applies to the fmt and math packages.
1304 g.P("import "+g.Pkg["proto"]+" ", GoImportPath(g.ImportPrefix)+"github.com/golang/protobuf/proto")
1305 g.P("import " + g.Pkg["fmt"] + ` "fmt"`)
1306 g.P("import " + g.Pkg["math"] + ` "math"`)
1307 var (
1308 imports = make(map[GoImportPath]bool)
1309 strongImports = make(map[GoImportPath]bool)
1310 importPaths []string
1311 )
1286 imports := make(map[GoImportPath]GoPackageName)
13121287 for i, s := range g.file.Dependency {
13131288 fd := g.fileByName(s)
13141289 importPath := fd.importPath
13161291 if importPath == g.file.importPath {
13171292 continue
13181293 }
1319 if !imports[importPath] {
1320 importPaths = append(importPaths, string(importPath))
1321 }
1322 imports[importPath] = true
1323 if !g.weak(int32(i)) {
1324 strongImports[importPath] = true
1325 }
1326 }
1327 sort.Strings(importPaths)
1328 for i := range importPaths {
1329 importPath := GoImportPath(importPaths[i])
1330 packageName := g.GoPackageName(importPath)
1331 fullPath := GoImportPath(g.ImportPrefix) + importPath
1332 // Skip weak imports.
1333 if !strongImports[importPath] {
1334 g.P("// skipping weak import ", packageName, " ", fullPath)
1294 // Do not import weak imports.
1295 if g.weak(int32(i)) {
1296 continue
1297 }
1298 // Do not import a package twice.
1299 if _, ok := imports[importPath]; ok {
13351300 continue
13361301 }
13371302 // We need to import all the dependencies, even if we don't reference them,
13381303 // because other code and tools depend on having the full transitive closure
13391304 // of protocol buffer types in the binary.
1305 packageName := g.GoPackageName(importPath)
13401306 if _, ok := g.usedPackages[importPath]; !ok {
13411307 packageName = "_"
13421308 }
1343 g.P("import ", packageName, " ", fullPath)
1344 }
1309 imports[importPath] = packageName
1310 }
1311 for importPath := range g.addedImports {
1312 imports[importPath] = g.GoPackageName(importPath)
1313 }
1314 // We almost always need a proto import. Rather than computing when we
1315 // do, which is tricky when there's a plugin, just import it and
1316 // reference it later. The same argument applies to the fmt and math packages.
1317 g.P("import (")
1318 g.P(g.Pkg["fmt"] + ` "fmt"`)
1319 g.P(g.Pkg["math"] + ` "math"`)
1320 g.P(g.Pkg["proto"]+" ", GoImportPath(g.ImportPrefix)+"github.com/golang/protobuf/proto")
1321 for importPath, packageName := range imports {
1322 g.P(packageName, " ", GoImportPath(g.ImportPrefix)+importPath)
1323 }
1324 g.P(")")
13451325 g.P()
13461326 // TODO: may need to worry about uniqueness across plugins
13471327 for _, p := range plugins {
13561336 }
13571337
13581338 func (g *Generator) generateImported(id *ImportedDescriptor) {
1359 tn := id.TypeName()
1360 sn := tn[len(tn)-1]
13611339 df := id.o.File()
13621340 filename := *df.Name
13631341 if df.importPath == g.file.importPath {
13641342 // Don't generate type aliases for files in the same Go package as this one.
1365 g.P("// Ignoring public import of ", sn, " from ", filename)
1366 g.P()
13671343 return
13681344 }
13691345 if !supportTypeAliases {
13701346 g.Fail(fmt.Sprintf("%s: public imports require at least go1.9", filename))
13711347 }
1372 g.P("// ", sn, " from public import ", filename)
13731348 g.usedPackages[df.importPath] = true
13741349
13751350 for _, sym := range df.exported[id.o] {
1376 sym.GenerateAlias(g, g.GoPackageName(df.importPath))
1351 sym.GenerateAlias(g, filename, g.GoPackageName(df.importPath))
13771352 }
13781353
13791354 g.P()
14091384 g.file.addExport(enum, constOrVarSymbol{name, "const", ccTypeName})
14101385 }
14111386 g.P(")")
1387 g.P()
14121388 g.P("var ", ccTypeName, "_name = map[int32]string{")
14131389 generated := make(map[int32]bool) // avoid duplicate values
14141390 for _, e := range enum.Value {
14201396 generated[*e.Number] = true
14211397 }
14221398 g.P("}")
1399 g.P()
14231400 g.P("var ", ccTypeName, "_value = map[string]int32{")
14241401 for _, e := range enum.Value {
14251402 g.P(strconv.Quote(*e.Name), ": ", e.Number, ",")
14261403 }
14271404 g.P("}")
1405 g.P()
14281406
14291407 if !enum.proto3() {
14301408 g.P("func (x ", ccTypeName, ") Enum() *", ccTypeName, " {")
14321410 g.P("*p = x")
14331411 g.P("return p")
14341412 g.P("}")
1413 g.P()
14351414 }
14361415
14371416 g.P("func (x ", ccTypeName, ") String() string {")
14381417 g.P("return ", g.Pkg["proto"], ".EnumName(", ccTypeName, "_name, int32(x))")
14391418 g.P("}")
1419 g.P()
14401420
14411421 if !enum.proto3() {
14421422 g.P("func (x *", ccTypeName, ") UnmarshalJSON(data []byte) error {")
14471427 g.P("*x = ", ccTypeName, "(value)")
14481428 g.P("return nil")
14491429 g.P("}")
1430 g.P()
14501431 }
14511432
14521433 var indexes []string
14581439 g.P("func (", ccTypeName, ") EnumDescriptor() ([]byte, []int) {")
14591440 g.P("return ", g.file.VarName(), ", []int{", strings.Join(indexes, ", "), "}")
14601441 g.P("}")
1442 g.P()
14611443 if enum.file.GetPackage() == "google.protobuf" && enum.GetName() == "NullValue" {
14621444 g.P("func (", ccTypeName, `) XXX_WellKnownType() string { return "`, enum.GetName(), `" }`)
1463 }
1464
1465 g.P()
1445 g.P()
1446 }
1447
1448 g.generateEnumRegistration(enum)
14661449 }
14671450
14681451 // The tag is a string like "varint,2,opt,name=fieldname,def=7" that
15191502 g.Fail("unknown enum type", CamelCaseSlice(obj.TypeName()))
15201503 }
15211504 defaultValue = enum.integerValueAsString(defaultValue)
1505 case descriptor.FieldDescriptorProto_TYPE_FLOAT:
1506 if def := defaultValue; def != "inf" && def != "-inf" && def != "nan" {
1507 if f, err := strconv.ParseFloat(defaultValue, 32); err == nil {
1508 defaultValue = fmt.Sprint(float32(f))
1509 }
1510 }
1511 case descriptor.FieldDescriptorProto_TYPE_DOUBLE:
1512 if def := defaultValue; def != "inf" && def != "-inf" && def != "nan" {
1513 if f, err := strconv.ParseFloat(defaultValue, 64); err == nil {
1514 defaultValue = fmt.Sprint(f)
1515 }
1516 }
15221517 }
15231518 defaultValue = ",def=" + defaultValue
15241519 }
15561551 name = name[i+1:]
15571552 }
15581553 }
1559 if json := field.GetJsonName(); json != "" && json != name {
1554 if json := field.GetJsonName(); field.Extendee == nil && json != "" && json != name {
15601555 // TODO: escaping might be needed, in which case
15611556 // perhaps this should be in its own "json" tag.
15621557 name += ",json=" + json
16601655 }
16611656
16621657 func (g *Generator) RecordTypeUse(t string) {
1663 if _, ok := g.typeNameToObject[t]; ok {
1664 // Call ObjectNamed to get the true object to record the use.
1665 obj := g.ObjectNamed(t)
1666 g.usedPackages[obj.GoImportPath()] = true
1667 }
1658 if _, ok := g.typeNameToObject[t]; !ok {
1659 return
1660 }
1661 importPath := g.ObjectNamed(t).GoImportPath()
1662 if importPath == g.outputImportPath {
1663 // Don't record use of objects in our package.
1664 return
1665 }
1666 g.AddImport(importPath)
1667 g.usedPackages[importPath] = true
16681668 }
16691669
16701670 // Method names that may be generated. Fields with these names get an
17641764 // oneofField - field containing list of subfields:
17651765 // - oneofSubField - a field within the oneof
17661766
1767 // msgCtx contais the context for the generator functions.
1767 // msgCtx contains the context for the generator functions.
17681768 type msgCtx struct {
17691769 goName string // Go struct name of the message, e.g. MessageName
17701770 message *Descriptor // The descriptor for the message
18681868 fieldNumber int // Actual field number, as defined in proto, e.g. 12
18691869 getterDef string // Default for getters, e.g. "nil", `""` or "Default_MessageType_FieldName"
18701870 protoDef string // Default value as defined in the proto file, e.g "yoshi" or "5"
1871 }
1872
1873 // wireTypeName returns a textual wire type, needed for oneof sub fields in generated code.
1874 func (f *oneofSubField) wireTypeName() string {
1875 switch f.protoType {
1876 case descriptor.FieldDescriptorProto_TYPE_FIXED64,
1877 descriptor.FieldDescriptorProto_TYPE_SFIXED64,
1878 descriptor.FieldDescriptorProto_TYPE_DOUBLE:
1879 return "WireFixed64"
1880 case descriptor.FieldDescriptorProto_TYPE_FIXED32,
1881 descriptor.FieldDescriptorProto_TYPE_SFIXED32,
1882 descriptor.FieldDescriptorProto_TYPE_FLOAT:
1883 return "WireFixed32"
1884 case descriptor.FieldDescriptorProto_TYPE_GROUP:
1885 return "WireStartGroup"
1886 case descriptor.FieldDescriptorProto_TYPE_MESSAGE,
1887 descriptor.FieldDescriptorProto_TYPE_STRING,
1888 descriptor.FieldDescriptorProto_TYPE_BYTES:
1889 return "WireBytes"
1890 default: // All others are Varints
1891 return "WireVarint"
1892 }
1871 deprecated string // Deprecation comment, if any.
18931872 }
18941873
18951874 // typedNil prints a nil casted to the pointer to this field.
1896 // - for XXX_OneofFuncs
1875 // - for XXX_OneofWrappers
18971876 func (f *oneofSubField) typedNil(g *Generator) {
18981877 g.P("(*", f.oneofTypeName, ")(nil),")
1899 }
1900
1901 // marshalCase prints the case matching this oneof subfield in the marshalling code.
1902 func (f *oneofSubField) marshalCase(g *Generator) {
1903 g.P("case *", f.oneofTypeName, ":")
1904 wire := f.wireTypeName()
1905 var pre, post string
1906 val := "x." + f.goName // overridden for TYPE_BOOL
1907 switch f.protoType {
1908 case descriptor.FieldDescriptorProto_TYPE_DOUBLE:
1909 pre = "b.EncodeFixed64(" + g.Pkg["math"] + ".Float64bits("
1910 post = "))"
1911 case descriptor.FieldDescriptorProto_TYPE_FLOAT:
1912 pre = "b.EncodeFixed32(uint64(" + g.Pkg["math"] + ".Float32bits("
1913 post = ")))"
1914 case descriptor.FieldDescriptorProto_TYPE_INT64, descriptor.FieldDescriptorProto_TYPE_UINT64:
1915 pre, post = "b.EncodeVarint(uint64(", "))"
1916 case descriptor.FieldDescriptorProto_TYPE_INT32, descriptor.FieldDescriptorProto_TYPE_UINT32, descriptor.FieldDescriptorProto_TYPE_ENUM:
1917 pre, post = "b.EncodeVarint(uint64(", "))"
1918 case descriptor.FieldDescriptorProto_TYPE_FIXED64, descriptor.FieldDescriptorProto_TYPE_SFIXED64:
1919 pre, post = "b.EncodeFixed64(uint64(", "))"
1920 case descriptor.FieldDescriptorProto_TYPE_FIXED32, descriptor.FieldDescriptorProto_TYPE_SFIXED32:
1921 pre, post = "b.EncodeFixed32(uint64(", "))"
1922 case descriptor.FieldDescriptorProto_TYPE_BOOL:
1923 g.P("t := uint64(0)")
1924 g.P("if ", val, " { t = 1 }")
1925 val = "t"
1926 pre, post = "b.EncodeVarint(", ")"
1927 case descriptor.FieldDescriptorProto_TYPE_STRING:
1928 pre, post = "b.EncodeStringBytes(", ")"
1929 case descriptor.FieldDescriptorProto_TYPE_GROUP:
1930 pre, post = "b.Marshal(", ")"
1931 case descriptor.FieldDescriptorProto_TYPE_MESSAGE:
1932 pre, post = "b.EncodeMessage(", ")"
1933 case descriptor.FieldDescriptorProto_TYPE_BYTES:
1934 pre, post = "b.EncodeRawBytes(", ")"
1935 case descriptor.FieldDescriptorProto_TYPE_SINT32:
1936 pre, post = "b.EncodeZigzag32(uint64(", "))"
1937 case descriptor.FieldDescriptorProto_TYPE_SINT64:
1938 pre, post = "b.EncodeZigzag64(uint64(", "))"
1939 default:
1940 g.Fail("unhandled oneof field type ", f.protoType.String())
1941 }
1942 g.P("b.EncodeVarint(", f.fieldNumber, "<<3|", g.Pkg["proto"], ".", wire, ")")
1943 if t := f.protoType; t != descriptor.FieldDescriptorProto_TYPE_GROUP && t != descriptor.FieldDescriptorProto_TYPE_MESSAGE {
1944 g.P(pre, val, post)
1945 } else {
1946 g.P("if err := ", pre, val, post, "; err != nil {")
1947 g.P("return err")
1948 g.P("}")
1949 }
1950 if f.protoType == descriptor.FieldDescriptorProto_TYPE_GROUP {
1951 g.P("b.EncodeVarint(", f.fieldNumber, "<<3|", g.Pkg["proto"], ".WireEndGroup)")
1952 }
1953 }
1954
1955 // unmarshalCase prints the case matching this oneof subfield in the unmarshalling code.
1956 func (f *oneofSubField) unmarshalCase(g *Generator, origOneofName string, oneofName string) {
1957 g.P("case ", f.fieldNumber, ": // ", origOneofName, ".", f.getProtoName())
1958 g.P("if wire != ", g.Pkg["proto"], ".", f.wireTypeName(), " {")
1959 g.P("return true, ", g.Pkg["proto"], ".ErrInternalBadWireType")
1960 g.P("}")
1961 lhs := "x, err" // overridden for TYPE_MESSAGE and TYPE_GROUP
1962 var dec, cast, cast2 string
1963 switch f.protoType {
1964 case descriptor.FieldDescriptorProto_TYPE_DOUBLE:
1965 dec, cast = "b.DecodeFixed64()", g.Pkg["math"]+".Float64frombits"
1966 case descriptor.FieldDescriptorProto_TYPE_FLOAT:
1967 dec, cast, cast2 = "b.DecodeFixed32()", "uint32", g.Pkg["math"]+".Float32frombits"
1968 case descriptor.FieldDescriptorProto_TYPE_INT64:
1969 dec, cast = "b.DecodeVarint()", "int64"
1970 case descriptor.FieldDescriptorProto_TYPE_UINT64:
1971 dec = "b.DecodeVarint()"
1972 case descriptor.FieldDescriptorProto_TYPE_INT32:
1973 dec, cast = "b.DecodeVarint()", "int32"
1974 case descriptor.FieldDescriptorProto_TYPE_FIXED64:
1975 dec = "b.DecodeFixed64()"
1976 case descriptor.FieldDescriptorProto_TYPE_FIXED32:
1977 dec, cast = "b.DecodeFixed32()", "uint32"
1978 case descriptor.FieldDescriptorProto_TYPE_BOOL:
1979 dec = "b.DecodeVarint()"
1980 // handled specially below
1981 case descriptor.FieldDescriptorProto_TYPE_STRING:
1982 dec = "b.DecodeStringBytes()"
1983 case descriptor.FieldDescriptorProto_TYPE_GROUP:
1984 g.P("msg := new(", f.goType[1:], ")") // drop star
1985 lhs = "err"
1986 dec = "b.DecodeGroup(msg)"
1987 // handled specially below
1988 case descriptor.FieldDescriptorProto_TYPE_MESSAGE:
1989 g.P("msg := new(", f.goType[1:], ")") // drop star
1990 lhs = "err"
1991 dec = "b.DecodeMessage(msg)"
1992 // handled specially below
1993 case descriptor.FieldDescriptorProto_TYPE_BYTES:
1994 dec = "b.DecodeRawBytes(true)"
1995 case descriptor.FieldDescriptorProto_TYPE_UINT32:
1996 dec, cast = "b.DecodeVarint()", "uint32"
1997 case descriptor.FieldDescriptorProto_TYPE_ENUM:
1998 dec, cast = "b.DecodeVarint()", f.goType
1999 case descriptor.FieldDescriptorProto_TYPE_SFIXED32:
2000 dec, cast = "b.DecodeFixed32()", "int32"
2001 case descriptor.FieldDescriptorProto_TYPE_SFIXED64:
2002 dec, cast = "b.DecodeFixed64()", "int64"
2003 case descriptor.FieldDescriptorProto_TYPE_SINT32:
2004 dec, cast = "b.DecodeZigzag32()", "int32"
2005 case descriptor.FieldDescriptorProto_TYPE_SINT64:
2006 dec, cast = "b.DecodeZigzag64()", "int64"
2007 default:
2008 g.Fail("unhandled oneof field type ", f.protoType.String())
2009 }
2010 g.P(lhs, " := ", dec)
2011 val := "x"
2012 if cast != "" {
2013 val = cast + "(" + val + ")"
2014 }
2015 if cast2 != "" {
2016 val = cast2 + "(" + val + ")"
2017 }
2018 switch f.protoType {
2019 case descriptor.FieldDescriptorProto_TYPE_BOOL:
2020 val += " != 0"
2021 case descriptor.FieldDescriptorProto_TYPE_GROUP,
2022 descriptor.FieldDescriptorProto_TYPE_MESSAGE:
2023 val = "msg"
2024 }
2025 g.P("m.", oneofName, " = &", f.oneofTypeName, "{", val, "}")
2026 g.P("return true, err")
2027 }
2028
2029 // sizerCase prints the case matching this oneof subfield in the sizer code.
2030 func (f *oneofSubField) sizerCase(g *Generator) {
2031 g.P("case *", f.oneofTypeName, ":")
2032 val := "x." + f.goName
2033 var varint, fixed string
2034 switch f.protoType {
2035 case descriptor.FieldDescriptorProto_TYPE_DOUBLE:
2036 fixed = "8"
2037 case descriptor.FieldDescriptorProto_TYPE_FLOAT:
2038 fixed = "4"
2039 case descriptor.FieldDescriptorProto_TYPE_INT64, descriptor.FieldDescriptorProto_TYPE_UINT64, descriptor.FieldDescriptorProto_TYPE_INT32, descriptor.FieldDescriptorProto_TYPE_UINT32, descriptor.FieldDescriptorProto_TYPE_ENUM:
2040 varint = val
2041 case descriptor.FieldDescriptorProto_TYPE_FIXED64, descriptor.FieldDescriptorProto_TYPE_SFIXED64:
2042 fixed = "8"
2043 case descriptor.FieldDescriptorProto_TYPE_FIXED32, descriptor.FieldDescriptorProto_TYPE_SFIXED32:
2044 fixed = "4"
2045 case descriptor.FieldDescriptorProto_TYPE_BOOL:
2046 fixed = "1"
2047 case descriptor.FieldDescriptorProto_TYPE_STRING:
2048 fixed = "len(" + val + ")"
2049 varint = fixed
2050 case descriptor.FieldDescriptorProto_TYPE_GROUP:
2051 fixed = g.Pkg["proto"] + ".Size(" + val + ")"
2052 case descriptor.FieldDescriptorProto_TYPE_MESSAGE:
2053 g.P("s := ", g.Pkg["proto"], ".Size(", val, ")")
2054 fixed = "s"
2055 varint = fixed
2056 case descriptor.FieldDescriptorProto_TYPE_BYTES:
2057 fixed = "len(" + val + ")"
2058 varint = fixed
2059 case descriptor.FieldDescriptorProto_TYPE_SINT32:
2060 varint = "(uint32(" + val + ") << 1) ^ uint32((int32(" + val + ") >> 31))"
2061 case descriptor.FieldDescriptorProto_TYPE_SINT64:
2062 varint = "uint64(" + val + " << 1) ^ uint64((int64(" + val + ") >> 63))"
2063 default:
2064 g.Fail("unhandled oneof field type ", f.protoType.String())
2065 }
2066 // Tag and wire varint is known statically,
2067 // so don't generate code for that part of the size computation.
2068 tagAndWireSize := proto.SizeVarint(uint64(f.fieldNumber << 3)) // wire doesn't affect varint size
2069 g.P("n += ", tagAndWireSize, " // tag and wire")
2070 if varint != "" {
2071 g.P("n += ", g.Pkg["proto"], ".SizeVarint(uint64(", varint, "))")
2072 }
2073 if fixed != "" {
2074 g.P("n += ", fixed)
2075 }
2076 if f.protoType == descriptor.FieldDescriptorProto_TYPE_GROUP {
2077 g.P("n += ", tagAndWireSize, " // tag and wire")
2078 }
20791878 }
20801879
20811880 // getProtoDef returns the default value explicitly stated in the proto file, e.g "yoshi" or "5".
21371936 g.P()
21381937 // Getters for each oneof
21391938 for _, sf := range f.subFields {
1939 if sf.deprecated != "" {
1940 g.P(sf.deprecated)
1941 }
21401942 g.P("func (m *", mc.goName, ") ", Annotate(mc.message.file, sf.fullPath, sf.getterName), "() "+sf.goType+" {")
21411943 g.P("if x, ok := m.", f.getterName, "().(*", sf.oneofTypeName, "); ok {")
21421944 g.P("return x.", sf.goName)
22142016 def = "float32(" + def + ")"
22152017 }
22162018 kind = "var "
2019 case df.getProtoType() == descriptor.FieldDescriptorProto_TYPE_FLOAT:
2020 if f, err := strconv.ParseFloat(def, 32); err == nil {
2021 def = fmt.Sprint(float32(f))
2022 }
2023 case df.getProtoType() == descriptor.FieldDescriptorProto_TYPE_DOUBLE:
2024 if f, err := strconv.ParseFloat(def, 64); err == nil {
2025 def = fmt.Sprint(f)
2026 }
22172027 case df.getProtoType() == descriptor.FieldDescriptorProto_TYPE_ENUM:
22182028 // Must be an enum. Need to construct the prefixed name.
22192029 obj := g.ObjectNamed(df.getProtoTypeName())
22622072 if len(ofields) == 0 {
22632073 return
22642074 }
2265 enc := "_" + mc.goName + "_OneofMarshaler"
2266 dec := "_" + mc.goName + "_OneofUnmarshaler"
2267 size := "_" + mc.goName + "_OneofSizer"
2268 encSig := "(msg " + g.Pkg["proto"] + ".Message, b *" + g.Pkg["proto"] + ".Buffer) error"
2269 decSig := "(msg " + g.Pkg["proto"] + ".Message, tag, wire int, b *" + g.Pkg["proto"] + ".Buffer) (bool, error)"
2270 sizeSig := "(msg " + g.Pkg["proto"] + ".Message) (n int)"
22712075
22722076 // OneofFuncs
2273 g.P("// XXX_OneofFuncs is for the internal use of the proto package.")
2274 g.P("func (*", mc.goName, ") XXX_OneofFuncs() (func", encSig, ", func", decSig, ", func", sizeSig, ", []interface{}) {")
2275 g.P("return ", enc, ", ", dec, ", ", size, ", []interface{}{")
2077 g.P("// XXX_OneofWrappers is for the internal use of the proto package.")
2078 g.P("func (*", mc.goName, ") XXX_OneofWrappers() []interface{} {")
2079 g.P("return []interface{}{")
22762080 for _, of := range ofields {
22772081 for _, sf := range of.subFields {
22782082 sf.typedNil(g)
22792083 }
22802084 }
22812085 g.P("}")
2282 g.P("}")
2283 g.P()
2284
2285 // marshaler
2286 g.P("func ", enc, encSig, " {")
2287 g.P("m := msg.(*", mc.goName, ")")
2288 for _, of := range ofields {
2289 g.P("// ", of.getProtoName())
2290 g.P("switch x := m.", of.goName, ".(type) {")
2291 for _, sf := range of.subFields {
2292 // also fills in field.wire
2293 sf.marshalCase(g)
2294 }
2295 g.P("case nil:")
2296 g.P("default:")
2297 g.P(" return ", g.Pkg["fmt"], `.Errorf("`, mc.goName, ".", of.goName, ` has unexpected type %T", x)`)
2298 g.P("}")
2299 }
2300 g.P("return nil")
2301 g.P("}")
2302 g.P()
2303
2304 // unmarshaler
2305 g.P("func ", dec, decSig, " {")
2306 g.P("m := msg.(*", mc.goName, ")")
2307 g.P("switch tag {")
2308 for _, of := range ofields {
2309 for _, sf := range of.subFields {
2310 sf.unmarshalCase(g, of.getProtoName(), of.goName)
2311 }
2312 }
2313 g.P("default:")
2314 g.P("return false, nil")
2315 g.P("}")
2316 g.P("}")
2317 g.P()
2318
2319 // sizer
2320 g.P("func ", size, sizeSig, " {")
2321 g.P("m := msg.(*", mc.goName, ")")
2322 for _, of := range ofields {
2323 g.P("// ", of.getProtoName())
2324 g.P("switch x := m.", of.goName, ".(type) {")
2325 for _, sf := range of.subFields {
2326 // also fills in field.wire
2327 sf.sizerCase(g)
2328 }
2329 g.P("case nil:")
2330 g.P("default:")
2331 g.P("panic(", g.Pkg["fmt"], ".Sprintf(\"proto: unexpected type %T in oneof\", x))")
2332 g.P("}")
2333 }
2334 g.P("return n")
23352086 g.P("}")
23362087 g.P()
23372088 }
23852136 g.P("func (*", mc.goName, ") Descriptor() ([]byte, []int) {")
23862137 g.P("return ", g.file.VarName(), ", []int{", strings.Join(indexes, ", "), "}")
23872138 g.P("}")
2139 g.P()
23882140 // TODO: Revisit the decision to use a XXX_WellKnownType method
23892141 // if we change proto.MessageName to work with multiple equivalents.
23902142 if mc.message.file.GetPackage() == "google.protobuf" && wellKnownTypes[mc.message.GetName()] {
23912143 g.P("func (*", mc.goName, `) XXX_WellKnownType() string { return "`, mc.message.GetName(), `" }`)
2144 g.P()
23922145 }
23932146
23942147 // Extension support methods
23952148 if len(mc.message.ExtensionRange) > 0 {
2396 // message_set_wire_format only makes sense when extensions are defined.
2397 if opts := mc.message.Options; opts != nil && opts.GetMessageSetWireFormat() {
2398 g.P()
2399 g.P("func (m *", mc.goName, ") MarshalJSON() ([]byte, error) {")
2400 g.P("return ", g.Pkg["proto"], ".MarshalMessageSetJSON(&m.XXX_InternalExtensions)")
2401 g.P("}")
2402 g.P("func (m *", mc.goName, ") UnmarshalJSON(buf []byte) error {")
2403 g.P("return ", g.Pkg["proto"], ".UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions)")
2404 g.P("}")
2405 }
2406
24072149 g.P()
24082150 g.P("var extRange_", mc.goName, " = []", g.Pkg["proto"], ".ExtensionRange{")
24092151 for _, r := range mc.message.ExtensionRange {
24142156 g.P("func (*", mc.goName, ") ExtensionRangeArray() []", g.Pkg["proto"], ".ExtensionRange {")
24152157 g.P("return extRange_", mc.goName)
24162158 g.P("}")
2159 g.P()
24172160 }
24182161
24192162 // TODO: It does not scale to keep adding another method for every
24312174 g.P("return xxx_messageInfo_", mc.goName, ".Marshal(b, m, deterministic)")
24322175 g.P("}")
24332176
2434 g.P("func (dst *", mc.goName, ") XXX_Merge(src ", g.Pkg["proto"], ".Message) {")
2435 g.P("xxx_messageInfo_", mc.goName, ".Merge(dst, src)")
2177 g.P("func (m *", mc.goName, ") XXX_Merge(src ", g.Pkg["proto"], ".Message) {")
2178 g.P("xxx_messageInfo_", mc.goName, ".Merge(m, src)")
24362179 g.P("}")
24372180
24382181 g.P("func (m *", mc.goName, ") XXX_Size() int {") // avoid name clash with "Size" field in some message
25022245 if oneof && oFields[*field.OneofIndex] == nil {
25032246 odp := message.OneofDecl[int(*field.OneofIndex)]
25042247 base := CamelCase(odp.GetName())
2505 names := allocNames(base, "Get"+base)
2506 fname, gname := names[0], names[1]
2248 fname := allocNames(base)[0]
25072249
25082250 // This is the first field of a oneof we haven't seen before.
25092251 // Generate the union field.
25212263 of := oneofField{
25222264 fieldCommon: fieldCommon{
25232265 goName: fname,
2524 getterName: gname,
2266 getterName: "Get"+fname,
25252267 goType: dname,
25262268 tags: tag,
25272269 protoName: odp.GetName(),
25612303
25622304 tag += fmt.Sprintf(" protobuf_key:%s protobuf_val:%s", keyTag, valTag)
25632305 }
2306 }
2307
2308 fieldDeprecated := ""
2309 if field.GetOptions().GetDeprecated() {
2310 fieldDeprecated = deprecationComment
25642311 }
25652312
25662313 dvalue := g.getterDefault(field, goTypeName)
26062353 getterDef: dvalue,
26072354 protoDef: field.GetDefaultValue(),
26082355 oneofTypeName: tname,
2356 deprecated: fieldDeprecated,
26092357 }
26102358 oneofField.subFields = append(oneofField.subFields, &sf)
26112359 g.RecordTypeUse(field.GetTypeName())
26122360 continue
2613 }
2614
2615 fieldDeprecated := ""
2616 if field.GetOptions().GetDeprecated() {
2617 fieldDeprecated = deprecationComment
26182361 }
26192362
26202363 fieldFullPath := fmt.Sprintf("%s,%d,%d", message.path, messageFieldPath, i)
26622405 g.generateOneofFuncs(mc, topLevelFields)
26632406 g.P()
26642407
2665 if !message.group {
2666
2667 var oneofTypes []string
2668 for _, f := range topLevelFields {
2669 if of, ok := f.(*oneofField); ok {
2670 for _, osf := range of.subFields {
2671 oneofTypes = append(oneofTypes, osf.oneofTypeName)
2672 }
2673 }
2674 }
2675
2676 opts := message.Options
2677 ms := &messageSymbol{
2678 sym: goTypeName,
2679 hasExtensions: len(message.ExtensionRange) > 0,
2680 isMessageSet: opts != nil && opts.GetMessageSetWireFormat(),
2681 oneofTypes: oneofTypes,
2682 }
2683 g.file.addExport(message, ms)
2684 }
2408 var oneofTypes []string
2409 for _, f := range topLevelFields {
2410 if of, ok := f.(*oneofField); ok {
2411 for _, osf := range of.subFields {
2412 oneofTypes = append(oneofTypes, osf.oneofTypeName)
2413 }
2414 }
2415 }
2416
2417 opts := message.Options
2418 ms := &messageSymbol{
2419 sym: goTypeName,
2420 hasExtensions: len(message.ExtensionRange) > 0,
2421 isMessageSet: opts != nil && opts.GetMessageSetWireFormat(),
2422 oneofTypes: oneofTypes,
2423 }
2424 g.file.addExport(message, ms)
26852425
26862426 for _, ext := range message.ext {
26872427 g.generateExtension(ext)
28102550 // In addition, the situation for when to apply this special case is implemented
28112551 // differently in other languages:
28122552 // https://github.com/google/protobuf/blob/aff10976/src/google/protobuf/text_format.cc#L1560
2813 mset := false
28142553 if extDesc.GetOptions().GetMessageSetWireFormat() && typeName[len(typeName)-1] == "message_set_extension" {
28152554 typeName = typeName[:len(typeName)-1]
2816 mset = true
28172555 }
28182556
28192557 // For text formatting, the package must be exactly what the .proto file declares,
28342572 g.P("}")
28352573 g.P()
28362574
2837 if mset {
2838 // Generate a bit more code to register with message_set.go.
2839 g.addInitf("%s.RegisterMessageSetType((%s)(nil), %d, %q)", g.Pkg["proto"], fieldType, *field.Number, extName)
2840 }
2575 g.addInitf("%s.RegisterExtension(%s)", g.Pkg["proto"], ext.DescName())
28412576
28422577 g.file.addExport(ext, constOrVarSymbol{ccTypeName, "var", ""})
28432578 }
28442579
28452580 func (g *Generator) generateInitFunction() {
2846 for _, enum := range g.file.enum {
2847 g.generateEnumRegistration(enum)
2848 }
2849 for _, d := range g.file.desc {
2850 for _, ext := range d.ext {
2851 g.generateExtensionRegistration(ext)
2852 }
2853 }
2854 for _, ext := range g.file.ext {
2855 g.generateExtensionRegistration(ext)
2856 }
28572581 if len(g.init) == 0 {
28582582 return
28592583 }
29152639 // The full type name, CamelCased.
29162640 ccTypeName := CamelCaseSlice(typeName)
29172641 g.addInitf("%s.RegisterEnum(%q, %[3]s_name, %[3]s_value)", g.Pkg["proto"], pkg+ccTypeName, ccTypeName)
2918 }
2919
2920 func (g *Generator) generateExtensionRegistration(ext *ExtensionDescriptor) {
2921 g.addInitf("%s.RegisterExtension(%s)", g.Pkg["proto"], ext.DescName())
29222642 }
29232643
29242644 // And now lots of helper functions.
6767 {"foo", "", "foo", true},
6868 {"github.com/golang/bar", "github.com/golang/bar", "bar", true},
6969 {"github.com/golang/bar;baz", "github.com/golang/bar", "baz", true},
70 {"github.com/golang/string", "github.com/golang/string", "string", true},
7071 }
7172 for _, tc := range tests {
7273 d := &FileDescriptor{
8081 if impPath != tc.impPath || pkg != tc.pkg || ok != tc.ok {
8182 t.Errorf("go_package = %q => (%q, %q, %t), want (%q, %q, %t)", tc.in,
8283 impPath, pkg, ok, tc.impPath, tc.pkg, tc.ok)
84 }
85 }
86 }
87
88 func TestPackageNames(t *testing.T) {
89 g := New()
90 g.packageNames = make(map[GoImportPath]GoPackageName)
91 g.usedPackageNames = make(map[GoPackageName]bool)
92 for _, test := range []struct {
93 importPath GoImportPath
94 want GoPackageName
95 }{
96 {"github.com/golang/foo", "foo"},
97 {"github.com/golang/second/package/named/foo", "foo1"},
98 {"github.com/golang/third/package/named/foo", "foo2"},
99 {"github.com/golang/conflicts/with/predeclared/ident/string", "string1"},
100 } {
101 if got := g.GoPackageName(test.importPath); got != test.want {
102 t.Errorf("GoPackageName(%v) = %v, want %v", test.importPath, got, test.want)
83103 }
84104 }
85105 }
22 import (
33 "bytes"
44 "flag"
5 "fmt"
65 "go/build"
76 "go/parser"
87 "go/token"
149148 wantPackageB: "test_beta",
150149 wantImportsA: map[string]bool{
151150 "github.com/golang/protobuf/proto": true,
152 "beta": true,
151 "beta": true,
153152 },
154153 }, {
155154 parameters: "import_prefix=prefix",
322321 }
323322 }
324323
325 func TestPackageComment(t *testing.T) {
326 workdir, err := ioutil.TempDir("", "proto-test")
327 if err != nil {
328 t.Fatal(err)
329 }
330 defer os.RemoveAll(workdir)
331
332 var packageRE = regexp.MustCompile(`(?m)^package .*`)
333
334 for i, test := range []struct {
335 goPackageOption string
336 wantPackage string
337 }{{
338 goPackageOption: ``,
339 wantPackage: `package proto_package`,
340 }, {
341 goPackageOption: `option go_package = "go_package";`,
342 wantPackage: `package go_package`,
343 }, {
344 goPackageOption: `option go_package = "import/path/of/go_package";`,
345 wantPackage: `package go_package // import "import/path/of/go_package"`,
346 }, {
347 goPackageOption: `option go_package = "import/path/of/something;go_package";`,
348 wantPackage: `package go_package // import "import/path/of/something"`,
349 }, {
350 goPackageOption: `option go_package = "import_path;go_package";`,
351 wantPackage: `package go_package // import "import_path"`,
352 }} {
353 srcName := filepath.Join(workdir, fmt.Sprintf("%d.proto", i))
354 tgtName := filepath.Join(workdir, fmt.Sprintf("%d.pb.go", i))
355
356 buf := &bytes.Buffer{}
357 fmt.Fprintln(buf, `syntax = "proto3";`)
358 fmt.Fprintln(buf, `package proto_package;`)
359 fmt.Fprintln(buf, test.goPackageOption)
360 if err := ioutil.WriteFile(srcName, buf.Bytes(), 0666); err != nil {
361 t.Fatal(err)
362 }
363
364 protoc(t, []string{"-I" + workdir, "--go_out=paths=source_relative:" + workdir, srcName})
365
366 out, err := ioutil.ReadFile(tgtName)
367 if err != nil {
368 t.Fatal(err)
369 }
370
371 pkg := packageRE.Find(out)
372 if pkg == nil {
373 t.Errorf("generated .pb.go contains no package line\n\nsource:\n%v\n\noutput:\n%v", buf.String(), string(out))
374 continue
375 }
376
377 if got, want := string(pkg), test.wantPackage; got != want {
378 t.Errorf("unexpected package statement with go_package = %q\n got: %v\nwant: %v", test.goPackageOption, got, want)
379 }
380 }
381 }
382
383324 // parseFile returns a file's package name and a list of all packages it imports.
384325 func parseFile(source string) (packageName string, imports []string, err error) {
385326 fset := token.NewFileSet()
3535
3636 import (
3737 "fmt"
38 "path"
3938 "strconv"
4039 "strings"
4140
5251 // Paths for packages used by code generated in this file,
5352 // relative to the import_prefix of the generator.Generator.
5453 const (
55 contextPkgPath = "golang.org/x/net/context"
54 contextPkgPath = "context"
5655 grpcPkgPath = "google.golang.org/grpc"
56 codePkgPath = "google.golang.org/grpc/codes"
57 statusPkgPath = "google.golang.org/grpc/status"
5758 )
5859
5960 func init() {
8283 // Init initializes the plugin.
8384 func (g *grpc) Init(gen *generator.Generator) {
8485 g.gen = gen
85 contextPkg = generator.RegisterUniquePackageName("context", nil)
86 grpcPkg = generator.RegisterUniquePackageName("grpc", nil)
8786 }
8887
8988 // Given a type name defined in a .proto, return its object.
107106 return
108107 }
109108
109 contextPkg = string(g.gen.AddImport(contextPkgPath))
110 grpcPkg = string(g.gen.AddImport(grpcPkgPath))
111
110112 g.P("// Reference imports to suppress errors if they are not otherwise used.")
111113 g.P("var _ ", contextPkg, ".Context")
112114 g.P("var _ ", grpcPkg, ".ClientConn")
125127
126128 // GenerateImports generates the import declaration for this file.
127129 func (g *grpc) GenerateImports(file *generator.FileDescriptor) {
128 if len(file.FileDescriptorProto.Service) == 0 {
129 return
130 }
131 g.P("import (")
132 g.P(contextPkg, " ", generator.GoImportPath(path.Join(string(g.gen.ImportPrefix), contextPkgPath)))
133 g.P(grpcPkg, " ", generator.GoImportPath(path.Join(string(g.gen.ImportPrefix), grpcPkgPath)))
134 g.P(")")
135 g.P()
136130 }
137131
138132 // reservedClientName records whether a client name is reserved on the client side.
222216 }
223217 g.P("}")
224218 g.P()
219
220 // Server Unimplemented struct for forward compatability.
221 if deprecated {
222 g.P(deprecationComment)
223 }
224 g.generateUnimplementedServer(servName, service)
225225
226226 // Server registration.
227227 if deprecated {
276276 g.P()
277277 }
278278
279 // generateUnimplementedServer creates the unimplemented server struct
280 func (g *grpc) generateUnimplementedServer(servName string, service *pb.ServiceDescriptorProto) {
281 serverType := servName + "Server"
282 g.P("// Unimplemented", serverType, " can be embedded to have forward compatible implementations.")
283 g.P("type Unimplemented", serverType, " struct {")
284 g.P("}")
285 g.P()
286 // Unimplemented<service_name>Server's concrete methods
287 for _, method := range service.Method {
288 g.generateServerMethodConcrete(servName, method)
289 }
290 g.P()
291 }
292
293 // generateServerMethodConcrete returns unimplemented methods which ensure forward compatibility
294 func (g *grpc) generateServerMethodConcrete(servName string, method *pb.MethodDescriptorProto) {
295 header := g.generateServerSignatureWithParamNames(servName, method)
296 g.P("func (*Unimplemented", servName, "Server) ", header, " {")
297 var nilArg string
298 if !method.GetServerStreaming() && !method.GetClientStreaming() {
299 nilArg = "nil, "
300 }
301 methName := generator.CamelCase(method.GetName())
302 statusPkg := string(g.gen.AddImport(statusPkgPath))
303 codePkg := string(g.gen.AddImport(codePkgPath))
304 g.P("return ", nilArg, statusPkg, `.Errorf(`, codePkg, `.Unimplemented, "method `, methName, ` not implemented")`)
305 g.P("}")
306 }
307
279308 // generateClientSignature returns the client-side signature for a method.
280309 func (g *grpc) generateClientSignature(servName string, method *pb.MethodDescriptorProto) string {
281310 origMethName := method.GetName()
373402 g.P("}")
374403 g.P()
375404 }
405 }
406
407 // generateServerSignatureWithParamNames returns the server-side signature for a method with parameter names.
408 func (g *grpc) generateServerSignatureWithParamNames(servName string, method *pb.MethodDescriptorProto) string {
409 origMethName := method.GetName()
410 methName := generator.CamelCase(origMethName)
411 if reservedClientName[methName] {
412 methName += "_"
413 }
414
415 var reqArgs []string
416 ret := "error"
417 if !method.GetServerStreaming() && !method.GetClientStreaming() {
418 reqArgs = append(reqArgs, "ctx "+contextPkg+".Context")
419 ret = "(*" + g.typeName(method.GetOutputType()) + ", error)"
420 }
421 if !method.GetClientStreaming() {
422 reqArgs = append(reqArgs, "req *"+g.typeName(method.GetInputType()))
423 }
424 if method.GetServerStreaming() || method.GetClientStreaming() {
425 reqArgs = append(reqArgs, "srv "+servName+"_"+generator.CamelCase(origMethName)+"Server")
426 }
427
428 return methName + "(" + strings.Join(reqArgs, ", ") + ") " + ret
376429 }
377430
378431 // generateServerSignature returns the server-side signature for a method.
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // deprecated/deprecated.proto is a deprecated file.
22
3 package deprecated // import "github.com/golang/protobuf/protoc-gen-go/testdata/deprecated"
4
5 /*
6 package deprecated contains only deprecated messages and services.
7 */
8
9 import proto "github.com/golang/protobuf/proto"
10 import fmt "fmt"
11 import math "math"
3 // package deprecated contains only deprecated messages and services.
4
5 package deprecated
126
137 import (
14 context "golang.org/x/net/context"
8 context "context"
9 fmt "fmt"
10 proto "github.com/golang/protobuf/proto"
1511 grpc "google.golang.org/grpc"
12 codes "google.golang.org/grpc/codes"
13 status "google.golang.org/grpc/status"
14 math "math"
1615 )
1716
1817 // Reference imports to suppress errors if they are not otherwise used.
2423 // is compatible with the proto package it is being compiled against.
2524 // A compilation error at this line likely means your copy of the
2625 // proto package needs to be updated.
27 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
26 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
2827
2928 // DeprecatedEnum contains deprecated values.
3029 type DeprecatedEnum int32 // Deprecated: Do not use.
3635 var DeprecatedEnum_name = map[int32]string{
3736 0: "DEPRECATED",
3837 }
38
3939 var DeprecatedEnum_value = map[string]int32{
4040 "DEPRECATED": 0,
4141 }
4343 func (x DeprecatedEnum) String() string {
4444 return proto.EnumName(DeprecatedEnum_name, int32(x))
4545 }
46
4647 func (DeprecatedEnum) EnumDescriptor() ([]byte, []int) {
47 return fileDescriptor_deprecated_9e1889ba21817fad, []int{0}
48 return fileDescriptor_f64ba265cd7eae3f, []int{0}
4849 }
4950
5051 // DeprecatedRequest is a request to DeprecatedCall.
6061 func (m *DeprecatedRequest) String() string { return proto.CompactTextString(m) }
6162 func (*DeprecatedRequest) ProtoMessage() {}
6263 func (*DeprecatedRequest) Descriptor() ([]byte, []int) {
63 return fileDescriptor_deprecated_9e1889ba21817fad, []int{0}
64 }
64 return fileDescriptor_f64ba265cd7eae3f, []int{0}
65 }
66
6567 func (m *DeprecatedRequest) XXX_Unmarshal(b []byte) error {
6668 return xxx_messageInfo_DeprecatedRequest.Unmarshal(m, b)
6769 }
6870 func (m *DeprecatedRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
6971 return xxx_messageInfo_DeprecatedRequest.Marshal(b, m, deterministic)
7072 }
71 func (dst *DeprecatedRequest) XXX_Merge(src proto.Message) {
72 xxx_messageInfo_DeprecatedRequest.Merge(dst, src)
73 func (m *DeprecatedRequest) XXX_Merge(src proto.Message) {
74 xxx_messageInfo_DeprecatedRequest.Merge(m, src)
7375 }
7476 func (m *DeprecatedRequest) XXX_Size() int {
7577 return xxx_messageInfo_DeprecatedRequest.Size(m)
8385 // Deprecated: Do not use.
8486 type DeprecatedResponse struct {
8587 // DeprecatedField contains a DeprecatedEnum.
86 DeprecatedField DeprecatedEnum `protobuf:"varint,1,opt,name=deprecated_field,json=deprecatedField,proto3,enum=deprecated.DeprecatedEnum" json:"deprecated_field,omitempty"` // Deprecated: Do not use.
87 XXX_NoUnkeyedLiteral struct{} `json:"-"`
88 XXX_unrecognized []byte `json:"-"`
89 XXX_sizecache int32 `json:"-"`
88 DeprecatedField DeprecatedEnum `protobuf:"varint,1,opt,name=deprecated_field,json=deprecatedField,proto3,enum=deprecated.DeprecatedEnum" json:"deprecated_field,omitempty"` // Deprecated: Do not use.
89 // DeprecatedOneof contains a deprecated field.
90 //
91 // Types that are valid to be assigned to DeprecatedOneof:
92 // *DeprecatedResponse_DeprecatedOneofField
93 DeprecatedOneof isDeprecatedResponse_DeprecatedOneof `protobuf_oneof:"deprecated_oneof"`
94 XXX_NoUnkeyedLiteral struct{} `json:"-"`
95 XXX_unrecognized []byte `json:"-"`
96 XXX_sizecache int32 `json:"-"`
9097 }
9198
9299 func (m *DeprecatedResponse) Reset() { *m = DeprecatedResponse{} }
93100 func (m *DeprecatedResponse) String() string { return proto.CompactTextString(m) }
94101 func (*DeprecatedResponse) ProtoMessage() {}
95102 func (*DeprecatedResponse) Descriptor() ([]byte, []int) {
96 return fileDescriptor_deprecated_9e1889ba21817fad, []int{1}
97 }
103 return fileDescriptor_f64ba265cd7eae3f, []int{1}
104 }
105
98106 func (m *DeprecatedResponse) XXX_Unmarshal(b []byte) error {
99107 return xxx_messageInfo_DeprecatedResponse.Unmarshal(m, b)
100108 }
101109 func (m *DeprecatedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
102110 return xxx_messageInfo_DeprecatedResponse.Marshal(b, m, deterministic)
103111 }
104 func (dst *DeprecatedResponse) XXX_Merge(src proto.Message) {
105 xxx_messageInfo_DeprecatedResponse.Merge(dst, src)
112 func (m *DeprecatedResponse) XXX_Merge(src proto.Message) {
113 xxx_messageInfo_DeprecatedResponse.Merge(m, src)
106114 }
107115 func (m *DeprecatedResponse) XXX_Size() int {
108116 return xxx_messageInfo_DeprecatedResponse.Size(m)
121129 return DeprecatedEnum_DEPRECATED
122130 }
123131
132 type isDeprecatedResponse_DeprecatedOneof interface {
133 isDeprecatedResponse_DeprecatedOneof()
134 }
135
136 type DeprecatedResponse_DeprecatedOneofField struct {
137 DeprecatedOneofField string `protobuf:"bytes,2,opt,name=deprecated_oneof_field,json=deprecatedOneofField,proto3,oneof"`
138 }
139
140 func (*DeprecatedResponse_DeprecatedOneofField) isDeprecatedResponse_DeprecatedOneof() {}
141
142 func (m *DeprecatedResponse) GetDeprecatedOneof() isDeprecatedResponse_DeprecatedOneof {
143 if m != nil {
144 return m.DeprecatedOneof
145 }
146 return nil
147 }
148
149 // Deprecated: Do not use.
150 func (m *DeprecatedResponse) GetDeprecatedOneofField() string {
151 if x, ok := m.GetDeprecatedOneof().(*DeprecatedResponse_DeprecatedOneofField); ok {
152 return x.DeprecatedOneofField
153 }
154 return ""
155 }
156
157 // XXX_OneofWrappers is for the internal use of the proto package.
158 func (*DeprecatedResponse) XXX_OneofWrappers() []interface{} {
159 return []interface{}{
160 (*DeprecatedResponse_DeprecatedOneofField)(nil),
161 }
162 }
163
124164 func init() {
165 proto.RegisterEnum("deprecated.DeprecatedEnum", DeprecatedEnum_name, DeprecatedEnum_value)
125166 proto.RegisterType((*DeprecatedRequest)(nil), "deprecated.DeprecatedRequest")
126167 proto.RegisterType((*DeprecatedResponse)(nil), "deprecated.DeprecatedResponse")
127 proto.RegisterEnum("deprecated.DeprecatedEnum", DeprecatedEnum_name, DeprecatedEnum_value)
168 }
169
170 func init() { proto.RegisterFile("deprecated/deprecated.proto", fileDescriptor_f64ba265cd7eae3f) }
171
172 var fileDescriptor_f64ba265cd7eae3f = []byte{
173 // 287 bytes of a gzipped FileDescriptorProto
174 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xcd, 0x4a, 0xf3, 0x40,
175 0x14, 0x86, 0x7b, 0xe6, 0x83, 0x0f, 0x9d, 0x45, 0xad, 0x83, 0x68, 0x88, 0x28, 0x25, 0xab, 0x20,
176 0x34, 0x81, 0xba, 0x2b, 0x6e, 0x9a, 0x26, 0xa2, 0x2b, 0x25, 0x76, 0xe5, 0x46, 0xf2, 0x73, 0x12,
177 0x03, 0xe9, 0x4c, 0x4c, 0x26, 0x5e, 0x83, 0xf7,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, 0xbe, 0xf6, 0xa9, 0x97, 0x89,
189 0x8d, 0x5f, 0x8a, 0x3a, 0xe1, 0xa5, 0x3f, 0xdc, 0x23, 0xed, 0x8b, 0x6d, 0x90, 0xcd, 0x4a, 0xe4,
190 0xb3, 0x52, 0xf8, 0x12, 0x3b, 0x99, 0x27, 0x32, 0x31, 0x4e, 0xf7, 0x05, 0x90, 0xfe, 0x1f, 0x5c,
191 0xd7, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x08, 0xd5, 0xa0, 0x89, 0xdd, 0x01, 0x00, 0x00,
128192 }
129193
130194 // Reference imports to suppress errors if they are not otherwise used.
170234 type DeprecatedServiceServer interface {
171235 // DeprecatedCall takes a DeprecatedRequest and returns a DeprecatedResponse.
172236 DeprecatedCall(context.Context, *DeprecatedRequest) (*DeprecatedResponse, error)
237 }
238
239 // Deprecated: Do not use.
240 // UnimplementedDeprecatedServiceServer can be embedded to have forward compatible implementations.
241 type UnimplementedDeprecatedServiceServer struct {
242 }
243
244 func (*UnimplementedDeprecatedServiceServer) DeprecatedCall(ctx context.Context, req *DeprecatedRequest) (*DeprecatedResponse, error) {
245 return nil, status.Errorf(codes.Unimplemented, "method DeprecatedCall not implemented")
173246 }
174247
175248 // Deprecated: Do not use.
207280 Streams: []grpc.StreamDesc{},
208281 Metadata: "deprecated/deprecated.proto",
209282 }
210
211 func init() {
212 proto.RegisterFile("deprecated/deprecated.proto", fileDescriptor_deprecated_9e1889ba21817fad)
213 }
214
215 var fileDescriptor_deprecated_9e1889ba21817fad = []byte{
216 // 248 bytes of a gzipped FileDescriptorProto
217 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0x49, 0x2d, 0x28,
218 0x4a, 0x4d, 0x4e, 0x2c, 0x49, 0x4d, 0xd1, 0x47, 0x30, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85,
219 0xb8, 0x10, 0x22, 0x4a, 0xe2, 0x5c, 0x82, 0x2e, 0x70, 0x5e, 0x50, 0x6a, 0x61, 0x69, 0x6a, 0x71,
220 0x89, 0x15, 0x93, 0x04, 0xa3, 0x52, 0x32, 0x97, 0x10, 0xb2, 0x44, 0x71, 0x41, 0x7e, 0x5e, 0x71,
221 0xaa, 0x90, 0x27, 0x97, 0x00, 0x42, 0x73, 0x7c, 0x5a, 0x66, 0x6a, 0x4e, 0x8a, 0x04, 0xa3, 0x02,
222 0xa3, 0x06, 0x9f, 0x91, 0x94, 0x1e, 0x92, 0x3d, 0x08, 0x9d, 0xae, 0x79, 0xa5, 0xb9, 0x4e, 0x4c,
223 0x12, 0x8c, 0x41, 0xfc, 0x08, 0x69, 0x37, 0x90, 0x36, 0x90, 0x25, 0x5a, 0x1a, 0x5c, 0x7c, 0xa8,
224 0x4a, 0x85, 0x84, 0xb8, 0xb8, 0x5c, 0x5c, 0x03, 0x82, 0x5c, 0x9d, 0x1d, 0x43, 0x5c, 0x5d, 0x04,
225 0x18, 0xa4, 0x98, 0x38, 0x18, 0xa5, 0x98, 0x24, 0x18, 0x8d, 0xf2, 0x90, 0xdd, 0x19, 0x9c, 0x5a,
226 0x54, 0x96, 0x99, 0x9c, 0x2a, 0x14, 0x82, 0xac, 0xdd, 0x39, 0x31, 0x27, 0x47, 0x48, 0x16, 0xbb,
227 0x2b, 0xa0, 0x1e, 0x93, 0x92, 0xc3, 0x25, 0x0d, 0xf1, 0x9e, 0x12, 0x73, 0x07, 0x13, 0xa3, 0x14,
228 0x88, 0x70, 0x72, 0x8c, 0xb2, 0x49, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5,
229 0x4f, 0xcf, 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x07, 0x07, 0x5f, 0x52, 0x69, 0x1a, 0x84, 0x91, 0xac,
230 0x9b, 0x9e, 0x9a, 0xa7, 0x9b, 0x9e, 0xaf, 0x5f, 0x92, 0x5a, 0x5c, 0x92, 0x92, 0x58, 0x92, 0x88,
231 0x14, 0xd2, 0x3b, 0x18, 0x19, 0x93, 0xd8, 0xc0, 0xaa, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff,
232 0x0e, 0xf5, 0x6c, 0x87, 0x8c, 0x01, 0x00, 0x00,
233 }
4848 option deprecated = true;
4949 // DeprecatedField contains a DeprecatedEnum.
5050 DeprecatedEnum deprecated_field = 1 [deprecated=true];
51 // DeprecatedOneof contains a deprecated field.
52 oneof deprecated_oneof {
53 // DeprecatedOneofField is a deprecated field.
54 string deprecated_oneof_field = 2 [deprecated=true];
55 }
5156 }
5257
5358 // DeprecatedEnum contains deprecated values.
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: extension_base/extension_base.proto
22
3 package extension_base // import "github.com/golang/protobuf/protoc-gen-go/testdata/extension_base"
3 package extension_base
44
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 math "math"
9 )
810
911 // Reference imports to suppress errors if they are not otherwise used.
1012 var _ = proto.Marshal
1517 // is compatible with the proto package it is being compiled against.
1618 // A compilation error at this line likely means your copy of the
1719 // proto package needs to be updated.
18 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
20 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
1921
2022 type BaseMessage struct {
2123 Height *int32 `protobuf:"varint,1,opt,name=height" json:"height,omitempty"`
2931 func (m *BaseMessage) String() string { return proto.CompactTextString(m) }
3032 func (*BaseMessage) ProtoMessage() {}
3133 func (*BaseMessage) Descriptor() ([]byte, []int) {
32 return fileDescriptor_extension_base_41d3c712c9fc37fc, []int{0}
34 return fileDescriptor_2fbd53bac0b7ca8a, []int{0}
3335 }
3436
3537 var extRange_BaseMessage = []proto.ExtensionRange{
4042 func (*BaseMessage) ExtensionRangeArray() []proto.ExtensionRange {
4143 return extRange_BaseMessage
4244 }
45
4346 func (m *BaseMessage) XXX_Unmarshal(b []byte) error {
4447 return xxx_messageInfo_BaseMessage.Unmarshal(m, b)
4548 }
4649 func (m *BaseMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
4750 return xxx_messageInfo_BaseMessage.Marshal(b, m, deterministic)
4851 }
49 func (dst *BaseMessage) XXX_Merge(src proto.Message) {
50 xxx_messageInfo_BaseMessage.Merge(dst, src)
52 func (m *BaseMessage) XXX_Merge(src proto.Message) {
53 xxx_messageInfo_BaseMessage.Merge(m, src)
5154 }
5255 func (m *BaseMessage) XXX_Size() int {
5356 return xxx_messageInfo_BaseMessage.Size(m)
7780 func (m *OldStyleMessage) String() string { return proto.CompactTextString(m) }
7881 func (*OldStyleMessage) ProtoMessage() {}
7982 func (*OldStyleMessage) Descriptor() ([]byte, []int) {
80 return fileDescriptor_extension_base_41d3c712c9fc37fc, []int{1}
81 }
82
83 func (m *OldStyleMessage) MarshalJSON() ([]byte, error) {
84 return proto.MarshalMessageSetJSON(&m.XXX_InternalExtensions)
85 }
86 func (m *OldStyleMessage) UnmarshalJSON(buf []byte) error {
87 return proto.UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions)
83 return fileDescriptor_2fbd53bac0b7ca8a, []int{1}
8884 }
8985
9086 var extRange_OldStyleMessage = []proto.ExtensionRange{
9490 func (*OldStyleMessage) ExtensionRangeArray() []proto.ExtensionRange {
9591 return extRange_OldStyleMessage
9692 }
93
9794 func (m *OldStyleMessage) XXX_Unmarshal(b []byte) error {
9895 return xxx_messageInfo_OldStyleMessage.Unmarshal(m, b)
9996 }
10097 func (m *OldStyleMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
10198 return xxx_messageInfo_OldStyleMessage.Marshal(b, m, deterministic)
10299 }
103 func (dst *OldStyleMessage) XXX_Merge(src proto.Message) {
104 xxx_messageInfo_OldStyleMessage.Merge(dst, src)
100 func (m *OldStyleMessage) XXX_Merge(src proto.Message) {
101 xxx_messageInfo_OldStyleMessage.Merge(m, src)
105102 }
106103 func (m *OldStyleMessage) XXX_Size() int {
107104 return xxx_messageInfo_OldStyleMessage.Size(m)
118115 }
119116
120117 func init() {
121 proto.RegisterFile("extension_base/extension_base.proto", fileDescriptor_extension_base_41d3c712c9fc37fc)
118 proto.RegisterFile("extension_base/extension_base.proto", fileDescriptor_2fbd53bac0b7ca8a)
122119 }
123120
124 var fileDescriptor_extension_base_41d3c712c9fc37fc = []byte{
121 var fileDescriptor_2fbd53bac0b7ca8a = []byte{
125122 // 179 bytes of a gzipped FileDescriptorProto
126123 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4e, 0xad, 0x28, 0x49,
127124 0xcd, 0x2b, 0xce, 0xcc, 0xcf, 0x8b, 0x4f, 0x4a, 0x2c, 0x4e, 0xd5, 0x47, 0xe5, 0xea, 0x15, 0x14,
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: extension_extra/extension_extra.proto
22
3 package extension_extra // import "github.com/golang/protobuf/protoc-gen-go/testdata/extension_extra"
3 package extension_extra
44
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 math "math"
9 )
810
911 // Reference imports to suppress errors if they are not otherwise used.
1012 var _ = proto.Marshal
1517 // is compatible with the proto package it is being compiled against.
1618 // A compilation error at this line likely means your copy of the
1719 // proto package needs to be updated.
18 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
20 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
1921
2022 type ExtraMessage struct {
2123 Width *int32 `protobuf:"varint,1,opt,name=width" json:"width,omitempty"`
2830 func (m *ExtraMessage) String() string { return proto.CompactTextString(m) }
2931 func (*ExtraMessage) ProtoMessage() {}
3032 func (*ExtraMessage) Descriptor() ([]byte, []int) {
31 return fileDescriptor_extension_extra_83adf2410f49f816, []int{0}
33 return fileDescriptor_fce75f5a63502cd5, []int{0}
3234 }
35
3336 func (m *ExtraMessage) XXX_Unmarshal(b []byte) error {
3437 return xxx_messageInfo_ExtraMessage.Unmarshal(m, b)
3538 }
3639 func (m *ExtraMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
3740 return xxx_messageInfo_ExtraMessage.Marshal(b, m, deterministic)
3841 }
39 func (dst *ExtraMessage) XXX_Merge(src proto.Message) {
40 xxx_messageInfo_ExtraMessage.Merge(dst, src)
42 func (m *ExtraMessage) XXX_Merge(src proto.Message) {
43 xxx_messageInfo_ExtraMessage.Merge(m, src)
4144 }
4245 func (m *ExtraMessage) XXX_Size() int {
4346 return xxx_messageInfo_ExtraMessage.Size(m)
6063 }
6164
6265 func init() {
63 proto.RegisterFile("extension_extra/extension_extra.proto", fileDescriptor_extension_extra_83adf2410f49f816)
66 proto.RegisterFile("extension_extra/extension_extra.proto", fileDescriptor_fce75f5a63502cd5)
6467 }
6568
66 var fileDescriptor_extension_extra_83adf2410f49f816 = []byte{
69 var fileDescriptor_fce75f5a63502cd5 = []byte{
6770 // 133 bytes of a gzipped FileDescriptorProto
6871 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4d, 0xad, 0x28, 0x49,
6972 0xcd, 0x2b, 0xce, 0xcc, 0xcf, 0x8b, 0x4f, 0xad, 0x28, 0x29, 0x4a, 0xd4, 0x47, 0xe3, 0xeb, 0x15,
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: extension_user/extension_user.proto
22
3 package extension_user // import "github.com/golang/protobuf/protoc-gen-go/testdata/extension_user"
4
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
8 import extension_base "github.com/golang/protobuf/protoc-gen-go/testdata/extension_base"
9 import extension_extra "github.com/golang/protobuf/protoc-gen-go/testdata/extension_extra"
3 package extension_user
4
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 extension_base "github.com/golang/protobuf/protoc-gen-go/testdata/extension_base"
9 extension_extra "github.com/golang/protobuf/protoc-gen-go/testdata/extension_extra"
10 math "math"
11 )
1012
1113 // Reference imports to suppress errors if they are not otherwise used.
1214 var _ = proto.Marshal
1719 // is compatible with the proto package it is being compiled against.
1820 // A compilation error at this line likely means your copy of the
1921 // proto package needs to be updated.
20 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
22 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
2123
2224 type UserMessage struct {
2325 Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
3133 func (m *UserMessage) String() string { return proto.CompactTextString(m) }
3234 func (*UserMessage) ProtoMessage() {}
3335 func (*UserMessage) Descriptor() ([]byte, []int) {
34 return fileDescriptor_extension_user_af41b5e0bdfb7846, []int{0}
35 }
36 return fileDescriptor_359ba8abf543ca10, []int{0}
37 }
38
3639 func (m *UserMessage) XXX_Unmarshal(b []byte) error {
3740 return xxx_messageInfo_UserMessage.Unmarshal(m, b)
3841 }
3942 func (m *UserMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
4043 return xxx_messageInfo_UserMessage.Marshal(b, m, deterministic)
4144 }
42 func (dst *UserMessage) XXX_Merge(src proto.Message) {
43 xxx_messageInfo_UserMessage.Merge(dst, src)
45 func (m *UserMessage) XXX_Merge(src proto.Message) {
46 xxx_messageInfo_UserMessage.Merge(m, src)
4447 }
4548 func (m *UserMessage) XXX_Size() int {
4649 return xxx_messageInfo_UserMessage.Size(m)
7780 func (m *LoudMessage) String() string { return proto.CompactTextString(m) }
7881 func (*LoudMessage) ProtoMessage() {}
7982 func (*LoudMessage) Descriptor() ([]byte, []int) {
80 return fileDescriptor_extension_user_af41b5e0bdfb7846, []int{1}
83 return fileDescriptor_359ba8abf543ca10, []int{1}
8184 }
8285
8386 var extRange_LoudMessage = []proto.ExtensionRange{
8790 func (*LoudMessage) ExtensionRangeArray() []proto.ExtensionRange {
8891 return extRange_LoudMessage
8992 }
93
9094 func (m *LoudMessage) XXX_Unmarshal(b []byte) error {
9195 return xxx_messageInfo_LoudMessage.Unmarshal(m, b)
9296 }
9397 func (m *LoudMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
9498 return xxx_messageInfo_LoudMessage.Marshal(b, m, deterministic)
9599 }
96 func (dst *LoudMessage) XXX_Merge(src proto.Message) {
97 xxx_messageInfo_LoudMessage.Merge(dst, src)
100 func (m *LoudMessage) XXX_Merge(src proto.Message) {
101 xxx_messageInfo_LoudMessage.Merge(m, src)
98102 }
99103 func (m *LoudMessage) XXX_Size() int {
100104 return xxx_messageInfo_LoudMessage.Size(m)
125129 func (m *LoginMessage) String() string { return proto.CompactTextString(m) }
126130 func (*LoginMessage) ProtoMessage() {}
127131 func (*LoginMessage) Descriptor() ([]byte, []int) {
128 return fileDescriptor_extension_user_af41b5e0bdfb7846, []int{2}
129 }
132 return fileDescriptor_359ba8abf543ca10, []int{2}
133 }
134
130135 func (m *LoginMessage) XXX_Unmarshal(b []byte) error {
131136 return xxx_messageInfo_LoginMessage.Unmarshal(m, b)
132137 }
133138 func (m *LoginMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
134139 return xxx_messageInfo_LoginMessage.Marshal(b, m, deterministic)
135140 }
136 func (dst *LoginMessage) XXX_Merge(src proto.Message) {
137 xxx_messageInfo_LoginMessage.Merge(dst, src)
141 func (m *LoginMessage) XXX_Merge(src proto.Message) {
142 xxx_messageInfo_LoginMessage.Merge(m, src)
138143 }
139144 func (m *LoginMessage) XXX_Size() int {
140145 return xxx_messageInfo_LoginMessage.Size(m)
150155 ExtensionType: (*UserMessage)(nil),
151156 Field: 16,
152157 Name: "extension_user.LoginMessage.user_message",
153 Tag: "bytes,16,opt,name=user_message,json=userMessage",
158 Tag: "bytes,16,opt,name=user_message",
154159 Filename: "extension_user/extension_user.proto",
155160 }
156161
165170 func (m *Detail) String() string { return proto.CompactTextString(m) }
166171 func (*Detail) ProtoMessage() {}
167172 func (*Detail) Descriptor() ([]byte, []int) {
168 return fileDescriptor_extension_user_af41b5e0bdfb7846, []int{3}
169 }
173 return fileDescriptor_359ba8abf543ca10, []int{3}
174 }
175
170176 func (m *Detail) XXX_Unmarshal(b []byte) error {
171177 return xxx_messageInfo_Detail.Unmarshal(m, b)
172178 }
173179 func (m *Detail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
174180 return xxx_messageInfo_Detail.Marshal(b, m, deterministic)
175181 }
176 func (dst *Detail) XXX_Merge(src proto.Message) {
177 xxx_messageInfo_Detail.Merge(dst, src)
182 func (m *Detail) XXX_Merge(src proto.Message) {
183 xxx_messageInfo_Detail.Merge(m, src)
178184 }
179185 func (m *Detail) XXX_Size() int {
180186 return xxx_messageInfo_Detail.Size(m)
204210 func (m *Announcement) String() string { return proto.CompactTextString(m) }
205211 func (*Announcement) ProtoMessage() {}
206212 func (*Announcement) Descriptor() ([]byte, []int) {
207 return fileDescriptor_extension_user_af41b5e0bdfb7846, []int{4}
208 }
213 return fileDescriptor_359ba8abf543ca10, []int{4}
214 }
215
209216 func (m *Announcement) XXX_Unmarshal(b []byte) error {
210217 return xxx_messageInfo_Announcement.Unmarshal(m, b)
211218 }
212219 func (m *Announcement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
213220 return xxx_messageInfo_Announcement.Marshal(b, m, deterministic)
214221 }
215 func (dst *Announcement) XXX_Merge(src proto.Message) {
216 xxx_messageInfo_Announcement.Merge(dst, src)
222 func (m *Announcement) XXX_Merge(src proto.Message) {
223 xxx_messageInfo_Announcement.Merge(m, src)
217224 }
218225 func (m *Announcement) XXX_Size() int {
219226 return xxx_messageInfo_Announcement.Size(m)
236243 ExtensionType: (*Announcement)(nil),
237244 Field: 100,
238245 Name: "extension_user.Announcement.loud_ext",
239 Tag: "bytes,100,opt,name=loud_ext,json=loudExt",
246 Tag: "bytes,100,opt,name=loud_ext",
240247 Filename: "extension_user/extension_user.proto",
241248 }
242249
253260 func (m *OldStyleParcel) String() string { return proto.CompactTextString(m) }
254261 func (*OldStyleParcel) ProtoMessage() {}
255262 func (*OldStyleParcel) Descriptor() ([]byte, []int) {
256 return fileDescriptor_extension_user_af41b5e0bdfb7846, []int{5}
257 }
263 return fileDescriptor_359ba8abf543ca10, []int{5}
264 }
265
258266 func (m *OldStyleParcel) XXX_Unmarshal(b []byte) error {
259267 return xxx_messageInfo_OldStyleParcel.Unmarshal(m, b)
260268 }
261269 func (m *OldStyleParcel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
262270 return xxx_messageInfo_OldStyleParcel.Marshal(b, m, deterministic)
263271 }
264 func (dst *OldStyleParcel) XXX_Merge(src proto.Message) {
265 xxx_messageInfo_OldStyleParcel.Merge(dst, src)
272 func (m *OldStyleParcel) XXX_Merge(src proto.Message) {
273 xxx_messageInfo_OldStyleParcel.Merge(m, src)
266274 }
267275 func (m *OldStyleParcel) XXX_Size() int {
268276 return xxx_messageInfo_OldStyleParcel.Size(m)
292300 ExtensionType: (*OldStyleParcel)(nil),
293301 Field: 2001,
294302 Name: "extension_user.OldStyleParcel",
295 Tag: "bytes,2001,opt,name=message_set_extension,json=messageSetExtension",
303 Tag: "bytes,2001,opt,name=message_set_extension",
296304 Filename: "extension_user/extension_user.proto",
297305 }
298306
301309 ExtensionType: (*UserMessage)(nil),
302310 Field: 5,
303311 Name: "extension_user.user_message",
304 Tag: "bytes,5,opt,name=user_message,json=userMessage",
312 Tag: "bytes,5,opt,name=user_message",
305313 Filename: "extension_user/extension_user.proto",
306314 }
307315
310318 ExtensionType: (*extension_extra.ExtraMessage)(nil),
311319 Field: 9,
312320 Name: "extension_user.extra_message",
313 Tag: "bytes,9,opt,name=extra_message,json=extraMessage",
321 Tag: "bytes,9,opt,name=extra_message",
314322 Filename: "extension_user/extension_user.proto",
315323 }
316324
343351
344352 func init() {
345353 proto.RegisterType((*UserMessage)(nil), "extension_user.UserMessage")
354 proto.RegisterExtension(E_LoudMessage_Volume)
346355 proto.RegisterType((*LoudMessage)(nil), "extension_user.LoudMessage")
356 proto.RegisterExtension(E_LoginMessage_UserMessage)
347357 proto.RegisterType((*LoginMessage)(nil), "extension_user.LoginMessage")
348358 proto.RegisterType((*Detail)(nil), "extension_user.Detail")
359 proto.RegisterExtension(E_Announcement_LoudExt)
349360 proto.RegisterType((*Announcement)(nil), "extension_user.Announcement")
350 proto.RegisterMessageSetType((*OldStyleParcel)(nil), 2001, "extension_user.OldStyleParcel")
361 proto.RegisterExtension(E_OldStyleParcel_MessageSetExtension)
351362 proto.RegisterType((*OldStyleParcel)(nil), "extension_user.OldStyleParcel")
352 proto.RegisterExtension(E_LoudMessage_Volume)
353 proto.RegisterExtension(E_LoginMessage_UserMessage)
354 proto.RegisterExtension(E_Announcement_LoudExt)
355 proto.RegisterExtension(E_OldStyleParcel_MessageSetExtension)
356363 proto.RegisterExtension(E_UserMessage)
357364 proto.RegisterExtension(E_ExtraMessage)
358365 proto.RegisterExtension(E_Width)
361368 }
362369
363370 func init() {
364 proto.RegisterFile("extension_user/extension_user.proto", fileDescriptor_extension_user_af41b5e0bdfb7846)
365 }
366
367 var fileDescriptor_extension_user_af41b5e0bdfb7846 = []byte{
371 proto.RegisterFile("extension_user/extension_user.proto", fileDescriptor_359ba8abf543ca10)
372 }
373
374 var fileDescriptor_359ba8abf543ca10 = []byte{
368375 // 492 bytes of a gzipped FileDescriptorProto
369376 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x51, 0x6f, 0x94, 0x40,
370377 0x10, 0x0e, 0x6d, 0x8f, 0x5e, 0x87, 0x6b, 0xad, 0xa8, 0xcd, 0xa5, 0x6a, 0x25, 0x18, 0x13, 0x62,
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: grpc/grpc.proto
22
3 package testing // import "github.com/golang/protobuf/protoc-gen-go/testdata/grpc"
4
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
3 package testing
84
95 import (
10 context "golang.org/x/net/context"
6 context "context"
7 fmt "fmt"
8 proto "github.com/golang/protobuf/proto"
119 grpc "google.golang.org/grpc"
10 codes "google.golang.org/grpc/codes"
11 status "google.golang.org/grpc/status"
12 math "math"
1213 )
1314
1415 // Reference imports to suppress errors if they are not otherwise used.
2021 // is compatible with the proto package it is being compiled against.
2122 // A compilation error at this line likely means your copy of the
2223 // proto package needs to be updated.
23 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
24 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
2425
2526 type SimpleRequest struct {
2627 XXX_NoUnkeyedLiteral struct{} `json:"-"`
3233 func (m *SimpleRequest) String() string { return proto.CompactTextString(m) }
3334 func (*SimpleRequest) ProtoMessage() {}
3435 func (*SimpleRequest) Descriptor() ([]byte, []int) {
35 return fileDescriptor_grpc_65bf3902e49ee873, []int{0}
36 }
36 return fileDescriptor_81ea47a3f88c2082, []int{0}
37 }
38
3739 func (m *SimpleRequest) XXX_Unmarshal(b []byte) error {
3840 return xxx_messageInfo_SimpleRequest.Unmarshal(m, b)
3941 }
4042 func (m *SimpleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
4143 return xxx_messageInfo_SimpleRequest.Marshal(b, m, deterministic)
4244 }
43 func (dst *SimpleRequest) XXX_Merge(src proto.Message) {
44 xxx_messageInfo_SimpleRequest.Merge(dst, src)
45 func (m *SimpleRequest) XXX_Merge(src proto.Message) {
46 xxx_messageInfo_SimpleRequest.Merge(m, src)
4547 }
4648 func (m *SimpleRequest) XXX_Size() int {
4749 return xxx_messageInfo_SimpleRequest.Size(m)
6264 func (m *SimpleResponse) String() string { return proto.CompactTextString(m) }
6365 func (*SimpleResponse) ProtoMessage() {}
6466 func (*SimpleResponse) Descriptor() ([]byte, []int) {
65 return fileDescriptor_grpc_65bf3902e49ee873, []int{1}
66 }
67 return fileDescriptor_81ea47a3f88c2082, []int{1}
68 }
69
6770 func (m *SimpleResponse) XXX_Unmarshal(b []byte) error {
6871 return xxx_messageInfo_SimpleResponse.Unmarshal(m, b)
6972 }
7073 func (m *SimpleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
7174 return xxx_messageInfo_SimpleResponse.Marshal(b, m, deterministic)
7275 }
73 func (dst *SimpleResponse) XXX_Merge(src proto.Message) {
74 xxx_messageInfo_SimpleResponse.Merge(dst, src)
76 func (m *SimpleResponse) XXX_Merge(src proto.Message) {
77 xxx_messageInfo_SimpleResponse.Merge(m, src)
7578 }
7679 func (m *SimpleResponse) XXX_Size() int {
7780 return xxx_messageInfo_SimpleResponse.Size(m)
9295 func (m *StreamMsg) String() string { return proto.CompactTextString(m) }
9396 func (*StreamMsg) ProtoMessage() {}
9497 func (*StreamMsg) Descriptor() ([]byte, []int) {
95 return fileDescriptor_grpc_65bf3902e49ee873, []int{2}
96 }
98 return fileDescriptor_81ea47a3f88c2082, []int{2}
99 }
100
97101 func (m *StreamMsg) XXX_Unmarshal(b []byte) error {
98102 return xxx_messageInfo_StreamMsg.Unmarshal(m, b)
99103 }
100104 func (m *StreamMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
101105 return xxx_messageInfo_StreamMsg.Marshal(b, m, deterministic)
102106 }
103 func (dst *StreamMsg) XXX_Merge(src proto.Message) {
104 xxx_messageInfo_StreamMsg.Merge(dst, src)
107 func (m *StreamMsg) XXX_Merge(src proto.Message) {
108 xxx_messageInfo_StreamMsg.Merge(m, src)
105109 }
106110 func (m *StreamMsg) XXX_Size() int {
107111 return xxx_messageInfo_StreamMsg.Size(m)
122126 func (m *StreamMsg2) String() string { return proto.CompactTextString(m) }
123127 func (*StreamMsg2) ProtoMessage() {}
124128 func (*StreamMsg2) Descriptor() ([]byte, []int) {
125 return fileDescriptor_grpc_65bf3902e49ee873, []int{3}
126 }
129 return fileDescriptor_81ea47a3f88c2082, []int{3}
130 }
131
127132 func (m *StreamMsg2) XXX_Unmarshal(b []byte) error {
128133 return xxx_messageInfo_StreamMsg2.Unmarshal(m, b)
129134 }
130135 func (m *StreamMsg2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
131136 return xxx_messageInfo_StreamMsg2.Marshal(b, m, deterministic)
132137 }
133 func (dst *StreamMsg2) XXX_Merge(src proto.Message) {
134 xxx_messageInfo_StreamMsg2.Merge(dst, src)
138 func (m *StreamMsg2) XXX_Merge(src proto.Message) {
139 xxx_messageInfo_StreamMsg2.Merge(m, src)
135140 }
136141 func (m *StreamMsg2) XXX_Size() int {
137142 return xxx_messageInfo_StreamMsg2.Size(m)
147152 proto.RegisterType((*SimpleResponse)(nil), "grpc.testing.SimpleResponse")
148153 proto.RegisterType((*StreamMsg)(nil), "grpc.testing.StreamMsg")
149154 proto.RegisterType((*StreamMsg2)(nil), "grpc.testing.StreamMsg2")
155 }
156
157 func init() { proto.RegisterFile("grpc/grpc.proto", fileDescriptor_81ea47a3f88c2082) }
158
159 var fileDescriptor_81ea47a3f88c2082 = []byte{
160 // 244 bytes of a gzipped FileDescriptorProto
161 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4f, 0x2f, 0x2a, 0x48,
162 0xd6, 0x07, 0x11, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x3c, 0x60, 0x76, 0x49, 0x6a, 0x71,
163 0x49, 0x66, 0x5e, 0xba, 0x12, 0x3f, 0x17, 0x6f, 0x70, 0x66, 0x6e, 0x41, 0x4e, 0x6a, 0x50, 0x6a,
164 0x61, 0x69, 0x6a, 0x71, 0x89, 0x92, 0x00, 0x17, 0x1f, 0x4c, 0xa0, 0xb8, 0x20, 0x3f, 0xaf, 0x38,
165 0x55, 0x89, 0x9b, 0x8b, 0x33, 0xb8, 0xa4, 0x28, 0x35, 0x31, 0xd7, 0xb7, 0x38, 0x5d, 0x89, 0x87,
166 0x8b, 0x0b, 0xce, 0x31, 0x32, 0x9a, 0xc1, 0xc4, 0xc5, 0x12, 0x92, 0x5a, 0x5c, 0x22, 0xe4, 0xc6,
167 0xc5, 0x19, 0x9a, 0x97, 0x58, 0x54, 0xe9, 0x9c, 0x98, 0x93, 0x23, 0x24, 0xad, 0x87, 0x6c, 0x85,
168 0x1e, 0x8a, 0xf9, 0x52, 0x32, 0xd8, 0x25, 0x21, 0x76, 0x09, 0xb9, 0x70, 0x71, 0xb9, 0xe4, 0x97,
169 0xe7, 0x15, 0x83, 0xad, 0xc0, 0x6f, 0x90, 0x38, 0x9a, 0x24, 0xcc, 0x55, 0x06, 0x8c, 0x42, 0xce,
170 0x5c, 0x1c, 0xa1, 0x05, 0x50, 0x33, 0x70, 0x29, 0xc3, 0xef, 0x10, 0x0d, 0x46, 0x21, 0x5b, 0x2e,
171 0x16, 0xa7, 0xcc, 0x94, 0x4c, 0xdc, 0x06, 0x48, 0xe0, 0x90, 0x30, 0xd2, 0x60, 0x34, 0x60, 0x74,
172 0x72, 0x88, 0xb2, 0x4b, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf,
173 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x07, 0xc7, 0x40, 0x52, 0x69, 0x1a, 0x84, 0x91, 0xac, 0x9b, 0x9e,
174 0x9a, 0xa7, 0x9b, 0x9e, 0xaf, 0x0f, 0x32, 0x22, 0x25, 0xb1, 0x24, 0x11, 0x1c, 0x4d, 0xd6, 0x50,
175 0x03, 0x93, 0xd8, 0xc0, 0x8a, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x90, 0xb9, 0x95, 0x42,
176 0xc2, 0x01, 0x00, 0x00,
150177 }
151178
152179 // Reference imports to suppress errors if they are not otherwise used.
293320 Upstream(Test_UpstreamServer) error
294321 // This one streams in both directions.
295322 Bidi(Test_BidiServer) error
323 }
324
325 // UnimplementedTestServer can be embedded to have forward compatible implementations.
326 type UnimplementedTestServer struct {
327 }
328
329 func (*UnimplementedTestServer) UnaryCall(ctx context.Context, req *SimpleRequest) (*SimpleResponse, error) {
330 return nil, status.Errorf(codes.Unimplemented, "method UnaryCall not implemented")
331 }
332 func (*UnimplementedTestServer) Downstream(req *SimpleRequest, srv Test_DownstreamServer) error {
333 return status.Errorf(codes.Unimplemented, "method Downstream not implemented")
334 }
335 func (*UnimplementedTestServer) Upstream(srv Test_UpstreamServer) error {
336 return status.Errorf(codes.Unimplemented, "method Upstream not implemented")
337 }
338 func (*UnimplementedTestServer) Bidi(srv Test_BidiServer) error {
339 return status.Errorf(codes.Unimplemented, "method Bidi not implemented")
296340 }
297341
298342 func RegisterTestServer(s *grpc.Server, srv TestServer) {
419463 },
420464 Metadata: "grpc/grpc.proto",
421465 }
422
423 func init() { proto.RegisterFile("grpc/grpc.proto", fileDescriptor_grpc_65bf3902e49ee873) }
424
425 var fileDescriptor_grpc_65bf3902e49ee873 = []byte{
426 // 244 bytes of a gzipped FileDescriptorProto
427 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4f, 0x2f, 0x2a, 0x48,
428 0xd6, 0x07, 0x11, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x3c, 0x60, 0x76, 0x49, 0x6a, 0x71,
429 0x49, 0x66, 0x5e, 0xba, 0x12, 0x3f, 0x17, 0x6f, 0x70, 0x66, 0x6e, 0x41, 0x4e, 0x6a, 0x50, 0x6a,
430 0x61, 0x69, 0x6a, 0x71, 0x89, 0x92, 0x00, 0x17, 0x1f, 0x4c, 0xa0, 0xb8, 0x20, 0x3f, 0xaf, 0x38,
431 0x55, 0x89, 0x9b, 0x8b, 0x33, 0xb8, 0xa4, 0x28, 0x35, 0x31, 0xd7, 0xb7, 0x38, 0x5d, 0x89, 0x87,
432 0x8b, 0x0b, 0xce, 0x31, 0x32, 0x9a, 0xc1, 0xc4, 0xc5, 0x12, 0x92, 0x5a, 0x5c, 0x22, 0xe4, 0xc6,
433 0xc5, 0x19, 0x9a, 0x97, 0x58, 0x54, 0xe9, 0x9c, 0x98, 0x93, 0x23, 0x24, 0xad, 0x87, 0x6c, 0x85,
434 0x1e, 0x8a, 0xf9, 0x52, 0x32, 0xd8, 0x25, 0x21, 0x76, 0x09, 0xb9, 0x70, 0x71, 0xb9, 0xe4, 0x97,
435 0xe7, 0x15, 0x83, 0xad, 0xc0, 0x6f, 0x90, 0x38, 0x9a, 0x24, 0xcc, 0x55, 0x06, 0x8c, 0x42, 0xce,
436 0x5c, 0x1c, 0xa1, 0x05, 0x50, 0x33, 0x70, 0x29, 0xc3, 0xef, 0x10, 0x0d, 0x46, 0x21, 0x5b, 0x2e,
437 0x16, 0xa7, 0xcc, 0x94, 0x4c, 0xdc, 0x06, 0x48, 0xe0, 0x90, 0x30, 0xd2, 0x60, 0x34, 0x60, 0x74,
438 0x72, 0x88, 0xb2, 0x4b, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf,
439 0xcf, 0x49, 0xcc, 0x4b, 0xd7, 0x07, 0xc7, 0x40, 0x52, 0x69, 0x1a, 0x84, 0x91, 0xac, 0x9b, 0x9e,
440 0x9a, 0xa7, 0x9b, 0x9e, 0xaf, 0x0f, 0x32, 0x22, 0x25, 0xb1, 0x24, 0x11, 0x1c, 0x4d, 0xd6, 0x50,
441 0x03, 0x93, 0xd8, 0xc0, 0x8a, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x90, 0xb9, 0x95, 0x42,
442 0xc2, 0x01, 0x00, 0x00,
443 }
0 // Code generated by protoc-gen-go. DO NOT EDIT.
1 // source: grpc/grpc_empty.proto
2
3 package testing
4
5 import (
6 context "context"
7 fmt "fmt"
8 proto "github.com/golang/protobuf/proto"
9 grpc "google.golang.org/grpc"
10 math "math"
11 )
12
13 // Reference imports to suppress errors if they are not otherwise used.
14 var _ = proto.Marshal
15 var _ = fmt.Errorf
16 var _ = math.Inf
17
18 // This is a compile-time assertion to ensure that this generated file
19 // is compatible with the proto package it is being compiled against.
20 // A compilation error at this line likely means your copy of the
21 // proto package needs to be updated.
22 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
23
24 func init() { proto.RegisterFile("grpc/grpc_empty.proto", fileDescriptor_c580a37f1c90e9b1) }
25
26 var fileDescriptor_c580a37f1c90e9b1 = []byte{
27 // 125 bytes of a gzipped FileDescriptorProto
28 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4d, 0x2f, 0x2a, 0x48,
29 0xd6, 0x07, 0x11, 0xf1, 0xa9, 0xb9, 0x05, 0x25, 0x95, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42,
30 0x3c, 0x20, 0x11, 0xbd, 0x92, 0xd4, 0xe2, 0x92, 0xcc, 0xbc, 0x74, 0x23, 0x3e, 0x2e, 0x1e, 0x57,
31 0x90, 0x64, 0x70, 0x6a, 0x51, 0x59, 0x66, 0x72, 0xaa, 0x93, 0x43, 0x94, 0x5d, 0x7a, 0x66, 0x49,
32 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x7a, 0x7e, 0x4e, 0x62, 0x5e, 0xba, 0x3e, 0x58,
33 0x63, 0x52, 0x69, 0x1a, 0x84, 0x91, 0xac, 0x9b, 0x9e, 0x9a, 0xa7, 0x9b, 0x9e, 0xaf, 0x0f, 0x32,
34 0x23, 0x25, 0xb1, 0x24, 0x11, 0x6c, 0x87, 0x35, 0xd4, 0xc4, 0x24, 0x36, 0xb0, 0x22, 0x63, 0x40,
35 0x00, 0x00, 0x00, 0xff, 0xff, 0x93, 0x1d, 0xf2, 0x47, 0x7f, 0x00, 0x00, 0x00,
36 }
37
38 // Reference imports to suppress errors if they are not otherwise used.
39 var _ context.Context
40 var _ grpc.ClientConn
41
42 // This is a compile-time assertion to ensure that this generated file
43 // is compatible with the grpc package it is being compiled against.
44 const _ = grpc.SupportPackageIsVersion4
45
46 // EmptyServiceClient is the client API for EmptyService service.
47 //
48 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
49 type EmptyServiceClient interface {
50 }
51
52 type emptyServiceClient struct {
53 cc *grpc.ClientConn
54 }
55
56 func NewEmptyServiceClient(cc *grpc.ClientConn) EmptyServiceClient {
57 return &emptyServiceClient{cc}
58 }
59
60 // EmptyServiceServer is the server API for EmptyService service.
61 type EmptyServiceServer interface {
62 }
63
64 // UnimplementedEmptyServiceServer can be embedded to have forward compatible implementations.
65 type UnimplementedEmptyServiceServer struct {
66 }
67
68 func RegisterEmptyServiceServer(s *grpc.Server, srv EmptyServiceServer) {
69 s.RegisterService(&_EmptyService_serviceDesc, srv)
70 }
71
72 var _EmptyService_serviceDesc = grpc.ServiceDesc{
73 ServiceName: "grpc.testing.EmptyService",
74 HandlerType: (*EmptyServiceServer)(nil),
75 Methods: []grpc.MethodDesc{},
76 Streams: []grpc.StreamDesc{},
77 Metadata: "grpc/grpc_empty.proto",
78 }
0 // Go support for Protocol Buffers - Google's data interchange format
1 //
2 // Copyright 2019 The Go Authors. All rights reserved.
3 // https://github.com/golang/protobuf
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
7 // met:
8 //
9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 // * Redistributions in binary form must reproduce the above
12 // copyright notice, this list of conditions and the following disclaimer
13 // in the documentation and/or other materials provided with the
14 // distribution.
15 // * Neither the name of Google Inc. nor the names of its
16 // contributors may be used to endorse or promote products derived from
17 // this software without specific prior written permission.
18 //
19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
31 syntax = "proto3";
32
33 package grpc.testing;
34
35 option go_package = "github.com/golang/protobuf/protoc-gen-go/testdata/grpc;testing";
36
37 service EmptyService {}
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: import_public/a.proto
22
3 package import_public // import "github.com/golang/protobuf/protoc-gen-go/testdata/import_public"
3 package import_public
44
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
8 import sub "github.com/golang/protobuf/protoc-gen-go/testdata/import_public/sub"
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 sub "github.com/golang/protobuf/protoc-gen-go/testdata/import_public/sub"
9 math "math"
10 )
911
1012 // Reference imports to suppress errors if they are not otherwise used.
1113 var _ = proto.Marshal
1618 // is compatible with the proto package it is being compiled against.
1719 // A compilation error at this line likely means your copy of the
1820 // proto package needs to be updated.
19 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
21 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
22
23 const Default_M_DefaultField = sub.Default_M_DefaultField
2024
2125 // M from public import import_public/sub/a.proto
2226 type M = sub.M
27 type M_OneofInt32 = sub.M_OneofInt32
28 type M_OneofInt64 = sub.M_OneofInt64
29
30 // M_Grouping from public import import_public/sub/a.proto
31 type M_Grouping = sub.M_Grouping
32
33 // M_Submessage from public import import_public/sub/a.proto
34 type M_Submessage = sub.M_Submessage
35 type M_Submessage_SubmessageOneofInt32 = sub.M_Submessage_SubmessageOneofInt32
36 type M_Submessage_SubmessageOneofInt64 = sub.M_Submessage_SubmessageOneofInt64
2337
2438 // E from public import import_public/sub/a.proto
2539 type E = sub.E
2943
3044 const E_ZERO = E(sub.E_ZERO)
3145
32 // Ignoring public import of Local from import_public/b.proto
46 // M_Subenum from public import import_public/sub/a.proto
47 type M_Subenum = sub.M_Subenum
48
49 var M_Subenum_name = sub.M_Subenum_name
50 var M_Subenum_value = sub.M_Subenum_value
51
52 const M_M_ZERO = M_Subenum(sub.M_M_ZERO)
53
54 // M_Submessage_Submessage_Subenum from public import import_public/sub/a.proto
55 type M_Submessage_Submessage_Subenum = sub.M_Submessage_Submessage_Subenum
56
57 var M_Submessage_Submessage_Subenum_name = sub.M_Submessage_Submessage_Subenum_name
58 var M_Submessage_Submessage_Subenum_value = sub.M_Submessage_Submessage_Subenum_value
59
60 const M_Submessage_M_SUBMESSAGE_ZERO = M_Submessage_Submessage_Subenum(sub.M_Submessage_M_SUBMESSAGE_ZERO)
61
62 var E_ExtensionField = sub.E_ExtensionField
3363
3464 type Public struct {
35 M *sub.M `protobuf:"bytes,1,opt,name=m,proto3" json:"m,omitempty"`
36 E sub.E `protobuf:"varint,2,opt,name=e,proto3,enum=goproto.test.import_public.sub.E" json:"e,omitempty"`
37 Local *Local `protobuf:"bytes,3,opt,name=local,proto3" json:"local,omitempty"`
65 M *sub.M `protobuf:"bytes,1,opt,name=m" json:"m,omitempty"`
66 E *sub.E `protobuf:"varint,2,opt,name=e,enum=goproto.test.import_public.sub.E" json:"e,omitempty"`
67 Local *Local `protobuf:"bytes,3,opt,name=local" json:"local,omitempty"`
3868 XXX_NoUnkeyedLiteral struct{} `json:"-"`
3969 XXX_unrecognized []byte `json:"-"`
4070 XXX_sizecache int32 `json:"-"`
4474 func (m *Public) String() string { return proto.CompactTextString(m) }
4575 func (*Public) ProtoMessage() {}
4676 func (*Public) Descriptor() ([]byte, []int) {
47 return fileDescriptor_a_c0314c022b7c17d8, []int{0}
77 return fileDescriptor_73b7577c95fa6b70, []int{0}
4878 }
79
4980 func (m *Public) XXX_Unmarshal(b []byte) error {
5081 return xxx_messageInfo_Public.Unmarshal(m, b)
5182 }
5283 func (m *Public) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
5384 return xxx_messageInfo_Public.Marshal(b, m, deterministic)
5485 }
55 func (dst *Public) XXX_Merge(src proto.Message) {
56 xxx_messageInfo_Public.Merge(dst, src)
86 func (m *Public) XXX_Merge(src proto.Message) {
87 xxx_messageInfo_Public.Merge(m, src)
5788 }
5889 func (m *Public) XXX_Size() int {
5990 return xxx_messageInfo_Public.Size(m)
72103 }
73104
74105 func (m *Public) GetE() sub.E {
75 if m != nil {
76 return m.E
106 if m != nil && m.E != nil {
107 return *m.E
77108 }
78109 return sub.E_ZERO
79110 }
89120 proto.RegisterType((*Public)(nil), "goproto.test.import_public.Public")
90121 }
91122
92 func init() { proto.RegisterFile("import_public/a.proto", fileDescriptor_a_c0314c022b7c17d8) }
123 func init() { proto.RegisterFile("import_public/a.proto", fileDescriptor_73b7577c95fa6b70) }
93124
94 var fileDescriptor_a_c0314c022b7c17d8 = []byte{
95 // 200 bytes of a gzipped FileDescriptorProto
125 var fileDescriptor_73b7577c95fa6b70 = []byte{
126 // 195 bytes of a gzipped FileDescriptorProto
96127 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcd, 0xcc, 0x2d, 0xc8,
97128 0x2f, 0x2a, 0x89, 0x2f, 0x28, 0x4d, 0xca, 0xc9, 0x4c, 0xd6, 0x4f, 0xd4, 0x2b, 0x28, 0xca, 0x2f,
98129 0xc9, 0x17, 0x92, 0x4a, 0xcf, 0x07, 0x33, 0xf4, 0x4a, 0x52, 0x8b, 0x4b, 0xf4, 0x50, 0xd4, 0x48,
104135 0x04, 0x51, 0xef, 0xe4, 0x18, 0x65, 0x9f, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f,
105136 0xab, 0x9f, 0x9e, 0x9f, 0x93, 0x98, 0x97, 0xae, 0x0f, 0xd6, 0x9a, 0x54, 0x9a, 0x06, 0x61, 0x24,
106137 0xeb, 0xa6, 0xa7, 0xe6, 0xe9, 0xa6, 0xe7, 0xeb, 0x83, 0xcc, 0x4a, 0x49, 0x2c, 0x49, 0xd4, 0x47,
107 0x31, 0x2f, 0x80, 0x21, 0x80, 0x31, 0x89, 0x0d, 0xac, 0xd2, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff,
108 0x70, 0xc5, 0xc3, 0x79, 0x5a, 0x01, 0x00, 0x00,
138 0x31, 0x2f, 0x80, 0x21, 0x80, 0x11, 0x10, 0x00, 0x00, 0xff, 0xff, 0x17, 0x83, 0x2d, 0xd4, 0x52,
139 0x01, 0x00, 0x00,
109140 }
2828 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2929 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3030
31 syntax = "proto3";
31 syntax = "proto2";
3232
3333 package goproto.test.import_public;
3434
3838 import public "import_public/b.proto"; // Same Go package.
3939
4040 message Public {
41 goproto.test.import_public.sub.M m = 1;
42 goproto.test.import_public.sub.E e = 2;
43 Local local = 3;
41 optional goproto.test.import_public.sub.M m = 1;
42 optional goproto.test.import_public.sub.E e = 2;
43 optional Local local = 3;
4444 }
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: import_public/b.proto
22
3 package import_public // import "github.com/golang/protobuf/protoc-gen-go/testdata/import_public"
3 package import_public
44
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
8 import sub "github.com/golang/protobuf/protoc-gen-go/testdata/import_public/sub"
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 sub "github.com/golang/protobuf/protoc-gen-go/testdata/import_public/sub"
9 math "math"
10 )
911
1012 // Reference imports to suppress errors if they are not otherwise used.
1113 var _ = proto.Marshal
1618 // is compatible with the proto package it is being compiled against.
1719 // A compilation error at this line likely means your copy of the
1820 // proto package needs to be updated.
19 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
21 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
2022
2123 type Local struct {
22 M *sub.M `protobuf:"bytes,1,opt,name=m,proto3" json:"m,omitempty"`
23 E sub.E `protobuf:"varint,2,opt,name=e,proto3,enum=goproto.test.import_public.sub.E" json:"e,omitempty"`
24 M *sub.M `protobuf:"bytes,1,opt,name=m" json:"m,omitempty"`
25 E *sub.E `protobuf:"varint,2,opt,name=e,enum=goproto.test.import_public.sub.E" json:"e,omitempty"`
2426 XXX_NoUnkeyedLiteral struct{} `json:"-"`
2527 XXX_unrecognized []byte `json:"-"`
2628 XXX_sizecache int32 `json:"-"`
3032 func (m *Local) String() string { return proto.CompactTextString(m) }
3133 func (*Local) ProtoMessage() {}
3234 func (*Local) Descriptor() ([]byte, []int) {
33 return fileDescriptor_b_7f20a805fad67bd0, []int{0}
35 return fileDescriptor_84995586b3d09710, []int{0}
3436 }
37
3538 func (m *Local) XXX_Unmarshal(b []byte) error {
3639 return xxx_messageInfo_Local.Unmarshal(m, b)
3740 }
3841 func (m *Local) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
3942 return xxx_messageInfo_Local.Marshal(b, m, deterministic)
4043 }
41 func (dst *Local) XXX_Merge(src proto.Message) {
42 xxx_messageInfo_Local.Merge(dst, src)
44 func (m *Local) XXX_Merge(src proto.Message) {
45 xxx_messageInfo_Local.Merge(m, src)
4346 }
4447 func (m *Local) XXX_Size() int {
4548 return xxx_messageInfo_Local.Size(m)
5861 }
5962
6063 func (m *Local) GetE() sub.E {
61 if m != nil {
62 return m.E
64 if m != nil && m.E != nil {
65 return *m.E
6366 }
6467 return sub.E_ZERO
6568 }
6871 proto.RegisterType((*Local)(nil), "goproto.test.import_public.Local")
6972 }
7073
71 func init() { proto.RegisterFile("import_public/b.proto", fileDescriptor_b_7f20a805fad67bd0) }
74 func init() { proto.RegisterFile("import_public/b.proto", fileDescriptor_84995586b3d09710) }
7275
73 var fileDescriptor_b_7f20a805fad67bd0 = []byte{
74 // 174 bytes of a gzipped FileDescriptorProto
76 var fileDescriptor_84995586b3d09710 = []byte{
77 // 169 bytes of a gzipped FileDescriptorProto
7578 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcd, 0xcc, 0x2d, 0xc8,
7679 0x2f, 0x2a, 0x89, 0x2f, 0x28, 0x4d, 0xca, 0xc9, 0x4c, 0xd6, 0x4f, 0xd2, 0x2b, 0x28, 0xca, 0x2f,
7780 0xc9, 0x17, 0x92, 0x4a, 0xcf, 0x07, 0x33, 0xf4, 0x4a, 0x52, 0x8b, 0x4b, 0xf4, 0x50, 0xd4, 0x48,
8184 0x04, 0x93, 0x02, 0xa3, 0x06, 0x1f, 0x61, 0x0d, 0xae, 0x41, 0x8c, 0xa9, 0x4e, 0x8e, 0x51, 0xf6,
8285 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xe9, 0xf9, 0x39, 0x89, 0x79,
8386 0xe9, 0xfa, 0x60, 0x6d, 0x49, 0xa5, 0x69, 0x10, 0x46, 0xb2, 0x6e, 0x7a, 0x6a, 0x9e, 0x6e, 0x7a,
84 0xbe, 0x3e, 0xc8, 0x9c, 0x94, 0xc4, 0x92, 0x44, 0x7d, 0x14, 0xb3, 0x92, 0xd8, 0xc0, 0xaa, 0x8c,
85 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd6, 0x2b, 0x5f, 0x8e, 0x04, 0x01, 0x00, 0x00,
87 0xbe, 0x3e, 0xc8, 0x9c, 0x94, 0xc4, 0x92, 0x44, 0x7d, 0x14, 0xb3, 0x00, 0x01, 0x00, 0x00, 0xff,
88 0xff, 0x35, 0x0e, 0x6a, 0x82, 0xfc, 0x00, 0x00, 0x00,
8689 }
2828 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2929 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3030
31 syntax = "proto3";
31 syntax = "proto2";
3232
3333 package goproto.test.import_public;
3434
3737 import "import_public/sub/a.proto";
3838
3939 message Local {
40 goproto.test.import_public.sub.M m = 1;
41 goproto.test.import_public.sub.E e = 2;
40 optional goproto.test.import_public.sub.M m = 1;
41 optional goproto.test.import_public.sub.E e = 2;
4242 }
0 // Code generated by protoc-gen-go. DO NOT EDIT.
1 // source: import_public/importing/importing.proto
2
3 package importing
4
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 _ "github.com/golang/protobuf/protoc-gen-go/testdata/import_public"
9 sub "github.com/golang/protobuf/protoc-gen-go/testdata/import_public/sub"
10 math "math"
11 )
12
13 // Reference imports to suppress errors if they are not otherwise used.
14 var _ = proto.Marshal
15 var _ = fmt.Errorf
16 var _ = math.Inf
17
18 // This is a compile-time assertion to ensure that this generated file
19 // is compatible with the proto package it is being compiled against.
20 // A compilation error at this line likely means your copy of the
21 // proto package needs to be updated.
22 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
23
24 type M struct {
25 // Message type defined in a file publicly imported by a file we import.
26 M *sub.M `protobuf:"bytes,1,opt,name=m" json:"m,omitempty"`
27 XXX_NoUnkeyedLiteral struct{} `json:"-"`
28 XXX_unrecognized []byte `json:"-"`
29 XXX_sizecache int32 `json:"-"`
30 }
31
32 func (m *M) Reset() { *m = M{} }
33 func (m *M) String() string { return proto.CompactTextString(m) }
34 func (*M) ProtoMessage() {}
35 func (*M) Descriptor() ([]byte, []int) {
36 return fileDescriptor_36b835b3b8f6171a, []int{0}
37 }
38
39 func (m *M) XXX_Unmarshal(b []byte) error {
40 return xxx_messageInfo_M.Unmarshal(m, b)
41 }
42 func (m *M) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
43 return xxx_messageInfo_M.Marshal(b, m, deterministic)
44 }
45 func (m *M) XXX_Merge(src proto.Message) {
46 xxx_messageInfo_M.Merge(m, src)
47 }
48 func (m *M) XXX_Size() int {
49 return xxx_messageInfo_M.Size(m)
50 }
51 func (m *M) XXX_DiscardUnknown() {
52 xxx_messageInfo_M.DiscardUnknown(m)
53 }
54
55 var xxx_messageInfo_M proto.InternalMessageInfo
56
57 func (m *M) GetM() *sub.M {
58 if m != nil {
59 return m.M
60 }
61 return nil
62 }
63
64 func init() {
65 proto.RegisterType((*M)(nil), "goproto.test.import_public.importing.M")
66 }
67
68 func init() {
69 proto.RegisterFile("import_public/importing/importing.proto", fileDescriptor_36b835b3b8f6171a)
70 }
71
72 var fileDescriptor_36b835b3b8f6171a = []byte{
73 // 153 bytes of a gzipped FileDescriptorProto
74 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xcf, 0xcc, 0x2d, 0xc8,
75 0x2f, 0x2a, 0x89, 0x2f, 0x28, 0x4d, 0xca, 0xc9, 0x4c, 0xd6, 0x87, 0xf0, 0x32, 0xf3, 0xd2, 0x11,
76 0x2c, 0xbd, 0x82, 0xa2, 0xfc, 0x92, 0x7c, 0x21, 0x95, 0xf4, 0x7c, 0x30, 0x43, 0xaf, 0x24, 0xb5,
77 0xb8, 0x44, 0x0f, 0x45, 0x97, 0x1e, 0x5c, 0xad, 0x94, 0x28, 0xaa, 0x71, 0x89, 0x10, 0xcd, 0x4a,
78 0x26, 0x5c, 0x8c, 0xbe, 0x42, 0xfa, 0x5c, 0x8c, 0xb9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xdc, 0x46,
79 0x8a, 0x7a, 0x78, 0x4c, 0x2b, 0x2e, 0x4d, 0xd2, 0xf3, 0x0d, 0x62, 0xcc, 0x75, 0xf2, 0x8e, 0xf2,
80 0x4c, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0xcf, 0x49, 0xcc,
81 0x4b, 0xd7, 0x07, 0x6b, 0x4b, 0x2a, 0x4d, 0x83, 0x30, 0x92, 0x75, 0xd3, 0x53, 0xf3, 0x74, 0xd3,
82 0xf3, 0xf5, 0x41, 0xe6, 0xa4, 0x24, 0x96, 0x24, 0xea, 0xe3, 0xf0, 0x0f, 0x20, 0x00, 0x00, 0xff,
83 0xff, 0xd8, 0x7e, 0x58, 0x1c, 0xe9, 0x00, 0x00, 0x00,
84 }
0 // Go support for Protocol Buffers - Google's data interchange format
1 //
2 // Copyright 2018 The Go Authors. All rights reserved.
3 // https://github.com/golang/protobuf
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are
7 // met:
8 //
9 // * Redistributions of source code must retain the above copyright
10 // notice, this list of conditions and the following disclaimer.
11 // * Redistributions in binary form must reproduce the above
12 // copyright notice, this list of conditions and the following disclaimer
13 // in the documentation and/or other materials provided with the
14 // distribution.
15 // * Neither the name of Google Inc. nor the names of its
16 // contributors may be used to endorse or promote products derived from
17 // this software without specific prior written permission.
18 //
19 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
31 syntax = "proto2";
32
33 package goproto.test.import_public.importing;
34
35 option go_package = "github.com/golang/protobuf/protoc-gen-go/testdata/import_public/importing";
36
37 import "import_public/a.proto";
38
39 message M {
40 // Message type defined in a file publicly imported by a file we import.
41 optional goproto.test.import_public.sub.M m = 1;
42 }
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: import_public/sub/a.proto
22
3 package sub // import "github.com/golang/protobuf/protoc-gen-go/testdata/import_public/sub"
4
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
3 package sub
4
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 math "math"
9 )
810
911 // Reference imports to suppress errors if they are not otherwise used.
1012 var _ = proto.Marshal
1517 // is compatible with the proto package it is being compiled against.
1618 // A compilation error at this line likely means your copy of the
1719 // proto package needs to be updated.
18 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
20 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
1921
2022 type E int32
2123
2628 var E_name = map[int32]string{
2729 0: "ZERO",
2830 }
31
2932 var E_value = map[string]int32{
3033 "ZERO": 0,
3134 }
3235
36 func (x E) Enum() *E {
37 p := new(E)
38 *p = x
39 return p
40 }
41
3342 func (x E) String() string {
3443 return proto.EnumName(E_name, int32(x))
3544 }
45
46 func (x *E) UnmarshalJSON(data []byte) error {
47 value, err := proto.UnmarshalJSONEnum(E_value, data, "E")
48 if err != nil {
49 return err
50 }
51 *x = E(value)
52 return nil
53 }
54
3655 func (E) EnumDescriptor() ([]byte, []int) {
37 return fileDescriptor_a_91ca0264a534463a, []int{0}
56 return fileDescriptor_382f7805394b5c4e, []int{0}
57 }
58
59 type M_Subenum int32
60
61 const (
62 M_M_ZERO M_Subenum = 0
63 )
64
65 var M_Subenum_name = map[int32]string{
66 0: "M_ZERO",
67 }
68
69 var M_Subenum_value = map[string]int32{
70 "M_ZERO": 0,
71 }
72
73 func (x M_Subenum) Enum() *M_Subenum {
74 p := new(M_Subenum)
75 *p = x
76 return p
77 }
78
79 func (x M_Subenum) String() string {
80 return proto.EnumName(M_Subenum_name, int32(x))
81 }
82
83 func (x *M_Subenum) UnmarshalJSON(data []byte) error {
84 value, err := proto.UnmarshalJSONEnum(M_Subenum_value, data, "M_Subenum")
85 if err != nil {
86 return err
87 }
88 *x = M_Subenum(value)
89 return nil
90 }
91
92 func (M_Subenum) EnumDescriptor() ([]byte, []int) {
93 return fileDescriptor_382f7805394b5c4e, []int{0, 0}
94 }
95
96 type M_Submessage_Submessage_Subenum int32
97
98 const (
99 M_Submessage_M_SUBMESSAGE_ZERO M_Submessage_Submessage_Subenum = 0
100 )
101
102 var M_Submessage_Submessage_Subenum_name = map[int32]string{
103 0: "M_SUBMESSAGE_ZERO",
104 }
105
106 var M_Submessage_Submessage_Subenum_value = map[string]int32{
107 "M_SUBMESSAGE_ZERO": 0,
108 }
109
110 func (x M_Submessage_Submessage_Subenum) Enum() *M_Submessage_Submessage_Subenum {
111 p := new(M_Submessage_Submessage_Subenum)
112 *p = x
113 return p
114 }
115
116 func (x M_Submessage_Submessage_Subenum) String() string {
117 return proto.EnumName(M_Submessage_Submessage_Subenum_name, int32(x))
118 }
119
120 func (x *M_Submessage_Submessage_Subenum) UnmarshalJSON(data []byte) error {
121 value, err := proto.UnmarshalJSONEnum(M_Submessage_Submessage_Subenum_value, data, "M_Submessage_Submessage_Subenum")
122 if err != nil {
123 return err
124 }
125 *x = M_Submessage_Submessage_Subenum(value)
126 return nil
127 }
128
129 func (M_Submessage_Submessage_Subenum) EnumDescriptor() ([]byte, []int) {
130 return fileDescriptor_382f7805394b5c4e, []int{0, 1, 0}
38131 }
39132
40133 type M struct {
41134 // Field using a type in the same Go package, but a different source file.
42 M2 *M2 `protobuf:"bytes,1,opt,name=m2,proto3" json:"m2,omitempty"`
43 XXX_NoUnkeyedLiteral struct{} `json:"-"`
44 XXX_unrecognized []byte `json:"-"`
45 XXX_sizecache int32 `json:"-"`
135 M2 *M2 `protobuf:"bytes,1,opt,name=m2" json:"m2,omitempty"`
136 // Types that are valid to be assigned to OneofField:
137 // *M_OneofInt32
138 // *M_OneofInt64
139 OneofField isM_OneofField `protobuf_oneof:"oneof_field"`
140 Grouping *M_Grouping `protobuf:"group,4,opt,name=Grouping,json=grouping" json:"grouping,omitempty"`
141 DefaultField *string `protobuf:"bytes,6,opt,name=default_field,json=defaultField,def=def" json:"default_field,omitempty"`
142 XXX_NoUnkeyedLiteral struct{} `json:"-"`
143 XXX_unrecognized []byte `json:"-"`
144 XXX_sizecache int32 `json:"-"`
46145 }
47146
48147 func (m *M) Reset() { *m = M{} }
49148 func (m *M) String() string { return proto.CompactTextString(m) }
50149 func (*M) ProtoMessage() {}
51150 func (*M) Descriptor() ([]byte, []int) {
52 return fileDescriptor_a_91ca0264a534463a, []int{0}
53 }
151 return fileDescriptor_382f7805394b5c4e, []int{0}
152 }
153
54154 func (m *M) XXX_Unmarshal(b []byte) error {
55155 return xxx_messageInfo_M.Unmarshal(m, b)
56156 }
57157 func (m *M) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
58158 return xxx_messageInfo_M.Marshal(b, m, deterministic)
59159 }
60 func (dst *M) XXX_Merge(src proto.Message) {
61 xxx_messageInfo_M.Merge(dst, src)
160 func (m *M) XXX_Merge(src proto.Message) {
161 xxx_messageInfo_M.Merge(m, src)
62162 }
63163 func (m *M) XXX_Size() int {
64164 return xxx_messageInfo_M.Size(m)
68168 }
69169
70170 var xxx_messageInfo_M proto.InternalMessageInfo
171
172 const Default_M_DefaultField string = "def"
71173
72174 func (m *M) GetM2() *M2 {
73175 if m != nil {
76178 return nil
77179 }
78180
181 type isM_OneofField interface {
182 isM_OneofField()
183 }
184
185 type M_OneofInt32 struct {
186 OneofInt32 int32 `protobuf:"varint,2,opt,name=oneof_int32,json=oneofInt32,oneof"`
187 }
188
189 type M_OneofInt64 struct {
190 OneofInt64 int64 `protobuf:"varint,3,opt,name=oneof_int64,json=oneofInt64,oneof"`
191 }
192
193 func (*M_OneofInt32) isM_OneofField() {}
194
195 func (*M_OneofInt64) isM_OneofField() {}
196
197 func (m *M) GetOneofField() isM_OneofField {
198 if m != nil {
199 return m.OneofField
200 }
201 return nil
202 }
203
204 func (m *M) GetOneofInt32() int32 {
205 if x, ok := m.GetOneofField().(*M_OneofInt32); ok {
206 return x.OneofInt32
207 }
208 return 0
209 }
210
211 func (m *M) GetOneofInt64() int64 {
212 if x, ok := m.GetOneofField().(*M_OneofInt64); ok {
213 return x.OneofInt64
214 }
215 return 0
216 }
217
218 func (m *M) GetGrouping() *M_Grouping {
219 if m != nil {
220 return m.Grouping
221 }
222 return nil
223 }
224
225 func (m *M) GetDefaultField() string {
226 if m != nil && m.DefaultField != nil {
227 return *m.DefaultField
228 }
229 return Default_M_DefaultField
230 }
231
232 // XXX_OneofWrappers is for the internal use of the proto package.
233 func (*M) XXX_OneofWrappers() []interface{} {
234 return []interface{}{
235 (*M_OneofInt32)(nil),
236 (*M_OneofInt64)(nil),
237 }
238 }
239
240 type M_Grouping struct {
241 GroupField *string `protobuf:"bytes,5,opt,name=group_field,json=groupField" json:"group_field,omitempty"`
242 XXX_NoUnkeyedLiteral struct{} `json:"-"`
243 XXX_unrecognized []byte `json:"-"`
244 XXX_sizecache int32 `json:"-"`
245 }
246
247 func (m *M_Grouping) Reset() { *m = M_Grouping{} }
248 func (m *M_Grouping) String() string { return proto.CompactTextString(m) }
249 func (*M_Grouping) ProtoMessage() {}
250 func (*M_Grouping) Descriptor() ([]byte, []int) {
251 return fileDescriptor_382f7805394b5c4e, []int{0, 0}
252 }
253
254 func (m *M_Grouping) XXX_Unmarshal(b []byte) error {
255 return xxx_messageInfo_M_Grouping.Unmarshal(m, b)
256 }
257 func (m *M_Grouping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
258 return xxx_messageInfo_M_Grouping.Marshal(b, m, deterministic)
259 }
260 func (m *M_Grouping) XXX_Merge(src proto.Message) {
261 xxx_messageInfo_M_Grouping.Merge(m, src)
262 }
263 func (m *M_Grouping) XXX_Size() int {
264 return xxx_messageInfo_M_Grouping.Size(m)
265 }
266 func (m *M_Grouping) XXX_DiscardUnknown() {
267 xxx_messageInfo_M_Grouping.DiscardUnknown(m)
268 }
269
270 var xxx_messageInfo_M_Grouping proto.InternalMessageInfo
271
272 func (m *M_Grouping) GetGroupField() string {
273 if m != nil && m.GroupField != nil {
274 return *m.GroupField
275 }
276 return ""
277 }
278
279 type M_Submessage struct {
280 // Types that are valid to be assigned to SubmessageOneofField:
281 // *M_Submessage_SubmessageOneofInt32
282 // *M_Submessage_SubmessageOneofInt64
283 SubmessageOneofField isM_Submessage_SubmessageOneofField `protobuf_oneof:"submessage_oneof_field"`
284 XXX_NoUnkeyedLiteral struct{} `json:"-"`
285 XXX_unrecognized []byte `json:"-"`
286 XXX_sizecache int32 `json:"-"`
287 }
288
289 func (m *M_Submessage) Reset() { *m = M_Submessage{} }
290 func (m *M_Submessage) String() string { return proto.CompactTextString(m) }
291 func (*M_Submessage) ProtoMessage() {}
292 func (*M_Submessage) Descriptor() ([]byte, []int) {
293 return fileDescriptor_382f7805394b5c4e, []int{0, 1}
294 }
295
296 func (m *M_Submessage) XXX_Unmarshal(b []byte) error {
297 return xxx_messageInfo_M_Submessage.Unmarshal(m, b)
298 }
299 func (m *M_Submessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
300 return xxx_messageInfo_M_Submessage.Marshal(b, m, deterministic)
301 }
302 func (m *M_Submessage) XXX_Merge(src proto.Message) {
303 xxx_messageInfo_M_Submessage.Merge(m, src)
304 }
305 func (m *M_Submessage) XXX_Size() int {
306 return xxx_messageInfo_M_Submessage.Size(m)
307 }
308 func (m *M_Submessage) XXX_DiscardUnknown() {
309 xxx_messageInfo_M_Submessage.DiscardUnknown(m)
310 }
311
312 var xxx_messageInfo_M_Submessage proto.InternalMessageInfo
313
314 type isM_Submessage_SubmessageOneofField interface {
315 isM_Submessage_SubmessageOneofField()
316 }
317
318 type M_Submessage_SubmessageOneofInt32 struct {
319 SubmessageOneofInt32 int32 `protobuf:"varint,1,opt,name=submessage_oneof_int32,json=submessageOneofInt32,oneof"`
320 }
321
322 type M_Submessage_SubmessageOneofInt64 struct {
323 SubmessageOneofInt64 int64 `protobuf:"varint,2,opt,name=submessage_oneof_int64,json=submessageOneofInt64,oneof"`
324 }
325
326 func (*M_Submessage_SubmessageOneofInt32) isM_Submessage_SubmessageOneofField() {}
327
328 func (*M_Submessage_SubmessageOneofInt64) isM_Submessage_SubmessageOneofField() {}
329
330 func (m *M_Submessage) GetSubmessageOneofField() isM_Submessage_SubmessageOneofField {
331 if m != nil {
332 return m.SubmessageOneofField
333 }
334 return nil
335 }
336
337 func (m *M_Submessage) GetSubmessageOneofInt32() int32 {
338 if x, ok := m.GetSubmessageOneofField().(*M_Submessage_SubmessageOneofInt32); ok {
339 return x.SubmessageOneofInt32
340 }
341 return 0
342 }
343
344 func (m *M_Submessage) GetSubmessageOneofInt64() int64 {
345 if x, ok := m.GetSubmessageOneofField().(*M_Submessage_SubmessageOneofInt64); ok {
346 return x.SubmessageOneofInt64
347 }
348 return 0
349 }
350
351 // XXX_OneofWrappers is for the internal use of the proto package.
352 func (*M_Submessage) XXX_OneofWrappers() []interface{} {
353 return []interface{}{
354 (*M_Submessage_SubmessageOneofInt32)(nil),
355 (*M_Submessage_SubmessageOneofInt64)(nil),
356 }
357 }
358
359 var E_ExtensionField = &proto.ExtensionDesc{
360 ExtendedType: (*M2)(nil),
361 ExtensionType: (*string)(nil),
362 Field: 1,
363 Name: "goproto.test.import_public.sub.extension_field",
364 Tag: "bytes,1,opt,name=extension_field",
365 Filename: "import_public/sub/a.proto",
366 }
367
79368 func init() {
369 proto.RegisterEnum("goproto.test.import_public.sub.E", E_name, E_value)
370 proto.RegisterEnum("goproto.test.import_public.sub.M_Subenum", M_Subenum_name, M_Subenum_value)
371 proto.RegisterEnum("goproto.test.import_public.sub.M_Submessage_Submessage_Subenum", M_Submessage_Submessage_Subenum_name, M_Submessage_Submessage_Subenum_value)
80372 proto.RegisterType((*M)(nil), "goproto.test.import_public.sub.M")
81 proto.RegisterEnum("goproto.test.import_public.sub.E", E_name, E_value)
82 }
83
84 func init() { proto.RegisterFile("import_public/sub/a.proto", fileDescriptor_a_91ca0264a534463a) }
85
86 var fileDescriptor_a_91ca0264a534463a = []byte{
87 // 172 bytes of a gzipped FileDescriptorProto
88 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8,
89 0x2f, 0x2a, 0x89, 0x2f, 0x28, 0x4d, 0xca, 0xc9, 0x4c, 0xd6, 0x2f, 0x2e, 0x4d, 0xd2, 0x4f, 0xd4,
90 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x4b, 0xcf, 0x07, 0x33, 0xf4, 0x4a, 0x52, 0x8b, 0x4b,
91 0xf4, 0x50, 0xd4, 0xe9, 0x15, 0x97, 0x26, 0x49, 0x61, 0xd1, 0x9a, 0x04, 0xd1, 0xaa, 0x64, 0xce,
92 0xc5, 0xe8, 0x2b, 0x64, 0xc4, 0xc5, 0x94, 0x6b, 0x24, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0xa4,
93 0xa4, 0x87, 0xdf, 0x30, 0x3d, 0x5f, 0xa3, 0x20, 0xa6, 0x5c, 0x23, 0x2d, 0x5e, 0x2e, 0x46, 0x57,
94 0x21, 0x0e, 0x2e, 0x96, 0x28, 0xd7, 0x20, 0x7f, 0x01, 0x06, 0x27, 0xd7, 0x28, 0xe7, 0xf4, 0xcc,
95 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0xf4, 0xfc, 0x9c, 0xc4, 0xbc, 0x74, 0x7d,
96 0xb0, 0x39, 0x49, 0xa5, 0x69, 0x10, 0x46, 0xb2, 0x6e, 0x7a, 0x6a, 0x9e, 0x6e, 0x7a, 0xbe, 0x3e,
97 0xc8, 0xe0, 0x94, 0xc4, 0x92, 0x44, 0x7d, 0x0c, 0x67, 0x25, 0xb1, 0x81, 0x55, 0x1a, 0x03, 0x02,
98 0x00, 0x00, 0xff, 0xff, 0x81, 0xcc, 0x07, 0x7d, 0xed, 0x00, 0x00, 0x00,
99 }
373 proto.RegisterType((*M_Grouping)(nil), "goproto.test.import_public.sub.M.Grouping")
374 proto.RegisterType((*M_Submessage)(nil), "goproto.test.import_public.sub.M.Submessage")
375 proto.RegisterExtension(E_ExtensionField)
376 }
377
378 func init() { proto.RegisterFile("import_public/sub/a.proto", fileDescriptor_382f7805394b5c4e) }
379
380 var fileDescriptor_382f7805394b5c4e = []byte{
381 // 410 bytes of a gzipped FileDescriptorProto
382 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xcf, 0x6e, 0xd3, 0x40,
383 0x10, 0xc6, 0xbb, 0x49, 0x5a, 0xd2, 0x09, 0xe1, 0xcf, 0x8a, 0x22, 0xd3, 0x03, 0x98, 0x9c, 0xac,
384 0x56, 0x5d, 0x4b, 0x26, 0xf2, 0xa1, 0x37, 0x82, 0xdc, 0x82, 0x90, 0x55, 0xc9, 0x16, 0x97, 0x5e,
385 0x2c, 0x6f, 0xbc, 0x5e, 0x2c, 0xd9, 0xbb, 0x56, 0xbc, 0x2b, 0xf1, 0x08, 0xbc, 0x17, 0x2f, 0x86,
386 0xbc, 0xb6, 0x93, 0x46, 0x04, 0xe8, 0x6d, 0x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4d, 0xca, 0x19, 0xf6, 0xe1, 0x75, 0xb3, 0xfd,
398 0x4a, 0x1e, 0xae, 0x8f, 0xfa, 0xf5, 0x5f, 0xed, 0xfa, 0x77, 0xbb, 0x20, 0xfe, 0xc2, 0xf9, 0x4b,
399 0x13, 0xdb, 0xf8, 0x30, 0xe7, 0x2f, 0x17, 0x97, 0x80, 0x77, 0xd3, 0x93, 0x58, 0x53, 0x26, 0x74,
400 0x85, 0xcf, 0xe0, 0x65, 0x98, 0xc4, 0xdf, 0x56, 0x61, 0x10, 0xc7, 0x1f, 0x6f, 0x83, 0xe4, 0x3e,
401 0x88, 0xee, 0x5e, 0x1c, 0xad, 0xac, 0x03, 0x43, 0xcc, 0x5e, 0x8b, 0x33, 0x78, 0x32, 0xb0, 0x00,
402 0x27, 0xe1, 0x00, 0xcc, 0x87, 0xdf, 0x63, 0x54, 0x17, 0x73, 0x40, 0x01, 0x9e, 0xc2, 0xa4, 0xeb,
403 0x5e, 0x7f, 0x85, 0xe7, 0xec, 0x87, 0x62, 0xa2, 0x29, 0xa4, 0xe8, 0x14, 0xf8, 0x11, 0xa7, 0x61,
404 0x82, 0x38, 0x8d, 0x9e, 0x6d, 0x51, 0x93, 0xe3, 0x2a, 0xb8, 0xff, 0xc4, 0x0b, 0xf5, 0x5d, 0x53,
405 0xb2, 0x96, 0x95, 0xcb, 0x65, 0x99, 0x0a, 0xee, 0x1a, 0x2b, 0xaa, 0xf3, 0xee, 0xb1, 0xbe, 0xe2,
406 0x4c, 0x5c, 0x71, 0xe9, 0xb6, 0xde, 0x59, 0xaa, 0x52, 0xf7, 0x8f, 0xab, 0xfd, 0x1d, 0x00, 0x00,
407 0xff, 0xff, 0x13, 0x4f, 0x31, 0x07, 0x04, 0x03, 0x00, 0x00,
408 }
2828 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2929 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3030
31 syntax = "proto3";
31 syntax = "proto2";
3232
3333 package goproto.test.import_public.sub;
3434
3838
3939 message M {
4040 // Field using a type in the same Go package, but a different source file.
41 M2 m2 = 1;
41 optional M2 m2 = 1;
42
43 oneof oneof_field {
44 int32 oneof_int32 = 2;
45 int64 oneof_int64 = 3;
46 }
47
48 optional group Grouping = 4 {
49 optional string group_field = 5;
50 }
51
52 optional string default_field = 6 [default="def"];
53
54 message Submessage {
55 enum Submessage_Subenum {
56 M_SUBMESSAGE_ZERO = 0;
57 }
58
59 oneof submessage_oneof_field {
60 int32 submessage_oneof_int32 = 1;
61 int64 submessage_oneof_int64 = 2;
62 }
63 }
64
65 enum Subenum {
66 M_ZERO = 0;
67 }
4268 }
4369
4470 enum E {
4571 ZERO = 0;
4672 }
73
74 extend M2 {
75 optional string extension_field = 1;
76 }
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: import_public/sub/b.proto
22
3 package sub // import "github.com/golang/protobuf/protoc-gen-go/testdata/import_public/sub"
3 package sub
44
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 math "math"
9 )
810
911 // Reference imports to suppress errors if they are not otherwise used.
1012 var _ = proto.Marshal
1517 // is compatible with the proto package it is being compiled against.
1618 // A compilation error at this line likely means your copy of the
1719 // proto package needs to be updated.
18 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
20 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
1921
2022 type M2 struct {
21 XXX_NoUnkeyedLiteral struct{} `json:"-"`
22 XXX_unrecognized []byte `json:"-"`
23 XXX_sizecache int32 `json:"-"`
23 XXX_NoUnkeyedLiteral struct{} `json:"-"`
24 proto.XXX_InternalExtensions `json:"-"`
25 XXX_unrecognized []byte `json:"-"`
26 XXX_sizecache int32 `json:"-"`
2427 }
2528
2629 func (m *M2) Reset() { *m = M2{} }
2730 func (m *M2) String() string { return proto.CompactTextString(m) }
2831 func (*M2) ProtoMessage() {}
2932 func (*M2) Descriptor() ([]byte, []int) {
30 return fileDescriptor_b_eba25180453d86b4, []int{0}
33 return fileDescriptor_fc66afda3d7c2232, []int{0}
3134 }
35
36 var extRange_M2 = []proto.ExtensionRange{
37 {Start: 1, End: 536870911},
38 }
39
40 func (*M2) ExtensionRangeArray() []proto.ExtensionRange {
41 return extRange_M2
42 }
43
3244 func (m *M2) XXX_Unmarshal(b []byte) error {
3345 return xxx_messageInfo_M2.Unmarshal(m, b)
3446 }
3547 func (m *M2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
3648 return xxx_messageInfo_M2.Marshal(b, m, deterministic)
3749 }
38 func (dst *M2) XXX_Merge(src proto.Message) {
39 xxx_messageInfo_M2.Merge(dst, src)
50 func (m *M2) XXX_Merge(src proto.Message) {
51 xxx_messageInfo_M2.Merge(m, src)
4052 }
4153 func (m *M2) XXX_Size() int {
4254 return xxx_messageInfo_M2.Size(m)
5163 proto.RegisterType((*M2)(nil), "goproto.test.import_public.sub.M2")
5264 }
5365
54 func init() { proto.RegisterFile("import_public/sub/b.proto", fileDescriptor_b_eba25180453d86b4) }
66 func init() { proto.RegisterFile("import_public/sub/b.proto", fileDescriptor_fc66afda3d7c2232) }
5567
56 var fileDescriptor_b_eba25180453d86b4 = []byte{
57 // 127 bytes of a gzipped FileDescriptorProto
68 var fileDescriptor_fc66afda3d7c2232 = []byte{
69 // 132 bytes of a gzipped FileDescriptorProto
5870 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8,
5971 0x2f, 0x2a, 0x89, 0x2f, 0x28, 0x4d, 0xca, 0xc9, 0x4c, 0xd6, 0x2f, 0x2e, 0x4d, 0xd2, 0x4f, 0xd2,
6072 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x4b, 0xcf, 0x07, 0x33, 0xf4, 0x4a, 0x52, 0x8b, 0x4b,
61 0xf4, 0x50, 0xd4, 0xe9, 0x15, 0x97, 0x26, 0x29, 0xb1, 0x70, 0x31, 0xf9, 0x1a, 0x39, 0xb9, 0x46,
62 0x39, 0xa7, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xe7, 0x24,
63 0xe6, 0xa5, 0xeb, 0x83, 0xf5, 0x25, 0x95, 0xa6, 0x41, 0x18, 0xc9, 0xba, 0xe9, 0xa9, 0x79, 0xba,
64 0xe9, 0xf9, 0xfa, 0x20, 0x83, 0x52, 0x12, 0x4b, 0x12, 0xf5, 0x31, 0x2c, 0x4d, 0x62, 0x03, 0xab,
65 0x34, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x64, 0x42, 0xe4, 0xa8, 0x90, 0x00, 0x00, 0x00,
73 0xf4, 0x50, 0xd4, 0xe9, 0x15, 0x97, 0x26, 0x29, 0xf1, 0x71, 0x31, 0xf9, 0x1a, 0x69, 0x71, 0x70,
74 0x30, 0x0a, 0x34, 0x34, 0x34, 0x34, 0x30, 0x39, 0xb9, 0x46, 0x39, 0xa7, 0x67, 0x96, 0x64, 0x94,
75 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, 0xa7, 0xe7, 0xe7, 0x24, 0xe6, 0xa5, 0xeb, 0x83, 0x4d, 0x48,
76 0x2a, 0x4d, 0x83, 0x30, 0x92, 0x75, 0xd3, 0x53, 0xf3, 0x74, 0xd3, 0xf3, 0xf5, 0x41, 0x46, 0xa6,
77 0x24, 0x96, 0x24, 0xea, 0x63, 0x58, 0x0f, 0x08, 0x00, 0x00, 0xff, 0xff, 0x87, 0x44, 0x22, 0x2d,
78 0x92, 0x00, 0x00, 0x00,
6679 }
2828 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2929 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3030
31 syntax = "proto3";
31 syntax = "proto2";
3232
3333 package goproto.test.import_public.sub;
3434
3535 option go_package = "github.com/golang/protobuf/protoc-gen-go/testdata/import_public/sub";
3636
3737 message M2 {
38 extensions 1 to max;
3839 }
4545 var _ mainpb.E = subpb.E(0)
4646 _ = &mainpb.Public{
4747 M: &mainpb.M{},
48 E: mainpb.E_ZERO,
48 E: mainpb.E_ZERO.Enum(),
4949 Local: &mainpb.Local{
5050 M: &mainpb.M{},
51 E: mainpb.E_ZERO,
51 E: mainpb.E_ZERO.Enum(),
5252 },
5353 }
5454 _ = &mainpb.Public{
5555 M: &subpb.M{},
56 E: subpb.E_ZERO,
56 E: subpb.E_ZERO.Enum(),
5757 Local: &mainpb.Local{
5858 M: &subpb.M{},
59 E: subpb.E_ZERO,
59 E: subpb.E_ZERO.Enum(),
6060 },
6161 }
6262 _ = &mainpb.M{
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: imports/fmt/m.proto
22
3 package fmt // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports/fmt"
3 package fmt
44
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 math "math"
9 )
810
911 // Reference imports to suppress errors if they are not otherwise used.
1012 var _ = proto.Marshal
1517 // is compatible with the proto package it is being compiled against.
1618 // A compilation error at this line likely means your copy of the
1719 // proto package needs to be updated.
18 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
20 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
1921
2022 type M struct {
2123 XXX_NoUnkeyedLiteral struct{} `json:"-"`
2729 func (m *M) String() string { return proto.CompactTextString(m) }
2830 func (*M) ProtoMessage() {}
2931 func (*M) Descriptor() ([]byte, []int) {
30 return fileDescriptor_m_867dd34c461422b8, []int{0}
32 return fileDescriptor_72c126fcd452e392, []int{0}
3133 }
34
3235 func (m *M) XXX_Unmarshal(b []byte) error {
3336 return xxx_messageInfo_M.Unmarshal(m, b)
3437 }
3538 func (m *M) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
3639 return xxx_messageInfo_M.Marshal(b, m, deterministic)
3740 }
38 func (dst *M) XXX_Merge(src proto.Message) {
39 xxx_messageInfo_M.Merge(dst, src)
41 func (m *M) XXX_Merge(src proto.Message) {
42 xxx_messageInfo_M.Merge(m, src)
4043 }
4144 func (m *M) XXX_Size() int {
4245 return xxx_messageInfo_M.Size(m)
5154 proto.RegisterType((*M)(nil), "fmt.M")
5255 }
5356
54 func init() { proto.RegisterFile("imports/fmt/m.proto", fileDescriptor_m_867dd34c461422b8) }
57 func init() { proto.RegisterFile("imports/fmt/m.proto", fileDescriptor_72c126fcd452e392) }
5558
56 var fileDescriptor_m_867dd34c461422b8 = []byte{
59 var fileDescriptor_72c126fcd452e392 = []byte{
5760 // 109 bytes of a gzipped FileDescriptorProto
5861 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xce, 0xcc, 0x2d, 0xc8,
5962 0x2f, 0x2a, 0x29, 0xd6, 0x4f, 0xcb, 0x2d, 0xd1, 0xcf, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17,
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: imports/test_a_1/m1.proto
22
3 package test_a_1 // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_1"
3 package test_a_1
44
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 math "math"
9 )
810
911 // Reference imports to suppress errors if they are not otherwise used.
1012 var _ = proto.Marshal
1517 // is compatible with the proto package it is being compiled against.
1618 // A compilation error at this line likely means your copy of the
1719 // proto package needs to be updated.
18 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
20 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
1921
2022 type E1 int32
2123
2628 var E1_name = map[int32]string{
2729 0: "E1_ZERO",
2830 }
31
2932 var E1_value = map[string]int32{
3033 "E1_ZERO": 0,
3134 }
3336 func (x E1) String() string {
3437 return proto.EnumName(E1_name, int32(x))
3538 }
39
3640 func (E1) EnumDescriptor() ([]byte, []int) {
37 return fileDescriptor_m1_56a2598431d21e61, []int{0}
41 return fileDescriptor_c1091de3fa870a14, []int{0}
3842 }
3943
4044 type M1 struct {
4751 func (m *M1) String() string { return proto.CompactTextString(m) }
4852 func (*M1) ProtoMessage() {}
4953 func (*M1) Descriptor() ([]byte, []int) {
50 return fileDescriptor_m1_56a2598431d21e61, []int{0}
54 return fileDescriptor_c1091de3fa870a14, []int{0}
5155 }
56
5257 func (m *M1) XXX_Unmarshal(b []byte) error {
5358 return xxx_messageInfo_M1.Unmarshal(m, b)
5459 }
5560 func (m *M1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
5661 return xxx_messageInfo_M1.Marshal(b, m, deterministic)
5762 }
58 func (dst *M1) XXX_Merge(src proto.Message) {
59 xxx_messageInfo_M1.Merge(dst, src)
63 func (m *M1) XXX_Merge(src proto.Message) {
64 xxx_messageInfo_M1.Merge(m, src)
6065 }
6166 func (m *M1) XXX_Size() int {
6267 return xxx_messageInfo_M1.Size(m)
7883 func (m *M1_1) String() string { return proto.CompactTextString(m) }
7984 func (*M1_1) ProtoMessage() {}
8085 func (*M1_1) Descriptor() ([]byte, []int) {
81 return fileDescriptor_m1_56a2598431d21e61, []int{1}
86 return fileDescriptor_c1091de3fa870a14, []int{1}
8287 }
88
8389 func (m *M1_1) XXX_Unmarshal(b []byte) error {
8490 return xxx_messageInfo_M1_1.Unmarshal(m, b)
8591 }
8692 func (m *M1_1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
8793 return xxx_messageInfo_M1_1.Marshal(b, m, deterministic)
8894 }
89 func (dst *M1_1) XXX_Merge(src proto.Message) {
90 xxx_messageInfo_M1_1.Merge(dst, src)
95 func (m *M1_1) XXX_Merge(src proto.Message) {
96 xxx_messageInfo_M1_1.Merge(m, src)
9197 }
9298 func (m *M1_1) XXX_Size() int {
9399 return xxx_messageInfo_M1_1.Size(m)
106112 }
107113
108114 func init() {
115 proto.RegisterEnum("test.a.E1", E1_name, E1_value)
109116 proto.RegisterType((*M1)(nil), "test.a.M1")
110117 proto.RegisterType((*M1_1)(nil), "test.a.M1_1")
111 proto.RegisterEnum("test.a.E1", E1_name, E1_value)
112118 }
113119
114 func init() { proto.RegisterFile("imports/test_a_1/m1.proto", fileDescriptor_m1_56a2598431d21e61) }
120 func init() { proto.RegisterFile("imports/test_a_1/m1.proto", fileDescriptor_c1091de3fa870a14) }
115121
116 var fileDescriptor_m1_56a2598431d21e61 = []byte{
122 var fileDescriptor_c1091de3fa870a14 = []byte{
117123 // 165 bytes of a gzipped FileDescriptorProto
118124 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8,
119125 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8c, 0x37, 0xd4, 0xcf, 0x35, 0xd4,
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: imports/test_a_1/m2.proto
22
3 package test_a_1 // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_1"
3 package test_a_1
44
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 math "math"
9 )
810
911 // Reference imports to suppress errors if they are not otherwise used.
1012 var _ = proto.Marshal
1517 // is compatible with the proto package it is being compiled against.
1618 // A compilation error at this line likely means your copy of the
1719 // proto package needs to be updated.
18 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
20 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
1921
2022 type M2 struct {
2123 XXX_NoUnkeyedLiteral struct{} `json:"-"`
2729 func (m *M2) String() string { return proto.CompactTextString(m) }
2830 func (*M2) ProtoMessage() {}
2931 func (*M2) Descriptor() ([]byte, []int) {
30 return fileDescriptor_m2_ccd6356c045a9ac3, []int{0}
32 return fileDescriptor_20cf27515c0d621c, []int{0}
3133 }
34
3235 func (m *M2) XXX_Unmarshal(b []byte) error {
3336 return xxx_messageInfo_M2.Unmarshal(m, b)
3437 }
3538 func (m *M2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
3639 return xxx_messageInfo_M2.Marshal(b, m, deterministic)
3740 }
38 func (dst *M2) XXX_Merge(src proto.Message) {
39 xxx_messageInfo_M2.Merge(dst, src)
41 func (m *M2) XXX_Merge(src proto.Message) {
42 xxx_messageInfo_M2.Merge(m, src)
4043 }
4144 func (m *M2) XXX_Size() int {
4245 return xxx_messageInfo_M2.Size(m)
5154 proto.RegisterType((*M2)(nil), "test.a.M2")
5255 }
5356
54 func init() { proto.RegisterFile("imports/test_a_1/m2.proto", fileDescriptor_m2_ccd6356c045a9ac3) }
57 func init() { proto.RegisterFile("imports/test_a_1/m2.proto", fileDescriptor_20cf27515c0d621c) }
5558
56 var fileDescriptor_m2_ccd6356c045a9ac3 = []byte{
59 var fileDescriptor_20cf27515c0d621c = []byte{
5760 // 114 bytes of a gzipped FileDescriptorProto
5861 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8,
5962 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8c, 0x37, 0xd4, 0xcf, 0x35, 0xd2,
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: imports/test_a_2/m3.proto
22
3 package test_a_2 // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_2"
3 package test_a_2
44
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 math "math"
9 )
810
911 // Reference imports to suppress errors if they are not otherwise used.
1012 var _ = proto.Marshal
1517 // is compatible with the proto package it is being compiled against.
1618 // A compilation error at this line likely means your copy of the
1719 // proto package needs to be updated.
18 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
20 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
1921
2022 type M3 struct {
2123 XXX_NoUnkeyedLiteral struct{} `json:"-"`
2729 func (m *M3) String() string { return proto.CompactTextString(m) }
2830 func (*M3) ProtoMessage() {}
2931 func (*M3) Descriptor() ([]byte, []int) {
30 return fileDescriptor_m3_de310e87d08d4216, []int{0}
32 return fileDescriptor_ff9d8f834875c9c5, []int{0}
3133 }
34
3235 func (m *M3) XXX_Unmarshal(b []byte) error {
3336 return xxx_messageInfo_M3.Unmarshal(m, b)
3437 }
3538 func (m *M3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
3639 return xxx_messageInfo_M3.Marshal(b, m, deterministic)
3740 }
38 func (dst *M3) XXX_Merge(src proto.Message) {
39 xxx_messageInfo_M3.Merge(dst, src)
41 func (m *M3) XXX_Merge(src proto.Message) {
42 xxx_messageInfo_M3.Merge(m, src)
4043 }
4144 func (m *M3) XXX_Size() int {
4245 return xxx_messageInfo_M3.Size(m)
5154 proto.RegisterType((*M3)(nil), "test.a.M3")
5255 }
5356
54 func init() { proto.RegisterFile("imports/test_a_2/m3.proto", fileDescriptor_m3_de310e87d08d4216) }
57 func init() { proto.RegisterFile("imports/test_a_2/m3.proto", fileDescriptor_ff9d8f834875c9c5) }
5558
56 var fileDescriptor_m3_de310e87d08d4216 = []byte{
59 var fileDescriptor_ff9d8f834875c9c5 = []byte{
5760 // 114 bytes of a gzipped FileDescriptorProto
5861 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8,
5962 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8c, 0x37, 0xd2, 0xcf, 0x35, 0xd6,
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: imports/test_a_2/m4.proto
22
3 package test_a_2 // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_2"
3 package test_a_2
44
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 math "math"
9 )
810
911 // Reference imports to suppress errors if they are not otherwise used.
1012 var _ = proto.Marshal
1517 // is compatible with the proto package it is being compiled against.
1618 // A compilation error at this line likely means your copy of the
1719 // proto package needs to be updated.
18 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
20 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
1921
2022 type M4 struct {
2123 XXX_NoUnkeyedLiteral struct{} `json:"-"`
2729 func (m *M4) String() string { return proto.CompactTextString(m) }
2830 func (*M4) ProtoMessage() {}
2931 func (*M4) Descriptor() ([]byte, []int) {
30 return fileDescriptor_m4_da12b386229f3791, []int{0}
32 return fileDescriptor_fdd24f82f6c5a786, []int{0}
3133 }
34
3235 func (m *M4) XXX_Unmarshal(b []byte) error {
3336 return xxx_messageInfo_M4.Unmarshal(m, b)
3437 }
3538 func (m *M4) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
3639 return xxx_messageInfo_M4.Marshal(b, m, deterministic)
3740 }
38 func (dst *M4) XXX_Merge(src proto.Message) {
39 xxx_messageInfo_M4.Merge(dst, src)
41 func (m *M4) XXX_Merge(src proto.Message) {
42 xxx_messageInfo_M4.Merge(m, src)
4043 }
4144 func (m *M4) XXX_Size() int {
4245 return xxx_messageInfo_M4.Size(m)
5154 proto.RegisterType((*M4)(nil), "test.a.M4")
5255 }
5356
54 func init() { proto.RegisterFile("imports/test_a_2/m4.proto", fileDescriptor_m4_da12b386229f3791) }
57 func init() { proto.RegisterFile("imports/test_a_2/m4.proto", fileDescriptor_fdd24f82f6c5a786) }
5558
56 var fileDescriptor_m4_da12b386229f3791 = []byte{
59 var fileDescriptor_fdd24f82f6c5a786 = []byte{
5760 // 114 bytes of a gzipped FileDescriptorProto
5861 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8,
5962 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8c, 0x37, 0xd2, 0xcf, 0x35, 0xd1,
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: imports/test_b_1/m1.proto
22
3 package beta // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_b_1"
3 package beta
44
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 math "math"
9 )
810
911 // Reference imports to suppress errors if they are not otherwise used.
1012 var _ = proto.Marshal
1517 // is compatible with the proto package it is being compiled against.
1618 // A compilation error at this line likely means your copy of the
1719 // proto package needs to be updated.
18 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
20 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
1921
2022 type M1 struct {
2123 XXX_NoUnkeyedLiteral struct{} `json:"-"`
2729 func (m *M1) String() string { return proto.CompactTextString(m) }
2830 func (*M1) ProtoMessage() {}
2931 func (*M1) Descriptor() ([]byte, []int) {
30 return fileDescriptor_m1_aff127b054aec649, []int{0}
32 return fileDescriptor_7f49573d035512a8, []int{0}
3133 }
34
3235 func (m *M1) XXX_Unmarshal(b []byte) error {
3336 return xxx_messageInfo_M1.Unmarshal(m, b)
3437 }
3538 func (m *M1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
3639 return xxx_messageInfo_M1.Marshal(b, m, deterministic)
3740 }
38 func (dst *M1) XXX_Merge(src proto.Message) {
39 xxx_messageInfo_M1.Merge(dst, src)
41 func (m *M1) XXX_Merge(src proto.Message) {
42 xxx_messageInfo_M1.Merge(m, src)
4043 }
4144 func (m *M1) XXX_Size() int {
4245 return xxx_messageInfo_M1.Size(m)
5154 proto.RegisterType((*M1)(nil), "test.b.part1.M1")
5255 }
5356
54 func init() { proto.RegisterFile("imports/test_b_1/m1.proto", fileDescriptor_m1_aff127b054aec649) }
57 func init() { proto.RegisterFile("imports/test_b_1/m1.proto", fileDescriptor_7f49573d035512a8) }
5558
56 var fileDescriptor_m1_aff127b054aec649 = []byte{
59 var fileDescriptor_7f49573d035512a8 = []byte{
5760 // 125 bytes of a gzipped FileDescriptorProto
5861 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8,
5962 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8a, 0x37, 0xd4, 0xcf, 0x35, 0xd4,
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: imports/test_b_1/m2.proto
22
3 package beta // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_b_1"
3 package beta
44
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 math "math"
9 )
810
911 // Reference imports to suppress errors if they are not otherwise used.
1012 var _ = proto.Marshal
1517 // is compatible with the proto package it is being compiled against.
1618 // A compilation error at this line likely means your copy of the
1719 // proto package needs to be updated.
18 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
20 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
1921
2022 type M2 struct {
2123 XXX_NoUnkeyedLiteral struct{} `json:"-"`
2729 func (m *M2) String() string { return proto.CompactTextString(m) }
2830 func (*M2) ProtoMessage() {}
2931 func (*M2) Descriptor() ([]byte, []int) {
30 return fileDescriptor_m2_0c59cab35ba1b0d8, []int{0}
32 return fileDescriptor_a1becddceeb586f2, []int{0}
3133 }
34
3235 func (m *M2) XXX_Unmarshal(b []byte) error {
3336 return xxx_messageInfo_M2.Unmarshal(m, b)
3437 }
3538 func (m *M2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
3639 return xxx_messageInfo_M2.Marshal(b, m, deterministic)
3740 }
38 func (dst *M2) XXX_Merge(src proto.Message) {
39 xxx_messageInfo_M2.Merge(dst, src)
41 func (m *M2) XXX_Merge(src proto.Message) {
42 xxx_messageInfo_M2.Merge(m, src)
4043 }
4144 func (m *M2) XXX_Size() int {
4245 return xxx_messageInfo_M2.Size(m)
5154 proto.RegisterType((*M2)(nil), "test.b.part2.M2")
5255 }
5356
54 func init() { proto.RegisterFile("imports/test_b_1/m2.proto", fileDescriptor_m2_0c59cab35ba1b0d8) }
57 func init() { proto.RegisterFile("imports/test_b_1/m2.proto", fileDescriptor_a1becddceeb586f2) }
5558
56 var fileDescriptor_m2_0c59cab35ba1b0d8 = []byte{
59 var fileDescriptor_a1becddceeb586f2 = []byte{
5760 // 125 bytes of a gzipped FileDescriptorProto
5861 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0xcc, 0x2d, 0xc8,
5962 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x4f, 0x8a, 0x37, 0xd4, 0xcf, 0x35, 0xd2,
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: imports/test_import_a1m1.proto
22
3 package imports // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports"
3 package imports
44
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
8 import test_a_1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_1"
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 test_a_1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_1"
9 math "math"
10 )
911
1012 // Reference imports to suppress errors if they are not otherwise used.
1113 var _ = proto.Marshal
1618 // is compatible with the proto package it is being compiled against.
1719 // A compilation error at this line likely means your copy of the
1820 // proto package needs to be updated.
19 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
21 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
2022
2123 type A1M1 struct {
2224 F *test_a_1.M1 `protobuf:"bytes,1,opt,name=f,proto3" json:"f,omitempty"`
2931 func (m *A1M1) String() string { return proto.CompactTextString(m) }
3032 func (*A1M1) ProtoMessage() {}
3133 func (*A1M1) Descriptor() ([]byte, []int) {
32 return fileDescriptor_test_import_a1m1_d7f2b5c638a69f6e, []int{0}
34 return fileDescriptor_3b904a47327455f3, []int{0}
3335 }
36
3437 func (m *A1M1) XXX_Unmarshal(b []byte) error {
3538 return xxx_messageInfo_A1M1.Unmarshal(m, b)
3639 }
3740 func (m *A1M1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
3841 return xxx_messageInfo_A1M1.Marshal(b, m, deterministic)
3942 }
40 func (dst *A1M1) XXX_Merge(src proto.Message) {
41 xxx_messageInfo_A1M1.Merge(dst, src)
43 func (m *A1M1) XXX_Merge(src proto.Message) {
44 xxx_messageInfo_A1M1.Merge(m, src)
4245 }
4346 func (m *A1M1) XXX_Size() int {
4447 return xxx_messageInfo_A1M1.Size(m)
6063 proto.RegisterType((*A1M1)(nil), "test.A1M1")
6164 }
6265
63 func init() {
64 proto.RegisterFile("imports/test_import_a1m1.proto", fileDescriptor_test_import_a1m1_d7f2b5c638a69f6e)
65 }
66 func init() { proto.RegisterFile("imports/test_import_a1m1.proto", fileDescriptor_3b904a47327455f3) }
6667
67 var fileDescriptor_test_import_a1m1_d7f2b5c638a69f6e = []byte{
68 var fileDescriptor_3b904a47327455f3 = []byte{
6869 // 149 bytes of a gzipped FileDescriptorProto
6970 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcb, 0xcc, 0x2d, 0xc8,
7071 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x87, 0x70, 0xe2, 0x13, 0x0d, 0x73, 0x0d,
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: imports/test_import_a1m2.proto
22
3 package imports // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports"
3 package imports
44
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
8 import test_a_1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_1"
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 test_a_1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_1"
9 math "math"
10 )
911
1012 // Reference imports to suppress errors if they are not otherwise used.
1113 var _ = proto.Marshal
1618 // is compatible with the proto package it is being compiled against.
1719 // A compilation error at this line likely means your copy of the
1820 // proto package needs to be updated.
19 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
21 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
2022
2123 type A1M2 struct {
2224 F *test_a_1.M2 `protobuf:"bytes,1,opt,name=f,proto3" json:"f,omitempty"`
2931 func (m *A1M2) String() string { return proto.CompactTextString(m) }
3032 func (*A1M2) ProtoMessage() {}
3133 func (*A1M2) Descriptor() ([]byte, []int) {
32 return fileDescriptor_test_import_a1m2_9a3281ce9464e116, []int{0}
34 return fileDescriptor_bdb27b114687957d, []int{0}
3335 }
36
3437 func (m *A1M2) XXX_Unmarshal(b []byte) error {
3538 return xxx_messageInfo_A1M2.Unmarshal(m, b)
3639 }
3740 func (m *A1M2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
3841 return xxx_messageInfo_A1M2.Marshal(b, m, deterministic)
3942 }
40 func (dst *A1M2) XXX_Merge(src proto.Message) {
41 xxx_messageInfo_A1M2.Merge(dst, src)
43 func (m *A1M2) XXX_Merge(src proto.Message) {
44 xxx_messageInfo_A1M2.Merge(m, src)
4245 }
4346 func (m *A1M2) XXX_Size() int {
4447 return xxx_messageInfo_A1M2.Size(m)
6063 proto.RegisterType((*A1M2)(nil), "test.A1M2")
6164 }
6265
63 func init() {
64 proto.RegisterFile("imports/test_import_a1m2.proto", fileDescriptor_test_import_a1m2_9a3281ce9464e116)
65 }
66 func init() { proto.RegisterFile("imports/test_import_a1m2.proto", fileDescriptor_bdb27b114687957d) }
6667
67 var fileDescriptor_test_import_a1m2_9a3281ce9464e116 = []byte{
68 var fileDescriptor_bdb27b114687957d = []byte{
6869 // 149 bytes of a gzipped FileDescriptorProto
6970 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcb, 0xcc, 0x2d, 0xc8,
7071 0x2f, 0x2a, 0x29, 0xd6, 0x2f, 0x49, 0x2d, 0x2e, 0x89, 0x87, 0x70, 0xe2, 0x13, 0x0d, 0x73, 0x8d,
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: imports/test_import_all.proto
22
3 package imports // import "github.com/golang/protobuf/protoc-gen-go/testdata/imports"
3 package imports
44
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
8 import fmt1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/fmt"
9 import test_a_1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_1"
10 import test_a_2 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_2"
11 import test_b_1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_b_1"
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 fmt1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/fmt"
9 test_a_1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_1"
10 test_a_2 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_a_2"
11 test_b_1 "github.com/golang/protobuf/protoc-gen-go/testdata/imports/test_b_1"
12 math "math"
13 )
1214
1315 // Reference imports to suppress errors if they are not otherwise used.
1416 var _ = proto.Marshal
1921 // is compatible with the proto package it is being compiled against.
2022 // A compilation error at this line likely means your copy of the
2123 // proto package needs to be updated.
22 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
24 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
2325
2426 type All struct {
2527 Am1 *test_a_1.M1 `protobuf:"bytes,1,opt,name=am1,proto3" json:"am1,omitempty"`
3840 func (m *All) String() string { return proto.CompactTextString(m) }
3941 func (*All) ProtoMessage() {}
4042 func (*All) Descriptor() ([]byte, []int) {
41 return fileDescriptor_test_import_all_b41dc4592e4a4f3b, []int{0}
43 return fileDescriptor_324466f0afc16f77, []int{0}
4244 }
45
4346 func (m *All) XXX_Unmarshal(b []byte) error {
4447 return xxx_messageInfo_All.Unmarshal(m, b)
4548 }
4649 func (m *All) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
4750 return xxx_messageInfo_All.Marshal(b, m, deterministic)
4851 }
49 func (dst *All) XXX_Merge(src proto.Message) {
50 xxx_messageInfo_All.Merge(dst, src)
52 func (m *All) XXX_Merge(src proto.Message) {
53 xxx_messageInfo_All.Merge(m, src)
5154 }
5255 func (m *All) XXX_Size() int {
5356 return xxx_messageInfo_All.Size(m)
111114 proto.RegisterType((*All)(nil), "test.All")
112115 }
113116
114 func init() {
115 proto.RegisterFile("imports/test_import_all.proto", fileDescriptor_test_import_all_b41dc4592e4a4f3b)
116 }
117 func init() { proto.RegisterFile("imports/test_import_all.proto", fileDescriptor_324466f0afc16f77) }
117118
118 var fileDescriptor_test_import_all_b41dc4592e4a4f3b = []byte{
119 var fileDescriptor_324466f0afc16f77 = []byte{
119120 // 258 bytes of a gzipped FileDescriptorProto
120121 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0xd0, 0xb1, 0x4e, 0xc3, 0x30,
121122 0x10, 0x06, 0x60, 0x15, 0x97, 0x20, 0x99, 0x05, 0x85, 0xc5, 0x20, 0x90, 0x50, 0x27, 0x96, 0xda,
0 // Code generated by protoc-gen-go. DO NOT EDIT.
1 // source: issue780_oneof_conflict/test.proto
2
3 package oneoftest
4
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 math "math"
9 )
10
11 // Reference imports to suppress errors if they are not otherwise used.
12 var _ = proto.Marshal
13 var _ = fmt.Errorf
14 var _ = math.Inf
15
16 // This is a compile-time assertion to ensure that this generated file
17 // is compatible with the proto package it is being compiled against.
18 // A compilation error at this line likely means your copy of the
19 // proto package needs to be updated.
20 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
21
22 type Foo struct {
23 // Types that are valid to be assigned to Bar:
24 // *Foo_GetBar
25 Bar isFoo_Bar `protobuf_oneof:"bar"`
26 XXX_NoUnkeyedLiteral struct{} `json:"-"`
27 XXX_unrecognized []byte `json:"-"`
28 XXX_sizecache int32 `json:"-"`
29 }
30
31 func (m *Foo) Reset() { *m = Foo{} }
32 func (m *Foo) String() string { return proto.CompactTextString(m) }
33 func (*Foo) ProtoMessage() {}
34 func (*Foo) Descriptor() ([]byte, []int) {
35 return fileDescriptor_48462cafc802a68e, []int{0}
36 }
37
38 func (m *Foo) XXX_Unmarshal(b []byte) error {
39 return xxx_messageInfo_Foo.Unmarshal(m, b)
40 }
41 func (m *Foo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
42 return xxx_messageInfo_Foo.Marshal(b, m, deterministic)
43 }
44 func (m *Foo) XXX_Merge(src proto.Message) {
45 xxx_messageInfo_Foo.Merge(m, src)
46 }
47 func (m *Foo) XXX_Size() int {
48 return xxx_messageInfo_Foo.Size(m)
49 }
50 func (m *Foo) XXX_DiscardUnknown() {
51 xxx_messageInfo_Foo.DiscardUnknown(m)
52 }
53
54 var xxx_messageInfo_Foo proto.InternalMessageInfo
55
56 type isFoo_Bar interface {
57 isFoo_Bar()
58 }
59
60 type Foo_GetBar struct {
61 GetBar string `protobuf:"bytes,1,opt,name=get_bar,json=getBar,oneof"`
62 }
63
64 func (*Foo_GetBar) isFoo_Bar() {}
65
66 func (m *Foo) GetBar() isFoo_Bar {
67 if m != nil {
68 return m.Bar
69 }
70 return nil
71 }
72
73 func (m *Foo) GetGetBar() string {
74 if x, ok := m.GetBar().(*Foo_GetBar); ok {
75 return x.GetBar
76 }
77 return ""
78 }
79
80 // XXX_OneofWrappers is for the internal use of the proto package.
81 func (*Foo) XXX_OneofWrappers() []interface{} {
82 return []interface{}{
83 (*Foo_GetBar)(nil),
84 }
85 }
86
87 func init() {
88 proto.RegisterType((*Foo)(nil), "oneoftest.Foo")
89 }
90
91 func init() { proto.RegisterFile("issue780_oneof_conflict/test.proto", fileDescriptor_48462cafc802a68e) }
92
93 var fileDescriptor_48462cafc802a68e = []byte{
94 // 107 bytes of a gzipped FileDescriptorProto
95 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0xca, 0x2c, 0x2e, 0x2e,
96 0x4d, 0x35, 0xb7, 0x30, 0x88, 0xcf, 0xcf, 0x4b, 0xcd, 0x4f, 0x8b, 0x4f, 0xce, 0xcf, 0x4b, 0xcb,
97 0xc9, 0x4c, 0x2e, 0xd1, 0x2f, 0x49, 0x2d, 0x2e, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2,
98 0x04, 0x4b, 0x81, 0x04, 0x94, 0xd4, 0xb9, 0x98, 0xdd, 0xf2, 0xf3, 0x85, 0x24, 0xb9, 0xd8, 0xd3,
99 0x53, 0x4b, 0xe2, 0x93, 0x12, 0x8b, 0x24, 0x18, 0x15, 0x18, 0x35, 0x38, 0x3d, 0x18, 0x82, 0xd8,
100 0xd2, 0x53, 0x4b, 0x9c, 0x12, 0x8b, 0x9c, 0x58, 0xb9, 0x98, 0x93, 0x12, 0x8b, 0x00, 0x01, 0x00,
101 0x00, 0xff, 0xff, 0x12, 0x66, 0x0c, 0x02, 0x58, 0x00, 0x00, 0x00,
102 }
0 syntax = "proto2";
1
2 package oneoftest;
3
4 message Foo {
5 oneof bar {
6 string get_bar = 1;
7 }
8 }
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: multi/multi1.proto
22
3 package multitest // import "github.com/golang/protobuf/protoc-gen-go/testdata/multi"
3 package multitest
44
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 math "math"
9 )
810
911 // Reference imports to suppress errors if they are not otherwise used.
1012 var _ = proto.Marshal
1517 // is compatible with the proto package it is being compiled against.
1618 // A compilation error at this line likely means your copy of the
1719 // proto package needs to be updated.
18 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
20 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
1921
2022 type Multi1 struct {
2123 Multi2 *Multi2 `protobuf:"bytes,1,req,name=multi2" json:"multi2,omitempty"`
3032 func (m *Multi1) String() string { return proto.CompactTextString(m) }
3133 func (*Multi1) ProtoMessage() {}
3234 func (*Multi1) Descriptor() ([]byte, []int) {
33 return fileDescriptor_multi1_08e50c6822e808b8, []int{0}
35 return fileDescriptor_e0bffc140cd1b1d9, []int{0}
3436 }
37
3538 func (m *Multi1) XXX_Unmarshal(b []byte) error {
3639 return xxx_messageInfo_Multi1.Unmarshal(m, b)
3740 }
3841 func (m *Multi1) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
3942 return xxx_messageInfo_Multi1.Marshal(b, m, deterministic)
4043 }
41 func (dst *Multi1) XXX_Merge(src proto.Message) {
42 xxx_messageInfo_Multi1.Merge(dst, src)
44 func (m *Multi1) XXX_Merge(src proto.Message) {
45 xxx_messageInfo_Multi1.Merge(m, src)
4346 }
4447 func (m *Multi1) XXX_Size() int {
4548 return xxx_messageInfo_Multi1.Size(m)
7578 proto.RegisterType((*Multi1)(nil), "multitest.Multi1")
7679 }
7780
78 func init() { proto.RegisterFile("multi/multi1.proto", fileDescriptor_multi1_08e50c6822e808b8) }
81 func init() { proto.RegisterFile("multi/multi1.proto", fileDescriptor_e0bffc140cd1b1d9) }
7982
80 var fileDescriptor_multi1_08e50c6822e808b8 = []byte{
83 var fileDescriptor_e0bffc140cd1b1d9 = []byte{
8184 // 200 bytes of a gzipped FileDescriptorProto
8285 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xca, 0x2d, 0xcd, 0x29,
8386 0xc9, 0xd4, 0x07, 0x93, 0x86, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x9c, 0x60, 0x5e, 0x49,
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: multi/multi2.proto
22
3 package multitest // import "github.com/golang/protobuf/protoc-gen-go/testdata/multi"
3 package multitest
44
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 math "math"
9 )
810
911 // Reference imports to suppress errors if they are not otherwise used.
1012 var _ = proto.Marshal
1517 // is compatible with the proto package it is being compiled against.
1618 // A compilation error at this line likely means your copy of the
1719 // proto package needs to be updated.
18 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
20 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
1921
2022 type Multi2_Color int32
2123
3032 2: "GREEN",
3133 3: "RED",
3234 }
35
3336 var Multi2_Color_value = map[string]int32{
3437 "BLUE": 1,
3538 "GREEN": 2,
4144 *p = x
4245 return p
4346 }
47
4448 func (x Multi2_Color) String() string {
4549 return proto.EnumName(Multi2_Color_name, int32(x))
4650 }
51
4752 func (x *Multi2_Color) UnmarshalJSON(data []byte) error {
4853 value, err := proto.UnmarshalJSONEnum(Multi2_Color_value, data, "Multi2_Color")
4954 if err != nil {
5257 *x = Multi2_Color(value)
5358 return nil
5459 }
60
5561 func (Multi2_Color) EnumDescriptor() ([]byte, []int) {
56 return fileDescriptor_multi2_c47490ad66d93e67, []int{0, 0}
62 return fileDescriptor_a2aebe588a0b2853, []int{0, 0}
5763 }
5864
5965 type Multi2 struct {
6874 func (m *Multi2) String() string { return proto.CompactTextString(m) }
6975 func (*Multi2) ProtoMessage() {}
7076 func (*Multi2) Descriptor() ([]byte, []int) {
71 return fileDescriptor_multi2_c47490ad66d93e67, []int{0}
77 return fileDescriptor_a2aebe588a0b2853, []int{0}
7278 }
79
7380 func (m *Multi2) XXX_Unmarshal(b []byte) error {
7481 return xxx_messageInfo_Multi2.Unmarshal(m, b)
7582 }
7683 func (m *Multi2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
7784 return xxx_messageInfo_Multi2.Marshal(b, m, deterministic)
7885 }
79 func (dst *Multi2) XXX_Merge(src proto.Message) {
80 xxx_messageInfo_Multi2.Merge(dst, src)
86 func (m *Multi2) XXX_Merge(src proto.Message) {
87 xxx_messageInfo_Multi2.Merge(m, src)
8188 }
8289 func (m *Multi2) XXX_Size() int {
8390 return xxx_messageInfo_Multi2.Size(m)
103110 }
104111
105112 func init() {
113 proto.RegisterEnum("multitest.Multi2_Color", Multi2_Color_name, Multi2_Color_value)
106114 proto.RegisterType((*Multi2)(nil), "multitest.Multi2")
107 proto.RegisterEnum("multitest.Multi2_Color", Multi2_Color_name, Multi2_Color_value)
108115 }
109116
110 func init() { proto.RegisterFile("multi/multi2.proto", fileDescriptor_multi2_c47490ad66d93e67) }
117 func init() { proto.RegisterFile("multi/multi2.proto", fileDescriptor_a2aebe588a0b2853) }
111118
112 var fileDescriptor_multi2_c47490ad66d93e67 = []byte{
119 var fileDescriptor_a2aebe588a0b2853 = []byte{
113120 // 202 bytes of a gzipped FileDescriptorProto
114121 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xca, 0x2d, 0xcd, 0x29,
115122 0xc9, 0xd4, 0x07, 0x93, 0x46, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x9c, 0x60, 0x5e, 0x49,
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: multi/multi3.proto
22
3 package multitest // import "github.com/golang/protobuf/protoc-gen-go/testdata/multi"
3 package multitest
44
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 math "math"
9 )
810
911 // Reference imports to suppress errors if they are not otherwise used.
1012 var _ = proto.Marshal
1517 // is compatible with the proto package it is being compiled against.
1618 // A compilation error at this line likely means your copy of the
1719 // proto package needs to be updated.
18 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
20 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
1921
2022 type Multi3_HatType int32
2123
2830 1: "FEDORA",
2931 2: "FEZ",
3032 }
33
3134 var Multi3_HatType_value = map[string]int32{
3235 "FEDORA": 1,
3336 "FEZ": 2,
3841 *p = x
3942 return p
4043 }
44
4145 func (x Multi3_HatType) String() string {
4246 return proto.EnumName(Multi3_HatType_name, int32(x))
4347 }
48
4449 func (x *Multi3_HatType) UnmarshalJSON(data []byte) error {
4550 value, err := proto.UnmarshalJSONEnum(Multi3_HatType_value, data, "Multi3_HatType")
4651 if err != nil {
4954 *x = Multi3_HatType(value)
5055 return nil
5156 }
57
5258 func (Multi3_HatType) EnumDescriptor() ([]byte, []int) {
53 return fileDescriptor_multi3_d55a72b4628b7875, []int{0, 0}
59 return fileDescriptor_580398fc0bbeeaa7, []int{0, 0}
5460 }
5561
5662 type Multi3 struct {
6470 func (m *Multi3) String() string { return proto.CompactTextString(m) }
6571 func (*Multi3) ProtoMessage() {}
6672 func (*Multi3) Descriptor() ([]byte, []int) {
67 return fileDescriptor_multi3_d55a72b4628b7875, []int{0}
73 return fileDescriptor_580398fc0bbeeaa7, []int{0}
6874 }
75
6976 func (m *Multi3) XXX_Unmarshal(b []byte) error {
7077 return xxx_messageInfo_Multi3.Unmarshal(m, b)
7178 }
7279 func (m *Multi3) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
7380 return xxx_messageInfo_Multi3.Marshal(b, m, deterministic)
7481 }
75 func (dst *Multi3) XXX_Merge(src proto.Message) {
76 xxx_messageInfo_Multi3.Merge(dst, src)
82 func (m *Multi3) XXX_Merge(src proto.Message) {
83 xxx_messageInfo_Multi3.Merge(m, src)
7784 }
7885 func (m *Multi3) XXX_Size() int {
7986 return xxx_messageInfo_Multi3.Size(m)
9299 }
93100
94101 func init() {
102 proto.RegisterEnum("multitest.Multi3_HatType", Multi3_HatType_name, Multi3_HatType_value)
95103 proto.RegisterType((*Multi3)(nil), "multitest.Multi3")
96 proto.RegisterEnum("multitest.Multi3_HatType", Multi3_HatType_name, Multi3_HatType_value)
97104 }
98105
99 func init() { proto.RegisterFile("multi/multi3.proto", fileDescriptor_multi3_d55a72b4628b7875) }
106 func init() { proto.RegisterFile("multi/multi3.proto", fileDescriptor_580398fc0bbeeaa7) }
100107
101 var fileDescriptor_multi3_d55a72b4628b7875 = []byte{
108 var fileDescriptor_580398fc0bbeeaa7 = []byte{
102109 // 170 bytes of a gzipped FileDescriptorProto
103110 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xca, 0x2d, 0xcd, 0x29,
104111 0xc9, 0xd4, 0x07, 0x93, 0xc6, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x9c, 0x60, 0x5e, 0x49,
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: my_test/test.proto
22
3 package test // import "github.com/golang/protobuf/protoc-gen-go/testdata/my_test"
4
5 /*
6 This package holds interesting messages.
7 */
8
9 import proto "github.com/golang/protobuf/proto"
10 import fmt "fmt"
11 import math "math"
12 import _ "github.com/golang/protobuf/protoc-gen-go/testdata/multi"
3 // This package holds interesting messages.
4
5 package test
6
7 import (
8 fmt "fmt"
9 proto "github.com/golang/protobuf/proto"
10 _ "github.com/golang/protobuf/protoc-gen-go/testdata/multi"
11 math "math"
12 )
1313
1414 // Reference imports to suppress errors if they are not otherwise used.
1515 var _ = proto.Marshal
2020 // is compatible with the proto package it is being compiled against.
2121 // A compilation error at this line likely means your copy of the
2222 // proto package needs to be updated.
23 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
23 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
2424
2525 type HatType int32
2626
3434 1: "FEDORA",
3535 2: "FEZ",
3636 }
37
3738 var HatType_value = map[string]int32{
3839 "FEDORA": 1,
3940 "FEZ": 2,
4445 *p = x
4546 return p
4647 }
48
4749 func (x HatType) String() string {
4850 return proto.EnumName(HatType_name, int32(x))
4951 }
52
5053 func (x *HatType) UnmarshalJSON(data []byte) error {
5154 value, err := proto.UnmarshalJSONEnum(HatType_value, data, "HatType")
5255 if err != nil {
5558 *x = HatType(value)
5659 return nil
5760 }
61
5862 func (HatType) EnumDescriptor() ([]byte, []int) {
59 return fileDescriptor_test_2309d445eee26af7, []int{0}
63 return fileDescriptor_2c9b60a40d5131b9, []int{0}
6064 }
6165
6266 // This enum represents days of the week.
7377 2: "TUESDAY",
7478 // Duplicate value: 1: "LUNDI",
7579 }
80
7681 var Days_value = map[string]int32{
7782 "MONDAY": 1,
7883 "TUESDAY": 2,
8489 *p = x
8590 return p
8691 }
92
8793 func (x Days) String() string {
8894 return proto.EnumName(Days_name, int32(x))
8995 }
96
9097 func (x *Days) UnmarshalJSON(data []byte) error {
9198 value, err := proto.UnmarshalJSONEnum(Days_value, data, "Days")
9299 if err != nil {
95102 *x = Days(value)
96103 return nil
97104 }
105
98106 func (Days) EnumDescriptor() ([]byte, []int) {
99 return fileDescriptor_test_2309d445eee26af7, []int{1}
107 return fileDescriptor_2c9b60a40d5131b9, []int{1}
100108 }
101109
102110 type Request_Color int32
112120 1: "GREEN",
113121 2: "BLUE",
114122 }
123
115124 var Request_Color_value = map[string]int32{
116125 "RED": 0,
117126 "GREEN": 1,
123132 *p = x
124133 return p
125134 }
135
126136 func (x Request_Color) String() string {
127137 return proto.EnumName(Request_Color_name, int32(x))
128138 }
139
129140 func (x *Request_Color) UnmarshalJSON(data []byte) error {
130141 value, err := proto.UnmarshalJSONEnum(Request_Color_value, data, "Request_Color")
131142 if err != nil {
134145 *x = Request_Color(value)
135146 return nil
136147 }
148
137149 func (Request_Color) EnumDescriptor() ([]byte, []int) {
138 return fileDescriptor_test_2309d445eee26af7, []int{0, 0}
150 return fileDescriptor_2c9b60a40d5131b9, []int{0, 0}
139151 }
140152
141153 type Reply_Entry_Game int32
149161 1: "FOOTBALL",
150162 2: "TENNIS",
151163 }
164
152165 var Reply_Entry_Game_value = map[string]int32{
153166 "FOOTBALL": 1,
154167 "TENNIS": 2,
159172 *p = x
160173 return p
161174 }
175
162176 func (x Reply_Entry_Game) String() string {
163177 return proto.EnumName(Reply_Entry_Game_name, int32(x))
164178 }
179
165180 func (x *Reply_Entry_Game) UnmarshalJSON(data []byte) error {
166181 value, err := proto.UnmarshalJSONEnum(Reply_Entry_Game_value, data, "Reply_Entry_Game")
167182 if err != nil {
170185 *x = Reply_Entry_Game(value)
171186 return nil
172187 }
188
173189 func (Reply_Entry_Game) EnumDescriptor() ([]byte, []int) {
174 return fileDescriptor_test_2309d445eee26af7, []int{1, 0, 0}
190 return fileDescriptor_2c9b60a40d5131b9, []int{1, 0, 0}
175191 }
176192
177193 // This is a message that might be sent somewhere.
190206 Reset_ *int32 `protobuf:"varint,12,opt,name=reset" json:"reset,omitempty"`
191207 // This field should not conflict with any getters.
192208 GetKey_ *string `protobuf:"bytes,16,opt,name=get_key,json=getKey" json:"get_key,omitempty"`
209 FloatNinf *float32 `protobuf:"fixed32,20,opt,name=float_ninf,json=floatNinf,def=-inf" json:"float_ninf,omitempty"`
210 FloatPinf *float32 `protobuf:"fixed32,21,opt,name=float_pinf,json=floatPinf,def=inf" json:"float_pinf,omitempty"`
211 FloatExp *float32 `protobuf:"fixed32,22,opt,name=float_exp,json=floatExp,def=1e+09" json:"float_exp,omitempty"`
212 DoubleNinf *float64 `protobuf:"fixed64,23,opt,name=double_ninf,json=doubleNinf,def=-inf" json:"double_ninf,omitempty"`
213 DoublePinf *float64 `protobuf:"fixed64,24,opt,name=double_pinf,json=doublePinf,def=inf" json:"double_pinf,omitempty"`
214 DoubleExp *float64 `protobuf:"fixed64,25,opt,name=double_exp,json=doubleExp,def=1e+09" json:"double_exp,omitempty"`
193215 XXX_NoUnkeyedLiteral struct{} `json:"-"`
194216 XXX_unrecognized []byte `json:"-"`
195217 XXX_sizecache int32 `json:"-"`
199221 func (m *Request) String() string { return proto.CompactTextString(m) }
200222 func (*Request) ProtoMessage() {}
201223 func (*Request) Descriptor() ([]byte, []int) {
202 return fileDescriptor_test_2309d445eee26af7, []int{0}
203 }
224 return fileDescriptor_2c9b60a40d5131b9, []int{0}
225 }
226
204227 func (m *Request) XXX_Unmarshal(b []byte) error {
205228 return xxx_messageInfo_Request.Unmarshal(m, b)
206229 }
207230 func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
208231 return xxx_messageInfo_Request.Marshal(b, m, deterministic)
209232 }
210 func (dst *Request) XXX_Merge(src proto.Message) {
211 xxx_messageInfo_Request.Merge(dst, src)
233 func (m *Request) XXX_Merge(src proto.Message) {
234 xxx_messageInfo_Request.Merge(m, src)
212235 }
213236 func (m *Request) XXX_Size() int {
214237 return xxx_messageInfo_Request.Size(m)
222245 const Default_Request_Hat HatType = HatType_FEDORA
223246
224247 var Default_Request_Deadline float32 = float32(math.Inf(1))
248 var Default_Request_FloatNinf float32 = float32(math.Inf(-1))
249 var Default_Request_FloatPinf float32 = float32(math.Inf(1))
250
251 const Default_Request_FloatExp float32 = 1e+09
252
253 var Default_Request_DoubleNinf float64 = math.Inf(-1)
254 var Default_Request_DoublePinf float64 = math.Inf(1)
255
256 const Default_Request_DoubleExp float64 = 1e+09
225257
226258 func (m *Request) GetKey() []int64 {
227259 if m != nil {
284316 return *m.GetKey_
285317 }
286318 return ""
319 }
320
321 func (m *Request) GetFloatNinf() float32 {
322 if m != nil && m.FloatNinf != nil {
323 return *m.FloatNinf
324 }
325 return Default_Request_FloatNinf
326 }
327
328 func (m *Request) GetFloatPinf() float32 {
329 if m != nil && m.FloatPinf != nil {
330 return *m.FloatPinf
331 }
332 return Default_Request_FloatPinf
333 }
334
335 func (m *Request) GetFloatExp() float32 {
336 if m != nil && m.FloatExp != nil {
337 return *m.FloatExp
338 }
339 return Default_Request_FloatExp
340 }
341
342 func (m *Request) GetDoubleNinf() float64 {
343 if m != nil && m.DoubleNinf != nil {
344 return *m.DoubleNinf
345 }
346 return Default_Request_DoubleNinf
347 }
348
349 func (m *Request) GetDoublePinf() float64 {
350 if m != nil && m.DoublePinf != nil {
351 return *m.DoublePinf
352 }
353 return Default_Request_DoublePinf
354 }
355
356 func (m *Request) GetDoubleExp() float64 {
357 if m != nil && m.DoubleExp != nil {
358 return *m.DoubleExp
359 }
360 return Default_Request_DoubleExp
287361 }
288362
289363 type Request_SomeGroup struct {
297371 func (m *Request_SomeGroup) String() string { return proto.CompactTextString(m) }
298372 func (*Request_SomeGroup) ProtoMessage() {}
299373 func (*Request_SomeGroup) Descriptor() ([]byte, []int) {
300 return fileDescriptor_test_2309d445eee26af7, []int{0, 0}
301 }
374 return fileDescriptor_2c9b60a40d5131b9, []int{0, 0}
375 }
376
302377 func (m *Request_SomeGroup) XXX_Unmarshal(b []byte) error {
303378 return xxx_messageInfo_Request_SomeGroup.Unmarshal(m, b)
304379 }
305380 func (m *Request_SomeGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
306381 return xxx_messageInfo_Request_SomeGroup.Marshal(b, m, deterministic)
307382 }
308 func (dst *Request_SomeGroup) XXX_Merge(src proto.Message) {
309 xxx_messageInfo_Request_SomeGroup.Merge(dst, src)
383 func (m *Request_SomeGroup) XXX_Merge(src proto.Message) {
384 xxx_messageInfo_Request_SomeGroup.Merge(m, src)
310385 }
311386 func (m *Request_SomeGroup) XXX_Size() int {
312387 return xxx_messageInfo_Request_SomeGroup.Size(m)
337412 func (m *Reply) String() string { return proto.CompactTextString(m) }
338413 func (*Reply) ProtoMessage() {}
339414 func (*Reply) Descriptor() ([]byte, []int) {
340 return fileDescriptor_test_2309d445eee26af7, []int{1}
415 return fileDescriptor_2c9b60a40d5131b9, []int{1}
341416 }
342417
343418 var extRange_Reply = []proto.ExtensionRange{
347422 func (*Reply) ExtensionRangeArray() []proto.ExtensionRange {
348423 return extRange_Reply
349424 }
425
350426 func (m *Reply) XXX_Unmarshal(b []byte) error {
351427 return xxx_messageInfo_Reply.Unmarshal(m, b)
352428 }
353429 func (m *Reply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
354430 return xxx_messageInfo_Reply.Marshal(b, m, deterministic)
355431 }
356 func (dst *Reply) XXX_Merge(src proto.Message) {
357 xxx_messageInfo_Reply.Merge(dst, src)
432 func (m *Reply) XXX_Merge(src proto.Message) {
433 xxx_messageInfo_Reply.Merge(m, src)
358434 }
359435 func (m *Reply) XXX_Size() int {
360436 return xxx_messageInfo_Reply.Size(m)
392468 func (m *Reply_Entry) String() string { return proto.CompactTextString(m) }
393469 func (*Reply_Entry) ProtoMessage() {}
394470 func (*Reply_Entry) Descriptor() ([]byte, []int) {
395 return fileDescriptor_test_2309d445eee26af7, []int{1, 0}
396 }
471 return fileDescriptor_2c9b60a40d5131b9, []int{1, 0}
472 }
473
397474 func (m *Reply_Entry) XXX_Unmarshal(b []byte) error {
398475 return xxx_messageInfo_Reply_Entry.Unmarshal(m, b)
399476 }
400477 func (m *Reply_Entry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
401478 return xxx_messageInfo_Reply_Entry.Marshal(b, m, deterministic)
402479 }
403 func (dst *Reply_Entry) XXX_Merge(src proto.Message) {
404 xxx_messageInfo_Reply_Entry.Merge(dst, src)
480 func (m *Reply_Entry) XXX_Merge(src proto.Message) {
481 xxx_messageInfo_Reply_Entry.Merge(m, src)
405482 }
406483 func (m *Reply_Entry) XXX_Size() int {
407484 return xxx_messageInfo_Reply_Entry.Size(m)
447524 func (m *OtherBase) String() string { return proto.CompactTextString(m) }
448525 func (*OtherBase) ProtoMessage() {}
449526 func (*OtherBase) Descriptor() ([]byte, []int) {
450 return fileDescriptor_test_2309d445eee26af7, []int{2}
527 return fileDescriptor_2c9b60a40d5131b9, []int{2}
451528 }
452529
453530 var extRange_OtherBase = []proto.ExtensionRange{
457534 func (*OtherBase) ExtensionRangeArray() []proto.ExtensionRange {
458535 return extRange_OtherBase
459536 }
537
460538 func (m *OtherBase) XXX_Unmarshal(b []byte) error {
461539 return xxx_messageInfo_OtherBase.Unmarshal(m, b)
462540 }
463541 func (m *OtherBase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
464542 return xxx_messageInfo_OtherBase.Marshal(b, m, deterministic)
465543 }
466 func (dst *OtherBase) XXX_Merge(src proto.Message) {
467 xxx_messageInfo_OtherBase.Merge(dst, src)
544 func (m *OtherBase) XXX_Merge(src proto.Message) {
545 xxx_messageInfo_OtherBase.Merge(m, src)
468546 }
469547 func (m *OtherBase) XXX_Size() int {
470548 return xxx_messageInfo_OtherBase.Size(m)
492570 func (m *ReplyExtensions) String() string { return proto.CompactTextString(m) }
493571 func (*ReplyExtensions) ProtoMessage() {}
494572 func (*ReplyExtensions) Descriptor() ([]byte, []int) {
495 return fileDescriptor_test_2309d445eee26af7, []int{3}
496 }
573 return fileDescriptor_2c9b60a40d5131b9, []int{3}
574 }
575
497576 func (m *ReplyExtensions) XXX_Unmarshal(b []byte) error {
498577 return xxx_messageInfo_ReplyExtensions.Unmarshal(m, b)
499578 }
500579 func (m *ReplyExtensions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
501580 return xxx_messageInfo_ReplyExtensions.Marshal(b, m, deterministic)
502581 }
503 func (dst *ReplyExtensions) XXX_Merge(src proto.Message) {
504 xxx_messageInfo_ReplyExtensions.Merge(dst, src)
582 func (m *ReplyExtensions) XXX_Merge(src proto.Message) {
583 xxx_messageInfo_ReplyExtensions.Merge(m, src)
505584 }
506585 func (m *ReplyExtensions) XXX_Size() int {
507586 return xxx_messageInfo_ReplyExtensions.Size(m)
550629 func (m *OtherReplyExtensions) String() string { return proto.CompactTextString(m) }
551630 func (*OtherReplyExtensions) ProtoMessage() {}
552631 func (*OtherReplyExtensions) Descriptor() ([]byte, []int) {
553 return fileDescriptor_test_2309d445eee26af7, []int{4}
554 }
632 return fileDescriptor_2c9b60a40d5131b9, []int{4}
633 }
634
555635 func (m *OtherReplyExtensions) XXX_Unmarshal(b []byte) error {
556636 return xxx_messageInfo_OtherReplyExtensions.Unmarshal(m, b)
557637 }
558638 func (m *OtherReplyExtensions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
559639 return xxx_messageInfo_OtherReplyExtensions.Marshal(b, m, deterministic)
560640 }
561 func (dst *OtherReplyExtensions) XXX_Merge(src proto.Message) {
562 xxx_messageInfo_OtherReplyExtensions.Merge(dst, src)
641 func (m *OtherReplyExtensions) XXX_Merge(src proto.Message) {
642 xxx_messageInfo_OtherReplyExtensions.Merge(m, src)
563643 }
564644 func (m *OtherReplyExtensions) XXX_Size() int {
565645 return xxx_messageInfo_OtherReplyExtensions.Size(m)
588668 func (m *OldReply) String() string { return proto.CompactTextString(m) }
589669 func (*OldReply) ProtoMessage() {}
590670 func (*OldReply) Descriptor() ([]byte, []int) {
591 return fileDescriptor_test_2309d445eee26af7, []int{5}
592 }
593
594 func (m *OldReply) MarshalJSON() ([]byte, error) {
595 return proto.MarshalMessageSetJSON(&m.XXX_InternalExtensions)
596 }
597 func (m *OldReply) UnmarshalJSON(buf []byte) error {
598 return proto.UnmarshalMessageSetJSON(buf, &m.XXX_InternalExtensions)
671 return fileDescriptor_2c9b60a40d5131b9, []int{5}
599672 }
600673
601674 var extRange_OldReply = []proto.ExtensionRange{
605678 func (*OldReply) ExtensionRangeArray() []proto.ExtensionRange {
606679 return extRange_OldReply
607680 }
681
608682 func (m *OldReply) XXX_Unmarshal(b []byte) error {
609683 return xxx_messageInfo_OldReply.Unmarshal(m, b)
610684 }
611685 func (m *OldReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
612686 return xxx_messageInfo_OldReply.Marshal(b, m, deterministic)
613687 }
614 func (dst *OldReply) XXX_Merge(src proto.Message) {
615 xxx_messageInfo_OldReply.Merge(dst, src)
688 func (m *OldReply) XXX_Merge(src proto.Message) {
689 xxx_messageInfo_OldReply.Merge(m, src)
616690 }
617691 func (m *OldReply) XXX_Size() int {
618692 return xxx_messageInfo_OldReply.Size(m)
648722 func (m *Communique) String() string { return proto.CompactTextString(m) }
649723 func (*Communique) ProtoMessage() {}
650724 func (*Communique) Descriptor() ([]byte, []int) {
651 return fileDescriptor_test_2309d445eee26af7, []int{6}
652 }
725 return fileDescriptor_2c9b60a40d5131b9, []int{6}
726 }
727
653728 func (m *Communique) XXX_Unmarshal(b []byte) error {
654729 return xxx_messageInfo_Communique.Unmarshal(m, b)
655730 }
656731 func (m *Communique) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
657732 return xxx_messageInfo_Communique.Marshal(b, m, deterministic)
658733 }
659 func (dst *Communique) XXX_Merge(src proto.Message) {
660 xxx_messageInfo_Communique.Merge(dst, src)
734 func (m *Communique) XXX_Merge(src proto.Message) {
735 xxx_messageInfo_Communique.Merge(m, src)
661736 }
662737 func (m *Communique) XXX_Size() int {
663738 return xxx_messageInfo_Communique.Size(m)
816891 return nil
817892 }
818893
819 // XXX_OneofFuncs is for the internal use of the proto package.
820 func (*Communique) 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{}) {
821 return _Communique_OneofMarshaler, _Communique_OneofUnmarshaler, _Communique_OneofSizer, []interface{}{
894 // XXX_OneofWrappers is for the internal use of the proto package.
895 func (*Communique) XXX_OneofWrappers() []interface{} {
896 return []interface{}{
822897 (*Communique_Number)(nil),
823898 (*Communique_Name)(nil),
824899 (*Communique_Data)(nil),
832907 }
833908 }
834909
835 func _Communique_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
836 m := msg.(*Communique)
837 // union
838 switch x := m.Union.(type) {
839 case *Communique_Number:
840 b.EncodeVarint(5<<3 | proto.WireVarint)
841 b.EncodeVarint(uint64(x.Number))
842 case *Communique_Name:
843 b.EncodeVarint(6<<3 | proto.WireBytes)
844 b.EncodeStringBytes(x.Name)
845 case *Communique_Data:
846 b.EncodeVarint(7<<3 | proto.WireBytes)
847 b.EncodeRawBytes(x.Data)
848 case *Communique_TempC:
849 b.EncodeVarint(8<<3 | proto.WireFixed64)
850 b.EncodeFixed64(math.Float64bits(x.TempC))
851 case *Communique_Height:
852 b.EncodeVarint(9<<3 | proto.WireFixed32)
853 b.EncodeFixed32(uint64(math.Float32bits(x.Height)))
854 case *Communique_Today:
855 b.EncodeVarint(10<<3 | proto.WireVarint)
856 b.EncodeVarint(uint64(x.Today))
857 case *Communique_Maybe:
858 t := uint64(0)
859 if x.Maybe {
860 t = 1
861 }
862 b.EncodeVarint(11<<3 | proto.WireVarint)
863 b.EncodeVarint(t)
864 case *Communique_Delta_:
865 b.EncodeVarint(12<<3 | proto.WireVarint)
866 b.EncodeZigzag32(uint64(x.Delta))
867 case *Communique_Msg:
868 b.EncodeVarint(16<<3 | proto.WireBytes)
869 if err := b.EncodeMessage(x.Msg); err != nil {
870 return err
871 }
872 case *Communique_Somegroup:
873 b.EncodeVarint(14<<3 | proto.WireStartGroup)
874 if err := b.Marshal(x.Somegroup); err != nil {
875 return err
876 }
877 b.EncodeVarint(14<<3 | proto.WireEndGroup)
878 case nil:
879 default:
880 return fmt.Errorf("Communique.Union has unexpected type %T", x)
881 }
882 return nil
883 }
884
885 func _Communique_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
886 m := msg.(*Communique)
887 switch tag {
888 case 5: // union.number
889 if wire != proto.WireVarint {
890 return true, proto.ErrInternalBadWireType
891 }
892 x, err := b.DecodeVarint()
893 m.Union = &Communique_Number{int32(x)}
894 return true, err
895 case 6: // union.name
896 if wire != proto.WireBytes {
897 return true, proto.ErrInternalBadWireType
898 }
899 x, err := b.DecodeStringBytes()
900 m.Union = &Communique_Name{x}
901 return true, err
902 case 7: // union.data
903 if wire != proto.WireBytes {
904 return true, proto.ErrInternalBadWireType
905 }
906 x, err := b.DecodeRawBytes(true)
907 m.Union = &Communique_Data{x}
908 return true, err
909 case 8: // union.temp_c
910 if wire != proto.WireFixed64 {
911 return true, proto.ErrInternalBadWireType
912 }
913 x, err := b.DecodeFixed64()
914 m.Union = &Communique_TempC{math.Float64frombits(x)}
915 return true, err
916 case 9: // union.height
917 if wire != proto.WireFixed32 {
918 return true, proto.ErrInternalBadWireType
919 }
920 x, err := b.DecodeFixed32()
921 m.Union = &Communique_Height{math.Float32frombits(uint32(x))}
922 return true, err
923 case 10: // union.today
924 if wire != proto.WireVarint {
925 return true, proto.ErrInternalBadWireType
926 }
927 x, err := b.DecodeVarint()
928 m.Union = &Communique_Today{Days(x)}
929 return true, err
930 case 11: // union.maybe
931 if wire != proto.WireVarint {
932 return true, proto.ErrInternalBadWireType
933 }
934 x, err := b.DecodeVarint()
935 m.Union = &Communique_Maybe{x != 0}
936 return true, err
937 case 12: // union.delta
938 if wire != proto.WireVarint {
939 return true, proto.ErrInternalBadWireType
940 }
941 x, err := b.DecodeZigzag32()
942 m.Union = &Communique_Delta_{int32(x)}
943 return true, err
944 case 16: // union.msg
945 if wire != proto.WireBytes {
946 return true, proto.ErrInternalBadWireType
947 }
948 msg := new(Reply)
949 err := b.DecodeMessage(msg)
950 m.Union = &Communique_Msg{msg}
951 return true, err
952 case 14: // union.somegroup
953 if wire != proto.WireStartGroup {
954 return true, proto.ErrInternalBadWireType
955 }
956 msg := new(Communique_SomeGroup)
957 err := b.DecodeGroup(msg)
958 m.Union = &Communique_Somegroup{msg}
959 return true, err
960 default:
961 return false, nil
962 }
963 }
964
965 func _Communique_OneofSizer(msg proto.Message) (n int) {
966 m := msg.(*Communique)
967 // union
968 switch x := m.Union.(type) {
969 case *Communique_Number:
970 n += 1 // tag and wire
971 n += proto.SizeVarint(uint64(x.Number))
972 case *Communique_Name:
973 n += 1 // tag and wire
974 n += proto.SizeVarint(uint64(len(x.Name)))
975 n += len(x.Name)
976 case *Communique_Data:
977 n += 1 // tag and wire
978 n += proto.SizeVarint(uint64(len(x.Data)))
979 n += len(x.Data)
980 case *Communique_TempC:
981 n += 1 // tag and wire
982 n += 8
983 case *Communique_Height:
984 n += 1 // tag and wire
985 n += 4
986 case *Communique_Today:
987 n += 1 // tag and wire
988 n += proto.SizeVarint(uint64(x.Today))
989 case *Communique_Maybe:
990 n += 1 // tag and wire
991 n += 1
992 case *Communique_Delta_:
993 n += 1 // tag and wire
994 n += proto.SizeVarint(uint64((uint32(x.Delta) << 1) ^ uint32((int32(x.Delta) >> 31))))
995 case *Communique_Msg:
996 s := proto.Size(x.Msg)
997 n += 2 // tag and wire
998 n += proto.SizeVarint(uint64(s))
999 n += s
1000 case *Communique_Somegroup:
1001 n += 1 // tag and wire
1002 n += proto.Size(x.Somegroup)
1003 n += 1 // tag and wire
1004 case nil:
1005 default:
1006 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
1007 }
1008 return n
1009 }
1010
1011910 type Communique_SomeGroup struct {
1012911 Member *string `protobuf:"bytes,15,opt,name=member" json:"member,omitempty"`
1013912 XXX_NoUnkeyedLiteral struct{} `json:"-"`
1019918 func (m *Communique_SomeGroup) String() string { return proto.CompactTextString(m) }
1020919 func (*Communique_SomeGroup) ProtoMessage() {}
1021920 func (*Communique_SomeGroup) Descriptor() ([]byte, []int) {
1022 return fileDescriptor_test_2309d445eee26af7, []int{6, 0}
1023 }
921 return fileDescriptor_2c9b60a40d5131b9, []int{6, 0}
922 }
923
1024924 func (m *Communique_SomeGroup) XXX_Unmarshal(b []byte) error {
1025925 return xxx_messageInfo_Communique_SomeGroup.Unmarshal(m, b)
1026926 }
1027927 func (m *Communique_SomeGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
1028928 return xxx_messageInfo_Communique_SomeGroup.Marshal(b, m, deterministic)
1029929 }
1030 func (dst *Communique_SomeGroup) XXX_Merge(src proto.Message) {
1031 xxx_messageInfo_Communique_SomeGroup.Merge(dst, src)
930 func (m *Communique_SomeGroup) XXX_Merge(src proto.Message) {
931 xxx_messageInfo_Communique_SomeGroup.Merge(m, src)
1032932 }
1033933 func (m *Communique_SomeGroup) XXX_Size() int {
1034934 return xxx_messageInfo_Communique_SomeGroup.Size(m)
1056956 func (m *Communique_Delta) String() string { return proto.CompactTextString(m) }
1057957 func (*Communique_Delta) ProtoMessage() {}
1058958 func (*Communique_Delta) Descriptor() ([]byte, []int) {
1059 return fileDescriptor_test_2309d445eee26af7, []int{6, 1}
1060 }
959 return fileDescriptor_2c9b60a40d5131b9, []int{6, 1}
960 }
961
1061962 func (m *Communique_Delta) XXX_Unmarshal(b []byte) error {
1062963 return xxx_messageInfo_Communique_Delta.Unmarshal(m, b)
1063964 }
1064965 func (m *Communique_Delta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
1065966 return xxx_messageInfo_Communique_Delta.Marshal(b, m, deterministic)
1066967 }
1067 func (dst *Communique_Delta) XXX_Merge(src proto.Message) {
1068 xxx_messageInfo_Communique_Delta.Merge(dst, src)
968 func (m *Communique_Delta) XXX_Merge(src proto.Message) {
969 xxx_messageInfo_Communique_Delta.Merge(m, src)
1069970 }
1070971 func (m *Communique_Delta) XXX_Size() int {
1071972 return xxx_messageInfo_Communique_Delta.Size(m)
1095996 }
1096997
1097998 func init() {
999 proto.RegisterEnum("my.test.HatType", HatType_name, HatType_value)
1000 proto.RegisterEnum("my.test.Days", Days_name, Days_value)
1001 proto.RegisterEnum("my.test.Request_Color", Request_Color_name, Request_Color_value)
1002 proto.RegisterEnum("my.test.Reply_Entry_Game", Reply_Entry_Game_name, Reply_Entry_Game_value)
10981003 proto.RegisterType((*Request)(nil), "my.test.Request")
10991004 proto.RegisterMapType((map[int64]*Reply)(nil), "my.test.Request.MsgMappingEntry")
11001005 proto.RegisterMapType((map[int32]string)(nil), "my.test.Request.NameMappingEntry")
11021007 proto.RegisterType((*Reply)(nil), "my.test.Reply")
11031008 proto.RegisterType((*Reply_Entry)(nil), "my.test.Reply.Entry")
11041009 proto.RegisterType((*OtherBase)(nil), "my.test.OtherBase")
1010 proto.RegisterExtension(E_ReplyExtensions_Time)
1011 proto.RegisterExtension(E_ReplyExtensions_Carrot)
1012 proto.RegisterExtension(E_ReplyExtensions_Donut)
11051013 proto.RegisterType((*ReplyExtensions)(nil), "my.test.ReplyExtensions")
11061014 proto.RegisterType((*OtherReplyExtensions)(nil), "my.test.OtherReplyExtensions")
11071015 proto.RegisterType((*OldReply)(nil), "my.test.OldReply")
11081016 proto.RegisterType((*Communique)(nil), "my.test.Communique")
11091017 proto.RegisterType((*Communique_SomeGroup)(nil), "my.test.Communique.SomeGroup")
11101018 proto.RegisterType((*Communique_Delta)(nil), "my.test.Communique.Delta")
1111 proto.RegisterEnum("my.test.HatType", HatType_name, HatType_value)
1112 proto.RegisterEnum("my.test.Days", Days_name, Days_value)
1113 proto.RegisterEnum("my.test.Request_Color", Request_Color_name, Request_Color_value)
1114 proto.RegisterEnum("my.test.Reply_Entry_Game", Reply_Entry_Game_name, Reply_Entry_Game_value)
1115 proto.RegisterExtension(E_ReplyExtensions_Time)
1116 proto.RegisterExtension(E_ReplyExtensions_Carrot)
1117 proto.RegisterExtension(E_ReplyExtensions_Donut)
11181019 proto.RegisterExtension(E_Tag)
11191020 proto.RegisterExtension(E_Donut)
11201021 }
11211022
1122 func init() { proto.RegisterFile("my_test/test.proto", fileDescriptor_test_2309d445eee26af7) }
1123
1124 var fileDescriptor_test_2309d445eee26af7 = []byte{
1125 // 1033 bytes of a gzipped FileDescriptorProto
1126 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 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a8, 0x78, 0x8c,
1138 0x7a, 0xf3, 0x20, 0x64, 0x56, 0xd9, 0x46, 0x8e, 0xd6, 0xd1, 0x83, 0xf0, 0x8e, 0xac, 0x9c, 0xf8,
1139 0x0d, 0x54, 0x93, 0x88, 0x33, 0x3f, 0x8e, 0xd2, 0x85, 0x55, 0xb1, 0x91, 0x03, 0xed, 0xc6, 0xd6,
1140 0xc7, 0xaf, 0x22, 0xce, 0xce, 0x25, 0x82, 0xac, 0xc1, 0xb8, 0x0f, 0xf5, 0x90, 0x72, 0xe6, 0x72,
1141 0xba, 0x58, 0x04, 0xa1, 0x6f, 0xed, 0xd8, 0xba, 0x53, 0x6b, 0x7f, 0xb9, 0x95, 0x3c, 0xa6, 0x9c,
1142 0x8d, 0x72, 0xcc, 0x20, 0x14, 0x71, 0x46, 0x6a, 0xe1, 0xda, 0x83, 0x4f, 0xa1, 0xc6, 0x13, 0x7f,
1143 0x45, 0xb2, 0xab, 0x48, 0xec, 0x2d, 0x92, 0x51, 0xe2, 0x3f, 0xe1, 0x00, 0xbe, 0x72, 0xe0, 0x3d,
1144 0x30, 0x62, 0x96, 0x30, 0x61, 0xd5, 0x6d, 0xe4, 0x18, 0x24, 0x37, 0xf0, 0x01, 0x94, 0x7d, 0x26,
1145 0x5c, 0xd9, 0x65, 0xd3, 0x46, 0x4e, 0x95, 0x94, 0x7c, 0x26, 0xde, 0xb3, 0xac, 0xf1, 0x1d, 0x54,
1146 0x57, 0xf5, 0xe0, 0x43, 0xa8, 0xa9, 0x6a, 0xdc, 0xbb, 0x80, 0xcd, 0x3d, 0xab, 0xaa, 0x18, 0x40,
1147 0xb9, 0xce, 0xa4, 0xa7, 0xf1, 0x16, 0xcc, 0xe7, 0x05, 0xac, 0x87, 0x27, 0xc1, 0x6a, 0x78, 0x7b,
1148 0x60, 0xfc, 0x46, 0xe7, 0x29, 0xb3, 0x34, 0xf5, 0xa9, 0xdc, 0xe8, 0x68, 0x6f, 0x50, 0x63, 0x04,
1149 0xbb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9, 0xe6, 0xb9, 0xe0, 0x9b, 0x48, 0x8a, 0xc2, 0xd9, 0xe0,
1183 0x83, 0xa9, 0x1d, 0xb7, 0xa0, 0x28, 0x4b, 0x97, 0xc1, 0xd1, 0x64, 0xdc, 0x3f, 0xfd, 0xc5, 0x44,
1184 0xb8, 0x06, 0xe5, 0xeb, 0x9b, 0xc1, 0x95, 0x34, 0x34, 0xa9, 0x1a, 0x97, 0x37, 0xe3, 0xfe, 0x85,
1185 0x89, 0x1a, 0x9a, 0x89, 0x3a, 0x36, 0xe8, 0x82, 0xfa, 0x5b, 0xfb, 0xea, 0xab, 0x63, 0xc8, 0x50,
1186 0xa7, 0xf7, 0xdf, 0x4a, 0x3e, 0xc7, 0xfc, 0xaa, 0xba, 0xf3, 0xe2, 0xe9, 0xa2, 0xfe, 0xff, 0x4e,
1187 0x76, 0xdf, 0x7d, 0x78, 0xeb, 0x07, 0x62, 0x96, 0xde, 0xb6, 0xa6, 0x11, 0x3f, 0xf1, 0xa3, 0x39,
1188 0x0d, 0xfd, 0x13, 0x75, 0x39, 0xde, 0xa6, 0x77, 0xf9, 0xcb, 0xf4, 0x95, 0xcf, 0xc2, 0x57, 0x7e,
1189 0xa4, 0x6e, 0x55, 0xb9, 0x0f, 0x27, 0xcb, 0x6b, 0xf6, 0x27, 0xf9, 0xf8, 0x37, 0x00, 0x00, 0xff,
1190 0xff, 0x12, 0xd5, 0x46, 0x00, 0x75, 0x07, 0x00, 0x00,
1191 }
1023 func init() { proto.RegisterFile("my_test/test.proto", fileDescriptor_2c9b60a40d5131b9) }
1024
1025 var fileDescriptor_2c9b60a40d5131b9 = []byte{
1026 // 1148 bytes of a gzipped FileDescriptorProto
1027 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x56, 0xcf, 0x6e, 0xdb, 0x46,
1028 0x13, 0x37, 0x49, 0x51, 0x7f, 0x46, 0xfe, 0x6c, 0x7e, 0x0b, 0xd7, 0x66, 0x55, 0x24, 0x61, 0x95,
1029 0xb8, 0x50, 0xdc, 0x46, 0x8e, 0xd5, 0x02, 0x4d, 0x55, 0x34, 0x88, 0x65, 0xc9, 0x71, 0x10, 0x5b,
1030 0x2e, 0x36, 0xce, 0xa1, 0xb9, 0x10, 0x6b, 0x69, 0x45, 0xb1, 0xd6, 0x92, 0x8c, 0xb8, 0x2c, 0xcc,
1031 0x9b, 0x9f, 0xa2, 0x7d, 0x8d, 0xde, 0xfb, 0x0c, 0x7d, 0x26, 0x17, 0x3b, 0xab, 0x48, 0xb2, 0x55,
1032 0x94, 0x07, 0x82, 0x33, 0xf3, 0x9b, 0xdf, 0xec, 0xce, 0xcc, 0xce, 0x12, 0x88, 0xc8, 0x7d, 0xc9,
1033 0x53, 0xb9, 0xaf, 0x5e, 0xcd, 0x64, 0x1a, 0xcb, 0x98, 0x94, 0x44, 0xde, 0x54, 0x62, 0x8d, 0x88,
1034 0x6c, 0x22, 0xc3, 0x7d, 0x7c, 0x1f, 0x68, 0x63, 0xfd, 0xef, 0x22, 0x94, 0x28, 0xff, 0x98, 0xf1,
1035 0x54, 0x12, 0x07, 0xac, 0x2b, 0x9e, 0xbb, 0x86, 0x67, 0x35, 0x2c, 0xaa, 0x3e, 0x49, 0x03, 0xac,
1036 0x71, 0xc6, 0x5d, 0xcb, 0x33, 0x1a, 0x1b, 0xad, 0xed, 0xe6, 0x8c, 0xa8, 0x39, 0x73, 0x68, 0x1e,
1037 0xc5, 0x93, 0x78, 0x4a, 0x15, 0x84, 0xec, 0x81, 0x35, 0x66, 0xd2, 0x2d, 0x20, 0xd2, 0x99, 0x23,
1038 0x4f, 0x98, 0xbc, 0xc8, 0x13, 0xde, 0x2e, 0x1e, 0xf7, 0xba, 0xe7, 0xf4, 0x90, 0x2a, 0x10, 0x79,
1039 0x04, 0xe5, 0x21, 0x67, 0xc3, 0x49, 0x18, 0x71, 0xb7, 0xe4, 0x19, 0x0d, 0xb3, 0x6d, 0x85, 0xd1,
1040 0x88, 0xce, 0x95, 0xe4, 0x05, 0x54, 0xd2, 0x58, 0xf0, 0x60, 0x1a, 0x67, 0x89, 0x5b, 0xf6, 0x8c,
1041 0x06, 0xb4, 0x6a, 0x2b, 0xc1, 0xdf, 0xc5, 0x82, 0xbf, 0x56, 0x08, 0xba, 0x00, 0x93, 0x2e, 0xac,
1042 0x47, 0x4c, 0x70, 0x5f, 0xb0, 0x24, 0x09, 0xa3, 0xc0, 0xdd, 0xf0, 0xac, 0x46, 0xb5, 0xf5, 0xe5,
1043 0x8a, 0x73, 0x9f, 0x09, 0x7e, 0xa6, 0x31, 0xbd, 0x48, 0x4e, 0x73, 0x5a, 0x8d, 0x16, 0x1a, 0x72,
1044 0x08, 0x55, 0x91, 0x06, 0x73, 0x92, 0x4d, 0x24, 0xf1, 0x56, 0x48, 0xce, 0xd2, 0xe0, 0x0e, 0x07,
1045 0x88, 0xb9, 0x82, 0x6c, 0x81, 0x3d, 0xe5, 0x29, 0x97, 0xee, 0xba, 0x67, 0x34, 0x6c, 0xaa, 0x05,
1046 0xb2, 0x03, 0xa5, 0x80, 0x4b, 0x5f, 0x65, 0xd9, 0xf1, 0x8c, 0x46, 0x85, 0x16, 0x03, 0x2e, 0xdf,
1047 0xf2, 0x9c, 0x3c, 0x06, 0x18, 0x4d, 0x62, 0x26, 0xfd, 0x28, 0x8c, 0x46, 0xee, 0x16, 0x26, 0xa5,
1048 0xf0, 0x4c, 0x65, 0xa5, 0x82, 0xfa, 0x7e, 0x18, 0x8d, 0x48, 0xfd, 0x13, 0x28, 0x51, 0xa0, 0xcf,
1049 0x16, 0x99, 0xd3, 0x98, 0x9f, 0x35, 0x46, 0x0b, 0x3e, 0xbf, 0x4e, 0xdc, 0x6d, 0x84, 0xd8, 0x07,
1050 0xfc, 0xeb, 0xe7, 0x3f, 0xd0, 0x32, 0xea, 0x7b, 0xd7, 0x09, 0xd9, 0x85, 0xea, 0x30, 0xce, 0x2e,
1051 0x27, 0x5c, 0x47, 0xdb, 0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, 0x72, 0x9c, 0x5d, 0x36, 0x07, 0xb1, 0xd8, 0x0f,
1096 0xe2, 0x09, 0x8b, 0x82, 0x7d, 0xfc, 0x03, 0xb8, 0xcc, 0x46, 0xfa, 0x63, 0xf0, 0x2c, 0xe0, 0xd1,
1097 0xb3, 0x20, 0xc6, 0x5f, 0x07, 0xd5, 0x0f, 0xfb, 0xb3, 0x7f, 0x89, 0x1f, 0xd5, 0xeb, 0x9f, 0x00,
1098 0x00, 0x00, 0xff, 0xff, 0x31, 0xff, 0x4e, 0x30, 0x5a, 0x08, 0x00, 0x00,
1099 }
8484 optional int32 reset = 12;
8585 // This field should not conflict with any getters.
8686 optional string get_key = 16;
87
88 optional float float_ninf = 20 [default=-inf];
89 optional float float_pinf = 21 [default=inf];
90 optional float float_exp = 22 [default=1e9];
91 optional double double_ninf = 23 [default=-inf];
92 optional double double_pinf = 24 [default=inf];
93 optional double double_exp = 25 [default=1e9];
8794 }
8895
8996 message Reply {
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: proto3/proto3.proto
22
3 package proto3 // import "github.com/golang/protobuf/protoc-gen-go/testdata/proto3"
4
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
3 package proto3
4
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 math "math"
9 )
810
911 // Reference imports to suppress errors if they are not otherwise used.
1012 var _ = proto.Marshal
1517 // is compatible with the proto package it is being compiled against.
1618 // A compilation error at this line likely means your copy of the
1719 // proto package needs to be updated.
18 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
20 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
1921
2022 type Request_Flavour int32
2123
3234 2: "UMAMI",
3335 3: "GOPHERLICIOUS",
3436 }
37
3538 var Request_Flavour_value = map[string]int32{
3639 "SWEET": 0,
3740 "SOUR": 1,
4245 func (x Request_Flavour) String() string {
4346 return proto.EnumName(Request_Flavour_name, int32(x))
4447 }
48
4549 func (Request_Flavour) EnumDescriptor() ([]byte, []int) {
46 return fileDescriptor_proto3_a752e09251f17e01, []int{0, 0}
50 return fileDescriptor_ab04eb4084a521db, []int{0, 0}
4751 }
4852
4953 type Request struct {
6165 func (m *Request) String() string { return proto.CompactTextString(m) }
6266 func (*Request) ProtoMessage() {}
6367 func (*Request) Descriptor() ([]byte, []int) {
64 return fileDescriptor_proto3_a752e09251f17e01, []int{0}
65 }
68 return fileDescriptor_ab04eb4084a521db, []int{0}
69 }
70
6671 func (m *Request) XXX_Unmarshal(b []byte) error {
6772 return xxx_messageInfo_Request.Unmarshal(m, b)
6873 }
6974 func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
7075 return xxx_messageInfo_Request.Marshal(b, m, deterministic)
7176 }
72 func (dst *Request) XXX_Merge(src proto.Message) {
73 xxx_messageInfo_Request.Merge(dst, src)
77 func (m *Request) XXX_Merge(src proto.Message) {
78 xxx_messageInfo_Request.Merge(m, src)
7479 }
7580 func (m *Request) XXX_Size() int {
7681 return xxx_messageInfo_Request.Size(m)
128133 func (m *Book) String() string { return proto.CompactTextString(m) }
129134 func (*Book) ProtoMessage() {}
130135 func (*Book) Descriptor() ([]byte, []int) {
131 return fileDescriptor_proto3_a752e09251f17e01, []int{1}
132 }
136 return fileDescriptor_ab04eb4084a521db, []int{1}
137 }
138
133139 func (m *Book) XXX_Unmarshal(b []byte) error {
134140 return xxx_messageInfo_Book.Unmarshal(m, b)
135141 }
136142 func (m *Book) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
137143 return xxx_messageInfo_Book.Marshal(b, m, deterministic)
138144 }
139 func (dst *Book) XXX_Merge(src proto.Message) {
140 xxx_messageInfo_Book.Merge(dst, src)
145 func (m *Book) XXX_Merge(src proto.Message) {
146 xxx_messageInfo_Book.Merge(m, src)
141147 }
142148 func (m *Book) XXX_Size() int {
143149 return xxx_messageInfo_Book.Size(m)
163169 }
164170
165171 func init() {
172 proto.RegisterEnum("proto3.Request_Flavour", Request_Flavour_name, Request_Flavour_value)
166173 proto.RegisterType((*Request)(nil), "proto3.Request")
167174 proto.RegisterType((*Book)(nil), "proto3.Book")
168 proto.RegisterEnum("proto3.Request_Flavour", Request_Flavour_name, Request_Flavour_value)
169 }
170
171 func init() { proto.RegisterFile("proto3/proto3.proto", fileDescriptor_proto3_a752e09251f17e01) }
172
173 var fileDescriptor_proto3_a752e09251f17e01 = []byte{
175 }
176
177 func init() { proto.RegisterFile("proto3/proto3.proto", fileDescriptor_ab04eb4084a521db) }
178
179 var fileDescriptor_ab04eb4084a521db = []byte{
174180 // 306 bytes of a gzipped FileDescriptorProto
175181 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x3c, 0x90, 0xcf, 0x4e, 0xf2, 0x40,
176182 0x14, 0xc5, 0x99, 0xfe, 0xf9, 0x80, 0xfb, 0xa1, 0x19, 0xaf, 0x26, 0x8e, 0x1b, 0x33, 0x61, 0xd5,
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: google/protobuf/any.proto
22
3 package any // import "github.com/golang/protobuf/ptypes/any"
4
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
3 package any
4
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 math "math"
9 )
810
911 // Reference imports to suppress errors if they are not otherwise used.
1012 var _ = proto.Marshal
1517 // is compatible with the proto package it is being compiled against.
1618 // A compilation error at this line likely means your copy of the
1719 // proto package needs to be updated.
18 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
20 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
1921
2022 // `Any` contains an arbitrary serialized protocol buffer message along with a
2123 // URL that describes the type of the serialized message.
98100 // }
99101 //
100102 type Any struct {
101 // A URL/resource name whose content describes the type of the
102 // serialized protocol buffer message.
103 //
104 // For URLs which use the scheme `http`, `https`, or no scheme, the
105 // following restrictions and interpretations apply:
103 // A URL/resource name that uniquely identifies the type of the serialized
104 // protocol buffer message. The last segment of the URL's path must represent
105 // the fully qualified name of the type (as in
106 // `path/google.protobuf.Duration`). The name should be in a canonical form
107 // (e.g., leading "." is not accepted).
108 //
109 // In practice, teams usually precompile into the binary all types that they
110 // expect it to use in the context of Any. However, for URLs which use the
111 // scheme `http`, `https`, or no scheme, one can optionally set up a type
112 // server that maps type URLs to message definitions as follows:
106113 //
107114 // * If no scheme is provided, `https` is assumed.
108 // * The last segment of the URL's path must represent the fully
109 // qualified name of the type (as in `path/google.protobuf.Duration`).
110 // The name should be in a canonical form (e.g., leading "." is
111 // not accepted).
112115 // * An HTTP GET on the URL must yield a [google.protobuf.Type][]
113116 // value in binary format, or produce an error.
114117 // * Applications are allowed to cache lookup results based on the
117120 // on changes to types. (Use versioned type names to manage
118121 // breaking changes.)
119122 //
123 // Note: this functionality is not currently available in the official
124 // protobuf release, and it is not used for type URLs beginning with
125 // type.googleapis.com.
126 //
120127 // Schemes other than `http`, `https` (or the empty scheme) might be
121128 // used with implementation specific semantics.
122129 //
132139 func (m *Any) String() string { return proto.CompactTextString(m) }
133140 func (*Any) ProtoMessage() {}
134141 func (*Any) Descriptor() ([]byte, []int) {
135 return fileDescriptor_any_744b9ca530f228db, []int{0}
136 }
142 return fileDescriptor_b53526c13ae22eb4, []int{0}
143 }
144
137145 func (*Any) XXX_WellKnownType() string { return "Any" }
146
138147 func (m *Any) XXX_Unmarshal(b []byte) error {
139148 return xxx_messageInfo_Any.Unmarshal(m, b)
140149 }
141150 func (m *Any) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
142151 return xxx_messageInfo_Any.Marshal(b, m, deterministic)
143152 }
144 func (dst *Any) XXX_Merge(src proto.Message) {
145 xxx_messageInfo_Any.Merge(dst, src)
153 func (m *Any) XXX_Merge(src proto.Message) {
154 xxx_messageInfo_Any.Merge(m, src)
146155 }
147156 func (m *Any) XXX_Size() int {
148157 return xxx_messageInfo_Any.Size(m)
171180 proto.RegisterType((*Any)(nil), "google.protobuf.Any")
172181 }
173182
174 func init() { proto.RegisterFile("google/protobuf/any.proto", fileDescriptor_any_744b9ca530f228db) }
175
176 var fileDescriptor_any_744b9ca530f228db = []byte{
183 func init() { proto.RegisterFile("google/protobuf/any.proto", fileDescriptor_b53526c13ae22eb4) }
184
185 var fileDescriptor_b53526c13ae22eb4 = []byte{
177186 // 185 bytes of a gzipped FileDescriptorProto
178187 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4c, 0xcf, 0xcf, 0x4f,
179188 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcc, 0xab, 0xd4,
119119 // }
120120 //
121121 message Any {
122 // A URL/resource name whose content describes the type of the
123 // serialized protocol buffer message.
122 // A URL/resource name that uniquely identifies the type of the serialized
123 // protocol buffer message. The last segment of the URL's path must represent
124 // the fully qualified name of the type (as in
125 // `path/google.protobuf.Duration`). The name should be in a canonical form
126 // (e.g., leading "." is not accepted).
124127 //
125 // For URLs which use the scheme `http`, `https`, or no scheme, the
126 // following restrictions and interpretations apply:
128 // In practice, teams usually precompile into the binary all types that they
129 // expect it to use in the context of Any. However, for URLs which use the
130 // scheme `http`, `https`, or no scheme, one can optionally set up a type
131 // server that maps type URLs to message definitions as follows:
127132 //
128133 // * If no scheme is provided, `https` is assumed.
129 // * The last segment of the URL's path must represent the fully
130 // qualified name of the type (as in `path/google.protobuf.Duration`).
131 // The name should be in a canonical form (e.g., leading "." is
132 // not accepted).
133134 // * An HTTP GET on the URL must yield a [google.protobuf.Type][]
134135 // value in binary format, or produce an error.
135136 // * Applications are allowed to cache lookup results based on the
137138 // lookup. Therefore, binary compatibility needs to be preserved
138139 // on changes to types. (Use versioned type names to manage
139140 // breaking changes.)
141 //
142 // Note: this functionality is not currently available in the official
143 // protobuf release, and it is not used for type URLs beginning with
144 // type.googleapis.com.
140145 //
141146 // Schemes other than `http`, `https` (or the empty scheme) might be
142147 // used with implementation specific semantics.
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: google/protobuf/duration.proto
22
3 package duration // import "github.com/golang/protobuf/ptypes/duration"
3 package duration
44
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 math "math"
9 )
810
911 // Reference imports to suppress errors if they are not otherwise used.
1012 var _ = proto.Marshal
1517 // is compatible with the proto package it is being compiled against.
1618 // A compilation error at this line likely means your copy of the
1719 // proto package needs to be updated.
18 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
20 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
1921
2022 // A Duration represents a signed, fixed-length span of time represented
2123 // as a count of seconds and fractions of seconds at nanosecond
98100 func (m *Duration) String() string { return proto.CompactTextString(m) }
99101 func (*Duration) ProtoMessage() {}
100102 func (*Duration) Descriptor() ([]byte, []int) {
101 return fileDescriptor_duration_e7d612259e3f0613, []int{0}
103 return fileDescriptor_23597b2ebd7ac6c5, []int{0}
102104 }
105
103106 func (*Duration) XXX_WellKnownType() string { return "Duration" }
107
104108 func (m *Duration) XXX_Unmarshal(b []byte) error {
105109 return xxx_messageInfo_Duration.Unmarshal(m, b)
106110 }
107111 func (m *Duration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
108112 return xxx_messageInfo_Duration.Marshal(b, m, deterministic)
109113 }
110 func (dst *Duration) XXX_Merge(src proto.Message) {
111 xxx_messageInfo_Duration.Merge(dst, src)
114 func (m *Duration) XXX_Merge(src proto.Message) {
115 xxx_messageInfo_Duration.Merge(m, src)
112116 }
113117 func (m *Duration) XXX_Size() int {
114118 return xxx_messageInfo_Duration.Size(m)
137141 proto.RegisterType((*Duration)(nil), "google.protobuf.Duration")
138142 }
139143
140 func init() {
141 proto.RegisterFile("google/protobuf/duration.proto", fileDescriptor_duration_e7d612259e3f0613)
142 }
144 func init() { proto.RegisterFile("google/protobuf/duration.proto", fileDescriptor_23597b2ebd7ac6c5) }
143145
144 var fileDescriptor_duration_e7d612259e3f0613 = []byte{
146 var fileDescriptor_23597b2ebd7ac6c5 = []byte{
145147 // 190 bytes of a gzipped FileDescriptorProto
146148 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xcf, 0xcf, 0x4f,
147149 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0x29, 0x2d, 0x4a,
8181 return 0, fmt.Errorf("duration: %v is out of range for time.Duration", p)
8282 }
8383 if p.Nanos != 0 {
84 d += time.Duration(p.Nanos)
84 d += time.Duration(p.Nanos) * time.Nanosecond
8585 if (d < 0) != (p.Nanos < 0) {
8686 return 0, fmt.Errorf("duration: %v is out of range for time.Duration", p)
8787 }
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: google/protobuf/empty.proto
22
3 package empty // import "github.com/golang/protobuf/ptypes/empty"
3 package empty
44
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 math "math"
9 )
810
911 // Reference imports to suppress errors if they are not otherwise used.
1012 var _ = proto.Marshal
1517 // is compatible with the proto package it is being compiled against.
1618 // A compilation error at this line likely means your copy of the
1719 // proto package needs to be updated.
18 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
20 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
1921
2022 // A generic empty message that you can re-use to avoid defining duplicated
2123 // empty messages in your APIs. A typical example is to use it as the request
3638 func (m *Empty) String() string { return proto.CompactTextString(m) }
3739 func (*Empty) ProtoMessage() {}
3840 func (*Empty) Descriptor() ([]byte, []int) {
39 return fileDescriptor_empty_39e6d6db0632e5b2, []int{0}
41 return fileDescriptor_900544acb223d5b8, []int{0}
4042 }
43
4144 func (*Empty) XXX_WellKnownType() string { return "Empty" }
45
4246 func (m *Empty) XXX_Unmarshal(b []byte) error {
4347 return xxx_messageInfo_Empty.Unmarshal(m, b)
4448 }
4549 func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
4650 return xxx_messageInfo_Empty.Marshal(b, m, deterministic)
4751 }
48 func (dst *Empty) XXX_Merge(src proto.Message) {
49 xxx_messageInfo_Empty.Merge(dst, src)
52 func (m *Empty) XXX_Merge(src proto.Message) {
53 xxx_messageInfo_Empty.Merge(m, src)
5054 }
5155 func (m *Empty) XXX_Size() int {
5256 return xxx_messageInfo_Empty.Size(m)
6165 proto.RegisterType((*Empty)(nil), "google.protobuf.Empty")
6266 }
6367
64 func init() { proto.RegisterFile("google/protobuf/empty.proto", fileDescriptor_empty_39e6d6db0632e5b2) }
68 func init() { proto.RegisterFile("google/protobuf/empty.proto", fileDescriptor_900544acb223d5b8) }
6569
66 var fileDescriptor_empty_39e6d6db0632e5b2 = []byte{
70 var fileDescriptor_900544acb223d5b8 = []byte{
6771 // 148 bytes of a gzipped FileDescriptorProto
6872 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0xcf, 0xcf, 0x4f,
6973 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcd, 0x2d, 0x28,
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: google/protobuf/struct.proto
22
3 package structpb // import "github.com/golang/protobuf/ptypes/struct"
4
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
3 package structpb
4
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 math "math"
9 )
810
911 // Reference imports to suppress errors if they are not otherwise used.
1012 var _ = proto.Marshal
1517 // is compatible with the proto package it is being compiled against.
1618 // A compilation error at this line likely means your copy of the
1719 // proto package needs to be updated.
18 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
20 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
1921
2022 // `NullValue` is a singleton enumeration to represent the null value for the
2123 // `Value` type union.
3133 var NullValue_name = map[int32]string{
3234 0: "NULL_VALUE",
3335 }
36
3437 var NullValue_value = map[string]int32{
3538 "NULL_VALUE": 0,
3639 }
3841 func (x NullValue) String() string {
3942 return proto.EnumName(NullValue_name, int32(x))
4043 }
44
4145 func (NullValue) EnumDescriptor() ([]byte, []int) {
42 return fileDescriptor_struct_3a5a94e0c7801b27, []int{0}
43 }
46 return fileDescriptor_df322afd6c9fb402, []int{0}
47 }
48
4449 func (NullValue) XXX_WellKnownType() string { return "NullValue" }
4550
4651 // `Struct` represents a structured data value, consisting of fields
6368 func (m *Struct) String() string { return proto.CompactTextString(m) }
6469 func (*Struct) ProtoMessage() {}
6570 func (*Struct) Descriptor() ([]byte, []int) {
66 return fileDescriptor_struct_3a5a94e0c7801b27, []int{0}
67 }
71 return fileDescriptor_df322afd6c9fb402, []int{0}
72 }
73
6874 func (*Struct) XXX_WellKnownType() string { return "Struct" }
75
6976 func (m *Struct) XXX_Unmarshal(b []byte) error {
7077 return xxx_messageInfo_Struct.Unmarshal(m, b)
7178 }
7279 func (m *Struct) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
7380 return xxx_messageInfo_Struct.Marshal(b, m, deterministic)
7481 }
75 func (dst *Struct) XXX_Merge(src proto.Message) {
76 xxx_messageInfo_Struct.Merge(dst, src)
82 func (m *Struct) XXX_Merge(src proto.Message) {
83 xxx_messageInfo_Struct.Merge(m, src)
7784 }
7885 func (m *Struct) XXX_Size() int {
7986 return xxx_messageInfo_Struct.Size(m)
117124 func (m *Value) String() string { return proto.CompactTextString(m) }
118125 func (*Value) ProtoMessage() {}
119126 func (*Value) Descriptor() ([]byte, []int) {
120 return fileDescriptor_struct_3a5a94e0c7801b27, []int{1}
121 }
127 return fileDescriptor_df322afd6c9fb402, []int{1}
128 }
129
122130 func (*Value) XXX_WellKnownType() string { return "Value" }
131
123132 func (m *Value) XXX_Unmarshal(b []byte) error {
124133 return xxx_messageInfo_Value.Unmarshal(m, b)
125134 }
126135 func (m *Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
127136 return xxx_messageInfo_Value.Marshal(b, m, deterministic)
128137 }
129 func (dst *Value) XXX_Merge(src proto.Message) {
130 xxx_messageInfo_Value.Merge(dst, src)
138 func (m *Value) XXX_Merge(src proto.Message) {
139 xxx_messageInfo_Value.Merge(m, src)
131140 }
132141 func (m *Value) XXX_Size() int {
133142 return xxx_messageInfo_Value.Size(m)
227236 return nil
228237 }
229238
230 // XXX_OneofFuncs is for the internal use of the proto package.
231 func (*Value) 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{}) {
232 return _Value_OneofMarshaler, _Value_OneofUnmarshaler, _Value_OneofSizer, []interface{}{
239 // XXX_OneofWrappers is for the internal use of the proto package.
240 func (*Value) XXX_OneofWrappers() []interface{} {
241 return []interface{}{
233242 (*Value_NullValue)(nil),
234243 (*Value_NumberValue)(nil),
235244 (*Value_StringValue)(nil),
237246 (*Value_StructValue)(nil),
238247 (*Value_ListValue)(nil),
239248 }
240 }
241
242 func _Value_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
243 m := msg.(*Value)
244 // kind
245 switch x := m.Kind.(type) {
246 case *Value_NullValue:
247 b.EncodeVarint(1<<3 | proto.WireVarint)
248 b.EncodeVarint(uint64(x.NullValue))
249 case *Value_NumberValue:
250 b.EncodeVarint(2<<3 | proto.WireFixed64)
251 b.EncodeFixed64(math.Float64bits(x.NumberValue))
252 case *Value_StringValue:
253 b.EncodeVarint(3<<3 | proto.WireBytes)
254 b.EncodeStringBytes(x.StringValue)
255 case *Value_BoolValue:
256 t := uint64(0)
257 if x.BoolValue {
258 t = 1
259 }
260 b.EncodeVarint(4<<3 | proto.WireVarint)
261 b.EncodeVarint(t)
262 case *Value_StructValue:
263 b.EncodeVarint(5<<3 | proto.WireBytes)
264 if err := b.EncodeMessage(x.StructValue); err != nil {
265 return err
266 }
267 case *Value_ListValue:
268 b.EncodeVarint(6<<3 | proto.WireBytes)
269 if err := b.EncodeMessage(x.ListValue); err != nil {
270 return err
271 }
272 case nil:
273 default:
274 return fmt.Errorf("Value.Kind has unexpected type %T", x)
275 }
276 return nil
277 }
278
279 func _Value_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
280 m := msg.(*Value)
281 switch tag {
282 case 1: // kind.null_value
283 if wire != proto.WireVarint {
284 return true, proto.ErrInternalBadWireType
285 }
286 x, err := b.DecodeVarint()
287 m.Kind = &Value_NullValue{NullValue(x)}
288 return true, err
289 case 2: // kind.number_value
290 if wire != proto.WireFixed64 {
291 return true, proto.ErrInternalBadWireType
292 }
293 x, err := b.DecodeFixed64()
294 m.Kind = &Value_NumberValue{math.Float64frombits(x)}
295 return true, err
296 case 3: // kind.string_value
297 if wire != proto.WireBytes {
298 return true, proto.ErrInternalBadWireType
299 }
300 x, err := b.DecodeStringBytes()
301 m.Kind = &Value_StringValue{x}
302 return true, err
303 case 4: // kind.bool_value
304 if wire != proto.WireVarint {
305 return true, proto.ErrInternalBadWireType
306 }
307 x, err := b.DecodeVarint()
308 m.Kind = &Value_BoolValue{x != 0}
309 return true, err
310 case 5: // kind.struct_value
311 if wire != proto.WireBytes {
312 return true, proto.ErrInternalBadWireType
313 }
314 msg := new(Struct)
315 err := b.DecodeMessage(msg)
316 m.Kind = &Value_StructValue{msg}
317 return true, err
318 case 6: // kind.list_value
319 if wire != proto.WireBytes {
320 return true, proto.ErrInternalBadWireType
321 }
322 msg := new(ListValue)
323 err := b.DecodeMessage(msg)
324 m.Kind = &Value_ListValue{msg}
325 return true, err
326 default:
327 return false, nil
328 }
329 }
330
331 func _Value_OneofSizer(msg proto.Message) (n int) {
332 m := msg.(*Value)
333 // kind
334 switch x := m.Kind.(type) {
335 case *Value_NullValue:
336 n += 1 // tag and wire
337 n += proto.SizeVarint(uint64(x.NullValue))
338 case *Value_NumberValue:
339 n += 1 // tag and wire
340 n += 8
341 case *Value_StringValue:
342 n += 1 // tag and wire
343 n += proto.SizeVarint(uint64(len(x.StringValue)))
344 n += len(x.StringValue)
345 case *Value_BoolValue:
346 n += 1 // tag and wire
347 n += 1
348 case *Value_StructValue:
349 s := proto.Size(x.StructValue)
350 n += 1 // tag and wire
351 n += proto.SizeVarint(uint64(s))
352 n += s
353 case *Value_ListValue:
354 s := proto.Size(x.ListValue)
355 n += 1 // tag and wire
356 n += proto.SizeVarint(uint64(s))
357 n += s
358 case nil:
359 default:
360 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
361 }
362 return n
363249 }
364250
365251 // `ListValue` is a wrapper around a repeated field of values.
377263 func (m *ListValue) String() string { return proto.CompactTextString(m) }
378264 func (*ListValue) ProtoMessage() {}
379265 func (*ListValue) Descriptor() ([]byte, []int) {
380 return fileDescriptor_struct_3a5a94e0c7801b27, []int{2}
381 }
266 return fileDescriptor_df322afd6c9fb402, []int{2}
267 }
268
382269 func (*ListValue) XXX_WellKnownType() string { return "ListValue" }
270
383271 func (m *ListValue) XXX_Unmarshal(b []byte) error {
384272 return xxx_messageInfo_ListValue.Unmarshal(m, b)
385273 }
386274 func (m *ListValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
387275 return xxx_messageInfo_ListValue.Marshal(b, m, deterministic)
388276 }
389 func (dst *ListValue) XXX_Merge(src proto.Message) {
390 xxx_messageInfo_ListValue.Merge(dst, src)
277 func (m *ListValue) XXX_Merge(src proto.Message) {
278 xxx_messageInfo_ListValue.Merge(m, src)
391279 }
392280 func (m *ListValue) XXX_Size() int {
393281 return xxx_messageInfo_ListValue.Size(m)
406294 }
407295
408296 func init() {
297 proto.RegisterEnum("google.protobuf.NullValue", NullValue_name, NullValue_value)
409298 proto.RegisterType((*Struct)(nil), "google.protobuf.Struct")
410299 proto.RegisterMapType((map[string]*Value)(nil), "google.protobuf.Struct.FieldsEntry")
411300 proto.RegisterType((*Value)(nil), "google.protobuf.Value")
412301 proto.RegisterType((*ListValue)(nil), "google.protobuf.ListValue")
413 proto.RegisterEnum("google.protobuf.NullValue", NullValue_name, NullValue_value)
414 }
415
416 func init() {
417 proto.RegisterFile("google/protobuf/struct.proto", fileDescriptor_struct_3a5a94e0c7801b27)
418 }
419
420 var fileDescriptor_struct_3a5a94e0c7801b27 = []byte{
302 }
303
304 func init() { proto.RegisterFile("google/protobuf/struct.proto", fileDescriptor_df322afd6c9fb402) }
305
306 var fileDescriptor_df322afd6c9fb402 = []byte{
421307 // 417 bytes of a gzipped FileDescriptorProto
422308 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x41, 0x8b, 0xd3, 0x40,
423309 0x14, 0xc7, 0x3b, 0xc9, 0x36, 0x98, 0x17, 0x59, 0x97, 0x11, 0xb4, 0xac, 0xa2, 0xa1, 0x7b, 0x09,
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: google/protobuf/timestamp.proto
22
3 package timestamp // import "github.com/golang/protobuf/ptypes/timestamp"
3 package timestamp
44
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 math "math"
9 )
810
911 // Reference imports to suppress errors if they are not otherwise used.
1012 var _ = proto.Marshal
1517 // is compatible with the proto package it is being compiled against.
1618 // A compilation error at this line likely means your copy of the
1719 // proto package needs to be updated.
18 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
20 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
1921
2022 // A Timestamp represents a point in time independent of any time zone
2123 // or calendar, represented as seconds and fractions of seconds at
8082 // {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
8183 // seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
8284 // are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
83 // is required, though only UTC (as indicated by "Z") is presently supported.
85 // is required. A proto3 JSON serializer should always use UTC (as indicated by
86 // "Z") when printing the Timestamp type and a proto3 JSON parser should be
87 // able to accept both UTC and other timezones (as indicated by an offset).
8488 //
8589 // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
8690 // 01:30 UTC on January 15, 2017.
9195 // to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)
9296 // with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
9397 // can use the Joda Time's [`ISODateTimeFormat.dateTime()`](
94 // http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--)
95 // to obtain a formatter capable of generating timestamps in this format.
98 // http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--
99 // ) to obtain a formatter capable of generating timestamps in this format.
96100 //
97101 //
98102 type Timestamp struct {
114118 func (m *Timestamp) String() string { return proto.CompactTextString(m) }
115119 func (*Timestamp) ProtoMessage() {}
116120 func (*Timestamp) Descriptor() ([]byte, []int) {
117 return fileDescriptor_timestamp_b826e8e5fba671a8, []int{0}
121 return fileDescriptor_292007bbfe81227e, []int{0}
118122 }
123
119124 func (*Timestamp) XXX_WellKnownType() string { return "Timestamp" }
125
120126 func (m *Timestamp) XXX_Unmarshal(b []byte) error {
121127 return xxx_messageInfo_Timestamp.Unmarshal(m, b)
122128 }
123129 func (m *Timestamp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
124130 return xxx_messageInfo_Timestamp.Marshal(b, m, deterministic)
125131 }
126 func (dst *Timestamp) XXX_Merge(src proto.Message) {
127 xxx_messageInfo_Timestamp.Merge(dst, src)
132 func (m *Timestamp) XXX_Merge(src proto.Message) {
133 xxx_messageInfo_Timestamp.Merge(m, src)
128134 }
129135 func (m *Timestamp) XXX_Size() int {
130136 return xxx_messageInfo_Timestamp.Size(m)
153159 proto.RegisterType((*Timestamp)(nil), "google.protobuf.Timestamp")
154160 }
155161
156 func init() {
157 proto.RegisterFile("google/protobuf/timestamp.proto", fileDescriptor_timestamp_b826e8e5fba671a8)
158 }
162 func init() { proto.RegisterFile("google/protobuf/timestamp.proto", fileDescriptor_292007bbfe81227e) }
159163
160 var fileDescriptor_timestamp_b826e8e5fba671a8 = []byte{
164 var fileDescriptor_292007bbfe81227e = []byte{
161165 // 191 bytes of a gzipped FileDescriptorProto
162166 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xcf, 0xcf, 0x4f,
163167 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0xc9, 0xcc, 0x4d,
102102 // {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
103103 // seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
104104 // are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
105 // is required, though only UTC (as indicated by "Z") is presently supported.
105 // is required. A proto3 JSON serializer should always use UTC (as indicated by
106 // "Z") when printing the Timestamp type and a proto3 JSON parser should be
107 // able to accept both UTC and other timezones (as indicated by an offset).
106108 //
107109 // For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
108110 // 01:30 UTC on January 15, 2017.
113115 // to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)
114116 // with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one
115117 // can use the Joda Time's [`ISODateTimeFormat.dateTime()`](
116 // http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--)
117 // to obtain a formatter capable of generating timestamps in this format.
118 // http://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime--
119 // ) to obtain a formatter capable of generating timestamps in this format.
118120 //
119121 //
120122 message Timestamp {
110110 // TimestampProto converts the time.Time to a google.protobuf.Timestamp proto.
111111 // It returns an error if the resulting Timestamp is invalid.
112112 func TimestampProto(t time.Time) (*tspb.Timestamp, error) {
113 seconds := t.Unix()
114 nanos := int32(t.Sub(time.Unix(seconds, 0)))
115113 ts := &tspb.Timestamp{
116 Seconds: seconds,
117 Nanos: nanos,
114 Seconds: t.Unix(),
115 Nanos: int32(t.Nanosecond()),
118116 }
119117 if err := validateTimestamp(ts); err != nil {
120118 return nil, err
00 // Code generated by protoc-gen-go. DO NOT EDIT.
11 // source: google/protobuf/wrappers.proto
22
3 package wrappers // import "github.com/golang/protobuf/ptypes/wrappers"
4
5 import proto "github.com/golang/protobuf/proto"
6 import fmt "fmt"
7 import math "math"
3 package wrappers
4
5 import (
6 fmt "fmt"
7 proto "github.com/golang/protobuf/proto"
8 math "math"
9 )
810
911 // Reference imports to suppress errors if they are not otherwise used.
1012 var _ = proto.Marshal
1517 // is compatible with the proto package it is being compiled against.
1618 // A compilation error at this line likely means your copy of the
1719 // proto package needs to be updated.
18 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
20 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
1921
2022 // Wrapper message for `double`.
2123 //
3234 func (m *DoubleValue) String() string { return proto.CompactTextString(m) }
3335 func (*DoubleValue) ProtoMessage() {}
3436 func (*DoubleValue) Descriptor() ([]byte, []int) {
35 return fileDescriptor_wrappers_16c7c35c009f3253, []int{0}
36 }
37 return fileDescriptor_5377b62bda767935, []int{0}
38 }
39
3740 func (*DoubleValue) XXX_WellKnownType() string { return "DoubleValue" }
41
3842 func (m *DoubleValue) XXX_Unmarshal(b []byte) error {
3943 return xxx_messageInfo_DoubleValue.Unmarshal(m, b)
4044 }
4145 func (m *DoubleValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
4246 return xxx_messageInfo_DoubleValue.Marshal(b, m, deterministic)
4347 }
44 func (dst *DoubleValue) XXX_Merge(src proto.Message) {
45 xxx_messageInfo_DoubleValue.Merge(dst, src)
48 func (m *DoubleValue) XXX_Merge(src proto.Message) {
49 xxx_messageInfo_DoubleValue.Merge(m, src)
4650 }
4751 func (m *DoubleValue) XXX_Size() int {
4852 return xxx_messageInfo_DoubleValue.Size(m)
7579 func (m *FloatValue) String() string { return proto.CompactTextString(m) }
7680 func (*FloatValue) ProtoMessage() {}
7781 func (*FloatValue) Descriptor() ([]byte, []int) {
78 return fileDescriptor_wrappers_16c7c35c009f3253, []int{1}
79 }
82 return fileDescriptor_5377b62bda767935, []int{1}
83 }
84
8085 func (*FloatValue) XXX_WellKnownType() string { return "FloatValue" }
86
8187 func (m *FloatValue) XXX_Unmarshal(b []byte) error {
8288 return xxx_messageInfo_FloatValue.Unmarshal(m, b)
8389 }
8490 func (m *FloatValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
8591 return xxx_messageInfo_FloatValue.Marshal(b, m, deterministic)
8692 }
87 func (dst *FloatValue) XXX_Merge(src proto.Message) {
88 xxx_messageInfo_FloatValue.Merge(dst, src)
93 func (m *FloatValue) XXX_Merge(src proto.Message) {
94 xxx_messageInfo_FloatValue.Merge(m, src)
8995 }
9096 func (m *FloatValue) XXX_Size() int {
9197 return xxx_messageInfo_FloatValue.Size(m)
118124 func (m *Int64Value) String() string { return proto.CompactTextString(m) }
119125 func (*Int64Value) ProtoMessage() {}
120126 func (*Int64Value) Descriptor() ([]byte, []int) {
121 return fileDescriptor_wrappers_16c7c35c009f3253, []int{2}
122 }
127 return fileDescriptor_5377b62bda767935, []int{2}
128 }
129
123130 func (*Int64Value) XXX_WellKnownType() string { return "Int64Value" }
131
124132 func (m *Int64Value) XXX_Unmarshal(b []byte) error {
125133 return xxx_messageInfo_Int64Value.Unmarshal(m, b)
126134 }
127135 func (m *Int64Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
128136 return xxx_messageInfo_Int64Value.Marshal(b, m, deterministic)
129137 }
130 func (dst *Int64Value) XXX_Merge(src proto.Message) {
131 xxx_messageInfo_Int64Value.Merge(dst, src)
138 func (m *Int64Value) XXX_Merge(src proto.Message) {
139 xxx_messageInfo_Int64Value.Merge(m, src)
132140 }
133141 func (m *Int64Value) XXX_Size() int {
134142 return xxx_messageInfo_Int64Value.Size(m)
161169 func (m *UInt64Value) String() string { return proto.CompactTextString(m) }
162170 func (*UInt64Value) ProtoMessage() {}
163171 func (*UInt64Value) Descriptor() ([]byte, []int) {
164 return fileDescriptor_wrappers_16c7c35c009f3253, []int{3}
165 }
172 return fileDescriptor_5377b62bda767935, []int{3}
173 }
174
166175 func (*UInt64Value) XXX_WellKnownType() string { return "UInt64Value" }
176
167177 func (m *UInt64Value) XXX_Unmarshal(b []byte) error {
168178 return xxx_messageInfo_UInt64Value.Unmarshal(m, b)
169179 }
170180 func (m *UInt64Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
171181 return xxx_messageInfo_UInt64Value.Marshal(b, m, deterministic)
172182 }
173 func (dst *UInt64Value) XXX_Merge(src proto.Message) {
174 xxx_messageInfo_UInt64Value.Merge(dst, src)
183 func (m *UInt64Value) XXX_Merge(src proto.Message) {
184 xxx_messageInfo_UInt64Value.Merge(m, src)
175185 }
176186 func (m *UInt64Value) XXX_Size() int {
177187 return xxx_messageInfo_UInt64Value.Size(m)
204214 func (m *Int32Value) String() string { return proto.CompactTextString(m) }
205215 func (*Int32Value) ProtoMessage() {}
206216 func (*Int32Value) Descriptor() ([]byte, []int) {
207 return fileDescriptor_wrappers_16c7c35c009f3253, []int{4}
208 }
217 return fileDescriptor_5377b62bda767935, []int{4}
218 }
219
209220 func (*Int32Value) XXX_WellKnownType() string { return "Int32Value" }
221
210222 func (m *Int32Value) XXX_Unmarshal(b []byte) error {
211223 return xxx_messageInfo_Int32Value.Unmarshal(m, b)
212224 }
213225 func (m *Int32Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
214226 return xxx_messageInfo_Int32Value.Marshal(b, m, deterministic)
215227 }
216 func (dst *Int32Value) XXX_Merge(src proto.Message) {
217 xxx_messageInfo_Int32Value.Merge(dst, src)
228 func (m *Int32Value) XXX_Merge(src proto.Message) {
229 xxx_messageInfo_Int32Value.Merge(m, src)
218230 }
219231 func (m *Int32Value) XXX_Size() int {
220232 return xxx_messageInfo_Int32Value.Size(m)
247259 func (m *UInt32Value) String() string { return proto.CompactTextString(m) }
248260 func (*UInt32Value) ProtoMessage() {}
249261 func (*UInt32Value) Descriptor() ([]byte, []int) {
250 return fileDescriptor_wrappers_16c7c35c009f3253, []int{5}
251 }
262 return fileDescriptor_5377b62bda767935, []int{5}
263 }
264
252265 func (*UInt32Value) XXX_WellKnownType() string { return "UInt32Value" }
266
253267 func (m *UInt32Value) XXX_Unmarshal(b []byte) error {
254268 return xxx_messageInfo_UInt32Value.Unmarshal(m, b)
255269 }
256270 func (m *UInt32Value) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
257271 return xxx_messageInfo_UInt32Value.Marshal(b, m, deterministic)
258272 }
259 func (dst *UInt32Value) XXX_Merge(src proto.Message) {
260 xxx_messageInfo_UInt32Value.Merge(dst, src)
273 func (m *UInt32Value) XXX_Merge(src proto.Message) {
274 xxx_messageInfo_UInt32Value.Merge(m, src)
261275 }
262276 func (m *UInt32Value) XXX_Size() int {
263277 return xxx_messageInfo_UInt32Value.Size(m)
290304 func (m *BoolValue) String() string { return proto.CompactTextString(m) }
291305 func (*BoolValue) ProtoMessage() {}
292306 func (*BoolValue) Descriptor() ([]byte, []int) {
293 return fileDescriptor_wrappers_16c7c35c009f3253, []int{6}
294 }
307 return fileDescriptor_5377b62bda767935, []int{6}
308 }
309
295310 func (*BoolValue) XXX_WellKnownType() string { return "BoolValue" }
311
296312 func (m *BoolValue) XXX_Unmarshal(b []byte) error {
297313 return xxx_messageInfo_BoolValue.Unmarshal(m, b)
298314 }
299315 func (m *BoolValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
300316 return xxx_messageInfo_BoolValue.Marshal(b, m, deterministic)
301317 }
302 func (dst *BoolValue) XXX_Merge(src proto.Message) {
303 xxx_messageInfo_BoolValue.Merge(dst, src)
318 func (m *BoolValue) XXX_Merge(src proto.Message) {
319 xxx_messageInfo_BoolValue.Merge(m, src)
304320 }
305321 func (m *BoolValue) XXX_Size() int {
306322 return xxx_messageInfo_BoolValue.Size(m)
333349 func (m *StringValue) String() string { return proto.CompactTextString(m) }
334350 func (*StringValue) ProtoMessage() {}
335351 func (*StringValue) Descriptor() ([]byte, []int) {
336 return fileDescriptor_wrappers_16c7c35c009f3253, []int{7}
337 }
352 return fileDescriptor_5377b62bda767935, []int{7}
353 }
354
338355 func (*StringValue) XXX_WellKnownType() string { return "StringValue" }
356
339357 func (m *StringValue) XXX_Unmarshal(b []byte) error {
340358 return xxx_messageInfo_StringValue.Unmarshal(m, b)
341359 }
342360 func (m *StringValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
343361 return xxx_messageInfo_StringValue.Marshal(b, m, deterministic)
344362 }
345 func (dst *StringValue) XXX_Merge(src proto.Message) {
346 xxx_messageInfo_StringValue.Merge(dst, src)
363 func (m *StringValue) XXX_Merge(src proto.Message) {
364 xxx_messageInfo_StringValue.Merge(m, src)
347365 }
348366 func (m *StringValue) XXX_Size() int {
349367 return xxx_messageInfo_StringValue.Size(m)
376394 func (m *BytesValue) String() string { return proto.CompactTextString(m) }
377395 func (*BytesValue) ProtoMessage() {}
378396 func (*BytesValue) Descriptor() ([]byte, []int) {
379 return fileDescriptor_wrappers_16c7c35c009f3253, []int{8}
380 }
397 return fileDescriptor_5377b62bda767935, []int{8}
398 }
399
381400 func (*BytesValue) XXX_WellKnownType() string { return "BytesValue" }
401
382402 func (m *BytesValue) XXX_Unmarshal(b []byte) error {
383403 return xxx_messageInfo_BytesValue.Unmarshal(m, b)
384404 }
385405 func (m *BytesValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
386406 return xxx_messageInfo_BytesValue.Marshal(b, m, deterministic)
387407 }
388 func (dst *BytesValue) XXX_Merge(src proto.Message) {
389 xxx_messageInfo_BytesValue.Merge(dst, src)
408 func (m *BytesValue) XXX_Merge(src proto.Message) {
409 xxx_messageInfo_BytesValue.Merge(m, src)
390410 }
391411 func (m *BytesValue) XXX_Size() int {
392412 return xxx_messageInfo_BytesValue.Size(m)
416436 proto.RegisterType((*BytesValue)(nil), "google.protobuf.BytesValue")
417437 }
418438
419 func init() {
420 proto.RegisterFile("google/protobuf/wrappers.proto", fileDescriptor_wrappers_16c7c35c009f3253)
421 }
422
423 var fileDescriptor_wrappers_16c7c35c009f3253 = []byte{
439 func init() { proto.RegisterFile("google/protobuf/wrappers.proto", fileDescriptor_5377b62bda767935) }
440
441 var fileDescriptor_5377b62bda767935 = []byte{
424442 // 259 bytes of a gzipped FileDescriptorProto
425443 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xcf, 0xcf, 0x4f,
426444 0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x2f, 0x4a, 0x2c,
1616
1717 # Generate various test protos.
1818 PROTO_DIRS=(
19 conformance/internal/conformance_proto
2019 jsonpb/jsonpb_test_proto
2120 proto
2221 protoc-gen-go/testdata