...

Source file src/google.golang.org/protobuf/cmd/protoc-gen-go/testdata/proto2/proto2.pb.go

Documentation: google.golang.org/protobuf/cmd/protoc-gen-go/testdata/proto2

     1  // Copyright 2018 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Code generated by protoc-gen-go. DO NOT EDIT.
     6  // source: cmd/protoc-gen-go/testdata/proto2/proto2.proto
     7  
     8  package proto2
     9  
    10  import (
    11  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    12  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    13  	reflect "reflect"
    14  	sync "sync"
    15  )
    16  
    17  type Message struct {
    18  	state         protoimpl.MessageState
    19  	sizeCache     protoimpl.SizeCache
    20  	unknownFields protoimpl.UnknownFields
    21  
    22  	I32 *int32   `protobuf:"varint,1,opt,name=i32" json:"i32,omitempty"`
    23  	M   *Message `protobuf:"bytes,2,opt,name=m" json:"m,omitempty"`
    24  }
    25  
    26  func (x *Message) Reset() {
    27  	*x = Message{}
    28  	if protoimpl.UnsafeEnabled {
    29  		mi := &file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_msgTypes[0]
    30  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    31  		ms.StoreMessageInfo(mi)
    32  	}
    33  }
    34  
    35  func (x *Message) String() string {
    36  	return protoimpl.X.MessageStringOf(x)
    37  }
    38  
    39  func (*Message) ProtoMessage() {}
    40  
    41  func (x *Message) ProtoReflect() protoreflect.Message {
    42  	mi := &file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_msgTypes[0]
    43  	if protoimpl.UnsafeEnabled && x != nil {
    44  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    45  		if ms.LoadMessageInfo() == nil {
    46  			ms.StoreMessageInfo(mi)
    47  		}
    48  		return ms
    49  	}
    50  	return mi.MessageOf(x)
    51  }
    52  
    53  // Deprecated: Use Message.ProtoReflect.Descriptor instead.
    54  func (*Message) Descriptor() ([]byte, []int) {
    55  	return file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_rawDescGZIP(), []int{0}
    56  }
    57  
    58  func (x *Message) GetI32() int32 {
    59  	if x != nil && x.I32 != nil {
    60  		return *x.I32
    61  	}
    62  	return 0
    63  }
    64  
    65  func (x *Message) GetM() *Message {
    66  	if x != nil {
    67  		return x.M
    68  	}
    69  	return nil
    70  }
    71  
    72  var File_cmd_protoc_gen_go_testdata_proto2_proto2_proto protoreflect.FileDescriptor
    73  
    74  var file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_rawDesc = []byte{
    75  	0x0a, 0x2e, 0x63, 0x6d, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e,
    76  	0x2d, 0x67, 0x6f, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x70, 0x72, 0x6f,
    77  	0x74, 0x6f, 0x32, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
    78  	0x12, 0x15, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
    79  	0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x22, 0x49, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61,
    80  	0x67, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x33, 0x32, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
    81  	0x03, 0x69, 0x33, 0x32, 0x12, 0x2c, 0x0a, 0x01, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
    82  	0x1e, 0x2e, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63,
    83  	0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52,
    84  	0x01, 0x6d, 0x42, 0x3e, 0x5a, 0x3c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c,
    85  	0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
    86  	0x2f, 0x63, 0x6d, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d,
    87  	0x67, 0x6f, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74,
    88  	0x6f, 0x32,
    89  }
    90  
    91  var (
    92  	file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_rawDescOnce sync.Once
    93  	file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_rawDescData = file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_rawDesc
    94  )
    95  
    96  func file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_rawDescGZIP() []byte {
    97  	file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_rawDescOnce.Do(func() {
    98  		file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_rawDescData = protoimpl.X.CompressGZIP(file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_rawDescData)
    99  	})
   100  	return file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_rawDescData
   101  }
   102  
   103  var file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
   104  var file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_goTypes = []interface{}{
   105  	(*Message)(nil), // 0: goproto.protoc.proto2.Message
   106  }
   107  var file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_depIdxs = []int32{
   108  	0, // 0: goproto.protoc.proto2.Message.m:type_name -> goproto.protoc.proto2.Message
   109  	1, // [1:1] is the sub-list for method output_type
   110  	1, // [1:1] is the sub-list for method input_type
   111  	1, // [1:1] is the sub-list for extension type_name
   112  	1, // [1:1] is the sub-list for extension extendee
   113  	0, // [0:1] is the sub-list for field type_name
   114  }
   115  
   116  func init() { file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_init() }
   117  func file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_init() {
   118  	if File_cmd_protoc_gen_go_testdata_proto2_proto2_proto != nil {
   119  		return
   120  	}
   121  	if !protoimpl.UnsafeEnabled {
   122  		file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   123  			switch v := v.(*Message); i {
   124  			case 0:
   125  				return &v.state
   126  			case 1:
   127  				return &v.sizeCache
   128  			case 2:
   129  				return &v.unknownFields
   130  			default:
   131  				return nil
   132  			}
   133  		}
   134  	}
   135  	type x struct{}
   136  	out := protoimpl.TypeBuilder{
   137  		File: protoimpl.DescBuilder{
   138  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   139  			RawDescriptor: file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_rawDesc,
   140  			NumEnums:      0,
   141  			NumMessages:   1,
   142  			NumExtensions: 0,
   143  			NumServices:   0,
   144  		},
   145  		GoTypes:           file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_goTypes,
   146  		DependencyIndexes: file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_depIdxs,
   147  		MessageInfos:      file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_msgTypes,
   148  	}.Build()
   149  	File_cmd_protoc_gen_go_testdata_proto2_proto2_proto = out.File
   150  	file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_rawDesc = nil
   151  	file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_goTypes = nil
   152  	file_cmd_protoc_gen_go_testdata_proto2_proto2_proto_depIdxs = nil
   153  }
   154  

View as plain text