// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc             (unknown)
// source: runtime/v1/external_effects.proto

package runtimev1

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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	ExternalEffectDispatchService_ClaimExternalEffects_FullMethodName   = "/nexuscrm.runtime.v1.ExternalEffectDispatchService/ClaimExternalEffects"
	ExternalEffectDispatchService_CompleteExternalEffect_FullMethodName = "/nexuscrm.runtime.v1.ExternalEffectDispatchService/CompleteExternalEffect"
)

// ExternalEffectDispatchServiceClient is the client API for ExternalEffectDispatchService 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 ExternalEffectDispatchServiceClient interface {
	ClaimExternalEffects(ctx context.Context, in *ClaimExternalEffectsRequest, opts ...grpc.CallOption) (*ClaimExternalEffectsResponse, error)
	CompleteExternalEffect(ctx context.Context, in *CompleteExternalEffectRequest, opts ...grpc.CallOption) (*CompleteExternalEffectResponse, error)
}

type externalEffectDispatchServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewExternalEffectDispatchServiceClient(cc grpc.ClientConnInterface) ExternalEffectDispatchServiceClient {
	return &externalEffectDispatchServiceClient{cc}
}

func (c *externalEffectDispatchServiceClient) ClaimExternalEffects(ctx context.Context, in *ClaimExternalEffectsRequest, opts ...grpc.CallOption) (*ClaimExternalEffectsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ClaimExternalEffectsResponse)
	err := c.cc.Invoke(ctx, ExternalEffectDispatchService_ClaimExternalEffects_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *externalEffectDispatchServiceClient) CompleteExternalEffect(ctx context.Context, in *CompleteExternalEffectRequest, opts ...grpc.CallOption) (*CompleteExternalEffectResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(CompleteExternalEffectResponse)
	err := c.cc.Invoke(ctx, ExternalEffectDispatchService_CompleteExternalEffect_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ExternalEffectDispatchServiceServer is the server API for ExternalEffectDispatchService service.
// All implementations must embed UnimplementedExternalEffectDispatchServiceServer
// for forward compatibility.
type ExternalEffectDispatchServiceServer interface {
	ClaimExternalEffects(context.Context, *ClaimExternalEffectsRequest) (*ClaimExternalEffectsResponse, error)
	CompleteExternalEffect(context.Context, *CompleteExternalEffectRequest) (*CompleteExternalEffectResponse, error)
	mustEmbedUnimplementedExternalEffectDispatchServiceServer()
}

// UnimplementedExternalEffectDispatchServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedExternalEffectDispatchServiceServer struct{}

func (UnimplementedExternalEffectDispatchServiceServer) ClaimExternalEffects(context.Context, *ClaimExternalEffectsRequest) (*ClaimExternalEffectsResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method ClaimExternalEffects not implemented")
}
func (UnimplementedExternalEffectDispatchServiceServer) CompleteExternalEffect(context.Context, *CompleteExternalEffectRequest) (*CompleteExternalEffectResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method CompleteExternalEffect not implemented")
}
func (UnimplementedExternalEffectDispatchServiceServer) mustEmbedUnimplementedExternalEffectDispatchServiceServer() {
}
func (UnimplementedExternalEffectDispatchServiceServer) testEmbeddedByValue() {}

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

func RegisterExternalEffectDispatchServiceServer(s grpc.ServiceRegistrar, srv ExternalEffectDispatchServiceServer) {
	// If the following call panics, it indicates UnimplementedExternalEffectDispatchServiceServer was
	// embedded by pointer and is nil.  This will cause panics if an
	// unimplemented method is ever invoked, so we test this at initialization
	// time to prevent it from happening at runtime later due to I/O.
	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
		t.testEmbeddedByValue()
	}
	s.RegisterService(&ExternalEffectDispatchService_ServiceDesc, srv)
}

func _ExternalEffectDispatchService_ClaimExternalEffects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ClaimExternalEffectsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ExternalEffectDispatchServiceServer).ClaimExternalEffects(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ExternalEffectDispatchService_ClaimExternalEffects_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ExternalEffectDispatchServiceServer).ClaimExternalEffects(ctx, req.(*ClaimExternalEffectsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ExternalEffectDispatchService_CompleteExternalEffect_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CompleteExternalEffectRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ExternalEffectDispatchServiceServer).CompleteExternalEffect(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ExternalEffectDispatchService_CompleteExternalEffect_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ExternalEffectDispatchServiceServer).CompleteExternalEffect(ctx, req.(*CompleteExternalEffectRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// ExternalEffectDispatchService_ServiceDesc is the grpc.ServiceDesc for ExternalEffectDispatchService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ExternalEffectDispatchService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "nexuscrm.runtime.v1.ExternalEffectDispatchService",
	HandlerType: (*ExternalEffectDispatchServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ClaimExternalEffects",
			Handler:    _ExternalEffectDispatchService_ClaimExternalEffects_Handler,
		},
		{
			MethodName: "CompleteExternalEffect",
			Handler:    _ExternalEffectDispatchService_CompleteExternalEffect_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "runtime/v1/external_effects.proto",
}
