// Code generated by protoc-gen-go-grpc. DO NOT EDIT.

package useralert

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

// UserAlertServiceClient is the client API for UserAlertService 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 UserAlertServiceClient interface {
	GetUserAlertList(ctx context.Context, in *GetUserAlertListReq, opts ...grpc.CallOption) (*GetUserAlertListResp, error)
	SubscribeUserAlert(ctx context.Context, in *SubscribeUserAlertReq, opts ...grpc.CallOption) (*SubscribeUserAlertResp, error)
	UnsubscribeUserAlert(ctx context.Context, in *UnsubscribeUserAlertReq, opts ...grpc.CallOption) (*UnsubscribeUserAlertResp, error)
}

type userAlertServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewUserAlertServiceClient(cc grpc.ClientConnInterface) UserAlertServiceClient {
	return &userAlertServiceClient{cc}
}

func (c *userAlertServiceClient) GetUserAlertList(ctx context.Context, in *GetUserAlertListReq, opts ...grpc.CallOption) (*GetUserAlertListResp, error) {
	out := new(GetUserAlertListResp)
	err := c.cc.Invoke(ctx, "/useralert.UserAlertService/GetUserAlertList", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *userAlertServiceClient) SubscribeUserAlert(ctx context.Context, in *SubscribeUserAlertReq, opts ...grpc.CallOption) (*SubscribeUserAlertResp, error) {
	out := new(SubscribeUserAlertResp)
	err := c.cc.Invoke(ctx, "/useralert.UserAlertService/SubscribeUserAlert", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *userAlertServiceClient) UnsubscribeUserAlert(ctx context.Context, in *UnsubscribeUserAlertReq, opts ...grpc.CallOption) (*UnsubscribeUserAlertResp, error) {
	out := new(UnsubscribeUserAlertResp)
	err := c.cc.Invoke(ctx, "/useralert.UserAlertService/UnsubscribeUserAlert", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// UserAlertServiceServer is the server API for UserAlertService service.
// All implementations must embed UnimplementedUserAlertServiceServer
// for forward compatibility
type UserAlertServiceServer interface {
	GetUserAlertList(context.Context, *GetUserAlertListReq) (*GetUserAlertListResp, error)
	SubscribeUserAlert(context.Context, *SubscribeUserAlertReq) (*SubscribeUserAlertResp, error)
	UnsubscribeUserAlert(context.Context, *UnsubscribeUserAlertReq) (*UnsubscribeUserAlertResp, error)
	mustEmbedUnimplementedUserAlertServiceServer()
}

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

func (UnimplementedUserAlertServiceServer) GetUserAlertList(context.Context, *GetUserAlertListReq) (*GetUserAlertListResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetUserAlertList not implemented")
}
func (UnimplementedUserAlertServiceServer) SubscribeUserAlert(context.Context, *SubscribeUserAlertReq) (*SubscribeUserAlertResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method SubscribeUserAlert not implemented")
}
func (UnimplementedUserAlertServiceServer) UnsubscribeUserAlert(context.Context, *UnsubscribeUserAlertReq) (*UnsubscribeUserAlertResp, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UnsubscribeUserAlert not implemented")
}
func (UnimplementedUserAlertServiceServer) mustEmbedUnimplementedUserAlertServiceServer() {}

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

func RegisterUserAlertServiceServer(s grpc.ServiceRegistrar, srv UserAlertServiceServer) {
	s.RegisterService(&UserAlertService_ServiceDesc, srv)
}

func _UserAlertService_GetUserAlertList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetUserAlertListReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(UserAlertServiceServer).GetUserAlertList(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/useralert.UserAlertService/GetUserAlertList",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(UserAlertServiceServer).GetUserAlertList(ctx, req.(*GetUserAlertListReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _UserAlertService_SubscribeUserAlert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SubscribeUserAlertReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(UserAlertServiceServer).SubscribeUserAlert(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/useralert.UserAlertService/SubscribeUserAlert",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(UserAlertServiceServer).SubscribeUserAlert(ctx, req.(*SubscribeUserAlertReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _UserAlertService_UnsubscribeUserAlert_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UnsubscribeUserAlertReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(UserAlertServiceServer).UnsubscribeUserAlert(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/useralert.UserAlertService/UnsubscribeUserAlert",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(UserAlertServiceServer).UnsubscribeUserAlert(ctx, req.(*UnsubscribeUserAlertReq))
	}
	return interceptor(ctx, in, info, handler)
}

// UserAlertService_ServiceDesc is the grpc.ServiceDesc for UserAlertService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var UserAlertService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "useralert.UserAlertService",
	HandlerType: (*UserAlertServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetUserAlertList",
			Handler:    _UserAlertService_GetUserAlertList_Handler,
		},
		{
			MethodName: "SubscribeUserAlert",
			Handler:    _UserAlertService_SubscribeUserAlert_Handler,
		},
		{
			MethodName: "UnsubscribeUserAlert",
			Handler:    _UserAlertService_UnsubscribeUserAlert_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "useralert/service.proto",
}
