github.com/easysoft/zendata@v0.0.0-20240513203326-705bd5a7fd67/cmd/test/others/func/proto/dist/person.pb.go (about)

     1  // Code generated by protoc-gen-go.
     2  // source: person.proto
     3  // DO NOT EDIT!
     4  
     5  /*
     6  Package dist is a generated protocol buffer package.
     7  
     8  It is generated from these files:
     9  
    10  	person.proto
    11  
    12  It has these top-level messages:
    13  
    14  	Person
    15  	Address
    16  	Obj
    17  */
    18  package dist
    19  
    20  import (
    21  	fmt "fmt"
    22  
    23  	proto "github.com/golang/protobuf/proto"
    24  
    25  	math "math"
    26  )
    27  
    28  // Reference imports to suppress errors if they are not otherwise used.
    29  var _ = proto.Marshal
    30  var _ = fmt.Errorf
    31  var _ = math.Inf
    32  
    33  // This is a compile-time assertion to ensure that this generated file
    34  // is compatible with the proto package it is being compiled against.
    35  // A compilation error at this line likely means your copy of the
    36  // proto package needs to be updated.
    37  const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
    38  
    39  type Gender int32
    40  
    41  const (
    42  	Gender_M Gender = 0
    43  	Gender_F Gender = 1
    44  )
    45  
    46  var Gender_name = map[int32]string{
    47  	0: "M",
    48  	1: "F",
    49  }
    50  var Gender_value = map[string]int32{
    51  	"M": 0,
    52  	"F": 1,
    53  }
    54  
    55  func (x Gender) String() string {
    56  	return proto.EnumName(Gender_name, int32(x))
    57  }
    58  func (Gender) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
    59  
    60  type Person struct {
    61  	Name    string   `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
    62  	Age     int32    `protobuf:"varint,2,opt,name=age" json:"age,omitempty"`
    63  	Gender  Gender   `protobuf:"varint,3,opt,name=gender,enum=Gender" json:"gender,omitempty"`
    64  	Address *Address `protobuf:"bytes,4,opt,name=address" json:"address,omitempty"`
    65  }
    66  
    67  func (m *Person) Reset()                    { *m = Person{} }
    68  func (m *Person) String() string            { return proto.CompactTextString(m) }
    69  func (*Person) ProtoMessage()               {}
    70  func (*Person) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
    71  
    72  func (m *Person) GetName() string {
    73  	if m != nil {
    74  		return m.Name
    75  	}
    76  	return ""
    77  }
    78  
    79  func (m *Person) GetAge() int32 {
    80  	if m != nil {
    81  		return m.Age
    82  	}
    83  	return 0
    84  }
    85  
    86  func (m *Person) GetGender() Gender {
    87  	if m != nil {
    88  		return m.Gender
    89  	}
    90  	return Gender_M
    91  }
    92  
    93  func (m *Person) GetAddress() *Address {
    94  	if m != nil {
    95  		return m.Address
    96  	}
    97  	return nil
    98  }
    99  
   100  type Address struct {
   101  	City   string   `protobuf:"bytes,1,opt,name=city" json:"city,omitempty"`
   102  	Places []string `protobuf:"bytes,2,rep,name=places" json:"places,omitempty"`
   103  	Child  *Obj     `protobuf:"bytes,3,opt,name=child" json:"child,omitempty"`
   104  }
   105  
   106  func (m *Address) Reset()                    { *m = Address{} }
   107  func (m *Address) String() string            { return proto.CompactTextString(m) }
   108  func (*Address) ProtoMessage()               {}
   109  func (*Address) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
   110  
   111  func (m *Address) GetCity() string {
   112  	if m != nil {
   113  		return m.City
   114  	}
   115  	return ""
   116  }
   117  
   118  func (m *Address) GetPlaces() []string {
   119  	if m != nil {
   120  		return m.Places
   121  	}
   122  	return nil
   123  }
   124  
   125  func (m *Address) GetChild() *Obj {
   126  	if m != nil {
   127  		return m.Child
   128  	}
   129  	return nil
   130  }
   131  
   132  type Obj struct {
   133  	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
   134  }
   135  
   136  func (m *Obj) Reset()                    { *m = Obj{} }
   137  func (m *Obj) String() string            { return proto.CompactTextString(m) }
   138  func (*Obj) ProtoMessage()               {}
   139  func (*Obj) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
   140  
   141  func (m *Obj) GetName() string {
   142  	if m != nil {
   143  		return m.Name
   144  	}
   145  	return ""
   146  }
   147  
   148  func init() {
   149  	proto.RegisterType((*Person)(nil), "Person")
   150  	proto.RegisterType((*Address)(nil), "Address")
   151  	proto.RegisterType((*Obj)(nil), "Obj")
   152  	proto.RegisterEnum("Gender", Gender_name, Gender_value)
   153  }
   154  
   155  func init() { proto.RegisterFile("person.proto", fileDescriptor0) }
   156  
   157  var fileDescriptor0 = []byte{
   158  	// 219 bytes of a gzipped FileDescriptorProto
   159  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x90, 0xb1, 0x4e, 0xc3, 0x30,
   160  	0x10, 0x86, 0x71, 0xe3, 0x38, 0xf4, 0x8a, 0x50, 0x74, 0x43, 0x65, 0x58, 0xb0, 0x3c, 0x59, 0x0c,
   161  	0x1e, 0xc2, 0x13, 0xc0, 0x00, 0x13, 0x2a, 0x78, 0x64, 0x73, 0x62, 0xab, 0xa4, 0x2a, 0x49, 0x64,
   162  	0x67, 0xe1, 0xed, 0x91, 0x9d, 0x74, 0x63, 0xf2, 0xff, 0xfd, 0x1e, 0xbe, 0xbb, 0x83, 0x9b, 0xc9,
   163  	0x87, 0x38, 0x0e, 0x7a, 0x0a, 0xe3, 0x3c, 0xca, 0x08, 0xec, 0x23, 0x33, 0x22, 0xd0, 0xc1, 0xfe,
   164  	0x78, 0x4e, 0x04, 0x51, 0x5b, 0x93, 0x33, 0xd6, 0x50, 0xd8, 0xa3, 0xe7, 0x1b, 0x41, 0x54, 0x69,
   165  	0x52, 0xc4, 0x07, 0x60, 0x47, 0x3f, 0x38, 0x1f, 0x78, 0x21, 0x88, 0xba, 0x6d, 0x2a, 0xfd, 0x96,
   166  	0xd1, 0xac, 0x35, 0x4a, 0xa8, 0xac, 0x73, 0xc1, 0xc7, 0xc8, 0xa9, 0x20, 0x6a, 0xd7, 0x5c, 0xeb,
   167  	0xe7, 0x85, 0xcd, 0xe5, 0x43, 0x7e, 0x42, 0xb5, 0x76, 0xc9, 0xda, 0xf5, 0xf3, 0xef, 0xc5, 0x9a,
   168  	0x32, 0xee, 0x81, 0x4d, 0x67, 0xdb, 0xf9, 0xc8, 0x37, 0xa2, 0x50, 0x5b, 0xb3, 0x12, 0xde, 0x43,
   169  	0xd9, 0x7d, 0xf7, 0x67, 0x97, 0xd5, 0xbb, 0x86, 0xea, 0x43, 0x7b, 0x32, 0x4b, 0x25, 0xef, 0xa0,
   170  	0x38, 0xb4, 0xa7, 0xff, 0x96, 0x78, 0xdc, 0x03, 0x5b, 0x66, 0xc4, 0x12, 0xc8, 0x7b, 0x7d, 0x95,
   171  	0x9e, 0xd7, 0x9a, 0xbc, 0xb0, 0x2f, 0xea, 0xfa, 0x38, 0xb7, 0x2c, 0x5f, 0xe2, 0xe9, 0x2f, 0x00,
   172  	0x00, 0xff, 0xff, 0x85, 0xc1, 0x0e, 0x89, 0x19, 0x01, 0x00, 0x00,
   173  }