// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             v6.31.1
// source: github.com/buildbarn/bb-remote-execution/pkg/proto/completedactionlogger/completed_action_logger.proto

package completedactionlogger

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

// 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 (
	CompletedActionLogger_LogCompletedActions_FullMethodName = "/buildbarn.completedactionlogger.CompletedActionLogger/LogCompletedActions"
)

// CompletedActionLoggerClient is the client API for CompletedActionLogger 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 CompletedActionLoggerClient interface {
	LogCompletedActions(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[CompletedAction, emptypb.Empty], error)
}

type completedActionLoggerClient struct {
	cc grpc.ClientConnInterface
}

func NewCompletedActionLoggerClient(cc grpc.ClientConnInterface) CompletedActionLoggerClient {
	return &completedActionLoggerClient{cc}
}

func (c *completedActionLoggerClient) LogCompletedActions(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[CompletedAction, emptypb.Empty], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &CompletedActionLogger_ServiceDesc.Streams[0], CompletedActionLogger_LogCompletedActions_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[CompletedAction, emptypb.Empty]{ClientStream: stream}
	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 CompletedActionLogger_LogCompletedActionsClient = grpc.BidiStreamingClient[CompletedAction, emptypb.Empty]

// CompletedActionLoggerServer is the server API for CompletedActionLogger service.
// All implementations should embed UnimplementedCompletedActionLoggerServer
// for forward compatibility.
type CompletedActionLoggerServer interface {
	LogCompletedActions(grpc.BidiStreamingServer[CompletedAction, emptypb.Empty]) error
}

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

func (UnimplementedCompletedActionLoggerServer) LogCompletedActions(grpc.BidiStreamingServer[CompletedAction, emptypb.Empty]) error {
	return status.Errorf(codes.Unimplemented, "method LogCompletedActions not implemented")
}
func (UnimplementedCompletedActionLoggerServer) testEmbeddedByValue() {}

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

func RegisterCompletedActionLoggerServer(s grpc.ServiceRegistrar, srv CompletedActionLoggerServer) {
	// If the following call pancis, it indicates UnimplementedCompletedActionLoggerServer 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(&CompletedActionLogger_ServiceDesc, srv)
}

func _CompletedActionLogger_LogCompletedActions_Handler(srv interface{}, stream grpc.ServerStream) error {
	return srv.(CompletedActionLoggerServer).LogCompletedActions(&grpc.GenericServerStream[CompletedAction, emptypb.Empty]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CompletedActionLogger_LogCompletedActionsServer = grpc.BidiStreamingServer[CompletedAction, emptypb.Empty]

// CompletedActionLogger_ServiceDesc is the grpc.ServiceDesc for CompletedActionLogger service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var CompletedActionLogger_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "buildbarn.completedactionlogger.CompletedActionLogger",
	HandlerType: (*CompletedActionLoggerServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "LogCompletedActions",
			Handler:       _CompletedActionLogger_LogCompletedActions_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "github.com/buildbarn/bb-remote-execution/pkg/proto/completedactionlogger/completed_action_logger.proto",
}
