// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.0
// - protoc             v6.33.1
// source: realm.proto

package gen

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	emptypb "google.golang.org/protobuf/types/known/emptypb"
	wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
)

// 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 (
	RealmService_GetRealm_FullMethodName           = "/proto.RealmService/GetRealm"
	RealmService_GetRealmBatch_FullMethodName      = "/proto.RealmService/GetRealmBatch"
	RealmService_GetUserRealms_FullMethodName      = "/proto.RealmService/GetUserRealms"
	RealmService_GetPublicRealms_FullMethodName    = "/proto.RealmService/GetPublicRealms"
	RealmService_SearchRealms_FullMethodName       = "/proto.RealmService/SearchRealms"
	RealmService_SendInviteNotify_FullMethodName   = "/proto.RealmService/SendInviteNotify"
	RealmService_IsMemberWithRole_FullMethodName   = "/proto.RealmService/IsMemberWithRole"
	RealmService_LoadMemberAccount_FullMethodName  = "/proto.RealmService/LoadMemberAccount"
	RealmService_LoadMemberAccounts_FullMethodName = "/proto.RealmService/LoadMemberAccounts"
)

// RealmServiceClient is the client API for RealmService 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 RealmServiceClient interface {
	// Get realm by id or slug
	GetRealm(ctx context.Context, in *GetRealmRequest, opts ...grpc.CallOption) (*Realm, error)
	// Get realm batch by ids
	GetRealmBatch(ctx context.Context, in *GetRealmBatchRequest, opts ...grpc.CallOption) (*GetRealmBatchResponse, error)
	// Get realms for a user
	GetUserRealms(ctx context.Context, in *GetUserRealmsRequest, opts ...grpc.CallOption) (*GetUserRealmsResponse, error)
	// Get public realms
	GetPublicRealms(ctx context.Context, in *GetPublicRealmsRequest, opts ...grpc.CallOption) (*GetPublicRealmsResponse, error)
	// Search public realms
	SearchRealms(ctx context.Context, in *SearchRealmsRequest, opts ...grpc.CallOption) (*GetPublicRealmsResponse, error)
	// Send invitation notification
	SendInviteNotify(ctx context.Context, in *SendInviteNotifyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Check if member has required role
	IsMemberWithRole(ctx context.Context, in *IsMemberWithRoleRequest, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error)
	// Load account for a member
	LoadMemberAccount(ctx context.Context, in *LoadMemberAccountRequest, opts ...grpc.CallOption) (*RealmMember, error)
	// Load accounts for members
	LoadMemberAccounts(ctx context.Context, in *LoadMemberAccountsRequest, opts ...grpc.CallOption) (*LoadMemberAccountsResponse, error)
}

type realmServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewRealmServiceClient(cc grpc.ClientConnInterface) RealmServiceClient {
	return &realmServiceClient{cc}
}

