// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc             v5.27.2
// source: apemanager/grpc/service.proto

package apemanager

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.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

const (
	APEManagerService_AddChain_FullMethodName    = "/frostfs.v2.apemanager.APEManagerService/AddChain"
	APEManagerService_RemoveChain_FullMethodName = "/frostfs.v2.apemanager.APEManagerService/RemoveChain"
	APEManagerService_ListChains_FullMethodName  = "/frostfs.v2.apemanager.APEManagerService/ListChains"
)

// APEManagerServiceClient is the client API for APEManagerService 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 APEManagerServiceClient interface {
	// Add a rule chain for a specific target to `Policy` smart contract.
	//
	// Statuses:
	//   - **OK** (0, SECTION_SUCCESS): \
	//     the chain has been successfully added;
	//   - Common failures (SECTION_FAILURE_COMMON);
	//   - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
	//     container (as target) not found;
	//   - **APE_MANAGER_ACCESS_DENIED** (5120, SECTION_APE_MANAGER): \
	//     the operation is denied by the service.
	AddChain(ctx context.Context, in *AddChainRequest, opts ...grpc.CallOption) (*AddChainResponse, error)
	// Remove a rule chain for a specific target from `Policy` smart contract.
	// RemoveChain is an idempotent operation: removal of non-existing rule chain
	// also means success.
	//
	// Statuses:
	//   - **OK** (0, SECTION_SUCCESS): \
	//     the chain has been successfully removed;
	//   - Common failures (SECTION_FAILURE_COMMON);
	//   - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
	//     container (as target) not found;
	//   - **APE_MANAGER_ACCESS_DENIED** (5120, SECTION_APE_MANAGER): \
	//     the operation is denied by the service.
	RemoveChain(ctx context.Context, in *RemoveChainRequest, opts ...grpc.CallOption) (*RemoveChainResponse, error)
	// List chains defined for a specific target from `Policy` smart contract.
	//
	// Statuses:
	//   - **OK** (0, SECTION_SUCCESS): \
	//     chains have been successfully listed;
	//   - Common failures (SECTION_FAILURE_COMMON);
	//   - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
	//     container (as target) not found;
	//   - **APE_MANAGER_ACCESS_DENIED** (5120, SECTION_APE_MANAGER): \
	//     the operation is denied by the service.
	ListChains(ctx context.Context, in *ListChainsRequest, opts ...grpc.CallOption) (*ListChainsResponse, error)
}

type aPEManagerServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewAPEManagerServiceClient(cc grpc.ClientConnInterface) APEManagerServiceClient {
	return &aPEManagerServiceClient{cc}
}

func (c *aPEManagerServiceClient) AddChain(ctx context.Context, in *AddChainRequest, opts ...grpc.CallOption) (*AddChainResponse, error) {
	out := new(AddChainResponse)
	err := c.cc.Invoke(ctx, APEManagerService_AddChain_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *aPEManagerServiceClient) RemoveChain(ctx context.Context, in *RemoveChainRequest, opts ...grpc.CallOption) (*RemoveChainResponse, error) {
	out := new(RemoveChainResponse)
	err := c.cc.Invoke(ctx, APEManagerService_RemoveChain_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *aPEManagerServiceClient) ListChains(ctx context.Context, in *ListChainsRequest, opts ...grpc.CallOption) (*ListChainsResponse, error) {
	out := new(ListChainsResponse)
	err := c.cc.Invoke(ctx, APEManagerService_ListChains_FullMethodName, in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// APEManagerServiceServer is the server API for APEManagerService service.
// All implementations should embed UnimplementedAPEManagerServiceServer
// for forward compatibility
type APEManagerServiceServer interface {
	// Add a rule chain for a specific target to `Policy` smart contract.
	//
	// Statuses:
	//   - **OK** (0, SECTION_SUCCESS): \
	//     the chain has been successfully added;
	//   - Common failures (SECTION_FAILURE_COMMON);
	//   - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
	//     container (as target) not found;
	//   - **APE_MANAGER_ACCESS_DENIED** (5120, SECTION_APE_MANAGER): \
	//     the operation is denied by the service.
	AddChain(context.Context, *AddChainRequest) (*AddChainResponse, error)
	// Remove a rule chain for a specific target from `Policy` smart contract.
	// RemoveChain is an idempotent operation: removal of non-existing rule chain
	// also means success.
	//
	// Statuses:
	//   - **OK** (0, SECTION_SUCCESS): \
	//     the chain has been successfully removed;
	//   - Common failures (SECTION_FAILURE_COMMON);
	//   - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
	//     container (as target) not found;
	//   - **APE_MANAGER_ACCESS_DENIED** (5120, SECTION_APE_MANAGER): \
	//     the operation is denied by the service.
	RemoveChain(context.Context, *RemoveChainRequest) (*RemoveChainResponse, error)
	// List chains defined for a specific target from `Policy` smart contract.
	//
	// Statuses:
	//   - **OK** (0, SECTION_SUCCESS): \
	//     chains have been successfully listed;
	//   - Common failures (SECTION_FAILURE_COMMON);
	//   - **CONTAINER_NOT_FOUND** (3072, SECTION_CONTAINER): \
	//     container (as target) not found;
	//   - **APE_MANAGER_ACCESS_DENIED** (5120, SECTION_APE_MANAGER): \
	//     the operation is denied by the service.
	ListChains(context.Context, *ListChainsRequest) (*ListChainsResponse, error)
}

// UnimplementedAPEManagerServiceServer should be embedded to have forward compatible implementations.
type UnimplementedAPEManagerServiceServer struct {
}

func (UnimplementedAPEManagerServiceServer) AddChain(context.Context, *AddChainRequest) (*AddChainResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method AddChain not implemented")
}
func (UnimplementedAPEManagerServiceServer) RemoveChain(context.Context, *RemoveChainRequest) (*RemoveChainResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method RemoveChain not implemented")
}
func (UnimplementedAPEManagerServiceServer) ListChains(context.Context, *ListChainsRequest) (*ListChainsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ListChains not implemented")
}

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

func RegisterAPEManagerServiceServer(s grpc.ServiceRegistrar, srv APEManagerServiceServer) {
	s.RegisterService(&APEManagerService_ServiceDesc, srv)
}

func _APEManagerService_AddChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(AddChainRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(APEManagerServiceServer).AddChain(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: APEManagerService_AddChain_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(APEManagerServiceServer).AddChain(ctx, req.(*AddChainRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _APEManagerService_RemoveChain_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RemoveChainRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(APEManagerServiceServer).RemoveChain(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: APEManagerService_RemoveChain_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(APEManagerServiceServer).RemoveChain(ctx, req.(*RemoveChainRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _APEManagerService_ListChains_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ListChainsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(APEManagerServiceServer).ListChains(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: APEManagerService_ListChains_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(APEManagerServiceServer).ListChains(ctx, req.(*ListChainsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// APEManagerService_ServiceDesc is the grpc.ServiceDesc for APEManagerService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var APEManagerService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "frostfs.v2.apemanager.APEManagerService",
	HandlerType: (*APEManagerServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "AddChain",
			Handler:    _APEManagerService_AddChain_Handler,
		},
		{
			MethodName: "RemoveChain",
			Handler:    _APEManagerService_RemoveChain_Handler,
		},
		{
			MethodName: "ListChains",
			Handler:    _APEManagerService_ListChains_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "apemanager/grpc/service.proto",
}