// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             (unknown)
// source: proto/todotask/v1/todotask.proto

package __todotask

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

// TodoTaskServiceClient is the client API for TodoTaskService 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 TodoTaskServiceClient interface {
	CreateTask(ctx context.Context, in *CreateTaskRequest, opts ...grpc.CallOption) (*CreateTaskResponse, error)
	TasksList(ctx context.Context, in *TasksListRequest, opts ...grpc.CallOption) (*TasksListResponse, error)
	DeleteTask(ctx context.Context, in *DeleteTaskRequest, opts ...grpc.CallOption) (*DeleteTaskResponse, error)
	UpdateTask(ctx context.Context, in *UpdateTaskRequest, opts ...grpc.CallOption) (*UpdateTaskResponse, error)
}

type todoTaskServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewTodoTaskServiceClient(cc grpc.ClientConnInterface) TodoTaskServiceClient {
	return &todoTaskServiceClient{cc}
}

func (c *todoTaskServiceClient) CreateTask(ctx context.Context, in *CreateTaskRequest, opts ...grpc.CallOption) (*CreateTaskResponse, error) {
	out := new(CreateTaskResponse)
	err := c.cc.Invoke(ctx, "/proto.todotask.v1.TodoTaskService/CreateTask", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *todoTaskServiceClient) TasksList(ctx context.Context, in *TasksListRequest, opts ...grpc.CallOption) (*TasksListResponse, error) {
	out := new(TasksListResponse)
	err := c.cc.Invoke(ctx, "/proto.todotask.v1.TodoTaskService/TasksList", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *todoTaskServiceClient) DeleteTask(ctx context.Context, in *DeleteTaskRequest, opts ...grpc.CallOption) (*DeleteTaskResponse, error) {
	out := new(DeleteTaskResponse)
	err := c.cc.Invoke(ctx, "/proto.todotask.v1.TodoTaskService/DeleteTask", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *todoTaskServiceClient) UpdateTask(ctx context.Context, in *UpdateTaskRequest, opts ...grpc.CallOption) (*UpdateTaskResponse, error) {
	out := new(UpdateTaskResponse)
	err := c.cc.Invoke(ctx, "/proto.todotask.v1.TodoTaskService/UpdateTask", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// TodoTaskServiceServer is the server API for TodoTaskService service.
// All implementations must embed UnimplementedTodoTaskServiceServer
// for forward compatibility
type TodoTaskServiceServer interface {
	CreateTask(context.Context, *CreateTaskRequest) (*CreateTaskResponse, error)
	TasksList(context.Context, *TasksListRequest) (*TasksListResponse, error)
	DeleteTask(context.Context, *DeleteTaskRequest) (*DeleteTaskResponse, error)
	UpdateTask(context.Context, *UpdateTaskRequest) (*UpdateTaskResponse, error)
	mustEmbedUnimplementedTodoTaskServiceServer()
}

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

func (UnimplementedTodoTaskServiceServer) CreateTask(context.Context, *CreateTaskRequest) (*CreateTaskResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateTask not implemented")
}
func (UnimplementedTodoTaskServiceServer) TasksList(context.Context, *TasksListRequest) (*TasksListResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method TasksList not implemented")
}
func (UnimplementedTodoTaskServiceServer) DeleteTask(context.Context, *DeleteTaskRequest) (*DeleteTaskResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteTask not implemented")
}
func (UnimplementedTodoTaskServiceServer) UpdateTask(context.Context, *UpdateTaskRequest) (*UpdateTaskResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateTask not implemented")
}
func (UnimplementedTodoTaskServiceServer) mustEmbedUnimplementedTodoTaskServiceServer() {}

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

func RegisterTodoTaskServiceServer(s grpc.ServiceRegistrar, srv TodoTaskServiceServer) {
	s.RegisterService(&TodoTaskService_ServiceDesc, srv)
}

func _TodoTaskService_CreateTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateTaskRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TodoTaskServiceServer).CreateTask(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/proto.todotask.v1.TodoTaskService/CreateTask",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TodoTaskServiceServer).CreateTask(ctx, req.(*CreateTaskRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TodoTaskService_TasksList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(TasksListRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TodoTaskServiceServer).TasksList(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/proto.todotask.v1.TodoTaskService/TasksList",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TodoTaskServiceServer).TasksList(ctx, req.(*TasksListRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TodoTaskService_DeleteTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteTaskRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TodoTaskServiceServer).DeleteTask(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/proto.todotask.v1.TodoTaskService/DeleteTask",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TodoTaskServiceServer).DeleteTask(ctx, req.(*DeleteTaskRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _TodoTaskService_UpdateTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateTaskRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(TodoTaskServiceServer).UpdateTask(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/proto.todotask.v1.TodoTaskService/UpdateTask",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(TodoTaskServiceServer).UpdateTask(ctx, req.(*UpdateTaskRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// TodoTaskService_ServiceDesc is the grpc.ServiceDesc for TodoTaskService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var TodoTaskService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.todotask.v1.TodoTaskService",
	HandlerType: (*TodoTaskServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateTask",
			Handler:    _TodoTaskService_CreateTask_Handler,
		},
		{
			MethodName: "TasksList",
			Handler:    _TodoTaskService_TasksList_Handler,
		},
		{
			MethodName: "DeleteTask",
			Handler:    _TodoTaskService_DeleteTask_Handler,
		},
		{
			MethodName: "UpdateTask",
			Handler:    _TodoTaskService_UpdateTask_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/todotask/v1/todotask.proto",
}
