// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             v6.30.2
// source: api/internal.proto

package api

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"
)

// 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 (
	InternalService_Login_FullMethodName               = "/api.InternalService/Login"
	InternalService_Profile_FullMethodName             = "/api.InternalService/Profile"
	InternalService_GlobalSearch_FullMethodName        = "/api.InternalService/GlobalSearch"
	InternalService_CreateApiKey_FullMethodName        = "/api.InternalService/CreateApiKey"
	InternalService_DeleteApiKey_FullMethodName        = "/api.InternalService/DeleteApiKey"
	InternalService_ListApiKeys_FullMethodName         = "/api.InternalService/ListApiKeys"
	InternalService_Settings_FullMethodName            = "/api.InternalService/Settings"
	InternalService_OpenIdConnectLogin_FullMethodName  = "/api.InternalService/OpenIdConnectLogin"
	InternalService_OAuth2Login_FullMethodName         = "/api.InternalService/OAuth2Login"
	InternalService_GetDevicesSummary_FullMethodName   = "/api.InternalService/GetDevicesSummary"
	InternalService_GetGatewaysSummary_FullMethodName  = "/api.InternalService/GetGatewaysSummary"
	InternalService_StreamGatewayFrames_FullMethodName = "/api.InternalService/StreamGatewayFrames"
	InternalService_StreamDeviceFrames_FullMethodName  = "/api.InternalService/StreamDeviceFrames"
	InternalService_StreamDeviceEvents_FullMethodName  = "/api.InternalService/StreamDeviceEvents"
	InternalService_ListRegions_FullMethodName         = "/api.InternalService/ListRegions"
	InternalService_GetRegion_FullMethodName           = "/api.InternalService/GetRegion"
	InternalService_GetVersion_FullMethodName          = "/api.InternalService/GetVersion"
)

