// 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/node/v1alpha1/vc_service.proto

package identity_node_sdk_go

import (
	context "context"
	v1alpha1 "github.com/agntcy/identity/api/server/agntcy/identity/core/v1alpha1"
	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 (
	VcService_Publish_FullMethodName      = "/agntcy.identity.node.v1alpha1.VcService/Publish"
	VcService_Verify_FullMethodName       = "/agntcy.identity.node.v1alpha1.VcService/Verify"
	VcService_GetWellKnown_FullMethodName = "/agntcy.identity.node.v1alpha1.VcService/GetWellKnown"
	VcService_Search_FullMethodName       = "/agntcy.identity.node.v1alpha1.VcService/Search"
	VcService_Revoke_FullMethodName       = "/agntcy.identity.node.v1alpha1.VcService/Revoke"
)

// VcServiceClient is the client API for VcService 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.
//
// VC is the service that provides VC operations.
type VcServiceClient interface {
	// Publish an issued Verifiable Credential
	Publish(ctx context.Context, in *PublishRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Verify an existing Verifiable Credential
	Verify(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*v1alpha1.VerificationResult, error)
	// Returns the well-known Verifiable Credentials for the specified Id
	GetWellKnown(ctx context.Context, in *GetVcWellKnownRequest, opts ...grpc.CallOption) (*GetVcWellKnownResponse, error)
	// Search for Verifiable Credentials based on the specified criteria
	Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error)
	// Revoke a Verifiable Credential. THIS ACTION IS NOT REVERSIBLE.
	Revoke(ctx context.Context, in *RevokeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

type vcServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewVcServiceClient(cc grpc.ClientConnInterface) VcServiceClient {
	return &vcServiceClient{cc}
}

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

func (c *vcServiceClient) Verify(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*v1alpha1.VerificationResult, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(v1alpha1.VerificationResult)
	err := c.cc.Invoke(ctx, VcService_Verify_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *vcServiceClient) GetWellKnown(ctx context.Context, in *GetVcWellKnownRequest, opts ...grpc.CallOption) (*GetVcWellKnownResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetVcWellKnownResponse)
	err := c.cc.Invoke(ctx, VcService_GetWellKnown_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *vcServiceClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(SearchResponse)
	err := c.cc.Invoke(ctx, VcService_Search_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

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

// VcServiceServer is the server API for VcService service.
// All implementations should embed UnimplementedVcServiceServer
// for forward compatibility.
//
// VC is the service that provides VC operations.
type VcServiceServer interface {
	// Publish an issued Verifiable Credential
	Publish(context.Context, *PublishRequest) (*emptypb.Empty, error)
	// Verify an existing Verifiable Credential
	Verify(context.Context, *VerifyRequest) (*v1alpha1.VerificationResult, error)
	// Returns the well-known Verifiable Credentials for the specified Id
	GetWellKnown(context.Context, *GetVcWellKnownRequest) (*GetVcWellKnownResponse, error)
	// Search for Verifiable Credentials based on the specified criteria
	Search(context.Context, *SearchRequest) (*SearchResponse, error)
	// Revoke a Verifiable Credential. THIS ACTION IS NOT REVERSIBLE.
	Revoke(context.Context, *RevokeRequest) (*emptypb.Empty, error)
}

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

func (UnimplementedVcServiceServer) Publish(context.Context, *PublishRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Publish not implemented")
}
func (UnimplementedVcServiceServer) Verify(context.Context, *VerifyRequest) (*v1alpha1.VerificationResult, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Verify not implemented")
}
func (UnimplementedVcServiceServer) GetWellKnown(context.Context, *GetVcWellKnownRequest) (*GetVcWellKnownResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetWellKnown not implemented")
}
func (UnimplementedVcServiceServer) Search(context.Context, *SearchRequest) (*SearchResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Search not implemented")
}
func (UnimplementedVcServiceServer) Revoke(context.Context, *RevokeRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Revoke not implemented")
}
func (UnimplementedVcServiceServer) testEmbeddedByValue() {}

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

func RegisterVcServiceServer(s grpc.ServiceRegistrar, srv VcServiceServer) {
	// If the following call pancis, it indicates UnimplementedVcServiceServer 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(&VcService_ServiceDesc, srv)
}

func _VcService_Publish_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(PublishRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(VcServiceServer).Publish(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: VcService_Publish_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(VcServiceServer).Publish(ctx, req.(*PublishRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _VcService_Verify_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(VerifyRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(VcServiceServer).Verify(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: VcService_Verify_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(VcServiceServer).Verify(ctx, req.(*VerifyRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _VcService_GetWellKnown_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetVcWellKnownRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(VcServiceServer).GetWellKnown(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: VcService_GetWellKnown_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(VcServiceServer).GetWellKnown(ctx, req.(*GetVcWellKnownRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _VcService_Search_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SearchRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(VcServiceServer).Search(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: VcService_Search_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(VcServiceServer).Search(ctx, req.(*SearchRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _VcService_Revoke_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(RevokeRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(VcServiceServer).Revoke(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: VcService_Revoke_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(VcServiceServer).Revoke(ctx, req.(*RevokeRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// VcService_ServiceDesc is the grpc.ServiceDesc for VcService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var VcService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "agntcy.identity.node.v1alpha1.VcService",
	HandlerType: (*VcServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Publish",
			Handler:    _VcService_Publish_Handler,
		},
		{
			MethodName: "Verify",
			Handler:    _VcService_Verify_Handler,
		},
		{
			MethodName: "GetWellKnown",
			Handler:    _VcService_GetWellKnown_Handler,
		},
		{
			MethodName: "Search",
			Handler:    _VcService_Search_Handler,
		},
		{
			MethodName: "Revoke",
			Handler:    _VcService_Revoke_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "agntcy/identity/node/v1alpha1/vc_service.proto",
}
