// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.4.0
// - protoc             v5.27.2
// source: region.proto

// region 地区表

package region

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.62.0 or later.
const _ = grpc.SupportPackageIsVersion8

const (
	RegionService_RegionCreate_FullMethodName  = "/region.RegionService/RegionCreate"
	RegionService_RegionUpdate_FullMethodName  = "/region.RegionService/RegionUpdate"
	RegionService_RegionDelete_FullMethodName  = "/region.RegionService/RegionDelete"
	RegionService_Region_FullMethodName        = "/region.RegionService/Region"
	RegionService_RegionRecover_FullMethodName = "/region.RegionService/RegionRecover"
	RegionService_RegionList_FullMethodName    = "/region.RegionService/RegionList"
)

// RegionServiceClient is the client API for RegionService 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.
//
// RegionService 服务
type RegionServiceClient interface {
	RegionCreate(ctx context.Context, in *RegionCreateRequest, opts ...grpc.CallOption) (*RegionCreateResponse, error)
	RegionUpdate(ctx context.Context, in *RegionUpdateRequest, opts ...grpc.CallOption) (*RegionUpdateResponse, error)
	RegionDelete(ctx context.Context, in *RegionDeleteRequest, opts ...grpc.CallOption) (*RegionDeleteResponse, error)
	Region(ctx context.Context, in *RegionRequest, opts ...grpc.CallOption) (*RegionResponse, error)
	RegionRecover(ctx context.Context, in *RegionRecoverRequest, opts ...grpc.CallOption) (*RegionRecoverResponse, error)
	RegionList(ctx context.Context, in *RegionListRequest, opts ...grpc.CallOption) (*RegionListResponse, error)
}

type regionServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewRegionServiceClient(cc grpc.ClientConnInterface) RegionServiceClient {
	return &regionServiceClient{cc}
}

func (c *regionServiceClient) RegionCreate(ctx context.Context, in *RegionCreateRequest, opts ...grpc.CallOption) (*RegionCreateResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(RegionCreateResponse)
	err := c.cc.Invoke(ctx, RegionService_RegionCreate_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *regionServiceClient) RegionUpdate(ctx context.Context, in *RegionUpdateRequest, opts ...grpc.CallOption) (*RegionUpdateResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(RegionUpdateResponse)
	err := c.cc.Invoke(ctx, RegionService_RegionUpdate_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *regionServiceClient) RegionDelete(ctx context.Context, in *RegionDeleteRequest, opts ...grpc.CallOption) (*RegionDeleteResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(RegionDeleteResponse)
	err := c.cc.Invoke(ctx, RegionService_RegionDelete_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *regionServiceClient) Region(ctx context.Context, in *RegionRequest, opts ...grpc.CallOption) (*RegionResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(RegionResponse)
	err := c.cc.Invoke(ctx, RegionService_Region_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *regionServiceClient) RegionRecover(ctx context.Context, in *RegionRecoverRequest, opts ...grpc.CallOption) (*RegionRecoverResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(RegionRecoverResponse)
	err := c.cc.Invoke(ctx, RegionService_RegionRecover_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *regionServiceClient) RegionList(ctx context.Context, in *RegionListRequest, opts ...grpc.CallOption) (*RegionListResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(RegionListResponse)
	err := c.cc.Invoke(ctx, RegionService_RegionList_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// RegionServiceServer is the server API for RegionService service.
// All implementations must embed UnimplementedRegionServiceServer
// for forward compatibility
//
// RegionService 服务
type RegionServiceServer interface {
	RegionCreate(context.Context, *RegionCreateRequest) (*RegionCreateResponse, error)
	RegionUpdate(context.Context, *RegionUpdateRequest) (*RegionUpdateResponse, error)
	RegionDelete(context.Context, *RegionDeleteRequest) (*RegionDeleteResponse, error)
	Region(context.Context, *RegionRequest) (*RegionResponse, error)
	RegionRecover(context.Context, *RegionRecoverRequest) (*RegionRecoverResponse, error)
	RegionList(context.Context, *RegionListRequest) (*RegionListResponse, error)
	mustEmbedUnimplementedRegionServiceServer()
}

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

func (UnimplementedRegionServiceServer) RegionCreate(context.Context, *RegionCreateRequest) (*RegionCreateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RegionCreate not implemented")
}
func (UnimplementedRegionServiceServer) RegionUpdate(context.Context, *RegionUpdateRequest) (*RegionUpdateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RegionUpdate not implemented")
}
func (UnimplementedRegionServiceServer) RegionDelete(context.Context, *RegionDeleteRequest) (*RegionDeleteResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RegionDelete not implemented")
}
func (UnimplementedRegionServiceServer) Region(context.Context, *RegionRequest) (*RegionResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Region not implemented")
}
func (UnimplementedRegionServiceServer) RegionRecover(context.Context, *RegionRecoverRequest) (*RegionRecoverResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RegionRecover not implemented")
}
func (UnimplementedRegionServiceServer) RegionList(context.Context, *RegionListRequest) (*RegionListResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RegionList not implemented")
}
func (UnimplementedRegionServiceServer) mustEmbedUnimplementedRegionServiceServer() {}

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

func RegisterRegionServiceServer(s grpc.ServiceRegistrar, srv RegionServiceServer) {
	s.RegisterService(&RegionService_ServiceDesc, srv)
}

func _RegionService_RegionCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RegionCreateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RegionServiceServer).RegionCreate(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RegionService_RegionCreate_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RegionServiceServer).RegionCreate(ctx, req.(*RegionCreateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RegionService_RegionUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RegionUpdateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RegionServiceServer).RegionUpdate(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RegionService_RegionUpdate_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RegionServiceServer).RegionUpdate(ctx, req.(*RegionUpdateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RegionService_RegionDelete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RegionDeleteRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RegionServiceServer).RegionDelete(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RegionService_RegionDelete_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RegionServiceServer).RegionDelete(ctx, req.(*RegionDeleteRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RegionService_Region_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RegionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RegionServiceServer).Region(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RegionService_Region_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RegionServiceServer).Region(ctx, req.(*RegionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RegionService_RegionRecover_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RegionRecoverRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RegionServiceServer).RegionRecover(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RegionService_RegionRecover_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RegionServiceServer).RegionRecover(ctx, req.(*RegionRecoverRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RegionService_RegionList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RegionListRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RegionServiceServer).RegionList(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RegionService_RegionList_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RegionServiceServer).RegionList(ctx, req.(*RegionListRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// RegionService_ServiceDesc is the grpc.ServiceDesc for RegionService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var RegionService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "region.RegionService",
	HandlerType: (*RegionServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "RegionCreate",
			Handler:    _RegionService_RegionCreate_Handler,
		},
		{
			MethodName: "RegionUpdate",
			Handler:    _RegionService_RegionUpdate_Handler,
		},
		{
			MethodName: "RegionDelete",
			Handler:    _RegionService_RegionDelete_Handler,
		},
		{
			MethodName: "Region",
			Handler:    _RegionService_Region_Handler,
		},
		{
			MethodName: "RegionRecover",
			Handler:    _RegionService_RegionRecover_Handler,
		},
		{
			MethodName: "RegionList",
			Handler:    _RegionService_RegionList_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "region.proto",
}
