// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.11
// 	protoc        v3.20.3
// source: v3lock.proto

package v3lockpb

import (
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"

	etcdserverpb "go.etcd.io/etcd/api/v3/etcdserverpb"
	_ "google.golang.org/genproto/googleapis/api/annotations"
	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)

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 LockRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// name is the identifier for the distributed shared lock to be acquired.
	Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// lease is the ID of the lease that will be attached to ownership of the
	// lock. If the lease expires or is revoked and currently holds the lock,
	// the lock is automatically released. Calls to Lock with the same lease will
	// be treated as a single acquisition; locking twice with the same lease is a
	// no-op.
	Lease         int64 `protobuf:"varint,2,opt,name=lease,proto3" json:"lease,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*LockRequest) ProtoMessage() {}

func (x *LockRequest) ProtoReflect() protoreflect.Message {
	mi := &file_v3lock_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 LockRequest.ProtoReflect.Descriptor instead.
func (*LockRequest) Descriptor() ([]byte, []int) {
	return file_v3lock_proto_rawDescGZIP(), []int{0}
}

func (x *LockRequest) GetName() []byte {
	if x != nil {
		return x.Name
	}
	return nil
}

func (x *LockRequest) GetLease() int64 {
	if x != nil {
		return x.Lease
	}
	return 0
}

type LockResponse struct {
	state  protoimpl.MessageState       `protogen:"open.v1"`
	Header *etcdserverpb.ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	// key is a key that will exist on etcd for the duration that the Lock caller
	// owns the lock. Users should not modify this key or the lock may exhibit
	// undefined behavior.
	Key           []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

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

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

func (*LockResponse) ProtoMessage() {}

func (x *LockResponse) ProtoReflect() protoreflect.Message {
	mi := &file_v3lock_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 LockResponse.ProtoReflect.Descriptor instead.
func (*LockResponse) Descriptor() ([]byte, []int) {
	return file_v3lock_proto_rawDescGZIP(), []int{1}
}

func (x *LockResponse) GetHeader() *etcdserverpb.ResponseHeader {
	if x != nil {
		return x.Header
	}
	return nil
}

func (x *LockResponse) GetKey() []byte {
	if x != nil {
		return x.Key
	}
	return nil
}

type UnlockRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// key is the lock ownership key granted by Lock.
	Key           []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *UnlockRequest) Reset() {
	*x = UnlockRequest{}
	mi := &file_v3lock_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*UnlockRequest) ProtoMessage() {}

func (x *UnlockRequest) ProtoReflect() protoreflect.Message {
	mi := &file_v3lock_proto_msgTypes[2]
	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 UnlockRequest.ProtoReflect.Descriptor instead.
func (*UnlockRequest) Descriptor() ([]byte, []int) {
	return file_v3lock_proto_rawDescGZIP(), []int{2}
}

func (x *UnlockRequest) GetKey() []byte {
	if x != nil {
		return x.Key
	}
	return nil
}

type UnlockResponse struct {
	state         protoimpl.MessageState       `protogen:"open.v1"`
	Header        *etcdserverpb.ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *UnlockResponse) Reset() {
	*x = UnlockResponse{}
	mi := &file_v3lock_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

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

func (*UnlockResponse) ProtoMessage() {}

func (x *UnlockResponse) ProtoReflect() protoreflect.Message {
	mi := &file_v3lock_proto_msgTypes[3]
	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 UnlockResponse.ProtoReflect.Descriptor instead.
func (*UnlockResponse) Descriptor() ([]byte, []int) {
	return file_v3lock_proto_rawDescGZIP(), []int{3}
}

func (x *UnlockResponse) GetHeader() *etcdserverpb.ResponseHeader {
	if x != nil {
		return x.Header
	}
	return nil
}

var File_v3lock_proto protoreflect.FileDescriptor

const file_v3lock_proto_rawDesc = "" +
	"\n" +
	"\fv3lock.proto\x12\bv3lockpb\x1a\x1fetcd/api/etcdserverpb/rpc.proto\x1a\x1cgoogle/api/annotations.proto\"7\n" +
	"\vLockRequest\x12\x12\n" +
	"\x04name\x18\x01 \x01(\fR\x04name\x12\x14\n" +
	"\x05lease\x18\x02 \x01(\x03R\x05lease\"V\n" +
	"\fLockResponse\x124\n" +
	"\x06header\x18\x01 \x01(\v2\x1c.etcdserverpb.ResponseHeaderR\x06header\x12\x10\n" +
	"\x03key\x18\x02 \x01(\fR\x03key\"!\n" +
	"\rUnlockRequest\x12\x10\n" +
	"\x03key\x18\x01 \x01(\fR\x03key\"F\n" +
	"\x0eUnlockResponse\x124\n" +
	"\x06header\x18\x01 \x01(\v2\x1c.etcdserverpb.ResponseHeaderR\x06header2\xb0\x01\n" +
	"\x04Lock\x12O\n" +
	"\x04Lock\x12\x15.v3lockpb.LockRequest\x1a\x16.v3lockpb.LockResponse\"\x18\x82\xd3\xe4\x93\x02\x12:\x01*\"\r/v3/lock/lock\x12W\n" +
	"\x06Unlock\x12\x17.v3lockpb.UnlockRequest\x1a\x18.v3lockpb.UnlockResponse\"\x1a\x82\xd3\xe4\x93\x02\x14:\x01*\"\x0f/v3/lock/unlockB:Z8go.etcd.io/etcd/server/v3/etcdserver/api/v3lock/v3lockpbb\x06proto3"

var (
	file_v3lock_proto_rawDescOnce sync.Once
	file_v3lock_proto_rawDescData []byte
)

func file_v3lock_proto_rawDescGZIP() []byte {
	file_v3lock_proto_rawDescOnce.Do(func() {
		file_v3lock_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_v3lock_proto_rawDesc), len(file_v3lock_proto_rawDesc)))
	})
	return file_v3lock_proto_rawDescData
}

var file_v3lock_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_v3lock_proto_goTypes = []any{
	(*LockRequest)(nil),                 // 0: v3lockpb.LockRequest
	(*LockResponse)(nil),                // 1: v3lockpb.LockResponse
	(*UnlockRequest)(nil),               // 2: v3lockpb.UnlockRequest
	(*UnlockResponse)(nil),              // 3: v3lockpb.UnlockResponse
	(*etcdserverpb.ResponseHeader)(nil), // 4: etcdserverpb.ResponseHeader
}
var file_v3lock_proto_depIdxs = []int32{
	4, // 0: v3lockpb.LockResponse.header:type_name -> etcdserverpb.ResponseHeader
	4, // 1: v3lockpb.UnlockResponse.header:type_name -> etcdserverpb.ResponseHeader
	0, // 2: v3lockpb.Lock.Lock:input_type -> v3lockpb.LockRequest
	2, // 3: v3lockpb.Lock.Unlock:input_type -> v3lockpb.UnlockRequest
	1, // 4: v3lockpb.Lock.Lock:output_type -> v3lockpb.LockResponse
	3, // 5: v3lockpb.Lock.Unlock:output_type -> v3lockpb.UnlockResponse
	4, // [4:6] is the sub-list for method output_type
	2, // [2:4] is the sub-list for method input_type
	2, // [2:2] is the sub-list for extension type_name
	2, // [2:2] is the sub-list for extension extendee
	0, // [0:2] is the sub-list for field type_name
}

func init() { file_v3lock_proto_init() }
func file_v3lock_proto_init() {
	if File_v3lock_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_v3lock_proto_rawDesc), len(file_v3lock_proto_rawDesc)),
			NumEnums:      0,
			NumMessages:   4,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_v3lock_proto_goTypes,
		DependencyIndexes: file_v3lock_proto_depIdxs,
		MessageInfos:      file_v3lock_proto_msgTypes,
	}.Build()
	File_v3lock_proto = out.File
	file_v3lock_proto_goTypes = nil
	file_v3lock_proto_depIdxs = nil
}
