// 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_unlinked/import_option_unlinked.proto

package import_option_unlinked

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	descriptorpb "google.golang.org/protobuf/types/descriptorpb"
	reflect "reflect"
	unsafe "unsafe"
)

type OptionsMessage struct {
	state                  protoimpl.MessageState `protogen:"opaque.v1"`
	xxx_hidden_PlainField  int32                  `protobuf:"varint,1,opt,name=plain_field,json=plainField"`
	XXX_raceDetectHookData protoimpl.RaceDetectHookData
	XXX_presence           [1]uint32
	unknownFields          protoimpl.UnknownFields
	sizeCache              protoimpl.SizeCache
}

func (x *OptionsMessage) Reset() {
	*x = OptionsMessage{}
	mi := &file_cmd_protoc_gen_go_testdata_import_option_unlinked_import_option_unlinked_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *OptionsMessage) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*OptionsMessage) ProtoMessage() {}

func (x *OptionsMessage) ProtoReflect() protoreflect.Message {
	mi := &file_cmd_protoc_gen_go_testdata_import_option_unlinked_import_option_unlinked_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 *OptionsMessage) GetPlainField() int32 {
	if x != nil {
		return x.xxx_hidden_PlainField
	}
	return 0
}

func (x *OptionsMessage) SetPlainField(v int32) {
	x.xxx_hidden_PlainField = v
	protoimpl.X.SetPresent(&(x.XXX_presence[0]), 0, 1)
}

func (x *OptionsMessage) HasPlainField() bool {
	if x == nil {
		return false
	}
	return protoimpl.X.Present(&(x.XXX_presence[0]), 0)
}

func (x *OptionsMessage) ClearPlainField() {
	protoimpl.X.ClearPresent(&(x.XXX_presence[0]), 0)
	x.xxx_hidden_PlainField = 0
}

type OptionsMessage_builder struct {
	_ [0]func() // Prevents comparability and use of unkeyed literals for the builder.

	PlainField *int32
}

func (b0 OptionsMessage_builder) Build() *OptionsMessage {
	m0 := &OptionsMessage{}
	b, x := &b0, m0
	_, _ = b, x
	if b.PlainField != nil {
		protoimpl.X.SetPresentNonAtomic(&(x.XXX_presence[0]), 0, 1)
		x.xxx_hidden_PlainField = *b.PlainField
	}
	return m0
}

var file_cmd_protoc_gen_go_testdata_import_option_unlinked_import_option_unlinked_proto_extTypes = []protoimpl.ExtensionInfo{
	{
		ExtendedType:  (*descriptorpb.FieldOptions)(nil),
		ExtensionType: (*OptionsMessage)(nil),
		Field:         504589222,
		Name:          "testimportoption_unlinked.field_option",
		Tag:           "bytes,504589222,opt,name=field_option",
		Filename:      "cmd/protoc-gen-go/testdata/import_option_unlinked/import_option_unlinked.proto",
	},
}

// Extension fields to descriptorpb.FieldOptions.
var (
	// optional testimportoption_unlinked.OptionsMessage field_option = 504589222;
	E_FieldOption = &file_cmd_protoc_gen_go_testdata_import_option_unlinked_import_option_unlinked_proto_extTypes[0]
)

var File_cmd_protoc_gen_go_testdata_import_option_unlinked_import_option_unlinked_proto protoreflect.FileDescriptor

const file_cmd_protoc_gen_go_testdata_import_option_unlinked_import_option_unlinked_proto_rawDesc = "" +
	"\n" +
	"Ncmd/protoc-gen-go/testdata/import_option_unlinked/import_option_unlinked.proto\x12\x19testimportoption_unlinked\x1a google/protobuf/descriptor.proto\"1\n" +
	"\x0eOptionsMessage\x12\x1f\n" +
	"\vplain_field\x18\x01 \x01(\x05R\n" +
	"plainField:o\n" +
	"\ffield_option\x12\x1d.google.protobuf.FieldOptions\x18\xa6\xd7\xcd\xf0\x01 \x01(\v2).testimportoption_unlinked.OptionsMessageR\vfieldOptionBNZLgoogle.golang.org/protobuf/cmd/protoc-gen-go/testdata/import_option_unlinkedb\beditionsp\xe9\a"

var file_cmd_protoc_gen_go_testdata_import_option_unlinked_import_option_unlinked_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_cmd_protoc_gen_go_testdata_import_option_unlinked_import_option_unlinked_proto_goTypes = []any{
	(*OptionsMessage)(nil),            // 0: testimportoption_unlinked.OptionsMessage
	(*descriptorpb.FieldOptions)(nil), // 1: google.protobuf.FieldOptions
}
var file_cmd_protoc_gen_go_testdata_import_option_unlinked_import_option_unlinked_proto_depIdxs = []int32{
	1, // 0: testimportoption_unlinked.field_option:extendee -> google.protobuf.FieldOptions
	0, // 1: testimportoption_unlinked.field_option:type_name -> testimportoption_unlinked.OptionsMessage
	2, // [2:2] is the sub-list for method output_type
	2, // [2:2] is the sub-list for method input_type
	1, // [1:2] is the sub-list for extension type_name
	0, // [0:1] 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_unlinked_import_option_unlinked_proto_init()
}
func file_cmd_protoc_gen_go_testdata_import_option_unlinked_import_option_unlinked_proto_init() {
	if File_cmd_protoc_gen_go_testdata_import_option_unlinked_import_option_unlinked_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_unlinked_import_option_unlinked_proto_rawDesc), len(file_cmd_protoc_gen_go_testdata_import_option_unlinked_import_option_unlinked_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   1,
			NumExtensions: 1,
			NumServices:   0,
		},
		GoTypes:           file_cmd_protoc_gen_go_testdata_import_option_unlinked_import_option_unlinked_proto_goTypes,
		DependencyIndexes: file_cmd_protoc_gen_go_testdata_import_option_unlinked_import_option_unlinked_proto_depIdxs,
		MessageInfos:      file_cmd_protoc_gen_go_testdata_import_option_unlinked_import_option_unlinked_proto_msgTypes,
		ExtensionInfos:    file_cmd_protoc_gen_go_testdata_import_option_unlinked_import_option_unlinked_proto_extTypes,
	}.Build()
	File_cmd_protoc_gen_go_testdata_import_option_unlinked_import_option_unlinked_proto = out.File
	file_cmd_protoc_gen_go_testdata_import_option_unlinked_import_option_unlinked_proto_goTypes = nil
	file_cmd_protoc_gen_go_testdata_import_option_unlinked_import_option_unlinked_proto_depIdxs = nil
}
