// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.9
// 	protoc        v6.31.1
// source: github.com/buildbarn/bb-storage/pkg/proto/configuration/blockdevice/blockdevice.proto

package blockdevice

import (
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	reflect "reflect"
	sync "sync"
	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)
)

type FileConfiguration struct {
	state         protoimpl.MessageState `protogen:"open.v1"`
	Path          string                 `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
	SizeBytes     int64                  `protobuf:"varint,2,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*FileConfiguration) ProtoMessage() {}

func (x *FileConfiguration) ProtoReflect() protoreflect.Message {
	mi := &file_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_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)
}

// Deprecated: Use FileConfiguration.ProtoReflect.Descriptor instead.
func (*FileConfiguration) Descriptor() ([]byte, []int) {
	return file_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_proto_rawDescGZIP(), []int{0}
}

func (x *FileConfiguration) GetPath() string {
	if x != nil {
		return x.Path
	}
	return ""
}

func (x *FileConfiguration) GetSizeBytes() int64 {
	if x != nil {
		return x.SizeBytes
	}
	return 0
}

type Configuration struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Types that are valid to be assigned to Source:
	//
	//	*Configuration_DevicePath
	//	*Configuration_File
	Source                isConfiguration_Source `protobuf_oneof:"source"`
	WriteConcurrencyLimit int64                  `protobuf:"varint,3,opt,name=write_concurrency_limit,json=writeConcurrencyLimit,proto3" json:"write_concurrency_limit,omitempty"`
	unknownFields         protoimpl.UnknownFields
	sizeCache             protoimpl.SizeCache
}

func (x *Configuration) Reset() {
	*x = Configuration{}
	mi := &file_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*Configuration) ProtoMessage() {}

func (x *Configuration) ProtoReflect() protoreflect.Message {
	mi := &file_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_proto_msgTypes[1]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use Configuration.ProtoReflect.Descriptor instead.
func (*Configuration) Descriptor() ([]byte, []int) {
	return file_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_proto_rawDescGZIP(), []int{1}
}

func (x *Configuration) GetSource() isConfiguration_Source {
	if x != nil {
		return x.Source
	}
	return nil
}

func (x *Configuration) GetDevicePath() string {
	if x != nil {
		if x, ok := x.Source.(*Configuration_DevicePath); ok {
			return x.DevicePath
		}
	}
	return ""
}

func (x *Configuration) GetFile() *FileConfiguration {
	if x != nil {
		if x, ok := x.Source.(*Configuration_File); ok {
			return x.File
		}
	}
	return nil
}

func (x *Configuration) GetWriteConcurrencyLimit() int64 {
	if x != nil {
		return x.WriteConcurrencyLimit
	}
	return 0
}

type isConfiguration_Source interface {
	isConfiguration_Source()
}

type Configuration_DevicePath struct {
	DevicePath string `protobuf:"bytes,1,opt,name=device_path,json=devicePath,proto3,oneof"`
}

type Configuration_File struct {
	File *FileConfiguration `protobuf:"bytes,2,opt,name=file,proto3,oneof"`
}

func (*Configuration_DevicePath) isConfiguration_Source() {}

func (*Configuration_File) isConfiguration_Source() {}

var File_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_proto protoreflect.FileDescriptor

const file_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_proto_rawDesc = "" +
	"\n" +
	"Ugithub.com/buildbarn/bb-storage/pkg/proto/configuration/blockdevice/blockdevice.proto\x12#buildbarn.configuration.blockdevice\"F\n" +
	"\x11FileConfiguration\x12\x12\n" +
	"\x04path\x18\x01 \x01(\tR\x04path\x12\x1d\n" +
	"\n" +
	"size_bytes\x18\x02 \x01(\x03R\tsizeBytes\"\xc2\x01\n" +
	"\rConfiguration\x12!\n" +
	"\vdevice_path\x18\x01 \x01(\tH\x00R\n" +
	"devicePath\x12L\n" +
	"\x04file\x18\x02 \x01(\v26.buildbarn.configuration.blockdevice.FileConfigurationH\x00R\x04file\x126\n" +
	"\x17write_concurrency_limit\x18\x03 \x01(\x03R\x15writeConcurrencyLimitB\b\n" +
	"\x06sourceBEZCgithub.com/buildbarn/bb-storage/pkg/proto/configuration/blockdeviceb\x06proto3"

var (
	file_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_proto_rawDescOnce sync.Once
	file_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_proto_rawDescData []byte
)

func file_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_proto_rawDescGZIP() []byte {
	file_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_proto_rawDescOnce.Do(func() {
		file_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_proto_rawDesc), len(file_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_proto_rawDesc)))
	})
	return file_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_proto_rawDescData
}

var file_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_proto_goTypes = []any{
	(*FileConfiguration)(nil), // 0: buildbarn.configuration.blockdevice.FileConfiguration
	(*Configuration)(nil),     // 1: buildbarn.configuration.blockdevice.Configuration
}
var file_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_proto_depIdxs = []int32{
	0, // 0: buildbarn.configuration.blockdevice.Configuration.file:type_name -> buildbarn.configuration.blockdevice.FileConfiguration
	1, // [1:1] is the sub-list for method output_type
	1, // [1:1] is the sub-list for method input_type
	1, // [1:1] is the sub-list for extension type_name
	1, // [1:1] is the sub-list for extension extendee
	0, // [0:1] is the sub-list for field type_name
}

func init() {
	file_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_proto_init()
}
func file_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_proto_init() {
	if File_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_proto != nil {
		return
	}
	file_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_proto_msgTypes[1].OneofWrappers = []any{
		(*Configuration_DevicePath)(nil),
		(*Configuration_File)(nil),
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_proto_rawDesc), len(file_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   2,
			NumExtensions: 0,
			NumServices:   0,
		},
		GoTypes:           file_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_proto_goTypes,
		DependencyIndexes: file_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_proto_depIdxs,
		MessageInfos:      file_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_proto_msgTypes,
	}.Build()
	File_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_proto = out.File
	file_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_proto_goTypes = nil
	file_github_com_buildbarn_bb_storage_pkg_proto_configuration_blockdevice_blockdevice_proto_depIdxs = nil
}
