// Copyright 2025 AGNTCY Contributors (https://github.com/agntcy)
// SPDX-License-Identifier: Apache-2.0

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             (unknown)
// source: agntcy/identity/service/v1alpha1/app_service.proto

package identity_service_sdk_go

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 (
	AppService_ListApps_FullMethodName         = "/agntcy.identity.service.v1alpha1.AppService/ListApps"
	AppService_GetAppsCount_FullMethodName     = "/agntcy.identity.service.v1alpha1.AppService/GetAppsCount"
	AppService_GetApp_FullMethodName           = "/agntcy.identity.service.v1alpha1.AppService/GetApp"
	AppService_CreateApp_FullMethodName        = "/agntcy.identity.service.v1alpha1.AppService/CreateApp"
	AppService_CreateOasfApp_FullMethodName    = "/agntcy.identity.service.v1alpha1.AppService/CreateOasfApp"
	AppService_UpdateApp_FullMethodName        = "/agntcy.identity.service.v1alpha1.AppService/UpdateApp"
	AppService_DeleteApp_FullMethodName        = "/agntcy.identity.service.v1alpha1.AppService/DeleteApp"
	AppService_RefreshAppApiKey_FullMethodName = "/agntcy.identity.service.v1alpha1.AppService/RefreshAppApiKey"
	AppService_GetBadge_FullMethodName         = "/agntcy.identity.service.v1alpha1.AppService/GetBadge"
	AppService_GetTasks_FullMethodName         = "/agntcy.identity.service.v1alpha1.AppService/GetTasks"
)

