// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc             (unknown)
// source: runtime/v1/outbound_intents.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 (
	OutboundIntentService_ReadOutboundIntentGeneration_FullMethodName = "/nexuscrm.runtime.v1.OutboundIntentService/ReadOutboundIntentGeneration"
	OutboundIntentService_ListPendingOutboundIntents_FullMethodName   = "/nexuscrm.runtime.v1.OutboundIntentService/ListPendingOutboundIntents"
	OutboundIntentService_AcknowledgeOutboundIntent_FullMethodName    = "/nexuscrm.runtime.v1.OutboundIntentService/AcknowledgeOutboundIntent"
	OutboundIntentService_CommitOutboundResult_FullMethodName         = "/nexuscrm.runtime.v1.OutboundIntentService/CommitOutboundResult"
	OutboundIntentService_OpenOutboundMailAttachment_FullMethodName   = "/nexuscrm.runtime.v1.OutboundIntentService/OpenOutboundMailAttachment"
)

// OutboundIntentServiceClient is the client API for OutboundIntentService 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.
//
// OutboundIntentService exposes Runtime-owned immutable intents to one
// authorized Integration consumer. It deliberately exposes no provider-effect
// claim, credential, retry, or provider-dispatch RPC. CommitOutboundResult is
// the narrow, idempotent hand-back for Runtime's metadata-authorized local
// projection after Integration has durably recorded provider success.
type OutboundIntentServiceClient interface {
	ReadOutboundIntentGeneration(ctx context.Context, in *ReadOutboundIntentGenerationRequest, opts ...grpc.CallOption) (*ReadOutboundIntentGenerationResponse, error)
	ListPendingOutboundIntents(ctx context.Context, in *ListPendingOutboundIntentsRequest, opts ...grpc.CallOption) (*ListPendingOutboundIntentsResponse, error)
	AcknowledgeOutboundIntent(ctx context.Context, in *AcknowledgeOutboundIntentRequest, opts ...grpc.CallOption) (*AcknowledgeOutboundIntentResponse, error)
	CommitOutboundResult(ctx context.Context, in *CommitOutboundResultRequest, opts ...grpc.CallOption) (*CommitOutboundResultResponse, error)
	// Opens only a frozen attachment belonging to the exact accepted intent and
	// Integration command. It is not an arbitrary Runtime Files read surface.
	OpenOutboundMailAttachment(ctx context.Context, in *OpenOutboundMailAttachmentRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[OpenOutboundMailAttachmentResponse], error)
}

type outboundIntentServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewOutboundIntentServiceClient(cc grpc.ClientConnInterface) OutboundIntentServiceClient {
	return &outboundIntentServiceClient{cc}
}