func (c *realmServiceClient) GetRealm(ctx context.Context, in *GetRealmRequest, opts ...grpc.CallOption) (*Realm, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(Realm)
	err := c.cc.Invoke(ctx, RealmService_GetRealm_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *realmServiceClient) GetRealmBatch(ctx context.Context, in *GetRealmBatchRequest, opts ...grpc.CallOption) (*GetRealmBatchResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetRealmBatchResponse)
	err := c.cc.Invoke(ctx, RealmService_GetRealmBatch_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *realmServiceClient) GetUserRealms(ctx context.Context, in *GetUserRealmsRequest, opts ...grpc.CallOption) (*GetUserRealmsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetUserRealmsResponse)
	err := c.cc.Invoke(ctx, RealmService_GetUserRealms_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *realmServiceClient) GetPublicRealms(ctx context.Context, in *GetPublicRealmsRequest, opts ...grpc.CallOption) (*GetPublicRealmsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetPublicRealmsResponse)
	err := c.cc.Invoke(ctx, RealmService_GetPublicRealms_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *realmServiceClient) SearchRealms(ctx context.Context, in *SearchRealmsRequest, opts ...grpc.CallOption) (*GetPublicRealmsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetPublicRealmsResponse)
	err := c.cc.Invoke(ctx, RealmService_SearchRealms_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *realmServiceClient) SendInviteNotify(ctx context.Context, in *SendInviteNotifyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(emptypb.Empty)
	err := c.cc.Invoke(ctx, RealmService_SendInviteNotify_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *realmServiceClient) IsMemberWithRole(ctx context.Context, in *IsMemberWithRoleRequest, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(wrapperspb.BoolValue)
	err := c.cc.Invoke(ctx, RealmService_IsMemberWithRole_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *realmServiceClient) LoadMemberAccount(ctx context.Context, in *LoadMemberAccountRequest, opts ...grpc.CallOption) (*RealmMember, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(RealmMember)
	err := c.cc.Invoke(ctx, RealmService_LoadMemberAccount_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *realmServiceClient) LoadMemberAccounts(ctx context.Context, in *LoadMemberAccountsRequest, opts ...grpc.CallOption) (*LoadMemberAccountsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(LoadMemberAccountsResponse)
	err := c.cc.Invoke(ctx, RealmService_LoadMemberAccounts_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// RealmServiceServer is the server API for RealmService service.
// All implementations must embed UnimplementedRealmServiceServer
// for forward compatibility.
type RealmServiceServer interface {
	// Get realm by id or slug
	GetRealm(context.Context, *GetRealmRequest) (*Realm, error)
	// Get realm batch by ids
	GetRealmBatch(context.Context, *GetRealmBatchRequest) (*GetRealmBatchResponse, error)
	// Get realms for a user
	GetUserRealms(context.Context, *GetUserRealmsRequest) (*GetUserRealmsResponse, error)
	// Get public realms
	GetPublicRealms(context.Context, *GetPublicRealmsRequest) (*GetPublicRealmsResponse, error)
	// Search public realms
	SearchRealms(context.Context, *SearchRealmsRequest) (*GetPublicRealmsResponse, error)
	// Send invitation notification
	SendInviteNotify(context.Context, *SendInviteNotifyRequest) (*emptypb.Empty, error)
	// Check if member has required role
	IsMemberWithRole(context.Context, *IsMemberWithRoleRequest) (*wrapperspb.BoolValue, error)
	// Load account for a member
	LoadMemberAccount(context.Context, *LoadMemberAccountRequest) (*RealmMember, error)
	// Load accounts for members
	LoadMemberAccounts(context.Context, *LoadMemberAccountsRequest) (*LoadMemberAccountsResponse, error)
	mustEmbedUnimplementedRealmServiceServer()
}

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

func (UnimplementedRealmServiceServer) GetRealm(context.Context, *GetRealmRequest) (*Realm, error) {
	return nil, status.Error(codes.Unimplemented, "method GetRealm not implemented")
}
func (UnimplementedRealmServiceServer) GetRealmBatch(context.Context, *GetRealmBatchRequest) (*GetRealmBatchResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method GetRealmBatch not implemented")
}
func (UnimplementedRealmServiceServer) GetUserRealms(context.Context, *GetUserRealmsRequest) (*GetUserRealmsResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method GetUserRealms not implemented")
}
func (UnimplementedRealmServiceServer) GetPublicRealms(context.Context, *GetPublicRealmsRequest) (*GetPublicRealmsResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method GetPublicRealms not implemented")
}
func (UnimplementedRealmServiceServer) SearchRealms(context.Context, *SearchRealmsRequest) (*GetPublicRealmsResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method SearchRealms not implemented")
}
func (UnimplementedRealmServiceServer) SendInviteNotify(context.Context, *SendInviteNotifyRequest) (*emptypb.Empty, error) {
	return nil, status.Error(codes.Unimplemented, "method SendInviteNotify not implemented")
}
func (UnimplementedRealmServiceServer) IsMemberWithRole(context.Context, *IsMemberWithRoleRequest) (*wrapperspb.BoolValue, error) {
	return nil, status.Error(codes.Unimplemented, "method IsMemberWithRole not implemented")
}
func (UnimplementedRealmServiceServer) LoadMemberAccount(context.Context, *LoadMemberAccountRequest) (*RealmMember, error) {
	return nil, status.Error(codes.Unimplemented, "method LoadMemberAccount not implemented")
}
func (UnimplementedRealmServiceServer) LoadMemberAccounts(context.Context, *LoadMemberAccountsRequest) (*LoadMemberAccountsResponse, error) {
	return nil, status.Error(codes.Unimplemented, "method LoadMemberAccounts not implemented")
}
func (UnimplementedRealmServiceServer) mustEmbedUnimplementedRealmServiceServer() {}
func (UnimplementedRealmServiceServer) testEmbeddedByValue()                      {}

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

func RegisterRealmServiceServer(s grpc.ServiceRegistrar, srv RealmServiceServer) {
	// If the following call panics, it indicates UnimplementedRealmServiceServer 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(&RealmService_ServiceDesc, srv)
}

func _RealmService_GetRealm_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetRealmRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RealmServiceServer).GetRealm(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RealmService_GetRealm_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RealmServiceServer).GetRealm(ctx, req.(*GetRealmRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RealmService_GetRealmBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetRealmBatchRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RealmServiceServer).GetRealmBatch(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RealmService_GetRealmBatch_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RealmServiceServer).GetRealmBatch(ctx, req.(*GetRealmBatchRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RealmService_GetUserRealms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetUserRealmsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RealmServiceServer).GetUserRealms(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RealmService_GetUserRealms_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RealmServiceServer).GetUserRealms(ctx, req.(*GetUserRealmsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RealmService_GetPublicRealms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetPublicRealmsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RealmServiceServer).GetPublicRealms(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RealmService_GetPublicRealms_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RealmServiceServer).GetPublicRealms(ctx, req.(*GetPublicRealmsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RealmService_SearchRealms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SearchRealmsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RealmServiceServer).SearchRealms(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RealmService_SearchRealms_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RealmServiceServer).SearchRealms(ctx, req.(*SearchRealmsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RealmService_SendInviteNotify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SendInviteNotifyRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RealmServiceServer).SendInviteNotify(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RealmService_SendInviteNotify_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RealmServiceServer).SendInviteNotify(ctx, req.(*SendInviteNotifyRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RealmService_IsMemberWithRole_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(IsMemberWithRoleRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RealmServiceServer).IsMemberWithRole(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RealmService_IsMemberWithRole_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RealmServiceServer).IsMemberWithRole(ctx, req.(*IsMemberWithRoleRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RealmService_LoadMemberAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(LoadMemberAccountRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RealmServiceServer).LoadMemberAccount(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RealmService_LoadMemberAccount_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RealmServiceServer).LoadMemberAccount(ctx, req.(*LoadMemberAccountRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _RealmService_LoadMemberAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(LoadMemberAccountsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(RealmServiceServer).LoadMemberAccounts(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: RealmService_LoadMemberAccounts_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(RealmServiceServer).LoadMemberAccounts(ctx, req.(*LoadMemberAccountsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// RealmService_ServiceDesc is the grpc.ServiceDesc for RealmService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var RealmService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.RealmService",
	HandlerType: (*RealmServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetRealm",
			Handler:    _RealmService_GetRealm_Handler,
		},
		{
			MethodName: "GetRealmBatch",
			Handler:    _RealmService_GetRealmBatch_Handler,
		},
		{
			MethodName: "GetUserRealms",
			Handler:    _RealmService_GetUserRealms_Handler,
		},
		{
			MethodName: "GetPublicRealms",
			Handler:    _RealmService_GetPublicRealms_Handler,
		},
		{
			MethodName: "SearchRealms",
			Handler:    _RealmService_SearchRealms_Handler,
		},
		{
			MethodName: "SendInviteNotify",
			Handler:    _RealmService_SendInviteNotify_Handler,
		},
		{
			MethodName: "IsMemberWithRole",
			Handler:    _RealmService_IsMemberWithRole_Handler,
		},
		{
			MethodName: "LoadMemberAccount",
			Handler:    _RealmService_LoadMemberAccount_Handler,
		},
		{
			MethodName: "LoadMemberAccounts",
			Handler:    _RealmService_LoadMemberAccounts_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "realm.proto",
}
