// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             v5.28.3
// source: helios/keypad/keypad.proto

package pbkeypad

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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	KeypadService_GetConfig_FullMethodName   = "/helios.keypad.KeypadService/GetConfig"
	KeypadService_SaveConfig_FullMethodName  = "/helios.keypad.KeypadService/SaveConfig"
	KeypadService_ListKeypads_FullMethodName = "/helios.keypad.KeypadService/ListKeypads"
)

// KeypadServiceClient is the client API for KeypadService 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 KeypadServiceClient interface {
	// Requires authed human.
	GetConfig(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*GetConfigResponse, error)
	// Requires authed human.
	SaveConfig(ctx context.Context, in *SaveConfigRequest, opts ...grpc.CallOption) (*SaveConfigResponse, error)
	// Requires admin.
	ListKeypads(ctx context.Context, in *ListKeypadsRequest, opts ...grpc.CallOption) (*ListKeypadsResponse, error)
}

type keypadServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewKeypadServiceClient(cc grpc.ClientConnInterface) KeypadServiceClient {
	return &keypadServiceClient{cc}
}

func (c *keypadServiceClient) GetConfig(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*GetConfigResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetConfigResponse)
	err := c.cc.Invoke(ctx, KeypadService_GetConfig_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *keypadServiceClient) SaveConfig(ctx context.Context, in *SaveConfigRequest, opts ...grpc.CallOption) (*SaveConfigResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(SaveConfigResponse)
	err := c.cc.Invoke(ctx, KeypadService_SaveConfig_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *keypadServiceClient) ListKeypads(ctx context.Context, in *ListKeypadsRequest, opts ...grpc.CallOption) (*ListKeypadsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListKeypadsResponse)
	err := c.cc.Invoke(ctx, KeypadService_ListKeypads_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// KeypadServiceServer is the server API for KeypadService service.
// All implementations must embed UnimplementedKeypadServiceServer
// for forward compatibility.
type KeypadServiceServer interface {
	// Requires authed human.
	GetConfig(context.Context, *GetConfigRequest) (*GetConfigResponse, error)
	// Requires authed human.
	SaveConfig(context.Context, *SaveConfigRequest) (*SaveConfigResponse, error)
	// Requires admin.
	ListKeypads(context.Context, *ListKeypadsRequest) (*ListKeypadsResponse, error)
	mustEmbedUnimplementedKeypadServiceServer()
}

// UnimplementedKeypadServiceServer must 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 UnimplementedKeypadServiceServer struct{}

func (UnimplementedKeypadServiceServer) GetConfig(context.Context, *GetConfigRequest) (*GetConfigResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetConfig not implemented")
}
func (UnimplementedKeypadServiceServer) SaveConfig(context.Context, *SaveConfigRequest) (*SaveConfigResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SaveConfig not implemented")
}
func (UnimplementedKeypadServiceServer) ListKeypads(context.Context, *ListKeypadsRequest) (*ListKeypadsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListKeypads not implemented")
}
func (UnimplementedKeypadServiceServer) mustEmbedUnimplementedKeypadServiceServer() {}
func (UnimplementedKeypadServiceServer) testEmbeddedByValue()                       {}

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

func RegisterKeypadServiceServer(s grpc.ServiceRegistrar, srv KeypadServiceServer) {
	// If the following call pancis, it indicates UnimplementedKeypadServiceServer 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(&KeypadService_ServiceDesc, srv)
}

func _KeypadService_GetConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetConfigRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KeypadServiceServer).GetConfig(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: KeypadService_GetConfig_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KeypadServiceServer).GetConfig(ctx, req.(*GetConfigRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _KeypadService_SaveConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SaveConfigRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KeypadServiceServer).SaveConfig(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: KeypadService_SaveConfig_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KeypadServiceServer).SaveConfig(ctx, req.(*SaveConfigRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _KeypadService_ListKeypads_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListKeypadsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(KeypadServiceServer).ListKeypads(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: KeypadService_ListKeypads_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(KeypadServiceServer).ListKeypads(ctx, req.(*ListKeypadsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// KeypadService_ServiceDesc is the grpc.ServiceDesc for KeypadService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var KeypadService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "helios.keypad.KeypadService",
	HandlerType: (*KeypadServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetConfig",
			Handler:    _KeypadService_GetConfig_Handler,
		},
		{
			MethodName: "SaveConfig",
			Handler:    _KeypadService_SaveConfig_Handler,
		},
		{
			MethodName: "ListKeypads",
			Handler:    _KeypadService_ListKeypads_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "helios/keypad/keypad.proto",
}
