1
2
3
4
5
6
7 package proto
8
9 import (
10 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
11 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
12 reflect "reflect"
13 sync "sync"
14 )
15
16 const (
17
18 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
19
20 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
21 )
22
23 type Cat struct {
24 state protoimpl.MessageState
25 sizeCache protoimpl.SizeCache
26 unknownFields protoimpl.UnknownFields
27
28 Age int32 `protobuf:"varint,1,opt,name=Age,proto3" json:"Age,omitempty"`
29 Breed string `protobuf:"bytes,2,opt,name=Breed,proto3" json:"Breed,omitempty"`
30 Name string `protobuf:"bytes,3,opt,name=Name,proto3" json:"Name,omitempty"`
31 }
32
33 func (x *Cat) Reset() {
34 *x = Cat{}
35 if protoimpl.UnsafeEnabled {
36 mi := &file_proto_test_proto_msgTypes[0]
37 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
38 ms.StoreMessageInfo(mi)
39 }
40 }
41
42 func (x *Cat) String() string {
43 return protoimpl.X.MessageStringOf(x)
44 }
45
46 func (*Cat) ProtoMessage() {}
47
48 func (x *Cat) ProtoReflect() protoreflect.Message {
49 mi := &file_proto_test_proto_msgTypes[0]
50 if protoimpl.UnsafeEnabled && x != nil {
51 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
52 if ms.LoadMessageInfo() == nil {
53 ms.StoreMessageInfo(mi)
54 }
55 return ms
56 }
57 return mi.MessageOf(x)
58 }
59
60
61 func (*Cat) Descriptor() ([]byte, []int) {
62 return file_proto_test_proto_rawDescGZIP(), []int{0}
63 }
64
65 func (x *Cat) GetAge() int32 {
66 if x != nil {
67 return x.Age
68 }
69 return 0
70 }
71
72 func (x *Cat) GetBreed() string {
73 if x != nil {
74 return x.Breed
75 }
76 return ""
77 }
78
79 func (x *Cat) GetName() string {
80 if x != nil {
81 return x.Name
82 }
83 return ""
84 }
85
86 var File_proto_test_proto protoreflect.FileDescriptor
87
88 var file_proto_test_proto_rawDesc = []byte{
89 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f,
90 0x74, 0x6f, 0x22, 0x41, 0x0a, 0x03, 0x43, 0x61, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x41, 0x67, 0x65,
91 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x41, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x42,
92 0x72, 0x65, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x42, 0x72, 0x65, 0x65,
93 0x64, 0x12, 0x12, 0x0a, 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
94 0x04, 0x4e, 0x61, 0x6d, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
95 }
96
97 var (
98 file_proto_test_proto_rawDescOnce sync.Once
99 file_proto_test_proto_rawDescData = file_proto_test_proto_rawDesc
100 )
101
102 func file_proto_test_proto_rawDescGZIP() []byte {
103 file_proto_test_proto_rawDescOnce.Do(func() {
104 file_proto_test_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_test_proto_rawDescData)
105 })
106 return file_proto_test_proto_rawDescData
107 }
108
109 var file_proto_test_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
110 var file_proto_test_proto_goTypes = []interface{}{
111 (*Cat)(nil),
112 }
113 var file_proto_test_proto_depIdxs = []int32{
114 0,
115 0,
116 0,
117 0,
118 0,
119 }
120
121 func init() { file_proto_test_proto_init() }
122 func file_proto_test_proto_init() {
123 if File_proto_test_proto != nil {
124 return
125 }
126 if !protoimpl.UnsafeEnabled {
127 file_proto_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
128 switch v := v.(*Cat); i {
129 case 0:
130 return &v.state
131 case 1:
132 return &v.sizeCache
133 case 2:
134 return &v.unknownFields
135 default:
136 return nil
137 }
138 }
139 }
140 type x struct{}
141 out := protoimpl.TypeBuilder{
142 File: protoimpl.DescBuilder{
143 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
144 RawDescriptor: file_proto_test_proto_rawDesc,
145 NumEnums: 0,
146 NumMessages: 1,
147 NumExtensions: 0,
148 NumServices: 0,
149 },
150 GoTypes: file_proto_test_proto_goTypes,
151 DependencyIndexes: file_proto_test_proto_depIdxs,
152 MessageInfos: file_proto_test_proto_msgTypes,
153 }.Build()
154 File_proto_test_proto = out.File
155 file_proto_test_proto_rawDesc = nil
156 file_proto_test_proto_goTypes = nil
157 file_proto_test_proto_depIdxs = nil
158 }
159
View as plain text