func (c *outboundIntentServiceClient) ReadOutboundIntentGeneration(ctx context.Context, in *ReadOutboundIntentGenerationRequest, opts ...grpc.CallOption) (*ReadOutboundIntentGenerationResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ReadOutboundIntentGenerationResponse)
	err := c.cc.Invoke(ctx, OutboundIntentService_ReadOutboundIntentGeneration_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *outboundIntentServiceClient) ListPendingOutboundIntents(ctx context.Context, in *ListPendingOutboundIntentsRequest, opts ...grpc.CallOption) (*ListPendingOutboundIntentsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListPendingOutboundIntentsResponse)
	err := c.cc.Invoke(ctx, OutboundIntentService_ListPendingOutboundIntents_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *outboundIntentServiceClient) AcknowledgeOutboundIntent(ctx context.Context, in *AcknowledgeOutboundIntentRequest, opts ...grpc.CallOption) (*AcknowledgeOutboundIntentResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(AcknowledgeOutboundIntentResponse)
	err := c.cc.Invoke(ctx, OutboundIntentService_AcknowledgeOutboundIntent_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *outboundIntentServiceClient) CommitOutboundResult(ctx context.Context, in *CommitOutboundResultRequest, opts ...grpc.CallOption) (*CommitOutboundResultResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(CommitOutboundResultResponse)
	err := c.cc.Invoke(ctx, OutboundIntentService_CommitOutboundResult_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *outboundIntentServiceClient) OpenOutboundMailAttachment(ctx context.Context, in *OpenOutboundMailAttachmentRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[OpenOutboundMailAttachmentResponse], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &OutboundIntentService_ServiceDesc.Streams[0], OutboundIntentService_OpenOutboundMailAttachment_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[OpenOutboundMailAttachmentRequest, OpenOutboundMailAttachmentResponse]{ClientStream: stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type OutboundIntentService_OpenOutboundMailAttachmentClient = grpc.ServerStreamingClient[OpenOutboundMailAttachmentResponse]

// OutboundIntentServiceServer is the server API for OutboundIntentService service.
// All implementations must embed UnimplementedOutboundIntentServiceServer
// for forward compatibility.
//
// OutboundIntentService exposes Runtime-owned immutable intents to one
// authorized Integration consumer. It deliberately exposes no provider-effect
// claim, credential, retry, or provider-dispatch RPC. CommitOutboundResult is
// the narrow, idempotent hand-back for Runtime's metadata-authorized local
// projection after Integration has durably recorded provider success.
type OutboundIntentServiceServer interface {
	ReadOutboundIntentGeneration(context.Context, *ReadOutboundIntentGenerationRequest) (*ReadOutboundIntentGenerationResponse, error)
	ListPendingOutboundIntents(context.Context, *ListPendingOutboundIntentsRequest) (*ListPendingOutboundIntentsResponse, error)
	AcknowledgeOutboundIntent(context.Context, *AcknowledgeOutboundIntentRequest) (*AcknowledgeOutboundIntentResponse, error)
	CommitOutboundResult(context.Context, *CommitOutboundResultRequest) (*CommitOutboundResultResponse, error)
	// Opens only a frozen attachment belonging to the exact accepted intent and
	// Integration command. It is not an arbitrary Runtime Files read surface.
	OpenOutboundMailAttachment(*OpenOutboundMailAttachmentRequest, grpc.ServerStreamingServer[OpenOutboundMailAttachmentResponse]) error
	mustEmbedUnimplementedOutboundIntentServiceServer()
}

// UnimplementedOutboundIntentServiceServer 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 UnimplementedOutboundIntentServiceServer struct{}

func (UnimplementedOutboundIntentServiceServer) ReadOutboundIntentGeneration(context.Context, *ReadOutboundIntentGenerationRequest) (*ReadOutboundIntentGenerationResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method ReadOutboundIntentGeneration not implemented")
}
func (UnimplementedOutboundIntentServiceServer) ListPendingOutboundIntents(context.Context, *ListPendingOutboundIntentsRequest) (*ListPendingOutboundIntentsResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method ListPendingOutboundIntents not implemented")
}
func (UnimplementedOutboundIntentServiceServer) AcknowledgeOutboundIntent(context.Context, *AcknowledgeOutboundIntentRequest) (*AcknowledgeOutboundIntentResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method AcknowledgeOutboundIntent not implemented")
}
func (UnimplementedOutboundIntentServiceServer) CommitOutboundResult(context.Context, *CommitOutboundResultRequest) (*CommitOutboundResultResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method CommitOutboundResult not implemented")
}
func (UnimplementedOutboundIntentServiceServer) OpenOutboundMailAttachment(*OpenOutboundMailAttachmentRequest, grpc.ServerStreamingServer[OpenOutboundMailAttachmentResponse]) error {
	return status.Error(codes.Unimplemented, "method OpenOutboundMailAttachment not implemented")
}
func (UnimplementedOutboundIntentServiceServer) mustEmbedUnimplementedOutboundIntentServiceServer() {}
func (UnimplementedOutboundIntentServiceServer) testEmbeddedByValue()                               {}

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

func RegisterOutboundIntentServiceServer(s grpc.ServiceRegistrar, srv OutboundIntentServiceServer) {
	// If the following call panics, it indicates UnimplementedOutboundIntentServiceServer 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(&OutboundIntentService_ServiceDesc, srv)
}

func _OutboundIntentService_ReadOutboundIntentGeneration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ReadOutboundIntentGenerationRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OutboundIntentServiceServer).ReadOutboundIntentGeneration(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: OutboundIntentService_ReadOutboundIntentGeneration_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OutboundIntentServiceServer).ReadOutboundIntentGeneration(ctx, req.(*ReadOutboundIntentGenerationRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _OutboundIntentService_ListPendingOutboundIntents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListPendingOutboundIntentsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OutboundIntentServiceServer).ListPendingOutboundIntents(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: OutboundIntentService_ListPendingOutboundIntents_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OutboundIntentServiceServer).ListPendingOutboundIntents(ctx, req.(*ListPendingOutboundIntentsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _OutboundIntentService_AcknowledgeOutboundIntent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AcknowledgeOutboundIntentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OutboundIntentServiceServer).AcknowledgeOutboundIntent(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: OutboundIntentService_AcknowledgeOutboundIntent_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OutboundIntentServiceServer).AcknowledgeOutboundIntent(ctx, req.(*AcknowledgeOutboundIntentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _OutboundIntentService_CommitOutboundResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CommitOutboundResultRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OutboundIntentServiceServer).CommitOutboundResult(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: OutboundIntentService_CommitOutboundResult_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OutboundIntentServiceServer).CommitOutboundResult(ctx, req.(*CommitOutboundResultRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _OutboundIntentService_OpenOutboundMailAttachment_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(OpenOutboundMailAttachmentRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(OutboundIntentServiceServer).OpenOutboundMailAttachment(m, &grpc.GenericServerStream[OpenOutboundMailAttachmentRequest, OpenOutboundMailAttachmentResponse]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type OutboundIntentService_OpenOutboundMailAttachmentServer = grpc.ServerStreamingServer[OpenOutboundMailAttachmentResponse]

// OutboundIntentService_ServiceDesc is the grpc.ServiceDesc for OutboundIntentService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var OutboundIntentService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "nexuscrm.runtime.v1.OutboundIntentService",
	HandlerType: (*OutboundIntentServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ReadOutboundIntentGeneration",
			Handler:    _OutboundIntentService_ReadOutboundIntentGeneration_Handler,
		},
		{
			MethodName: "ListPendingOutboundIntents",
			Handler:    _OutboundIntentService_ListPendingOutboundIntents_Handler,
		},
		{
			MethodName: "AcknowledgeOutboundIntent",
			Handler:    _OutboundIntentService_AcknowledgeOutboundIntent_Handler,
		},
		{
			MethodName: "CommitOutboundResult",
			Handler:    _OutboundIntentService_CommitOutboundResult_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "OpenOutboundMailAttachment",
			Handler:       _OutboundIntentService_OpenOutboundMailAttachment_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "runtime/v1/outbound_intents.proto",
}

const (
	OutboundIntentNoEffectService_CommitOutboundNoEffect_FullMethodName = "/nexuscrm.runtime.v1.OutboundIntentNoEffectService/CommitOutboundNoEffect"
)

// OutboundIntentNoEffectServiceClient is the client API for OutboundIntentNoEffectService 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.
//
// OutboundIntentNoEffectService is the additive terminal hand-back for an
// accepted command that cannot be dispatched because its Catalog authority is
// retired. It is deliberately separate from OutboundIntentService so the
// published v1 Go client and server interfaces remain source-compatible.
type OutboundIntentNoEffectServiceClient interface {
	CommitOutboundNoEffect(ctx context.Context, in *CommitOutboundNoEffectRequest, opts ...grpc.CallOption) (*CommitOutboundNoEffectResponse, error)
}

type outboundIntentNoEffectServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewOutboundIntentNoEffectServiceClient(cc grpc.ClientConnInterface) OutboundIntentNoEffectServiceClient {
	return &outboundIntentNoEffectServiceClient{cc}
}

func (c *outboundIntentNoEffectServiceClient) CommitOutboundNoEffect(ctx context.Context, in *CommitOutboundNoEffectRequest, opts ...grpc.CallOption) (*CommitOutboundNoEffectResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(CommitOutboundNoEffectResponse)
	err := c.cc.Invoke(ctx, OutboundIntentNoEffectService_CommitOutboundNoEffect_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// OutboundIntentNoEffectServiceServer is the server API for OutboundIntentNoEffectService service.
// All implementations must embed UnimplementedOutboundIntentNoEffectServiceServer
// for forward compatibility.
//
// OutboundIntentNoEffectService is the additive terminal hand-back for an
// accepted command that cannot be dispatched because its Catalog authority is
// retired. It is deliberately separate from OutboundIntentService so the
// published v1 Go client and server interfaces remain source-compatible.
type OutboundIntentNoEffectServiceServer interface {
	CommitOutboundNoEffect(context.Context, *CommitOutboundNoEffectRequest) (*CommitOutboundNoEffectResponse, error)
	mustEmbedUnimplementedOutboundIntentNoEffectServiceServer()
}

// UnimplementedOutboundIntentNoEffectServiceServer 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 UnimplementedOutboundIntentNoEffectServiceServer struct{}

func (UnimplementedOutboundIntentNoEffectServiceServer) CommitOutboundNoEffect(context.Context, *CommitOutboundNoEffectRequest) (*CommitOutboundNoEffectResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method CommitOutboundNoEffect not implemented")
}
func (UnimplementedOutboundIntentNoEffectServiceServer) mustEmbedUnimplementedOutboundIntentNoEffectServiceServer() {
}
func (UnimplementedOutboundIntentNoEffectServiceServer) testEmbeddedByValue() {}

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

func RegisterOutboundIntentNoEffectServiceServer(s grpc.ServiceRegistrar, srv OutboundIntentNoEffectServiceServer) {
	// If the following call panics, it indicates UnimplementedOutboundIntentNoEffectServiceServer 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(&OutboundIntentNoEffectService_ServiceDesc, srv)
}

func _OutboundIntentNoEffectService_CommitOutboundNoEffect_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CommitOutboundNoEffectRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OutboundIntentNoEffectServiceServer).CommitOutboundNoEffect(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: OutboundIntentNoEffectService_CommitOutboundNoEffect_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OutboundIntentNoEffectServiceServer).CommitOutboundNoEffect(ctx, req.(*CommitOutboundNoEffectRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// OutboundIntentNoEffectService_ServiceDesc is the grpc.ServiceDesc for OutboundIntentNoEffectService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var OutboundIntentNoEffectService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "nexuscrm.runtime.v1.OutboundIntentNoEffectService",
	HandlerType: (*OutboundIntentNoEffectServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CommitOutboundNoEffect",
			Handler:    _OutboundIntentNoEffectService_CommitOutboundNoEffect_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "runtime/v1/outbound_intents.proto",
}
