// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc             v3.21.12
// source: yandex/cloud/speechsense/v1/assistants_service.proto

package speechsense

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 (
	AssistantsService_List_FullMethodName       = "/yandex.cloud.speechsense.v1.AssistantsService/List"
	AssistantsService_ListModels_FullMethodName = "/yandex.cloud.speechsense.v1.AssistantsService/ListModels"
)

// AssistantsServiceClient is the client API for AssistantsService 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 AssistantsServiceClient interface {
	// Rpc for listing assistants in a project
	List(ctx context.Context, in *ListAssistantsRequest, opts ...grpc.CallOption) (*ListAssistantsResponse, error)
	// Rpc for listing available assistant models
	ListModels(ctx context.Context, in *ListModelsRequest, opts ...grpc.CallOption) (*ListModelsResponse, error)
}

type assistantsServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewAssistantsServiceClient(cc grpc.ClientConnInterface) AssistantsServiceClient {
	return &assistantsServiceClient{cc}
}

func (c *assistantsServiceClient) List(ctx context.Context, in *ListAssistantsRequest, opts ...grpc.CallOption) (*ListAssistantsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListAssistantsResponse)
	err := c.cc.Invoke(ctx, AssistantsService_List_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *assistantsServiceClient) ListModels(ctx context.Context, in *ListModelsRequest, opts ...grpc.CallOption) (*ListModelsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListModelsResponse)
	err := c.cc.Invoke(ctx, AssistantsService_ListModels_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// AssistantsServiceServer is the server API for AssistantsService service.
// All implementations should embed UnimplementedAssistantsServiceServer
// for forward compatibility.
type AssistantsServiceServer interface {
	// Rpc for listing assistants in a project
	List(context.Context, *ListAssistantsRequest) (*ListAssistantsResponse, error)
	// Rpc for listing available assistant models
	ListModels(context.Context, *ListModelsRequest) (*ListModelsResponse, error)
}

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

func (UnimplementedAssistantsServiceServer) List(context.Context, *ListAssistantsRequest) (*ListAssistantsResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedAssistantsServiceServer) ListModels(context.Context, *ListModelsRequest) (*ListModelsResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method ListModels not implemented")
}
func (UnimplementedAssistantsServiceServer) testEmbeddedByValue() {}

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

func RegisterAssistantsServiceServer(s grpc.ServiceRegistrar, srv AssistantsServiceServer) {
	// If the following call panics, it indicates UnimplementedAssistantsServiceServer 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(&AssistantsService_ServiceDesc, srv)
}

func _AssistantsService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListAssistantsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AssistantsServiceServer).List(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: AssistantsService_List_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AssistantsServiceServer).List(ctx, req.(*ListAssistantsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _AssistantsService_ListModels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListModelsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AssistantsServiceServer).ListModels(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: AssistantsService_ListModels_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AssistantsServiceServer).ListModels(ctx, req.(*ListModelsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// AssistantsService_ServiceDesc is the grpc.ServiceDesc for AssistantsService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var AssistantsService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "yandex.cloud.speechsense.v1.AssistantsService",
	HandlerType: (*AssistantsServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "List",
			Handler:    _AssistantsService_List_Handler,
		},
		{
			MethodName: "ListModels",
			Handler:    _AssistantsService_ListModels_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "yandex/cloud/speechsense/v1/assistants_service.proto",
}
