// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             (unknown)
// source: saas/v1alpha1/record_hub_service.proto

package saasv1alpha1

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.62.0 or later.
const _ = grpc.SupportPackageIsVersion8

const (
	RecordHubService_GetRecord_FullMethodName    = "/saas.v1alpha1.RecordHubService/GetRecord"
	RecordHubService_DeleteRecord_FullMethodName = "/saas.v1alpha1.RecordHubService/DeleteRecord"
)

// RecordHubServiceClient is the client API for RecordHubService 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.
//
// These APIs are primarily intended for UI interactions. Their implementations should not interact with the Agent Directory service.
type RecordHubServiceClient interface {
	GetRecord(ctx context.Context, in *GetRecordRequest, opts ...grpc.CallOption) (*GetRecordResponse, error)
	DeleteRecord(ctx context.Context, in *DeleteRecordRequest, opts ...grpc.CallOption) (*DeleteRecordResponse, error)
}

type recordHubServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewRecordHubServiceClient(cc grpc.ClientConnInterface) RecordHubServiceClient {
	return &recordHubServiceClient{cc}
}

func (c *recordHubServiceClient) GetRecord(ctx context.Context, in *GetRecordRequest, opts ...grpc.CallOption) (*GetRecordResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetRecordResponse)
	err := c.cc.Invoke(ctx, RecordHubService_GetRecord_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *recordHubServiceClient) DeleteRecord(ctx context.Context, in *DeleteRecordRequest, opts ...grpc.CallOption) (*DeleteRecordResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(DeleteRecordResponse)
	err := c.cc.Invoke(ctx, RecordHubService_DeleteRecord_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// RecordHubServiceServer is the server API for RecordHubService service.
// All implementations should embed UnimplementedRecordHubServiceServer
// for forward compatibility.
//
// These APIs are primarily intended for UI interactions. Their implementations should not interact with the Agent Directory service.
type RecordHubServiceServer interface {
	GetRecord(context.Context, *GetRecordRequest) (*GetRecordResponse, error)
	DeleteRecord(context.Context, *DeleteRecordRequest) (*DeleteRecordResponse, error)
}

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

func (UnimplementedRecordHubServiceServer) GetRecord(context.Context, *GetRecordRequest) (*GetRecordResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetRecord not implemented")
}
func (UnimplementedRecordHubServiceServer) DeleteRecord(context.Context, *DeleteRecordRequest) (*DeleteRecordResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteRecord not implemented")
}
func (UnimplementedRecordHubServiceServer) testEmbeddedByValue() {}

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

func RegisterRecordHubServiceServer(s grpc.ServiceRegistrar, srv RecordHubServiceServer) {
	// If the following call pancis, it indicates UnimplementedRecordHubServiceServer 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(&RecordHubService_ServiceDesc, srv)
}

func _RecordHubService_GetRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetRecordRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RecordHubServiceServer).GetRecord(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RecordHubService_GetRecord_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RecordHubServiceServer).GetRecord(ctx, req.(*GetRecordRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RecordHubService_DeleteRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteRecordRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RecordHubServiceServer).DeleteRecord(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RecordHubService_DeleteRecord_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RecordHubServiceServer).DeleteRecord(ctx, req.(*DeleteRecordRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// RecordHubService_ServiceDesc is the grpc.ServiceDesc for RecordHubService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var RecordHubService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "saas.v1alpha1.RecordHubService",
	HandlerType: (*RecordHubServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetRecord",
			Handler:    _RecordHubService_GetRecord_Handler,
		},
		{
			MethodName: "DeleteRecord",
			Handler:    _RecordHubService_DeleteRecord_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "saas/v1alpha1/record_hub_service.proto",
}
