| // Copyright 2025 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| |
| // Code generated by protoc-gen-go. DO NOT EDIT. |
| // source: cmd/protoc-gen-go/testdata/import_option/import_option.proto |
| |
| package import_option |
| |
| import ( |
| protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
| protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
| _ "google.golang.org/protobuf/types/descriptorpb" |
| reflect "reflect" |
| unsafe "unsafe" |
| ) |
| |
| type TestMessage struct { |
| state protoimpl.MessageState `protogen:"opaque.v1"` |
| xxx_hidden_Hello *string `protobuf:"bytes,1,opt,name=hello"` |
| xxx_hidden_World *string `protobuf:"bytes,2,opt,name=world"` |
| XXX_raceDetectHookData protoimpl.RaceDetectHookData |
| XXX_presence [1]uint32 |
| unknownFields protoimpl.UnknownFields |
| sizeCache protoimpl.SizeCache |
| } |
| |
| func (x *TestMessage) Reset() { |
| *x = TestMessage{} |
| mi := &file_cmd_protoc_gen_go_testdata_import_option_import_option_proto_msgTypes[0] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| |
| func (x *TestMessage) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*TestMessage) ProtoMessage() {} |
| |
| func (x *TestMessage) ProtoReflect() protoreflect.Message { |
| mi := &file_cmd_protoc_gen_go_testdata_import_option_import_option_proto_msgTypes[0] |
| if x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| func (x *TestMessage) GetHello() string { |
| if x != nil { |
| if x.xxx_hidden_Hello != nil { |
| return *x.xxx_hidden_Hello |
| } |
| return "" |
| } |
| return "" |
| } |
| |
| func (x *TestMessage) GetWorld() string { |
| if x != nil { |
| if x.xxx_hidden_World != nil { |
| return *x.xxx_hidden_World |
| } |
| return "" |
| } |
| return "" |
| } |
| |
| func (x *TestMessage) SetHello(v string) { |
| x.xxx_hidden_Hello = &v |
| protoimpl.X.SetPresent(&(x.XXX_presence[0]), 0, 2) |
| } |
| |
| func (x *TestMessage) SetWorld(v string) { |
| x.xxx_hidden_World = &v |
| protoimpl.X.SetPresent(&(x.XXX_presence[0]), 1, 2) |
| } |
| |
| func (x *TestMessage) HasHello() bool { |
| if x == nil { |
| return false |
| } |
| return protoimpl.X.Present(&(x.XXX_presence[0]), 0) |
| } |
| |
| func (x *TestMessage) HasWorld() bool { |
| if x == nil { |
| return false |
| } |
| return protoimpl.X.Present(&(x.XXX_presence[0]), 1) |
| } |
| |
| func (x *TestMessage) ClearHello() { |
| protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 0) |
| x.xxx_hidden_Hello = nil |
| } |
| |
| func (x *TestMessage) ClearWorld() { |
| protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 1) |
| x.xxx_hidden_World = nil |
| } |
| |
| type TestMessage_builder struct { |
| _ [0]func() // Prevents comparability and use of unkeyed literals for the builder. |
| |
| Hello *string |
| World *string |
| } |
| |
| func (b0 TestMessage_builder) Build() *TestMessage { |
| m0 := &TestMessage{} |
| b, x := &b0, m0 |
| _, _ = b, x |
| if b.Hello != nil { |
| protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 0, 2) |
| x.xxx_hidden_Hello = b.Hello |
| } |
| if b.World != nil { |
| protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 1, 2) |
| x.xxx_hidden_World = b.World |
| } |
| return m0 |
| } |
| |
| var File_cmd_protoc_gen_go_testdata_import_option_import_option_proto protoreflect.FileDescriptor |
| |
| const file_cmd_protoc_gen_go_testdata_import_option_import_option_proto_rawDesc = "" + |
| "\n" + |
| "<cmd/protoc-gen-go/testdata/import_option/import_option.proto\x12\x10testimportoption\x1a google/protobuf/descriptor.proto\"M\n" + |
| "\vTestMessage\x12\x1e\n" + |
| "\x05hello\x18\x01 \x01(\tB\b\xaa\xba\xed\x84\x0f\x02\b\x17R\x05hello\x12\x1e\n" + |
| "\x05world\x18\x02 \x01(\tB\b\xb2\xba\xed\x84\x0f\x02\b\x17R\x05worldBEZCgoogle.golang.org/protobuf/cmd/protoc-gen-go/testdata/import_optionb\beditionsp\xe9\azJcmd/protoc-gen-go/testdata/import_option_custom/import_option_custom.protozNcmd/protoc-gen-go/testdata/import_option_unlinked/import_option_unlinked.proto" |
| |
| var file_cmd_protoc_gen_go_testdata_import_option_import_option_proto_msgTypes = make([]protoimpl.MessageInfo, 1) |
| var file_cmd_protoc_gen_go_testdata_import_option_import_option_proto_goTypes = []any{ |
| (*TestMessage)(nil), // 0: testimportoption.TestMessage |
| } |
| var file_cmd_protoc_gen_go_testdata_import_option_import_option_proto_depIdxs = []int32{ |
| 0, // [0:0] is the sub-list for method output_type |
| 0, // [0:0] is the sub-list for method input_type |
| 0, // [0:0] is the sub-list for extension type_name |
| 0, // [0:0] is the sub-list for extension extendee |
| 0, // [0:0] is the sub-list for field type_name |
| } |
| |
| func init() { file_cmd_protoc_gen_go_testdata_import_option_import_option_proto_init() } |
| func file_cmd_protoc_gen_go_testdata_import_option_import_option_proto_init() { |
| if File_cmd_protoc_gen_go_testdata_import_option_import_option_proto != nil { |
| return |
| } |
| type x struct{} |
| out := protoimpl.TypeBuilder{ |
| File: protoimpl.DescBuilder{ |
| GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
| RawDescriptor: unsafe.Slice(unsafe.StringData(file_cmd_protoc_gen_go_testdata_import_option_import_option_proto_rawDesc), len(file_cmd_protoc_gen_go_testdata_import_option_import_option_proto_rawDesc)), |
| NumEnums: 0, |
| NumMessages: 1, |
| NumExtensions: 0, |
| NumServices: 0, |
| }, |
| GoTypes: file_cmd_protoc_gen_go_testdata_import_option_import_option_proto_goTypes, |
| DependencyIndexes: file_cmd_protoc_gen_go_testdata_import_option_import_option_proto_depIdxs, |
| MessageInfos: file_cmd_protoc_gen_go_testdata_import_option_import_option_proto_msgTypes, |
| }.Build() |
| File_cmd_protoc_gen_go_testdata_import_option_import_option_proto = out.File |
| file_cmd_protoc_gen_go_testdata_import_option_import_option_proto_goTypes = nil |
| file_cmd_protoc_gen_go_testdata_import_option_import_option_proto_depIdxs = nil |
| } |