// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.2
// - protoc             v7.35.0
// source: module/base/cloud/proto/private.proto

package cloud

import (
	protobuf "bsm/full/protobuf"
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	Private_CreatePrivateData_FullMethodName    = "/cloud.Private/CreatePrivateData"
	Private_GetPrivateData_FullMethodName       = "/cloud.Private/GetPrivateData"
	Private_UpdatePrivateData_FullMethodName    = "/cloud.Private/UpdatePrivateData"
	Private_DeletePrivateData_FullMethodName    = "/cloud.Private/DeletePrivateData"
	Private_ListPrivateData_FullMethodName      = "/cloud.Private/ListPrivateData"
	Private_GetPrivateDataByType_FullMethodName = "/cloud.Private/GetPrivateDataByType"
	Private_SearchPrivateData_FullMethodName    = "/cloud.Private/SearchPrivateData"
	Private_EncryptData_FullMethodName          = "/cloud.Private/EncryptData"
	Private_DecryptData_FullMethodName          = "/cloud.Private/DecryptData"
)

// PrivateClient is the client API for Private service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// 隐私数据服务
type PrivateClient interface {
	// 创建隐私数据
	CreatePrivateData(ctx context.Context, in *CreatePrivateDataRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
	// 获取隐私数据详情
	GetPrivateData(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CloudPrivateItem, error)
	// 更新隐私数据
	UpdatePrivateData(ctx context.Context, in *CloudPrivateItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
	// 删除隐私数据
	DeletePrivateData(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
	// 获取隐私数据列表
	ListPrivateData(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListPrivateDataResponse, error)
	// 按类型获取隐私数据
	GetPrivateDataByType(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListPrivateDataResponse, error)
	// 搜索隐私数据
	SearchPrivateData(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListPrivateDataResponse, error)
	// 加密数据
	EncryptData(ctx context.Context, in *DataRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
	// 解密数据
	DecryptData(ctx context.Context, in *DataRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error)
}

type privateClient struct {
	cc grpc.ClientConnInterface
}

func NewPrivateClient(cc grpc.ClientConnInterface) PrivateClient {
	return &privateClient{cc}
}

func (c *privateClient) CreatePrivateData(ctx context.Context, in *CreatePrivateDataRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(protobuf.StatusReply)
	err := c.cc.Invoke(ctx, Private_CreatePrivateData_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *privateClient) GetPrivateData(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*CloudPrivateItem, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(CloudPrivateItem)
	err := c.cc.Invoke(ctx, Private_GetPrivateData_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *privateClient) UpdatePrivateData(ctx context.Context, in *CloudPrivateItem, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(protobuf.StatusReply)
	err := c.cc.Invoke(ctx, Private_UpdatePrivateData_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *privateClient) DeletePrivateData(ctx context.Context, in *protobuf.IdentRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(protobuf.StatusReply)
	err := c.cc.Invoke(ctx, Private_DeletePrivateData_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *privateClient) ListPrivateData(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListPrivateDataResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListPrivateDataResponse)
	err := c.cc.Invoke(ctx, Private_ListPrivateData_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *privateClient) GetPrivateDataByType(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListPrivateDataResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListPrivateDataResponse)
	err := c.cc.Invoke(ctx, Private_GetPrivateDataByType_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *privateClient) SearchPrivateData(ctx context.Context, in *protobuf.FetchRequest, opts ...grpc.CallOption) (*ListPrivateDataResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListPrivateDataResponse)
	err := c.cc.Invoke(ctx, Private_SearchPrivateData_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *privateClient) EncryptData(ctx context.Context, in *DataRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(protobuf.StatusReply)
	err := c.cc.Invoke(ctx, Private_EncryptData_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *privateClient) DecryptData(ctx context.Context, in *DataRequest, opts ...grpc.CallOption) (*protobuf.StatusReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(protobuf.StatusReply)
	err := c.cc.Invoke(ctx, Private_DecryptData_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// PrivateServer is the server API for Private service.
// All implementations should embed UnimplementedPrivateServer
// for forward compatibility.
//
// 隐私数据服务
type PrivateServer interface {
	// 创建隐私数据
	CreatePrivateData(context.Context, *CreatePrivateDataRequest) (*protobuf.StatusReply, error)
	// 获取隐私数据详情
	GetPrivateData(context.Context, *protobuf.IdentRequest) (*CloudPrivateItem, error)
	// 更新隐私数据
	UpdatePrivateData(context.Context, *CloudPrivateItem) (*protobuf.StatusReply, error)
	// 删除隐私数据
	DeletePrivateData(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error)
	// 获取隐私数据列表
	ListPrivateData(context.Context, *protobuf.FetchRequest) (*ListPrivateDataResponse, error)
	// 按类型获取隐私数据
	GetPrivateDataByType(context.Context, *protobuf.FetchRequest) (*ListPrivateDataResponse, error)
	// 搜索隐私数据
	SearchPrivateData(context.Context, *protobuf.FetchRequest) (*ListPrivateDataResponse, error)
	// 加密数据
	EncryptData(context.Context, *DataRequest) (*protobuf.StatusReply, error)
	// 解密数据
	DecryptData(context.Context, *DataRequest) (*protobuf.StatusReply, error)
}

// UnimplementedPrivateServer should be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedPrivateServer struct{}

func (UnimplementedPrivateServer) CreatePrivateData(context.Context, *CreatePrivateDataRequest) (*protobuf.StatusReply, error) {
	return nil, status.Error(codes.Unimplemented, "method CreatePrivateData not implemented")
}
func (UnimplementedPrivateServer) GetPrivateData(context.Context, *protobuf.IdentRequest) (*CloudPrivateItem, error) {
	return nil, status.Error(codes.Unimplemented, "method GetPrivateData not implemented")
}
func (UnimplementedPrivateServer) UpdatePrivateData(context.Context, *CloudPrivateItem) (*protobuf.StatusReply, error) {
	return nil, status.Error(codes.Unimplemented, "method UpdatePrivateData not implemented")
}
func (UnimplementedPrivateServer) DeletePrivateData(context.Context, *protobuf.IdentRequest) (*protobuf.StatusReply, error) {
	return nil, status.Error(codes.Unimplemented, "method DeletePrivateData not implemented")
}
func (UnimplementedPrivateServer) ListPrivateData(context.Context, *protobuf.FetchRequest) (*ListPrivateDataResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method ListPrivateData not implemented")
}
func (UnimplementedPrivateServer) GetPrivateDataByType(context.Context, *protobuf.FetchRequest) (*ListPrivateDataResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method GetPrivateDataByType not implemented")
}
func (UnimplementedPrivateServer) SearchPrivateData(context.Context, *protobuf.FetchRequest) (*ListPrivateDataResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method SearchPrivateData not implemented")
}
func (UnimplementedPrivateServer) EncryptData(context.Context, *DataRequest) (*protobuf.StatusReply, error) {
	return nil, status.Error(codes.Unimplemented, "method EncryptData not implemented")
}
func (UnimplementedPrivateServer) DecryptData(context.Context, *DataRequest) (*protobuf.StatusReply, error) {
	return nil, status.Error(codes.Unimplemented, "method DecryptData not implemented")
}
func (UnimplementedPrivateServer) testEmbeddedByValue() {}

// UnsafePrivateServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PrivateServer will
// result in compilation errors.
type UnsafePrivateServer interface {
	mustEmbedUnimplementedPrivateServer()
}

func RegisterPrivateServer(s grpc.ServiceRegistrar, srv PrivateServer) {
	// If the following call panics, it indicates UnimplementedPrivateServer was
	// embedded by pointer and is nil.  This will cause panics if an
	// unimplemented method is ever invoked, so we test this at initialization
	// time to prevent it from happening at runtime later due to I/O.
	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
		t.testEmbeddedByValue()
	}
	s.RegisterService(&Private_ServiceDesc, srv)
}

func _Private_CreatePrivateData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreatePrivateDataRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PrivateServer).CreatePrivateData(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Private_CreatePrivateData_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PrivateServer).CreatePrivateData(ctx, req.(*CreatePrivateDataRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Private_GetPrivateData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(protobuf.IdentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PrivateServer).GetPrivateData(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Private_GetPrivateData_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PrivateServer).GetPrivateData(ctx, req.(*protobuf.IdentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Private_UpdatePrivateData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CloudPrivateItem)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PrivateServer).UpdatePrivateData(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Private_UpdatePrivateData_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PrivateServer).UpdatePrivateData(ctx, req.(*CloudPrivateItem))
	}
	return interceptor(ctx, in, info, handler)
}

func _Private_DeletePrivateData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(protobuf.IdentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PrivateServer).DeletePrivateData(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Private_DeletePrivateData_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PrivateServer).DeletePrivateData(ctx, req.(*protobuf.IdentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Private_ListPrivateData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(protobuf.FetchRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PrivateServer).ListPrivateData(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Private_ListPrivateData_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PrivateServer).ListPrivateData(ctx, req.(*protobuf.FetchRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Private_GetPrivateDataByType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(protobuf.FetchRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PrivateServer).GetPrivateDataByType(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Private_GetPrivateDataByType_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PrivateServer).GetPrivateDataByType(ctx, req.(*protobuf.FetchRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Private_SearchPrivateData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(protobuf.FetchRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PrivateServer).SearchPrivateData(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Private_SearchPrivateData_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PrivateServer).SearchPrivateData(ctx, req.(*protobuf.FetchRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Private_EncryptData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DataRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PrivateServer).EncryptData(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Private_EncryptData_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PrivateServer).EncryptData(ctx, req.(*DataRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Private_DecryptData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DataRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(PrivateServer).DecryptData(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Private_DecryptData_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(PrivateServer).DecryptData(ctx, req.(*DataRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// Private_ServiceDesc is the grpc.ServiceDesc for Private service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Private_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cloud.Private",
	HandlerType: (*PrivateServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreatePrivateData",
			Handler:    _Private_CreatePrivateData_Handler,
		},
		{
			MethodName: "GetPrivateData",
			Handler:    _Private_GetPrivateData_Handler,
		},
		{
			MethodName: "UpdatePrivateData",
			Handler:    _Private_UpdatePrivateData_Handler,
		},
		{
			MethodName: "DeletePrivateData",
			Handler:    _Private_DeletePrivateData_Handler,
		},
		{
			MethodName: "ListPrivateData",
			Handler:    _Private_ListPrivateData_Handler,
		},
		{
			MethodName: "GetPrivateDataByType",
			Handler:    _Private_GetPrivateDataByType_Handler,
		},
		{
			MethodName: "SearchPrivateData",
			Handler:    _Private_SearchPrivateData_Handler,
		},
		{
			MethodName: "EncryptData",
			Handler:    _Private_EncryptData_Handler,
		},
		{
			MethodName: "DecryptData",
			Handler:    _Private_DecryptData_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "module/base/cloud/proto/private.proto",
}
