// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc             (unknown)
// source: runtime/v1/application_results.proto

package runtimev1

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 (
	ApplicationResultService_GetApplicationResult_FullMethodName = "/nexuscrm.runtime.v1.ApplicationResultService/GetApplicationResult"
)

// ApplicationResultServiceClient is the client API for ApplicationResultService 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.
//
// ApplicationResultService exposes only Runtime's immutable application-result
// authority. Command acceptance remains a separate, unchanged service because
// durable inbox admission is not application completion.
type ApplicationResultServiceClient interface {
	GetApplicationResult(ctx context.Context, in *GetApplicationResultRequest, opts ...grpc.CallOption) (*GetApplicationResultResponse, error)
}

type applicationResultServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewApplicationResultServiceClient(cc grpc.ClientConnInterface) ApplicationResultServiceClient {
	return &applicationResultServiceClient{cc}
}

func (c *applicationResultServiceClient) GetApplicationResult(ctx context.Context, in *GetApplicationResultRequest, opts ...grpc.CallOption) (*GetApplicationResultResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetApplicationResultResponse)
	err := c.cc.Invoke(ctx, ApplicationResultService_GetApplicationResult_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ApplicationResultServiceServer is the server API for ApplicationResultService service.
// All implementations must embed UnimplementedApplicationResultServiceServer
// for forward compatibility.
//
// ApplicationResultService exposes only Runtime's immutable application-result
// authority. Command acceptance remains a separate, unchanged service because
// durable inbox admission is not application completion.
type ApplicationResultServiceServer interface {
	GetApplicationResult(context.Context, *GetApplicationResultRequest) (*GetApplicationResultResponse, error)
	mustEmbedUnimplementedApplicationResultServiceServer()
}

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

func (UnimplementedApplicationResultServiceServer) GetApplicationResult(context.Context, *GetApplicationResultRequest) (*GetApplicationResultResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method GetApplicationResult not implemented")
}
func (UnimplementedApplicationResultServiceServer) mustEmbedUnimplementedApplicationResultServiceServer() {
}
func (UnimplementedApplicationResultServiceServer) testEmbeddedByValue() {}

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

func RegisterApplicationResultServiceServer(s grpc.ServiceRegistrar, srv ApplicationResultServiceServer) {
	// If the following call panics, it indicates UnimplementedApplicationResultServiceServer 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(&ApplicationResultService_ServiceDesc, srv)
}

func _ApplicationResultService_GetApplicationResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetApplicationResultRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ApplicationResultServiceServer).GetApplicationResult(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ApplicationResultService_GetApplicationResult_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ApplicationResultServiceServer).GetApplicationResult(ctx, req.(*GetApplicationResultRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// ApplicationResultService_ServiceDesc is the grpc.ServiceDesc for ApplicationResultService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ApplicationResultService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "nexuscrm.runtime.v1.ApplicationResultService",
	HandlerType: (*ApplicationResultServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetApplicationResult",
			Handler:    _ApplicationResultService_GetApplicationResult_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "runtime/v1/application_results.proto",
}
