// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             v3.21.2
// source: servers.proto

package servers

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

// ServerServiceClient is the client API for ServerService 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 ServerServiceClient interface {
	Create(ctx context.Context, in *ServerCreate, opts ...grpc.CallOption) (*NullResponse, error)
	Update(ctx context.Context, in *ServerUpdate, opts ...grpc.CallOption) (*NullResponse, error)
	Delete(ctx context.Context, in *IdMessage, opts ...grpc.CallOption) (*NullResponse, error)
	Get(ctx context.Context, in *IdMessage, opts ...grpc.CallOption) (*ServerItem, error)
	List(ctx context.Context, in *ServerListRequest, opts ...grpc.CallOption) (*ServerList, error)
}

type serverServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewServerServiceClient(cc grpc.ClientConnInterface) ServerServiceClient {
	return &serverServiceClient{cc}
}

func (c *serverServiceClient) Create(ctx context.Context, in *ServerCreate, opts ...grpc.CallOption) (*NullResponse, error) {
	out := new(NullResponse)
	err := c.cc.Invoke(ctx, "/servers.ServerService/Create", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *serverServiceClient) Update(ctx context.Context, in *ServerUpdate, opts ...grpc.CallOption) (*NullResponse, error) {
	out := new(NullResponse)
	err := c.cc.Invoke(ctx, "/servers.ServerService/Update", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *serverServiceClient) Delete(ctx context.Context, in *IdMessage, opts ...grpc.CallOption) (*NullResponse, error) {
	out := new(NullResponse)
	err := c.cc.Invoke(ctx, "/servers.ServerService/Delete", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *serverServiceClient) Get(ctx context.Context, in *IdMessage, opts ...grpc.CallOption) (*ServerItem, error) {
	out := new(ServerItem)
	err := c.cc.Invoke(ctx, "/servers.ServerService/Get", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *serverServiceClient) List(ctx context.Context, in *ServerListRequest, opts ...grpc.CallOption) (*ServerList, error) {
	out := new(ServerList)
	err := c.cc.Invoke(ctx, "/servers.ServerService/List", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ServerServiceServer is the server API for ServerService service.
// All implementations must embed UnimplementedServerServiceServer
// for forward compatibility
type ServerServiceServer interface {
	Create(context.Context, *ServerCreate) (*NullResponse, error)
	Update(context.Context, *ServerUpdate) (*NullResponse, error)
	Delete(context.Context, *IdMessage) (*NullResponse, error)
	Get(context.Context, *IdMessage) (*ServerItem, error)
	List(context.Context, *ServerListRequest) (*ServerList, error)
	mustEmbedUnimplementedServerServiceServer()
}

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

func (UnimplementedServerServiceServer) Create(context.Context, *ServerCreate) (*NullResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedServerServiceServer) Update(context.Context, *ServerUpdate) (*NullResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedServerServiceServer) Delete(context.Context, *IdMessage) (*NullResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedServerServiceServer) Get(context.Context, *IdMessage) (*ServerItem, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedServerServiceServer) List(context.Context, *ServerListRequest) (*ServerList, error) {
	return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedServerServiceServer) mustEmbedUnimplementedServerServiceServer() {}

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

func RegisterServerServiceServer(s grpc.ServiceRegistrar, srv ServerServiceServer) {
	s.RegisterService(&ServerService_ServiceDesc, srv)
}

func _ServerService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ServerCreate)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ServerServiceServer).Create(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/servers.ServerService/Create",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ServerServiceServer).Create(ctx, req.(*ServerCreate))
	}
	return interceptor(ctx, in, info, handler)
}

func _ServerService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ServerUpdate)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ServerServiceServer).Update(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/servers.ServerService/Update",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ServerServiceServer).Update(ctx, req.(*ServerUpdate))
	}
	return interceptor(ctx, in, info, handler)
}

func _ServerService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(IdMessage)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ServerServiceServer).Delete(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/servers.ServerService/Delete",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ServerServiceServer).Delete(ctx, req.(*IdMessage))
	}
	return interceptor(ctx, in, info, handler)
}

func _ServerService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(IdMessage)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ServerServiceServer).Get(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/servers.ServerService/Get",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ServerServiceServer).Get(ctx, req.(*IdMessage))
	}
	return interceptor(ctx, in, info, handler)
}

func _ServerService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ServerListRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ServerServiceServer).List(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/servers.ServerService/List",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ServerServiceServer).List(ctx, req.(*ServerListRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// ServerService_ServiceDesc is the grpc.ServiceDesc for ServerService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ServerService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "servers.ServerService",
	HandlerType: (*ServerServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _ServerService_Create_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _ServerService_Update_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _ServerService_Delete_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _ServerService_Get_Handler,
		},
		{
			MethodName: "List",
			Handler:    _ServerService_List_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "servers.proto",
}