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

package pb

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

// WkhtmltopdfServiceClient is the client API for WkhtmltopdfService 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 WkhtmltopdfServiceClient interface {
	Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error)
	Generate(ctx context.Context, in *GenerateRequest, opts ...grpc.CallOption) (*GenerateResponse, error)
}

type wkhtmltopdfServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewWkhtmltopdfServiceClient(cc grpc.ClientConnInterface) WkhtmltopdfServiceClient {
	return &wkhtmltopdfServiceClient{cc}
}

func (c *wkhtmltopdfServiceClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PingResponse, error) {
	out := new(PingResponse)
	err := c.cc.Invoke(ctx, "/wkhtmltopdfpb.wkhtmltopdfService/Ping", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *wkhtmltopdfServiceClient) Generate(ctx context.Context, in *GenerateRequest, opts ...grpc.CallOption) (*GenerateResponse, error) {
	out := new(GenerateResponse)
	err := c.cc.Invoke(ctx, "/wkhtmltopdfpb.wkhtmltopdfService/Generate", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// WkhtmltopdfServiceServer is the server API for WkhtmltopdfService service.
// All implementations must embed UnimplementedWkhtmltopdfServiceServer
// for forward compatibility
type WkhtmltopdfServiceServer interface {
	Ping(context.Context, *PingRequest) (*PingResponse, error)
	Generate(context.Context, *GenerateRequest) (*GenerateResponse, error)
	mustEmbedUnimplementedWkhtmltopdfServiceServer()
}

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

func (UnimplementedWkhtmltopdfServiceServer) Ping(context.Context, *PingRequest) (*PingResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented")
}
func (UnimplementedWkhtmltopdfServiceServer) Generate(context.Context, *GenerateRequest) (*GenerateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Generate not implemented")
}
func (UnimplementedWkhtmltopdfServiceServer) mustEmbedUnimplementedWkhtmltopdfServiceServer() {}

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

func RegisterWkhtmltopdfServiceServer(s grpc.ServiceRegistrar, srv WkhtmltopdfServiceServer) {
	s.RegisterService(&WkhtmltopdfService_ServiceDesc, srv)
}

func _WkhtmltopdfService_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PingRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(WkhtmltopdfServiceServer).Ping(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/wkhtmltopdfpb.wkhtmltopdfService/Ping",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(WkhtmltopdfServiceServer).Ping(ctx, req.(*PingRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _WkhtmltopdfService_Generate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GenerateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(WkhtmltopdfServiceServer).Generate(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/wkhtmltopdfpb.wkhtmltopdfService/Generate",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(WkhtmltopdfServiceServer).Generate(ctx, req.(*GenerateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// WkhtmltopdfService_ServiceDesc is the grpc.ServiceDesc for WkhtmltopdfService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var WkhtmltopdfService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "wkhtmltopdfpb.wkhtmltopdfService",
	HandlerType: (*WkhtmltopdfServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Ping",
			Handler:    _WkhtmltopdfService_Ping_Handler,
		},
		{
			MethodName: "Generate",
			Handler:    _WkhtmltopdfService_Generate_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "wkhtmltopdf.proto",
}
