// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc             v4.25.2
// source: itemblockaction/v1/ItemBlockAction.proto

package v1

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

const (
	ItemBlockAction_AppliesTo_FullMethodName       = "/v1.ItemBlockAction/AppliesTo"
	ItemBlockAction_GetRelatedItems_FullMethodName = "/v1.ItemBlockAction/GetRelatedItems"
)

// ItemBlockActionClient is the client API for ItemBlockAction 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 ItemBlockActionClient interface {
	AppliesTo(ctx context.Context, in *ItemBlockActionAppliesToRequest, opts ...grpc.CallOption) (*ItemBlockActionAppliesToResponse, error)
	GetRelatedItems(ctx context.Context, in *ItemBlockActionGetRelatedItemsRequest, opts ...grpc.CallOption) (*ItemBlockActionGetRelatedItemsResponse, error)
}

type itemBlockActionClient struct {
	cc grpc.ClientConnInterface
}

func NewItemBlockActionClient(cc grpc.ClientConnInterface) ItemBlockActionClient {
	return &itemBlockActionClient{cc}
}

func (c *itemBlockActionClient) AppliesTo(ctx context.Context, in *ItemBlockActionAppliesToRequest, opts ...grpc.CallOption) (*ItemBlockActionAppliesToResponse, error) {
	out := new(ItemBlockActionAppliesToResponse)
	err := c.cc.Invoke(ctx, ItemBlockAction_AppliesTo_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *itemBlockActionClient) GetRelatedItems(ctx context.Context, in *ItemBlockActionGetRelatedItemsRequest, opts ...grpc.CallOption) (*ItemBlockActionGetRelatedItemsResponse, error) {
	out := new(ItemBlockActionGetRelatedItemsResponse)
	err := c.cc.Invoke(ctx, ItemBlockAction_GetRelatedItems_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ItemBlockActionServer is the server API for ItemBlockAction service.
// All implementations should embed UnimplementedItemBlockActionServer
// for forward compatibility
type ItemBlockActionServer interface {
	AppliesTo(context.Context, *ItemBlockActionAppliesToRequest) (*ItemBlockActionAppliesToResponse, error)
	GetRelatedItems(context.Context, *ItemBlockActionGetRelatedItemsRequest) (*ItemBlockActionGetRelatedItemsResponse, error)
}

// UnimplementedItemBlockActionServer should be embedded to have forward compatible implementations.
type UnimplementedItemBlockActionServer struct {
}

func (UnimplementedItemBlockActionServer) AppliesTo(context.Context, *ItemBlockActionAppliesToRequest) (*ItemBlockActionAppliesToResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method AppliesTo not implemented")
}
func (UnimplementedItemBlockActionServer) GetRelatedItems(context.Context, *ItemBlockActionGetRelatedItemsRequest) (*ItemBlockActionGetRelatedItemsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetRelatedItems not implemented")
}

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

func RegisterItemBlockActionServer(s grpc.ServiceRegistrar, srv ItemBlockActionServer) {
	s.RegisterService(&ItemBlockAction_ServiceDesc, srv)
}

func _ItemBlockAction_AppliesTo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ItemBlockActionAppliesToRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ItemBlockActionServer).AppliesTo(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ItemBlockAction_AppliesTo_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ItemBlockActionServer).AppliesTo(ctx, req.(*ItemBlockActionAppliesToRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ItemBlockAction_GetRelatedItems_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ItemBlockActionGetRelatedItemsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ItemBlockActionServer).GetRelatedItems(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ItemBlockAction_GetRelatedItems_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ItemBlockActionServer).GetRelatedItems(ctx, req.(*ItemBlockActionGetRelatedItemsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// ItemBlockAction_ServiceDesc is the grpc.ServiceDesc for ItemBlockAction service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ItemBlockAction_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "v1.ItemBlockAction",
	HandlerType: (*ItemBlockActionServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AppliesTo",
			Handler:    _ItemBlockAction_AppliesTo_Handler,
		},
		{
			MethodName: "GetRelatedItems",
			Handler:    _ItemBlockAction_GetRelatedItems_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "itemblockaction/v1/ItemBlockAction.proto",
}
