// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.0
// - protoc             v7.34.1
// source: cloud.proto

package cloud

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 (
	CloudToolService_ToolStream_FullMethodName = "/cloud.CloudToolService/ToolStream"
)

// CloudToolServiceClient is the client API for CloudToolService 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 CloudToolServiceClient interface {
	// Dozzle sends ToolResponse, cloud sends ToolRequest
	ToolStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[ToolResponse, ToolRequest], error)
}

type cloudToolServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewCloudToolServiceClient(cc grpc.ClientConnInterface) CloudToolServiceClient {
	return &cloudToolServiceClient{cc}
}

func (c *cloudToolServiceClient) ToolStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[ToolResponse, ToolRequest], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &CloudToolService_ServiceDesc.Streams[0], CloudToolService_ToolStream_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[ToolResponse, ToolRequest]{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 CloudToolService_ToolStreamClient = grpc.BidiStreamingClient[ToolResponse, ToolRequest]

// CloudToolServiceServer is the server API for CloudToolService service.
// All implementations must embed UnimplementedCloudToolServiceServer
// for forward compatibility.
type CloudToolServiceServer interface {
	// Dozzle sends ToolResponse, cloud sends ToolRequest
	ToolStream(grpc.BidiStreamingServer[ToolResponse, ToolRequest]) error
	mustEmbedUnimplementedCloudToolServiceServer()
}

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

func (UnimplementedCloudToolServiceServer) ToolStream(grpc.BidiStreamingServer[ToolResponse, ToolRequest]) error {
	return status.Error(codes.Unimplemented, "method ToolStream not implemented")
}
func (UnimplementedCloudToolServiceServer) mustEmbedUnimplementedCloudToolServiceServer() {}
func (UnimplementedCloudToolServiceServer) testEmbeddedByValue()                          {}

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

func RegisterCloudToolServiceServer(s grpc.ServiceRegistrar, srv CloudToolServiceServer) {
	// If the following call panics, it indicates UnimplementedCloudToolServiceServer 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(&CloudToolService_ServiceDesc, srv)
}

func _CloudToolService_ToolStream_Handler(srv interface{}, stream grpc.ServerStream) error {
	return srv.(CloudToolServiceServer).ToolStream(&grpc.GenericServerStream[ToolResponse, ToolRequest]{ServerStream: stream})
}

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

// CloudToolService_ServiceDesc is the grpc.ServiceDesc for CloudToolService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var CloudToolService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cloud.CloudToolService",
	HandlerType: (*CloudToolServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ToolStream",
			Handler:       _CloudToolService_ToolStream_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "cloud.proto",
}
