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

package proto

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 (
	OutputService_OutputSaveStream_FullMethodName = "/output.OutputService/OutputSaveStream"
	OutputService_OutputStat_FullMethodName       = "/output.OutputService/OutputStat"
	OutputService_OutputPublicURL_FullMethodName  = "/output.OutputService/OutputPublicURL"
)

// OutputServiceClient is the client API for OutputService 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 OutputServiceClient interface {
	OutputSaveStream(ctx context.Context, opts ...grpc.CallOption) (OutputService_OutputSaveStreamClient, error)
	OutputStat(ctx context.Context, in *OutputStatRequest, opts ...grpc.CallOption) (*OutputStatResponse, error)
	OutputPublicURL(ctx context.Context, in *OutputPublicURLRequest, opts ...grpc.CallOption) (*OutputPublicURLResponse, error)
}

type outputServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewOutputServiceClient(cc grpc.ClientConnInterface) OutputServiceClient {
	return &outputServiceClient{cc}
}

func (c *outputServiceClient) OutputSaveStream(ctx context.Context, opts ...grpc.CallOption) (OutputService_OutputSaveStreamClient, error) {
	stream, err := c.cc.NewStream(ctx, &OutputService_ServiceDesc.Streams[0], OutputService_OutputSaveStream_FullMethodName, opts...)
	if err != nil {
		return nil, err
	}
	x := &outputServiceOutputSaveStreamClient{stream}
	return x, nil
}

type OutputService_OutputSaveStreamClient interface {
	Send(*OutputSaveRequest) error
	CloseAndRecv() (*OutputSaveResponse, error)
	grpc.ClientStream
}

type outputServiceOutputSaveStreamClient struct {
	grpc.ClientStream
}

func (x *outputServiceOutputSaveStreamClient) Send(m *OutputSaveRequest) error {
	return x.ClientStream.SendMsg(m)
}

func (x *outputServiceOutputSaveStreamClient) CloseAndRecv() (*OutputSaveResponse, error) {
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	m := new(OutputSaveResponse)
	if err := x.ClientStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

func (c *outputServiceClient) OutputStat(ctx context.Context, in *OutputStatRequest, opts ...grpc.CallOption) (*OutputStatResponse, error) {
	out := new(OutputStatResponse)
	err := c.cc.Invoke(ctx, OutputService_OutputStat_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *outputServiceClient) OutputPublicURL(ctx context.Context, in *OutputPublicURLRequest, opts ...grpc.CallOption) (*OutputPublicURLResponse, error) {
	out := new(OutputPublicURLResponse)
	err := c.cc.Invoke(ctx, OutputService_OutputPublicURL_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// OutputServiceServer is the server API for OutputService service.
// All implementations must embed UnimplementedOutputServiceServer
// for forward compatibility
type OutputServiceServer interface {
	OutputSaveStream(OutputService_OutputSaveStreamServer) error
	OutputStat(context.Context, *OutputStatRequest) (*OutputStatResponse, error)
	OutputPublicURL(context.Context, *OutputPublicURLRequest) (*OutputPublicURLResponse, error)
	mustEmbedUnimplementedOutputServiceServer()
}

// UnimplementedOutputServiceServer must be embedded to have forward compatible implementations.
type UnimplementedOutputServiceServer struct {
}

func (UnimplementedOutputServiceServer) OutputSaveStream(OutputService_OutputSaveStreamServer) error {
	return status.Errorf(codes.Unimplemented, "method OutputSaveStream not implemented")
}
func (UnimplementedOutputServiceServer) OutputStat(context.Context, *OutputStatRequest) (*OutputStatResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method OutputStat not implemented")
}
func (UnimplementedOutputServiceServer) OutputPublicURL(context.Context, *OutputPublicURLRequest) (*OutputPublicURLResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method OutputPublicURL not implemented")
}
func (UnimplementedOutputServiceServer) mustEmbedUnimplementedOutputServiceServer() {}

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

func RegisterOutputServiceServer(s grpc.ServiceRegistrar, srv OutputServiceServer) {
	s.RegisterService(&OutputService_ServiceDesc, srv)
}

func _OutputService_OutputSaveStream_Handler(srv interface{}, stream grpc.ServerStream) error {
	return srv.(OutputServiceServer).OutputSaveStream(&outputServiceOutputSaveStreamServer{stream})
}

type OutputService_OutputSaveStreamServer interface {
	SendAndClose(*OutputSaveResponse) error
	Recv() (*OutputSaveRequest, error)
	grpc.ServerStream
}

type outputServiceOutputSaveStreamServer struct {
	grpc.ServerStream
}

func (x *outputServiceOutputSaveStreamServer) SendAndClose(m *OutputSaveResponse) error {
	return x.ServerStream.SendMsg(m)
}

func (x *outputServiceOutputSaveStreamServer) Recv() (*OutputSaveRequest, error) {
	m := new(OutputSaveRequest)
	if err := x.ServerStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

func _OutputService_OutputStat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(OutputStatRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OutputServiceServer).OutputStat(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: OutputService_OutputStat_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OutputServiceServer).OutputStat(ctx, req.(*OutputStatRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _OutputService_OutputPublicURL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(OutputPublicURLRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(OutputServiceServer).OutputPublicURL(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: OutputService_OutputPublicURL_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(OutputServiceServer).OutputPublicURL(ctx, req.(*OutputPublicURLRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// OutputService_ServiceDesc is the grpc.ServiceDesc for OutputService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var OutputService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "output.OutputService",
	HandlerType: (*OutputServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "OutputStat",
			Handler:    _OutputService_OutputStat_Handler,
		},
		{
			MethodName: "OutputPublicURL",
			Handler:    _OutputService_OutputPublicURL_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "OutputSaveStream",
			Handler:       _OutputService_OutputSaveStream_Handler,
			ClientStreams: true,
		},
	},
	Metadata: "output.proto",
}
