// Copyright 2025 Buf Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.11
// 	protoc        (unknown)
// source: buf/descriptor/v1/source_code_info_extension.proto

//go:build protoopaque

package descriptorv1

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

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

// Extensions to google.protobuf.SourceCodeInfo.
//
// These are encapsulated in a single message so that a single extension number can be used
// on google.protobuf.SourceCodeInfo.
type SourceCodeInfoExtension struct {
	state                          protoimpl.MessageState `protogen:"opaque.v1"`
	xxx_hidden_IsSyntaxUnspecified bool                   `protobuf:"varint,2,opt,name=is_syntax_unspecified,json=isSyntaxUnspecified,proto3"`
	xxx_hidden_UnusedDependency    []int32                `protobuf:"varint,3,rep,packed,name=unused_dependency,json=unusedDependency,proto3"`
	unknownFields                  protoimpl.UnknownFields
	sizeCache                      protoimpl.SizeCache
}

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

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

func (*SourceCodeInfoExtension) ProtoMessage() {}

func (x *SourceCodeInfoExtension) ProtoReflect() protoreflect.Message {
	mi := &file_buf_descriptor_v1_source_code_info_extension_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 *SourceCodeInfoExtension) GetIsSyntaxUnspecified() bool {
	if x != nil {
		return x.xxx_hidden_IsSyntaxUnspecified
	}
	return false
}

func (x *SourceCodeInfoExtension) GetUnusedDependency() []int32 {
	if x != nil {
		return x.xxx_hidden_UnusedDependency
	}
	return nil
}

func (x *SourceCodeInfoExtension) SetIsSyntaxUnspecified(v bool) {
	x.xxx_hidden_IsSyntaxUnspecified = v
}

func (x *SourceCodeInfoExtension) SetUnusedDependency(v []int32) {
	x.xxx_hidden_UnusedDependency = v
}

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

	// Whether the file did not have a syntax explicitly specified.
	//
	// Per the FileDescriptorProto spec, it would be fine in this case to just leave the syntax field
	// unset to denote this and to set the syntax field to "proto2" if it is specified. However,
	// protoc does not set the syntax field if it was "proto2". Plugins may want to differentiate
	// between "proto2" and unset, and this field allows them to.
	IsSyntaxUnspecified bool
	// The indexes within the dependency field on FileDescriptorProto for those dependencies that
	// are not used.
	//
	// This matches the shape of the public_dependency and weak_dependency fields.
	UnusedDependency []int32
}

func (b0 SourceCodeInfoExtension_builder) Build() *SourceCodeInfoExtension {
	m0 := &SourceCodeInfoExtension{}
	b, x := &b0, m0
	_, _ = b, x
	x.xxx_hidden_IsSyntaxUnspecified = b.IsSyntaxUnspecified
	x.xxx_hidden_UnusedDependency = b.UnusedDependency
	return m0
}

var File_buf_descriptor_v1_source_code_info_extension_proto protoreflect.FileDescriptor

const file_buf_descriptor_v1_source_code_info_extension_proto_rawDesc = "" +
	"\n" +
	"2buf/descriptor/v1/source_code_info_extension.proto\x12\x11buf.descriptor.v1\"z\n" +
	"\x17SourceCodeInfoExtension\x122\n" +
	"\x15is_syntax_unspecified\x18\x02 \x01(\bR\x13isSyntaxUnspecified\x12+\n" +
	"\x11unused_dependency\x18\x03 \x03(\x05R\x10unusedDependencyB]Z[buf.build/gen/go/bufbuild/protodescriptor/protocolbuffers/go/buf/descriptor/v1;descriptorv1b\x06proto3"

var file_buf_descriptor_v1_source_code_info_extension_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
var file_buf_descriptor_v1_source_code_info_extension_proto_goTypes = []any{
	(*SourceCodeInfoExtension)(nil), // 0: buf.descriptor.v1.SourceCodeInfoExtension
}
var file_buf_descriptor_v1_source_code_info_extension_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_buf_descriptor_v1_source_code_info_extension_proto_init() }
func file_buf_descriptor_v1_source_code_info_extension_proto_init() {
	if File_buf_descriptor_v1_source_code_info_extension_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_buf_descriptor_v1_source_code_info_extension_proto_rawDesc), len(file_buf_descriptor_v1_source_code_info_extension_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   1,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_buf_descriptor_v1_source_code_info_extension_proto_goTypes,
		DependencyIndexes: file_buf_descriptor_v1_source_code_info_extension_proto_depIdxs,
		MessageInfos:      file_buf_descriptor_v1_source_code_info_extension_proto_msgTypes,
	}.Build()
	File_buf_descriptor_v1_source_code_info_extension_proto = out.File
	file_buf_descriptor_v1_source_code_info_extension_proto_goTypes = nil
	file_buf_descriptor_v1_source_code_info_extension_proto_depIdxs = nil
}
