// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc             v3.21.12
// source: kms/kms.proto

package kms

import (
	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.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

const (
	KMSService_Seal_FullMethodName   = "/sidero.kms.KMSService/Seal"
	KMSService_Unseal_FullMethodName = "/sidero.kms.KMSService/Unseal"
)

// KMSServiceClient is the client API for KMSService 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 KMSServiceClient interface {
	Seal(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
	Unseal(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
}

type kMSServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewKMSServiceClient(cc grpc.ClientConnInterface) KMSServiceClient {
	return &kMSServiceClient{cc}
}

func (c *kMSServiceClient) Seal(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
	out := new(Response)
	err := c.cc.Invoke(ctx, KMSService_Seal_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *kMSServiceClient) Unseal(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
	out := new(Response)
	err := c.cc.Invoke(ctx, KMSService_Unseal_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// KMSServiceServer is the server API for KMSService service.
// All implementations must embed UnimplementedKMSServiceServer
// for forward compatibility
type KMSServiceServer interface {
	Seal(context.Context, *Request) (*Response, error)
	Unseal(context.Context, *Request) (*Response, error)
	mustEmbedUnimplementedKMSServiceServer()
}

// UnimplementedKMSServiceServer must be embedded to have forward compatible implementations.
type UnimplementedKMSServiceServer struct {
}

func (UnimplementedKMSServiceServer) Seal(context.Context, *Request) (*Response, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Seal not implemented")
}
func (UnimplementedKMSServiceServer) Unseal(context.Context, *Request) (*Response, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Unseal not implemented")
}
func (UnimplementedKMSServiceServer) mustEmbedUnimplementedKMSServiceServer() {}

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

func RegisterKMSServiceServer(s grpc.ServiceRegistrar, srv KMSServiceServer) {
	s.RegisterService(&KMSService_ServiceDesc, srv)
}

func _KMSService_Seal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Request)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KMSServiceServer).Seal(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: KMSService_Seal_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KMSServiceServer).Seal(ctx, req.(*Request))
	}
	return interceptor(ctx, in, info, handler)
}

func _KMSService_Unseal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Request)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KMSServiceServer).Unseal(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: KMSService_Unseal_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KMSServiceServer).Unseal(ctx, req.(*Request))
	}
	return interceptor(ctx, in, info, handler)
}

// KMSService_ServiceDesc is the grpc.ServiceDesc for KMSService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var KMSService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "sidero.kms.KMSService",
	HandlerType: (*KMSServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Seal",
			Handler:    _KMSService_Seal_Handler,
		},
		{
			MethodName: "Unseal",
			Handler:    _KMSService_Unseal_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "kms/kms.proto",
}
