github.com/gogo/protobuf@v1.3.2/test/issue630/issue630.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: issue630.proto 3 4 package issue630 5 6 import ( 7 fmt "fmt" 8 _ "github.com/gogo/protobuf/gogoproto" 9 proto "github.com/gogo/protobuf/proto" 10 math "math" 11 reflect "reflect" 12 strings "strings" 13 ) 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package 25 26 type Foo struct { 27 Bar1 []Bar `protobuf:"bytes,1,rep,name=Bar1" json:"Bar1"` 28 XXX_NoUnkeyedLiteral struct{} `json:"-"` 29 XXX_unrecognized []byte `json:"-"` 30 XXX_sizecache int32 `json:"-"` 31 } 32 33 func (m *Foo) Reset() { *m = Foo{} } 34 func (m *Foo) String() string { return proto.CompactTextString(m) } 35 func (*Foo) ProtoMessage() {} 36 func (*Foo) Descriptor() ([]byte, []int) { 37 return fileDescriptor_60374e06e51d301c, []int{0} 38 } 39 func (m *Foo) XXX_Unmarshal(b []byte) error { 40 return xxx_messageInfo_Foo.Unmarshal(m, b) 41 } 42 func (m *Foo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 43 return xxx_messageInfo_Foo.Marshal(b, m, deterministic) 44 } 45 func (m *Foo) XXX_Merge(src proto.Message) { 46 xxx_messageInfo_Foo.Merge(m, src) 47 } 48 func (m *Foo) XXX_Size() int { 49 return xxx_messageInfo_Foo.Size(m) 50 } 51 func (m *Foo) XXX_DiscardUnknown() { 52 xxx_messageInfo_Foo.DiscardUnknown(m) 53 } 54 55 var xxx_messageInfo_Foo proto.InternalMessageInfo 56 57 func (m *Foo) GetBar1() []Bar { 58 if m != nil { 59 return m.Bar1 60 } 61 return nil 62 } 63 64 type Qux struct { 65 Bar1 []*Bar `protobuf:"bytes,1,rep,name=Bar1" json:"Bar1,omitempty"` 66 XXX_NoUnkeyedLiteral struct{} `json:"-"` 67 XXX_unrecognized []byte `json:"-"` 68 XXX_sizecache int32 `json:"-"` 69 } 70 71 func (m *Qux) Reset() { *m = Qux{} } 72 func (m *Qux) String() string { return proto.CompactTextString(m) } 73 func (*Qux) ProtoMessage() {} 74 func (*Qux) Descriptor() ([]byte, []int) { 75 return fileDescriptor_60374e06e51d301c, []int{1} 76 } 77 func (m *Qux) XXX_Unmarshal(b []byte) error { 78 return xxx_messageInfo_Qux.Unmarshal(m, b) 79 } 80 func (m *Qux) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 81 return xxx_messageInfo_Qux.Marshal(b, m, deterministic) 82 } 83 func (m *Qux) XXX_Merge(src proto.Message) { 84 xxx_messageInfo_Qux.Merge(m, src) 85 } 86 func (m *Qux) XXX_Size() int { 87 return xxx_messageInfo_Qux.Size(m) 88 } 89 func (m *Qux) XXX_DiscardUnknown() { 90 xxx_messageInfo_Qux.DiscardUnknown(m) 91 } 92 93 var xxx_messageInfo_Qux proto.InternalMessageInfo 94 95 func (m *Qux) GetBar1() []*Bar { 96 if m != nil { 97 return m.Bar1 98 } 99 return nil 100 } 101 102 type Bar struct { 103 Baz string `protobuf:"bytes,1,opt,name=Baz" json:"Baz"` 104 XXX_NoUnkeyedLiteral struct{} `json:"-"` 105 XXX_unrecognized []byte `json:"-"` 106 XXX_sizecache int32 `json:"-"` 107 } 108 109 func (m *Bar) Reset() { *m = Bar{} } 110 func (m *Bar) String() string { return proto.CompactTextString(m) } 111 func (*Bar) ProtoMessage() {} 112 func (*Bar) Descriptor() ([]byte, []int) { 113 return fileDescriptor_60374e06e51d301c, []int{2} 114 } 115 func (m *Bar) XXX_Unmarshal(b []byte) error { 116 return xxx_messageInfo_Bar.Unmarshal(m, b) 117 } 118 func (m *Bar) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 119 return xxx_messageInfo_Bar.Marshal(b, m, deterministic) 120 } 121 func (m *Bar) XXX_Merge(src proto.Message) { 122 xxx_messageInfo_Bar.Merge(m, src) 123 } 124 func (m *Bar) XXX_Size() int { 125 return xxx_messageInfo_Bar.Size(m) 126 } 127 func (m *Bar) XXX_DiscardUnknown() { 128 xxx_messageInfo_Bar.DiscardUnknown(m) 129 } 130 131 var xxx_messageInfo_Bar proto.InternalMessageInfo 132 133 func (m *Bar) GetBaz() string { 134 if m != nil { 135 return m.Baz 136 } 137 return "" 138 } 139 140 func init() { 141 proto.RegisterType((*Foo)(nil), "issue630.Foo") 142 proto.RegisterType((*Qux)(nil), "issue630.Qux") 143 proto.RegisterType((*Bar)(nil), "issue630.Bar") 144 } 145 146 func init() { proto.RegisterFile("issue630.proto", fileDescriptor_60374e06e51d301c) } 147 148 var fileDescriptor_60374e06e51d301c = []byte{ 149 // 150 bytes of a gzipped FileDescriptorProto 150 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x2c, 0x2e, 0x2e, 151 0x4d, 0x35, 0x33, 0x36, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0xa5, 0x74, 152 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0xf3, 0xd3, 0xf3, 0xf5, 153 0xc1, 0x0a, 0x92, 0x4a, 0xd3, 0xc0, 0x3c, 0x30, 0x07, 0xcc, 0x82, 0x68, 0x54, 0xd2, 0xe3, 0x62, 154 0x76, 0xcb, 0xcf, 0x17, 0x52, 0xe7, 0x62, 0x71, 0x4a, 0x2c, 0x32, 0x94, 0x60, 0x54, 0x60, 0xd6, 155 0xe0, 0x36, 0xe2, 0xd5, 0x83, 0x1b, 0xef, 0x94, 0x58, 0xe4, 0xc4, 0x72, 0xe2, 0x9e, 0x3c, 0x43, 156 0x10, 0x58, 0x01, 0x48, 0x7d, 0x60, 0x69, 0x05, 0x61, 0xf5, 0x8c, 0x50, 0xf5, 0xb2, 0x5c, 0xcc, 157 0x4e, 0x89, 0x45, 0x42, 0x62, 0x20, 0xaa, 0x4a, 0x82, 0x51, 0x81, 0x51, 0x83, 0x13, 0x6a, 0x1e, 158 0x48, 0xc0, 0x89, 0xe5, 0xc3, 0x43, 0x39, 0x46, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc9, 0x5d, 159 0xa4, 0x14, 0xce, 0x00, 0x00, 0x00, 160 } 161 162 func (this *Foo) GoString() string { 163 if this == nil { 164 return "nil" 165 } 166 s := make([]string, 0, 5) 167 s = append(s, "&issue630.Foo{") 168 if this.Bar1 != nil { 169 vs := make([]Bar, len(this.Bar1)) 170 for i := range vs { 171 vs[i] = this.Bar1[i] 172 } 173 s = append(s, "Bar1: "+fmt.Sprintf("%#v", vs)+",\n") 174 } 175 if this.XXX_unrecognized != nil { 176 s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") 177 } 178 s = append(s, "}") 179 return strings.Join(s, "") 180 } 181 func (this *Qux) GoString() string { 182 if this == nil { 183 return "nil" 184 } 185 s := make([]string, 0, 5) 186 s = append(s, "&issue630.Qux{") 187 if this.Bar1 != nil { 188 s = append(s, "Bar1: "+fmt.Sprintf("%#v", this.Bar1)+",\n") 189 } 190 if this.XXX_unrecognized != nil { 191 s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") 192 } 193 s = append(s, "}") 194 return strings.Join(s, "") 195 } 196 func (this *Bar) GoString() string { 197 if this == nil { 198 return "nil" 199 } 200 s := make([]string, 0, 5) 201 s = append(s, "&issue630.Bar{") 202 s = append(s, "Baz: "+fmt.Sprintf("%#v", this.Baz)+",\n") 203 if this.XXX_unrecognized != nil { 204 s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") 205 } 206 s = append(s, "}") 207 return strings.Join(s, "") 208 } 209 func valueToGoStringIssue630(v interface{}, typ string) string { 210 rv := reflect.ValueOf(v) 211 if rv.IsNil() { 212 return "nil" 213 } 214 pv := reflect.Indirect(rv).Interface() 215 return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) 216 }