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

package core

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
)

// 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

// SharedServiceClient is the client API for SharedService 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 SharedServiceClient interface {
	// Get the current version of the app
	CheckForUpdates(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*AppVersion, error)
}

type sharedServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewSharedServiceClient(cc grpc.ClientConnInterface) SharedServiceClient {
	return &sharedServiceClient{cc}
}

func (c *sharedServiceClient) CheckForUpdates(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*AppVersion, error) {
	out := new(AppVersion)
	err := c.cc.Invoke(ctx, "/shared.SharedService/checkForUpdates", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// SharedServiceServer is the server API for SharedService service.
// All implementations must embed UnimplementedSharedServiceServer
// for forward compatibility
type SharedServiceServer interface {
	// Get the current version of the app
	CheckForUpdates(context.Context, *wrapperspb.StringValue) (*AppVersion, error)
	mustEmbedUnimplementedSharedServiceServer()
}

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

func (UnimplementedSharedServiceServer) CheckForUpdates(context.Context, *wrapperspb.StringValue) (*AppVersion, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CheckForUpdates not implemented")
}
func (UnimplementedSharedServiceServer) mustEmbedUnimplementedSharedServiceServer() {}

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

func RegisterSharedServiceServer(s grpc.ServiceRegistrar, srv SharedServiceServer) {
	s.RegisterService(&SharedService_ServiceDesc, srv)
}

func _SharedService_CheckForUpdates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(wrapperspb.StringValue)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SharedServiceServer).CheckForUpdates(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/shared.SharedService/checkForUpdates",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SharedServiceServer).CheckForUpdates(ctx, req.(*wrapperspb.StringValue))
	}
	return interceptor(ctx, in, info, handler)
}

// SharedService_ServiceDesc is the grpc.ServiceDesc for SharedService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SharedService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "shared.SharedService",
	HandlerType: (*SharedServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "checkForUpdates",
			Handler:    _SharedService_CheckForUpdates_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "shared.proto",
}
