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

package grpc_e2e_tests

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

// VisitorCounterClient is the client API for VisitorCounter 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 VisitorCounterClient interface {
	GetVisitCount(ctx context.Context, in *VisitorCounterRequest, opts ...grpc.CallOption) (*VisitorCounterResponse, error)
	UpdateVisitor(ctx context.Context, in *UpdateVisitorRequest, opts ...grpc.CallOption) (*UpdateVisitorResponse, error)
}

type visitorCounterClient struct {
	cc grpc.ClientConnInterface
}

func NewVisitorCounterClient(cc grpc.ClientConnInterface) VisitorCounterClient {
	return &visitorCounterClient{cc}
}

func (c *visitorCounterClient) GetVisitCount(ctx context.Context, in *VisitorCounterRequest, opts ...grpc.CallOption) (*VisitorCounterResponse, error) {
	out := new(VisitorCounterResponse)
	err := c.cc.Invoke(ctx, "/skaffold.examples.e2e.visitor.VisitorCounter/GetVisitCount", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *visitorCounterClient) UpdateVisitor(ctx context.Context, in *UpdateVisitorRequest, opts ...grpc.CallOption) (*UpdateVisitorResponse, error) {
	out := new(UpdateVisitorResponse)
	err := c.cc.Invoke(ctx, "/skaffold.examples.e2e.visitor.VisitorCounter/UpdateVisitor", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// VisitorCounterServer is the server API for VisitorCounter service.
// All implementations must embed UnimplementedVisitorCounterServer
// for forward compatibility
type VisitorCounterServer interface {
	GetVisitCount(context.Context, *VisitorCounterRequest) (*VisitorCounterResponse, error)
	UpdateVisitor(context.Context, *UpdateVisitorRequest) (*UpdateVisitorResponse, error)
	mustEmbedUnimplementedVisitorCounterServer()
}

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

func (UnimplementedVisitorCounterServer) GetVisitCount(context.Context, *VisitorCounterRequest) (*VisitorCounterResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetVisitCount not implemented")
}
func (UnimplementedVisitorCounterServer) UpdateVisitor(context.Context, *UpdateVisitorRequest) (*UpdateVisitorResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateVisitor not implemented")
}
func (UnimplementedVisitorCounterServer) mustEmbedUnimplementedVisitorCounterServer() {}

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

func RegisterVisitorCounterServer(s grpc.ServiceRegistrar, srv VisitorCounterServer) {
	s.RegisterService(&VisitorCounter_ServiceDesc, srv)
}

func _VisitorCounter_GetVisitCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(VisitorCounterRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(VisitorCounterServer).GetVisitCount(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/skaffold.examples.e2e.visitor.VisitorCounter/GetVisitCount",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(VisitorCounterServer).GetVisitCount(ctx, req.(*VisitorCounterRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _VisitorCounter_UpdateVisitor_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateVisitorRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(VisitorCounterServer).UpdateVisitor(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/skaffold.examples.e2e.visitor.VisitorCounter/UpdateVisitor",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(VisitorCounterServer).UpdateVisitor(ctx, req.(*UpdateVisitorRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// VisitorCounter_ServiceDesc is the grpc.ServiceDesc for VisitorCounter service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var VisitorCounter_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "skaffold.examples.e2e.visitor.VisitorCounter",
	HandlerType: (*VisitorCounterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetVisitCount",
			Handler:    _VisitorCounter_GetVisitCount_Handler,
		},
		{
			MethodName: "UpdateVisitor",
			Handler:    _VisitorCounter_UpdateVisitor_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/visitor.proto",
}
