Debian Codegraph @

test/tags/tags.pb.go

raw
1 // Code generated by protoc-gen-gogo. DO NOT EDIT.
2 // source: tags.proto
3
4 package tags
5
6 import (
7 fmt "fmt"
8 _ "github.com/gogo/protobuf/gogoproto"
9 proto "github.com/gogo/protobuf/proto"
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.GoGoProtoPackageIsVersion3 // please upgrade the proto package
23
24 type Outside struct {
25 *Inside `protobuf:"bytes,1,opt,name=Inside,embedded=Inside" json:""`
26 Field2 *string `protobuf:"bytes,2,opt,name=Field2" json:"MyField2" xml:",comment"`
27 // Types that are valid to be assigned to Filed:
28 // *Outside_Field3
29 Filed isOutside_Filed `protobuf_oneof:"filed"`
30 XXX_NoUnkeyedLiteral struct{} `json:"-"`
31 XXX_unrecognized []byte `json:"-"`
32 XXX_sizecache int32 `json:"-"`
33 }
34
35 func (m *Outside) Reset() { *m = Outside{} }
36 func (m *Outside) String() string { return proto.CompactTextString(m) }
37 func (*Outside) ProtoMessage() {}
38 func (*Outside) Descriptor() ([]byte, []int) {
39 return fileDescriptor_e7d9cbcae1e528f6, []int{0}
40 }
41 func (m *Outside) XXX_Unmarshal(b []byte) error {
42 return xxx_messageInfo_Outside.Unmarshal(m, b)
43 }
44 func (m *Outside) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
45 return xxx_messageInfo_Outside.Marshal(b, m, deterministic)
46 }
47 func (m *Outside) XXX_Merge(src proto.Message) {
48 xxx_messageInfo_Outside.Merge(m, src)
49 }
50 func (m *Outside) XXX_Size() int {
51 return xxx_messageInfo_Outside.Size(m)
52 }
53 func (m *Outside) XXX_DiscardUnknown() {
54 xxx_messageInfo_Outside.DiscardUnknown(m)
55 }
56
57 var xxx_messageInfo_Outside proto.InternalMessageInfo
58
59 type isOutside_Filed interface {
60 isOutside_Filed()
61 }
62
63 type Outside_Field3 struct {
64 Field3 string `protobuf:"bytes,3,opt,name=Field3,oneof" json:"MyField3" xml:",comment"`
65 }
66
67 func (*Outside_Field3) isOutside_Filed() {}
68
69 func (m *Outside) GetFiled() isOutside_Filed {
70 if m != nil {
71 return m.Filed
72 }
73 return nil
74 }
75
76 func (m *Outside) GetField2() string {
77 if m != nil && m.Field2 != nil {
78 return *m.Field2
79 }
80 return ""
81 }
82
83 func (m *Outside) GetField3() string {
84 if x, ok := m.GetFiled().(*Outside_Field3); ok {
85 return x.Field3
86 }
87 return ""
88 }
89
90 // XXX_OneofWrappers is for the internal use of the proto package.
91 func (*Outside) XXX_OneofWrappers() []interface{} {
92 return []interface{}{
93 (*Outside_Field3)(nil),
94 }
95 }
96
97 type Inside struct {
98 Field1 *string `protobuf:"bytes,1,opt,name=Field1" json:"MyField1" xml:",chardata"`
99 XXX_NoUnkeyedLiteral struct{} `json:"-"`
100 XXX_unrecognized []byte `json:"-"`
101 XXX_sizecache int32 `json:"-"`
102 }
103
104 func (m *Inside) Reset() { *m = Inside{} }
105 func (m *Inside) String() string { return proto.CompactTextString(m) }
106 func (*Inside) ProtoMessage() {}
107 func (*Inside) Descriptor() ([]byte, []int) {
108 return fileDescriptor_e7d9cbcae1e528f6, []int{1}
109 }
110 func (m *Inside) XXX_Unmarshal(b []byte) error {
111 return xxx_messageInfo_Inside.Unmarshal(m, b)
112 }
113 func (m *Inside) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
114 return xxx_messageInfo_Inside.Marshal(b, m, deterministic)
115 }
116 func (m *Inside) XXX_Merge(src proto.Message) {
117 xxx_messageInfo_Inside.Merge(m, src)
118 }
119 func (m *Inside) XXX_Size() int {
120 return xxx_messageInfo_Inside.Size(m)
121 }
122 func (m *Inside) XXX_DiscardUnknown() {
123 xxx_messageInfo_Inside.DiscardUnknown(m)
124 }
125
126 var xxx_messageInfo_Inside proto.InternalMessageInfo
127
128 func (m *Inside) GetField1() string {
129 if m != nil && m.Field1 != nil {
130 return *m.Field1
131 }
132 return ""
133 }
134
135 func init() {
136 proto.RegisterType((*Outside)(nil), "tags.Outside")
137 proto.RegisterType((*Inside)(nil), "tags.Inside")
138 }
139
140 func init() { proto.RegisterFile("tags.proto", fileDescriptor_e7d9cbcae1e528f6) }
141
142 var fileDescriptor_e7d9cbcae1e528f6 = []byte{
143 // 231 bytes of a gzipped FileDescriptorProto
144 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2a, 0x49, 0x4c, 0x2f,
145 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x01, 0xb1, 0xa5, 0x74, 0xd3, 0x33, 0x4b, 0x32,
146 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 0xc1, 0x92, 0x49, 0xa5,
147 0x69, 0x60, 0x1e, 0x98, 0x03, 0x66, 0x41, 0x34, 0x29, 0x6d, 0x61, 0xe4, 0x62, 0xf7, 0x2f, 0x2d,
148 0x29, 0xce, 0x4c, 0x49, 0x15, 0xd2, 0xe3, 0x62, 0xf3, 0xcc, 0x03, 0xb1, 0x24, 0x18, 0x15, 0x18,
149 0x35, 0xb8, 0x8d, 0x78, 0xf4, 0xc0, 0xa6, 0x43, 0xc4, 0x9c, 0x38, 0x2e, 0xdc, 0x93, 0x67, 0x7c,
150 0x75, 0x4f, 0x9e, 0x21, 0x08, 0xaa, 0x4a, 0xc8, 0x8c, 0x8b, 0xcd, 0x2d, 0x33, 0x35, 0x27, 0xc5,
151 0x48, 0x82, 0x49, 0x81, 0x51, 0x83, 0xd3, 0x49, 0xee, 0xd5, 0x3d, 0x79, 0x0e, 0xdf, 0x4a, 0x88,
152 0xd8, 0xa7, 0x7b, 0xf2, 0x7c, 0x15, 0xb9, 0x39, 0x56, 0x4a, 0x3a, 0xc9, 0xf9, 0xb9, 0xb9, 0xa9,
153 0x79, 0x25, 0x4a, 0x41, 0x50, 0xd5, 0x42, 0x16, 0x50, 0x7d, 0xc6, 0x12, 0xcc, 0x18, 0xfa, 0x8c,
154 0x31, 0xf5, 0x79, 0x30, 0x40, 0x75, 0x1a, 0x3b, 0xb1, 0x73, 0xb1, 0xa6, 0x65, 0xe6, 0xa4, 0xa6,
155 0x28, 0x39, 0xc2, 0x9c, 0x2a, 0x64, 0x0e, 0x35, 0xcc, 0x10, 0xec, 0x68, 0x4e, 0x27, 0x79, 0x24,
156 0xc3, 0x0c, 0x3f, 0xdd, 0x93, 0xe7, 0x87, 0x1a, 0x96, 0x91, 0x58, 0x94, 0x92, 0x58, 0x92, 0x08,
157 0x73, 0x85, 0xa1, 0x13, 0xcb, 0x8f, 0x87, 0x72, 0x8c, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x23,
158 0x9e, 0x05, 0xb9, 0x41, 0x01, 0x00, 0x00,
159 }
160
161 func NewPopulatedOutside(r randyTags, easy bool) *Outside {
162 this := &Outside{}
163 if r.Intn(5) != 0 {
164 this.Inside = NewPopulatedInside(r, easy)
165 }
166 if r.Intn(5) != 0 {
167 v1 := string(randStringTags(r))
168 this.Field2 = &v1
169 }
170 oneofNumber_Filed := []int32{3}[r.Intn(1)]
171 switch oneofNumber_Filed {
172 case 3:
173 this.Filed = NewPopulatedOutside_Field3(r, easy)
174 }
175 if !easy && r.Intn(10) != 0 {
176 this.XXX_unrecognized = randUnrecognizedTags(r, 4)
177 }
178 return this
179 }
180
181 func NewPopulatedOutside_Field3(r randyTags, easy bool) *Outside_Field3 {
182 this := &Outside_Field3{}
183 this.Field3 = string(randStringTags(r))
184 return this
185 }
186 func NewPopulatedInside(r randyTags, easy bool) *Inside {
187 this := &Inside{}
188 if r.Intn(5) != 0 {
189 v2 := string(randStringTags(r))
190 this.Field1 = &v2
191 }
192 if !easy && r.Intn(10) != 0 {
193 this.XXX_unrecognized = randUnrecognizedTags(r, 2)
194 }
195 return this
196 }
197
198 type randyTags interface {
199 Float32() float32
200 Float64() float64
201 Int63() int64
202 Int31() int32
203 Uint32() uint32
204 Intn(n int) int
205 }
206
207 func randUTF8RuneTags(r randyTags) rune {
208 ru := r.Intn(62)
209 if ru < 10 {
210 return rune(ru + 48)
211 } else if ru < 36 {
212 return rune(ru + 55)
213 }
214 return rune(ru + 61)
215 }
216 func randStringTags(r randyTags) string {
217 v3 := r.Intn(100)
218 tmps := make([]rune, v3)
219 for i := 0; i < v3; i++ {
220 tmps[i] = randUTF8RuneTags(r)
221 }
222 return string(tmps)
223 }
224 func randUnrecognizedTags(r randyTags, maxFieldNumber int) (dAtA []byte) {
225 l := r.Intn(5)
226 for i := 0; i < l; i++ {
227 wire := r.Intn(4)
228 if wire == 3 {
229 wire = 5
230 }
231 fieldNumber := maxFieldNumber + r.Intn(100)
232 dAtA = randFieldTags(dAtA, r, fieldNumber, wire)
233 }
234 return dAtA
235 }
236 func randFieldTags(dAtA []byte, r randyTags, fieldNumber int, wire int) []byte {
237 key := uint32(fieldNumber)<<3 | uint32(wire)
238 switch wire {
239 case 0:
240 dAtA = encodeVarintPopulateTags(dAtA, uint64(key))
241 v4 := r.Int63()
242 if r.Intn(2) == 0 {
243 v4 *= -1
244 }
245 dAtA = encodeVarintPopulateTags(dAtA, uint64(v4))
246 case 1:
247 dAtA = encodeVarintPopulateTags(dAtA, uint64(key))
248 dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
249 case 2:
250 dAtA = encodeVarintPopulateTags(dAtA, uint64(key))
251 ll := r.Intn(100)
252 dAtA = encodeVarintPopulateTags(dAtA, uint64(ll))
253 for j := 0; j < ll; j++ {
254 dAtA = append(dAtA, byte(r.Intn(256)))
255 }
256 default:
257 dAtA = encodeVarintPopulateTags(dAtA, uint64(key))
258 dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)))
259 }
260 return dAtA
261 }
262 func encodeVarintPopulateTags(dAtA []byte, v uint64) []byte {
263 for v >= 1<<7 {
264 dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80))
265 v >>= 7
266 }
267 dAtA = append(dAtA, uint8(v))
268 return dAtA
269 }