// Code generated by protoc-gen-go. DO NOT EDIT.
// source: pkg/storage/cbt/nbd/v1/nbd.proto

/*
Package v1 is a generated protocol buffer package.

It is generated from these files:

	pkg/storage/cbt/nbd/v1/nbd.proto

It has these top-level messages:

	MapRequest
	MapResponse
	Extent
	ReadRequest
	DataChunk
*/
package v1

import (
	fmt "fmt"
	math "math"

	proto "github.com/golang/protobuf/proto"

	context "golang.org/x/net/context"
	grpc "google.golang.org/grpc"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package

type MapRequest struct {
	ExportName string `protobuf:"bytes,1,opt,name=export_name,json=exportName" json:"export_name,omitempty"`
	BitmapName string `protobuf:"bytes,2,opt,name=bitmap_name,json=bitmapName" json:"bitmap_name,omitempty"`
	Offset     uint64 `protobuf:"varint,3,opt,name=offset" json:"offset,omitempty"`
	Length     uint64 `protobuf:"varint,4,opt,name=length" json:"length,omitempty"`
}

func (m *MapRequest) Reset()                    { *m = MapRequest{} }
func (m *MapRequest) String() string            { return proto.CompactTextString(m) }
func (*MapRequest) ProtoMessage()               {}
func (*MapRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }

func (m *MapRequest) GetExportName() string {
	if m != nil {
		return m.ExportName
	}
	return ""
}

func (m *MapRequest) GetBitmapName() string {
	if m != nil {
		return m.BitmapName
	}
	return ""
}

func (m *MapRequest) GetOffset() uint64 {
	if m != nil {
		return m.Offset
	}
	return 0
}

func (m *MapRequest) GetLength() uint64 {
	if m != nil {
		return m.Length
	}
	return 0
}

type MapResponse struct {
	Extents    []*Extent `protobuf:"bytes,1,rep,name=extents" json:"extents,omitempty"`
	NextOffset uint64    `protobuf:"varint,2,opt,name=next_offset,json=nextOffset" json:"next_offset,omitempty"`
}

func (m *MapResponse) Reset()                    { *m = MapResponse{} }
func (m *MapResponse) String() string            { return proto.CompactTextString(m) }
func (*MapResponse) ProtoMessage()               {}
func (*MapResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }

func (m *MapResponse) GetExtents() []*Extent {
	if m != nil {
		return m.Extents
	}
	return nil
}

func (m *MapResponse) GetNextOffset() uint64 {
	if m != nil {
		return m.NextOffset
	}
	return 0
}

type Extent struct {
	Offset      uint64 `protobuf:"varint,1,opt,name=offset" json:"offset,omitempty"`
	Length      uint64 `protobuf:"varint,2,opt,name=length" json:"length,omitempty"`
	Flags       uint64 `protobuf:"varint,3,opt,name=flags" json:"flags,omitempty"`
	Description string `protobuf:"bytes,4,opt,name=description" json:"description,omitempty"`
}

func (m *Extent) Reset()                    { *m = Extent{} }
func (m *Extent) String() string            { return proto.CompactTextString(m) }
func (*Extent) ProtoMessage()               {}
func (*Extent) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }

func (m *Extent) GetOffset() uint64 {
	if m != nil {
		return m.Offset
	}
	return 0
}

func (m *Extent) GetLength() uint64 {
	if m != nil {
		return m.Length
	}
	return 0
}

func (m *Extent) GetFlags() uint64 {
	if m != nil {
		return m.Flags
	}
	return 0
}

func (m *Extent) GetDescription() string {
	if m != nil {
		return m.Description
	}
	return ""
}

type ReadRequest struct {
	ExportName string `protobuf:"bytes,1,opt,name=export_name,json=exportName" json:"export_name,omitempty"`
	Offset     uint64 `protobuf:"varint,2,opt,name=offset" json:"offset,omitempty"`
	Length     uint64 `protobuf:"varint,3,opt,name=length" json:"length,omitempty"`
}

func (m *ReadRequest) Reset()                    { *m = ReadRequest{} }
func (m *ReadRequest) String() string            { return proto.CompactTextString(m) }
func (*ReadRequest) ProtoMessage()               {}
func (*ReadRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }

func (m *ReadRequest) GetExportName() string {
	if m != nil {
		return m.ExportName
	}
	return ""
}

func (m *ReadRequest) GetOffset() uint64 {
	if m != nil {
		return m.Offset
	}
	return 0
}

func (m *ReadRequest) GetLength() uint64 {
	if m != nil {
		return m.Length
	}
	return 0
}

type DataChunk struct {
	Offset uint64 `protobuf:"varint,1,opt,name=offset" json:"offset,omitempty"`
	Data   []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
}

func (m *DataChunk) Reset()                    { *m = DataChunk{} }
func (m *DataChunk) String() string            { return proto.CompactTextString(m) }
func (*DataChunk) ProtoMessage()               {}
func (*DataChunk) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }

func (m *DataChunk) GetOffset() uint64 {
	if m != nil {
		return m.Offset
	}
	return 0
}

