// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             v5.28.3
// source: helios/speech/speech.proto

package pbspeech

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 (
	SpeechService_GetUploadUrl_FullMethodName = "/helios.speech.SpeechService/GetUploadUrl"
	SpeechService_Transcribe_FullMethodName   = "/helios.speech.SpeechService/Transcribe"
)

// SpeechServiceClient is the client API for SpeechService 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 SpeechServiceClient interface {
	GetUploadUrl(ctx context.Context, in *GetUploadUrlRequest, opts ...grpc.CallOption) (*GetUploadUrlResponse, error)
	// Transcribes the given media & cleans up the resources.
	// NOTE: must have uploaded to referenced object.
	Transcribe(ctx context.Context, in *TranscribeRequest, opts ...grpc.CallOption) (*TranscribeResponse, error)
}

type speechServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewSpeechServiceClient(cc grpc.ClientConnInterface) SpeechServiceClient {
	return &speechServiceClient{cc}
}

func (c *speechServiceClient) GetUploadUrl(ctx context.Context, in *GetUploadUrlRequest, opts ...grpc.CallOption) (*GetUploadUrlResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetUploadUrlResponse)
	err := c.cc.Invoke(ctx, SpeechService_GetUploadUrl_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *speechServiceClient) Transcribe(ctx context.Context, in *TranscribeRequest, opts ...grpc.CallOption) (*TranscribeResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(TranscribeResponse)
	err := c.cc.Invoke(ctx, SpeechService_Transcribe_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// SpeechServiceServer is the server API for SpeechService service.
// All implementations must embed UnimplementedSpeechServiceServer
// for forward compatibility.
type SpeechServiceServer interface {
	GetUploadUrl(context.Context, *GetUploadUrlRequest) (*GetUploadUrlResponse, error)
	// Transcribes the given media & cleans up the resources.
	// NOTE: must have uploaded to referenced object.
	Transcribe(context.Context, *TranscribeRequest) (*TranscribeResponse, error)
	mustEmbedUnimplementedSpeechServiceServer()
}

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

func (UnimplementedSpeechServiceServer) GetUploadUrl(context.Context, *GetUploadUrlRequest) (*GetUploadUrlResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetUploadUrl not implemented")
}
func (UnimplementedSpeechServiceServer) Transcribe(context.Context, *TranscribeRequest) (*TranscribeResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Transcribe not implemented")
}
func (UnimplementedSpeechServiceServer) mustEmbedUnimplementedSpeechServiceServer() {}
func (UnimplementedSpeechServiceServer) testEmbeddedByValue()                       {}

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

func RegisterSpeechServiceServer(s grpc.ServiceRegistrar, srv SpeechServiceServer) {
	// If the following call pancis, it indicates UnimplementedSpeechServiceServer 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(&SpeechService_ServiceDesc, srv)
}

func _SpeechService_GetUploadUrl_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetUploadUrlRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SpeechServiceServer).GetUploadUrl(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SpeechService_GetUploadUrl_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SpeechServiceServer).GetUploadUrl(ctx, req.(*GetUploadUrlRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _SpeechService_Transcribe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(TranscribeRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SpeechServiceServer).Transcribe(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SpeechService_Transcribe_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SpeechServiceServer).Transcribe(ctx, req.(*TranscribeRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// SpeechService_ServiceDesc is the grpc.ServiceDesc for SpeechService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SpeechService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "helios.speech.SpeechService",
	HandlerType: (*SpeechServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetUploadUrl",
			Handler:    _SpeechService_GetUploadUrl_Handler,
		},
		{
			MethodName: "Transcribe",
			Handler:    _SpeechService_Transcribe_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "helios/speech/speech.proto",
}
