// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             v5.28.2
// source: api/system/v1/sys_post.proto

package v1

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 (
	SysPost_CreateSysPost_FullMethodName = "/api.system.v1.SysPost/CreateSysPost"
	SysPost_UpdateSysPost_FullMethodName = "/api.system.v1.SysPost/UpdateSysPost"
	SysPost_DeleteSysPost_FullMethodName = "/api.system.v1.SysPost/DeleteSysPost"
	SysPost_GetSysPost_FullMethodName    = "/api.system.v1.SysPost/GetSysPost"
	SysPost_ListSysPost_FullMethodName   = "/api.system.v1.SysPost/ListSysPost"
)

// SysPostClient is the client API for SysPost 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 SysPostClient interface {
	CreateSysPost(ctx context.Context, in *SysPostRep, opts ...grpc.CallOption) (*EmptyReply, error)
	UpdateSysPost(ctx context.Context, in *SysPostRep, opts ...grpc.CallOption) (*EmptyReply, error)
	DeleteSysPost(ctx context.Context, in *DeleteSysPostRep, opts ...grpc.CallOption) (*EmptyReply, error)
	GetSysPost(ctx context.Context, in *GetSysPostRep, opts ...grpc.CallOption) (*GetSysPostReply, error)
	ListSysPost(ctx context.Context, in *ListSysPostRep, opts ...grpc.CallOption) (*ListSysPostReply, error)
}

type sysPostClient struct {
	cc grpc.ClientConnInterface
}

func NewSysPostClient(cc grpc.ClientConnInterface) SysPostClient {
	return &sysPostClient{cc}
}

func (c *sysPostClient) CreateSysPost(ctx context.Context, in *SysPostRep, opts ...grpc.CallOption) (*EmptyReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(EmptyReply)
	err := c.cc.Invoke(ctx, SysPost_CreateSysPost_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sysPostClient) UpdateSysPost(ctx context.Context, in *SysPostRep, opts ...grpc.CallOption) (*EmptyReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(EmptyReply)
	err := c.cc.Invoke(ctx, SysPost_UpdateSysPost_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sysPostClient) DeleteSysPost(ctx context.Context, in *DeleteSysPostRep, opts ...grpc.CallOption) (*EmptyReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(EmptyReply)
	err := c.cc.Invoke(ctx, SysPost_DeleteSysPost_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sysPostClient) GetSysPost(ctx context.Context, in *GetSysPostRep, opts ...grpc.CallOption) (*GetSysPostReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetSysPostReply)
	err := c.cc.Invoke(ctx, SysPost_GetSysPost_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *sysPostClient) ListSysPost(ctx context.Context, in *ListSysPostRep, opts ...grpc.CallOption) (*ListSysPostReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListSysPostReply)
	err := c.cc.Invoke(ctx, SysPost_ListSysPost_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// SysPostServer is the server API for SysPost service.
// All implementations must embed UnimplementedSysPostServer
// for forward compatibility.
type SysPostServer interface {
	CreateSysPost(context.Context, *SysPostRep) (*EmptyReply, error)
	UpdateSysPost(context.Context, *SysPostRep) (*EmptyReply, error)
	DeleteSysPost(context.Context, *DeleteSysPostRep) (*EmptyReply, error)
	GetSysPost(context.Context, *GetSysPostRep) (*GetSysPostReply, error)
	ListSysPost(context.Context, *ListSysPostRep) (*ListSysPostReply, error)
	mustEmbedUnimplementedSysPostServer()
}

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

func (UnimplementedSysPostServer) CreateSysPost(context.Context, *SysPostRep) (*EmptyReply, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateSysPost not implemented")
}
func (UnimplementedSysPostServer) UpdateSysPost(context.Context, *SysPostRep) (*EmptyReply, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateSysPost not implemented")
}
func (UnimplementedSysPostServer) DeleteSysPost(context.Context, *DeleteSysPostRep) (*EmptyReply, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteSysPost not implemented")
}
func (UnimplementedSysPostServer) GetSysPost(context.Context, *GetSysPostRep) (*GetSysPostReply, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetSysPost not implemented")
}
func (UnimplementedSysPostServer) ListSysPost(context.Context, *ListSysPostRep) (*ListSysPostReply, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListSysPost not implemented")
}
func (UnimplementedSysPostServer) mustEmbedUnimplementedSysPostServer() {}
func (UnimplementedSysPostServer) testEmbeddedByValue()                 {}

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

func RegisterSysPostServer(s grpc.ServiceRegistrar, srv SysPostServer) {
	// If the following call pancis, it indicates UnimplementedSysPostServer 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(&SysPost_ServiceDesc, srv)
}

func _SysPost_CreateSysPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SysPostRep)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SysPostServer).CreateSysPost(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SysPost_CreateSysPost_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SysPostServer).CreateSysPost(ctx, req.(*SysPostRep))
	}
	return interceptor(ctx, in, info, handler)
}

func _SysPost_UpdateSysPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SysPostRep)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SysPostServer).UpdateSysPost(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SysPost_UpdateSysPost_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SysPostServer).UpdateSysPost(ctx, req.(*SysPostRep))
	}
	return interceptor(ctx, in, info, handler)
}

func _SysPost_DeleteSysPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteSysPostRep)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SysPostServer).DeleteSysPost(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SysPost_DeleteSysPost_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SysPostServer).DeleteSysPost(ctx, req.(*DeleteSysPostRep))
	}
	return interceptor(ctx, in, info, handler)
}

func _SysPost_GetSysPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetSysPostRep)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SysPostServer).GetSysPost(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SysPost_GetSysPost_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SysPostServer).GetSysPost(ctx, req.(*GetSysPostRep))
	}
	return interceptor(ctx, in, info, handler)
}

func _SysPost_ListSysPost_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListSysPostRep)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SysPostServer).ListSysPost(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SysPost_ListSysPost_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SysPostServer).ListSysPost(ctx, req.(*ListSysPostRep))
	}
	return interceptor(ctx, in, info, handler)
}

// SysPost_ServiceDesc is the grpc.ServiceDesc for SysPost service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SysPost_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.system.v1.SysPost",
	HandlerType: (*SysPostServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateSysPost",
			Handler:    _SysPost_CreateSysPost_Handler,
		},
		{
			MethodName: "UpdateSysPost",
			Handler:    _SysPost_UpdateSysPost_Handler,
		},
		{
			MethodName: "DeleteSysPost",
			Handler:    _SysPost_DeleteSysPost_Handler,
		},
		{
			MethodName: "GetSysPost",
			Handler:    _SysPost_GetSysPost_Handler,
		},
		{
			MethodName: "ListSysPost",
			Handler:    _SysPost_ListSysPost_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/system/v1/sys_post.proto",
}
