// Code generated by protoc-gen-go-grpc. DO NOT EDIT.

package call

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

// CallServiceClient is the client API for CallService 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 CallServiceClient interface {
	Call(ctx context.Context, in *CallRequest, opts ...grpc.CallOption) (*CallResponse, error)
}

type callServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewCallServiceClient(cc grpc.ClientConnInterface) CallServiceClient {
	return &callServiceClient{cc}
}

func (c *callServiceClient) Call(ctx context.Context, in *CallRequest, opts ...grpc.CallOption) (*CallResponse, error) {
	out := new(CallResponse)
	err := c.cc.Invoke(ctx, "/ioc_golang.aop.call.CallService/Call", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// CallServiceServer is the server API for CallService service.
// All implementations must embed UnimplementedCallServiceServer
// for forward compatibility
type CallServiceServer interface {
	Call(context.Context, *CallRequest) (*CallResponse, error)
	mustEmbedUnimplementedCallServiceServer()
}

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

func (UnimplementedCallServiceServer) Call(context.Context, *CallRequest) (*CallResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Call not implemented")
}
func (UnimplementedCallServiceServer) mustEmbedUnimplementedCallServiceServer() {}

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

func RegisterCallServiceServer(s grpc.ServiceRegistrar, srv CallServiceServer) {
	s.RegisterService(&CallService_ServiceDesc, srv)
}

func _CallService_Call_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CallRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(CallServiceServer).Call(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ioc_golang.aop.call.CallService/Call",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(CallServiceServer).Call(ctx, req.(*CallRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// CallService_ServiceDesc is the grpc.ServiceDesc for CallService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var CallService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "ioc_golang.aop.call.CallService",
	HandlerType: (*CallServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Call",
			Handler:    _CallService_Call_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "extension/aop/call/api/ioc_golang/aop/call/call.proto",
}