func (m *DataChunk) GetData() []byte {
	if m != nil {
		return m.Data
	}
	return nil
}

func init() {
	proto.RegisterType((*MapRequest)(nil), "kubevirt.nbd.MapRequest")
	proto.RegisterType((*MapResponse)(nil), "kubevirt.nbd.MapResponse")
	proto.RegisterType((*Extent)(nil), "kubevirt.nbd.Extent")
	proto.RegisterType((*ReadRequest)(nil), "kubevirt.nbd.ReadRequest")
	proto.RegisterType((*DataChunk)(nil), "kubevirt.nbd.DataChunk")
}

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4

// Client API for NBD service

type NBDClient interface {
	Map(ctx context.Context, in *MapRequest, opts ...grpc.CallOption) (NBD_MapClient, error)
	Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (NBD_ReadClient, error)
}

type nBDClient struct {
	cc *grpc.ClientConn
}

func NewNBDClient(cc *grpc.ClientConn) NBDClient {
	return &nBDClient{cc}
}

func (c *nBDClient) Map(ctx context.Context, in *MapRequest, opts ...grpc.CallOption) (NBD_MapClient, error) {
	stream, err := grpc.NewClientStream(ctx, &_NBD_serviceDesc.Streams[0], c.cc, "/kubevirt.nbd.NBD/Map", opts...)
	if err != nil {
		return nil, err
	}
	x := &nBDMapClient{stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

type NBD_MapClient interface {
	Recv() (*MapResponse, error)
	grpc.ClientStream
}

type nBDMapClient struct {
	grpc.ClientStream
}

func (x *nBDMapClient) Recv() (*MapResponse, error) {
	m := new(MapResponse)
	if err := x.ClientStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

func (c *nBDClient) Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (NBD_ReadClient, error) {
	stream, err := grpc.NewClientStream(ctx, &_NBD_serviceDesc.Streams[1], c.cc, "/kubevirt.nbd.NBD/Read", opts...)
	if err != nil {
		return nil, err
	}
	x := &nBDReadClient{stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

type NBD_ReadClient interface {
	Recv() (*DataChunk, error)
	grpc.ClientStream
}

type nBDReadClient struct {
	grpc.ClientStream
}

func (x *nBDReadClient) Recv() (*DataChunk, error) {
	m := new(DataChunk)
	if err := x.ClientStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

// Server API for NBD service

type NBDServer interface {
	Map(*MapRequest, NBD_MapServer) error
	Read(*ReadRequest, NBD_ReadServer) error
}

func RegisterNBDServer(s *grpc.Server, srv NBDServer) {
	s.RegisterService(&_NBD_serviceDesc, srv)
}

func _NBD_Map_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(MapRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(NBDServer).Map(m, &nBDMapServer{stream})
}

type NBD_MapServer interface {
	Send(*MapResponse) error
	grpc.ServerStream
}

type nBDMapServer struct {
	grpc.ServerStream
}

func (x *nBDMapServer) Send(m *MapResponse) error {
	return x.ServerStream.SendMsg(m)
}

func _NBD_Read_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(ReadRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(NBDServer).Read(m, &nBDReadServer{stream})
}

type NBD_ReadServer interface {
	Send(*DataChunk) error
	grpc.ServerStream
}

type nBDReadServer struct {
	grpc.ServerStream
}

func (x *nBDReadServer) Send(m *DataChunk) error {
	return x.ServerStream.SendMsg(m)
}

var _NBD_serviceDesc = grpc.ServiceDesc{
	ServiceName: "kubevirt.nbd.NBD",
	HandlerType: (*NBDServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Map",
			Handler:       _NBD_Map_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Read",
			Handler:       _NBD_Read_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "pkg/storage/cbt/nbd/v1/nbd.proto",
}

func init() { proto.RegisterFile("pkg/storage/cbt/nbd/v1/nbd.proto", fileDescriptor0) }

var fileDescriptor0 = []byte{
	// 357 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x3f, 0x8f, 0xe2, 0x30,
	0x10, 0xc5, 0x2f, 0x7f, 0x8e, 0x13, 0x13, 0x2a, 0x0b, 0xdd, 0xe5, 0x68, 0x2e, 0x4a, 0x45, 0x95,
	0x1c, 0x5c, 0x71, 0x1d, 0x05, 0xc7, 0x95, 0xb0, 0x52, 0xca, 0x2d, 0x16, 0x39, 0x64, 0x08, 0x11,
	0xe0, 0x78, 0xe3, 0x01, 0x51, 0x6d, 0xb7, 0xdf, 0x7b, 0x65, 0x9b, 0x5d, 0xc2, 0x6a, 0x91, 0xb6,
	0x4a, 0xe6, 0xcd, 0xb3, 0xfd, 0x7b, 0x63, 0x43, 0x24, 0xb7, 0x65, 0xaa, 0xa8, 0x6e, 0x78, 0x89,
	0xe9, 0x2a, 0xa7, 0x54, 0xe4, 0x45, 0x7a, 0x1c, 0xe9, 0x4f, 0x22, 0x9b, 0x9a, 0x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