// AppServiceClient is the client API for AppService 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.
//
// AppService manages apps.
type AppServiceClient interface {
	// List Apps.
	ListApps(ctx context.Context, in *ListAppsRequest, opts ...grpc.CallOption) (*ListAppsResponse, error)
	// Get apps count per type.
	GetAppsCount(ctx context.Context, in *GetAppsCountRequest, opts ...grpc.CallOption) (*GetAppsCountResponse, error)
	// Get App by id
	GetApp(ctx context.Context, in *GetAppRequest, opts ...grpc.CallOption) (*App, error)
	// Create a new App.
	CreateApp(ctx context.Context, in *CreateAppRequest, opts ...grpc.CallOption) (*App, error)
	CreateOasfApp(ctx context.Context, in *CreateOasfAppRequest, opts ...grpc.CallOption) (*CreateOasfAppResponse, error)
	// Update an App.
	UpdateApp(ctx context.Context, in *UpdateAppRequest, opts ...grpc.CallOption) (*App, error)
	// Delete an existing App.
	DeleteApp(ctx context.Context, in *DeleteAppRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Refresh the api-key for an App.
	RefreshAppApiKey(ctx context.Context, in *RefreshAppApiKeyRequest, opts ...grpc.CallOption) (*App, error)
	// Get the current badge issued for the App.
	GetBadge(ctx context.Context, in *GetBadgeRequest, opts ...grpc.CallOption) (*Badge, error)
	// Get the list of tasks of all apps
	GetTasks(ctx context.Context, in *GetTasksRequest, opts ...grpc.CallOption) (*GetTasksResponse, error)
}

type appServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewAppServiceClient(cc grpc.ClientConnInterface) AppServiceClient {
	return &appServiceClient{cc}
}

func (c *appServiceClient) ListApps(ctx context.Context, in *ListAppsRequest, opts ...grpc.CallOption) (*ListAppsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ListAppsResponse)
	err := c.cc.Invoke(ctx, AppService_ListApps_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *appServiceClient) GetAppsCount(ctx context.Context, in *GetAppsCountRequest, opts ...grpc.CallOption) (*GetAppsCountResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetAppsCountResponse)
	err := c.cc.Invoke(ctx, AppService_GetAppsCount_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *appServiceClient) GetApp(ctx context.Context, in *GetAppRequest, opts ...grpc.CallOption) (*App, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(App)
	err := c.cc.Invoke(ctx, AppService_GetApp_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *appServiceClient) CreateApp(ctx context.Context, in *CreateAppRequest, opts ...grpc.CallOption) (*App, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(App)
	err := c.cc.Invoke(ctx, AppService_CreateApp_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *appServiceClient) CreateOasfApp(ctx context.Context, in *CreateOasfAppRequest, opts ...grpc.CallOption) (*CreateOasfAppResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(CreateOasfAppResponse)
	err := c.cc.Invoke(ctx, AppService_CreateOasfApp_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *appServiceClient) UpdateApp(ctx context.Context, in *UpdateAppRequest, opts ...grpc.CallOption) (*App, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(App)
	err := c.cc.Invoke(ctx, AppService_UpdateApp_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

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

func (c *appServiceClient) RefreshAppApiKey(ctx context.Context, in *RefreshAppApiKeyRequest, opts ...grpc.CallOption) (*App, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(App)
	err := c.cc.Invoke(ctx, AppService_RefreshAppApiKey_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *appServiceClient) GetBadge(ctx context.Context, in *GetBadgeRequest, opts ...grpc.CallOption) (*Badge, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(Badge)
	err := c.cc.Invoke(ctx, AppService_GetBadge_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *appServiceClient) GetTasks(ctx context.Context, in *GetTasksRequest, opts ...grpc.CallOption) (*GetTasksResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetTasksResponse)
	err := c.cc.Invoke(ctx, AppService_GetTasks_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// AppServiceServer is the server API for AppService service.
// All implementations should embed UnimplementedAppServiceServer
// for forward compatibility.
//
// AppService manages apps.
type AppServiceServer interface {
	// List Apps.
	ListApps(context.Context, *ListAppsRequest) (*ListAppsResponse, error)
	// Get apps count per type.
	GetAppsCount(context.Context, *GetAppsCountRequest) (*GetAppsCountResponse, error)
	// Get App by id
	GetApp(context.Context, *GetAppRequest) (*App, error)
	// Create a new App.
	CreateApp(context.Context, *CreateAppRequest) (*App, error)
	CreateOasfApp(context.Context, *CreateOasfAppRequest) (*CreateOasfAppResponse, error)
	// Update an App.
	UpdateApp(context.Context, *UpdateAppRequest) (*App, error)
	// Delete an existing App.
	DeleteApp(context.Context, *DeleteAppRequest) (*emptypb.Empty, error)
	// Refresh the api-key for an App.
	RefreshAppApiKey(context.Context, *RefreshAppApiKeyRequest) (*App, error)
	// Get the current badge issued for the App.
	GetBadge(context.Context, *GetBadgeRequest) (*Badge, error)
	// Get the list of tasks of all apps
	GetTasks(context.Context, *GetTasksRequest) (*GetTasksResponse, error)
}

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

func (UnimplementedAppServiceServer) ListApps(context.Context, *ListAppsRequest) (*ListAppsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListApps not implemented")
}
func (UnimplementedAppServiceServer) GetAppsCount(context.Context, *GetAppsCountRequest) (*GetAppsCountResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetAppsCount not implemented")
}
func (UnimplementedAppServiceServer) GetApp(context.Context, *GetAppRequest) (*App, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetApp not implemented")
}
func (UnimplementedAppServiceServer) CreateApp(context.Context, *CreateAppRequest) (*App, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateApp not implemented")
}
func (UnimplementedAppServiceServer) CreateOasfApp(context.Context, *CreateOasfAppRequest) (*CreateOasfAppResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method CreateOasfApp not implemented")
}
func (UnimplementedAppServiceServer) UpdateApp(context.Context, *UpdateAppRequest) (*App, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateApp not implemented")
}
func (UnimplementedAppServiceServer) DeleteApp(context.Context, *DeleteAppRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method DeleteApp not implemented")
}
func (UnimplementedAppServiceServer) RefreshAppApiKey(context.Context, *RefreshAppApiKeyRequest) (*App, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RefreshAppApiKey not implemented")
}
func (UnimplementedAppServiceServer) GetBadge(context.Context, *GetBadgeRequest) (*Badge, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetBadge not implemented")
}
func (UnimplementedAppServiceServer) GetTasks(context.Context, *GetTasksRequest) (*GetTasksResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetTasks not implemented")
}
func (UnimplementedAppServiceServer) testEmbeddedByValue() {}

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

func RegisterAppServiceServer(s grpc.ServiceRegistrar, srv AppServiceServer) {
	// If the following call pancis, it indicates UnimplementedAppServiceServer 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(&AppService_ServiceDesc, srv)
}

func _AppService_ListApps_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListAppsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AppServiceServer).ListApps(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: AppService_ListApps_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AppServiceServer).ListApps(ctx, req.(*ListAppsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _AppService_GetAppsCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetAppsCountRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AppServiceServer).GetAppsCount(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: AppService_GetAppsCount_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AppServiceServer).GetAppsCount(ctx, req.(*GetAppsCountRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _AppService_GetApp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetAppRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AppServiceServer).GetApp(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: AppService_GetApp_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AppServiceServer).GetApp(ctx, req.(*GetAppRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _AppService_CreateApp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateAppRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AppServiceServer).CreateApp(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: AppService_CreateApp_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AppServiceServer).CreateApp(ctx, req.(*CreateAppRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _AppService_CreateOasfApp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(CreateOasfAppRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AppServiceServer).CreateOasfApp(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: AppService_CreateOasfApp_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AppServiceServer).CreateOasfApp(ctx, req.(*CreateOasfAppRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _AppService_UpdateApp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateAppRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AppServiceServer).UpdateApp(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: AppService_UpdateApp_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AppServiceServer).UpdateApp(ctx, req.(*UpdateAppRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _AppService_DeleteApp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DeleteAppRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AppServiceServer).DeleteApp(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: AppService_DeleteApp_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AppServiceServer).DeleteApp(ctx, req.(*DeleteAppRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _AppService_RefreshAppApiKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RefreshAppApiKeyRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AppServiceServer).RefreshAppApiKey(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: AppService_RefreshAppApiKey_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AppServiceServer).RefreshAppApiKey(ctx, req.(*RefreshAppApiKeyRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _AppService_GetBadge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetBadgeRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AppServiceServer).GetBadge(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: AppService_GetBadge_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AppServiceServer).GetBadge(ctx, req.(*GetBadgeRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _AppService_GetTasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetTasksRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(AppServiceServer).GetTasks(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: AppService_GetTasks_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(AppServiceServer).GetTasks(ctx, req.(*GetTasksRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// AppService_ServiceDesc is the grpc.ServiceDesc for AppService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var AppService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "agntcy.identity.service.v1alpha1.AppService",
	HandlerType: (*AppServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ListApps",
			Handler:    _AppService_ListApps_Handler,
		},
		{
			MethodName: "GetAppsCount",
			Handler:    _AppService_GetAppsCount_Handler,
		},
		{
			MethodName: "GetApp",
			Handler:    _AppService_GetApp_Handler,
		},
		{
			MethodName: "CreateApp",
			Handler:    _AppService_CreateApp_Handler,
		},
		{
			MethodName: "CreateOasfApp",
			Handler:    _AppService_CreateOasfApp_Handler,
		},
		{
			MethodName: "UpdateApp",
			Handler:    _AppService_UpdateApp_Handler,
		},
		{
			MethodName: "DeleteApp",
			Handler:    _AppService_DeleteApp_Handler,
		},
		{
			MethodName: "RefreshAppApiKey",
			Handler:    _AppService_RefreshAppApiKey_Handler,
		},
		{
			MethodName: "GetBadge",
			Handler:    _AppService_GetBadge_Handler,
		},
		{
			MethodName: "GetTasks",
			Handler:    _AppService_GetTasks_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "agntcy/identity/service/v1alpha1/app_service.proto",
}