// InternalServiceClient is the client API for InternalService 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.
//
// InternalService is the service providing API endpoints for internal usage.
type InternalServiceClient interface {
	// Log in a user
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
	// Get the current user's profile
	Profile(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ProfileResponse, error)
	// Perform a global search.
	GlobalSearch(ctx context.Context, in *GlobalSearchRequest, opts ...grpc.CallOption) (*GlobalSearchResponse, error)
	// CreateApiKey creates the given API key.
	CreateApiKey(ctx context.Context, in *CreateApiKeyRequest, opts ...grpc.CallOption) (*CreateApiKeyResponse, error)
	// DeleteApiKey deletes the API key.
	DeleteApiKey(ctx context.Context, in *DeleteApiKeyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// ListApiKeys lists the available API keys.
	ListApiKeys(ctx context.Context, in *ListApiKeysRequest, opts ...grpc.CallOption) (*ListApiKeysResponse, error)
	// Get the global settings.
	Settings(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*SettingsResponse, error)
	// OpenId Connect login.
	OpenIdConnectLogin(ctx context.Context, in *OpenIdConnectLoginRequest, opts ...grpc.CallOption) (*OpenIdConnectLoginResponse, error)
	// OAuth2 login.
	OAuth2Login(ctx context.Context, in *OAuth2LoginRequest, opts ...grpc.CallOption) (*OAuth2LoginResponse, error)
	// GetDevicesSummary returns an aggregated summary of the devices.
	GetDevicesSummary(ctx context.Context, in *GetDevicesSummaryRequest, opts ...grpc.CallOption) (*GetDevicesSummaryResponse, error)
	// GetGatewaysSummary returns an aggregated summary of the gateways.
	GetGatewaysSummary(ctx context.Context, in *GetGatewaysSummaryRequest, opts ...grpc.CallOption) (*GetGatewaysSummaryResponse, error)
	// Stream frame for the given Gateway ID.
	StreamGatewayFrames(ctx context.Context, in *StreamGatewayFramesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[LogItem], error)
	// Stream frames for the given Device EUI.
	StreamDeviceFrames(ctx context.Context, in *StreamDeviceFramesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[LogItem], error)
	// Stream events for the given Device EUI.
	StreamDeviceEvents(ctx context.Context, in *StreamDeviceEventsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[LogItem], error)
	// ListRegions lists the available (configured) regions.
	ListRegions(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListRegionsResponse, error)
	// GetRegion returns the region details for the given region.
	GetRegion(ctx context.Context, in *GetRegionRequest, opts ...grpc.CallOption) (*GetRegionResponse, error)
	// GetVersion returns the ChirpStack version.
	GetVersion(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetVersionResponse, error)
}

type internalServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewInternalServiceClient(cc grpc.ClientConnInterface) InternalServiceClient {
	return &internalServiceClient{cc}
}

func (c *internalServiceClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(LoginResponse)
	err := c.cc.Invoke(ctx, InternalService_Login_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

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

func (c *internalServiceClient) GlobalSearch(ctx context.Context, in *GlobalSearchRequest, opts ...grpc.CallOption) (*GlobalSearchResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GlobalSearchResponse)
	err := c.cc.Invoke(ctx, InternalService_GlobalSearch_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *internalServiceClient) CreateApiKey(ctx context.Context, in *CreateApiKeyRequest, opts ...grpc.CallOption) (*CreateApiKeyResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(CreateApiKeyResponse)
	err := c.cc.Invoke(ctx, InternalService_CreateApiKey_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

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

func (c *internalServiceClient) ListApiKeys(ctx context.Context, in *ListApiKeysRequest, opts ...grpc.CallOption) (*ListApiKeysResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListApiKeysResponse)
	err := c.cc.Invoke(ctx, InternalService_ListApiKeys_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

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

func (c *internalServiceClient) OpenIdConnectLogin(ctx context.Context, in *OpenIdConnectLoginRequest, opts ...grpc.CallOption) (*OpenIdConnectLoginResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(OpenIdConnectLoginResponse)
	err := c.cc.Invoke(ctx, InternalService_OpenIdConnectLogin_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *internalServiceClient) OAuth2Login(ctx context.Context, in *OAuth2LoginRequest, opts ...grpc.CallOption) (*OAuth2LoginResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(OAuth2LoginResponse)
	err := c.cc.Invoke(ctx, InternalService_OAuth2Login_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *internalServiceClient) GetDevicesSummary(ctx context.Context, in *GetDevicesSummaryRequest, opts ...grpc.CallOption) (*GetDevicesSummaryResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetDevicesSummaryResponse)
	err := c.cc.Invoke(ctx, InternalService_GetDevicesSummary_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *internalServiceClient) GetGatewaysSummary(ctx context.Context, in *GetGatewaysSummaryRequest, opts ...grpc.CallOption) (*GetGatewaysSummaryResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetGatewaysSummaryResponse)
	err := c.cc.Invoke(ctx, InternalService_GetGatewaysSummary_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *internalServiceClient) StreamGatewayFrames(ctx context.Context, in *StreamGatewayFramesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[LogItem], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &InternalService_ServiceDesc.Streams[0], InternalService_StreamGatewayFrames_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[StreamGatewayFramesRequest, LogItem]{ClientStream: stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type InternalService_StreamGatewayFramesClient = grpc.ServerStreamingClient[LogItem]

func (c *internalServiceClient) StreamDeviceFrames(ctx context.Context, in *StreamDeviceFramesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[LogItem], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &InternalService_ServiceDesc.Streams[1], InternalService_StreamDeviceFrames_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[StreamDeviceFramesRequest, LogItem]{ClientStream: stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type InternalService_StreamDeviceFramesClient = grpc.ServerStreamingClient[LogItem]

func (c *internalServiceClient) StreamDeviceEvents(ctx context.Context, in *StreamDeviceEventsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[LogItem], error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	stream, err := c.cc.NewStream(ctx, &InternalService_ServiceDesc.Streams[2], InternalService_StreamDeviceEvents_FullMethodName, cOpts...)
	if err != nil {
		return nil, err
	}
	x := &grpc.GenericClientStream[StreamDeviceEventsRequest, LogItem]{ClientStream: stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type InternalService_StreamDeviceEventsClient = grpc.ServerStreamingClient[LogItem]

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

func (c *internalServiceClient) GetRegion(ctx context.Context, in *GetRegionRequest, opts ...grpc.CallOption) (*GetRegionResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetRegionResponse)
	err := c.cc.Invoke(ctx, InternalService_GetRegion_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

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

// InternalServiceServer is the server API for InternalService service.
// All implementations must embed UnimplementedInternalServiceServer
// for forward compatibility.
//
// InternalService is the service providing API endpoints for internal usage.
type InternalServiceServer interface {
	// Log in a user
	Login(context.Context, *LoginRequest) (*LoginResponse, error)
	// Get the current user's profile
	Profile(context.Context, *emptypb.Empty) (*ProfileResponse, error)
	// Perform a global search.
	GlobalSearch(context.Context, *GlobalSearchRequest) (*GlobalSearchResponse, error)
	// CreateApiKey creates the given API key.
	CreateApiKey(context.Context, *CreateApiKeyRequest) (*CreateApiKeyResponse, error)
	// DeleteApiKey deletes the API key.
	DeleteApiKey(context.Context, *DeleteApiKeyRequest) (*emptypb.Empty, error)
	// ListApiKeys lists the available API keys.
	ListApiKeys(context.Context, *ListApiKeysRequest) (*ListApiKeysResponse, error)
	// Get the global settings.
	Settings(context.Context, *emptypb.Empty) (*SettingsResponse, error)
	// OpenId Connect login.
	OpenIdConnectLogin(context.Context, *OpenIdConnectLoginRequest) (*OpenIdConnectLoginResponse, error)
	// OAuth2 login.
	OAuth2Login(context.Context, *OAuth2LoginRequest) (*OAuth2LoginResponse, error)
	// GetDevicesSummary returns an aggregated summary of the devices.
	GetDevicesSummary(context.Context, *GetDevicesSummaryRequest) (*GetDevicesSummaryResponse, error)
	// GetGatewaysSummary returns an aggregated summary of the gateways.
	GetGatewaysSummary(context.Context, *GetGatewaysSummaryRequest) (*GetGatewaysSummaryResponse, error)
	// Stream frame for the given Gateway ID.
	StreamGatewayFrames(*StreamGatewayFramesRequest, grpc.ServerStreamingServer[LogItem]) error
	// Stream frames for the given Device EUI.
	StreamDeviceFrames(*StreamDeviceFramesRequest, grpc.ServerStreamingServer[LogItem]) error
	// Stream events for the given Device EUI.
	StreamDeviceEvents(*StreamDeviceEventsRequest, grpc.ServerStreamingServer[LogItem]) error
	// ListRegions lists the available (configured) regions.
	ListRegions(context.Context, *emptypb.Empty) (*ListRegionsResponse, error)
	// GetRegion returns the region details for the given region.
	GetRegion(context.Context, *GetRegionRequest) (*GetRegionResponse, error)
	// GetVersion returns the ChirpStack version.
	GetVersion(context.Context, *emptypb.Empty) (*GetVersionResponse, error)
	mustEmbedUnimplementedInternalServiceServer()
}

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

func (UnimplementedInternalServiceServer) Login(context.Context, *LoginRequest) (*LoginResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Login not implemented")
}
func (UnimplementedInternalServiceServer) Profile(context.Context, *emptypb.Empty) (*ProfileResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Profile not implemented")
}
func (UnimplementedInternalServiceServer) GlobalSearch(context.Context, *GlobalSearchRequest) (*GlobalSearchResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GlobalSearch not implemented")
}
func (UnimplementedInternalServiceServer) CreateApiKey(context.Context, *CreateApiKeyRequest) (*CreateApiKeyResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateApiKey not implemented")
}
func (UnimplementedInternalServiceServer) DeleteApiKey(context.Context, *DeleteApiKeyRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteApiKey not implemented")
}
func (UnimplementedInternalServiceServer) ListApiKeys(context.Context, *ListApiKeysRequest) (*ListApiKeysResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListApiKeys not implemented")
}
func (UnimplementedInternalServiceServer) Settings(context.Context, *emptypb.Empty) (*SettingsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Settings not implemented")
}
func (UnimplementedInternalServiceServer) OpenIdConnectLogin(context.Context, *OpenIdConnectLoginRequest) (*OpenIdConnectLoginResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method OpenIdConnectLogin not implemented")
}
func (UnimplementedInternalServiceServer) OAuth2Login(context.Context, *OAuth2LoginRequest) (*OAuth2LoginResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method OAuth2Login not implemented")
}
func (UnimplementedInternalServiceServer) GetDevicesSummary(context.Context, *GetDevicesSummaryRequest) (*GetDevicesSummaryResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetDevicesSummary not implemented")
}
func (UnimplementedInternalServiceServer) GetGatewaysSummary(context.Context, *GetGatewaysSummaryRequest) (*GetGatewaysSummaryResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetGatewaysSummary not implemented")
}
func (UnimplementedInternalServiceServer) StreamGatewayFrames(*StreamGatewayFramesRequest, grpc.ServerStreamingServer[LogItem]) error {
	return status.Errorf(codes.Unimplemented, "method StreamGatewayFrames not implemented")
}
func (UnimplementedInternalServiceServer) StreamDeviceFrames(*StreamDeviceFramesRequest, grpc.ServerStreamingServer[LogItem]) error {
	return status.Errorf(codes.Unimplemented, "method StreamDeviceFrames not implemented")
}
func (UnimplementedInternalServiceServer) StreamDeviceEvents(*StreamDeviceEventsRequest, grpc.ServerStreamingServer[LogItem]) error {
	return status.Errorf(codes.Unimplemented, "method StreamDeviceEvents not implemented")
}
func (UnimplementedInternalServiceServer) ListRegions(context.Context, *emptypb.Empty) (*ListRegionsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListRegions not implemented")
}
func (UnimplementedInternalServiceServer) GetRegion(context.Context, *GetRegionRequest) (*GetRegionResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetRegion not implemented")
}
func (UnimplementedInternalServiceServer) GetVersion(context.Context, *emptypb.Empty) (*GetVersionResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetVersion not implemented")
}
func (UnimplementedInternalServiceServer) mustEmbedUnimplementedInternalServiceServer() {}
func (UnimplementedInternalServiceServer) testEmbeddedByValue()                         {}

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

func RegisterInternalServiceServer(s grpc.ServiceRegistrar, srv InternalServiceServer) {
	// If the following call pancis, it indicates UnimplementedInternalServiceServer 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(&InternalService_ServiceDesc, srv)
}

func _InternalService_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(LoginRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(InternalServiceServer).Login(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: InternalService_Login_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(InternalServiceServer).Login(ctx, req.(*LoginRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _InternalService_Profile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(emptypb.Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(InternalServiceServer).Profile(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: InternalService_Profile_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(InternalServiceServer).Profile(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _InternalService_GlobalSearch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GlobalSearchRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(InternalServiceServer).GlobalSearch(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: InternalService_GlobalSearch_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(InternalServiceServer).GlobalSearch(ctx, req.(*GlobalSearchRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _InternalService_CreateApiKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateApiKeyRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(InternalServiceServer).CreateApiKey(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: InternalService_CreateApiKey_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(InternalServiceServer).CreateApiKey(ctx, req.(*CreateApiKeyRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _InternalService_DeleteApiKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteApiKeyRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(InternalServiceServer).DeleteApiKey(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: InternalService_DeleteApiKey_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(InternalServiceServer).DeleteApiKey(ctx, req.(*DeleteApiKeyRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _InternalService_ListApiKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListApiKeysRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(InternalServiceServer).ListApiKeys(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: InternalService_ListApiKeys_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(InternalServiceServer).ListApiKeys(ctx, req.(*ListApiKeysRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _InternalService_Settings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(emptypb.Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(InternalServiceServer).Settings(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: InternalService_Settings_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(InternalServiceServer).Settings(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _InternalService_OpenIdConnectLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(OpenIdConnectLoginRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(InternalServiceServer).OpenIdConnectLogin(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: InternalService_OpenIdConnectLogin_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(InternalServiceServer).OpenIdConnectLogin(ctx, req.(*OpenIdConnectLoginRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _InternalService_OAuth2Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(OAuth2LoginRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(InternalServiceServer).OAuth2Login(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: InternalService_OAuth2Login_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(InternalServiceServer).OAuth2Login(ctx, req.(*OAuth2LoginRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _InternalService_GetDevicesSummary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetDevicesSummaryRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(InternalServiceServer).GetDevicesSummary(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: InternalService_GetDevicesSummary_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(InternalServiceServer).GetDevicesSummary(ctx, req.(*GetDevicesSummaryRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _InternalService_GetGatewaysSummary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetGatewaysSummaryRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(InternalServiceServer).GetGatewaysSummary(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: InternalService_GetGatewaysSummary_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(InternalServiceServer).GetGatewaysSummary(ctx, req.(*GetGatewaysSummaryRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _InternalService_StreamGatewayFrames_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(StreamGatewayFramesRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(InternalServiceServer).StreamGatewayFrames(m, &grpc.GenericServerStream[StreamGatewayFramesRequest, LogItem]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type InternalService_StreamGatewayFramesServer = grpc.ServerStreamingServer[LogItem]

func _InternalService_StreamDeviceFrames_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(StreamDeviceFramesRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(InternalServiceServer).StreamDeviceFrames(m, &grpc.GenericServerStream[StreamDeviceFramesRequest, LogItem]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type InternalService_StreamDeviceFramesServer = grpc.ServerStreamingServer[LogItem]

func _InternalService_StreamDeviceEvents_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(StreamDeviceEventsRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(InternalServiceServer).StreamDeviceEvents(m, &grpc.GenericServerStream[StreamDeviceEventsRequest, LogItem]{ServerStream: stream})
}

// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type InternalService_StreamDeviceEventsServer = grpc.ServerStreamingServer[LogItem]

func _InternalService_ListRegions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(emptypb.Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(InternalServiceServer).ListRegions(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: InternalService_ListRegions_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(InternalServiceServer).ListRegions(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

func _InternalService_GetRegion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetRegionRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(InternalServiceServer).GetRegion(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: InternalService_GetRegion_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(InternalServiceServer).GetRegion(ctx, req.(*GetRegionRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _InternalService_GetVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(emptypb.Empty)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(InternalServiceServer).GetVersion(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: InternalService_GetVersion_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(InternalServiceServer).GetVersion(ctx, req.(*emptypb.Empty))
	}
	return interceptor(ctx, in, info, handler)
}

// InternalService_ServiceDesc is the grpc.ServiceDesc for InternalService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var InternalService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.InternalService",
	HandlerType: (*InternalServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Login",
			Handler:    _InternalService_Login_Handler,
		},
		{
			MethodName: "Profile",
			Handler:    _InternalService_Profile_Handler,
		},
		{
			MethodName: "GlobalSearch",
			Handler:    _InternalService_GlobalSearch_Handler,
		},
		{
			MethodName: "CreateApiKey",
			Handler:    _InternalService_CreateApiKey_Handler,
		},
		{
			MethodName: "DeleteApiKey",
			Handler:    _InternalService_DeleteApiKey_Handler,
		},
		{
			MethodName: "ListApiKeys",
			Handler:    _InternalService_ListApiKeys_Handler,
		},
		{
			MethodName: "Settings",
			Handler:    _InternalService_Settings_Handler,
		},
		{
			MethodName: "OpenIdConnectLogin",
			Handler:    _InternalService_OpenIdConnectLogin_Handler,
		},
		{
			MethodName: "OAuth2Login",
			Handler:    _InternalService_OAuth2Login_Handler,
		},
		{
			MethodName: "GetDevicesSummary",
			Handler:    _InternalService_GetDevicesSummary_Handler,
		},
		{
			MethodName: "GetGatewaysSummary",
			Handler:    _InternalService_GetGatewaysSummary_Handler,
		},
		{
			MethodName: "ListRegions",
			Handler:    _InternalService_ListRegions_Handler,
		},
		{
			MethodName: "GetRegion",
			Handler:    _InternalService_GetRegion_Handler,
		},
		{
			MethodName: "GetVersion",
			Handler:    _InternalService_GetVersion_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StreamGatewayFrames",
			Handler:       _InternalService_StreamGatewayFrames_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "StreamDeviceFrames",
			Handler:       _InternalService_StreamDeviceFrames_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "StreamDeviceEvents",
			Handler:       _InternalService_StreamDeviceEvents_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "api/internal.proto",
}
