// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             v6.31.1
// source: bonanza.build/pkg/proto/storage/tag/tag.proto

package tag

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 (
	Resolver_ResolveTag_FullMethodName = "/bonanza.storage.tag.Resolver/ResolveTag"
)

// ResolverClient is the client API for Resolver 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 ResolverClient interface {
	ResolveTag(ctx context.Context, in *ResolveTagRequest, opts ...grpc.CallOption) (*ResolveTagResponse, error)
}

type resolverClient struct {
	cc grpc.ClientConnInterface
}

func NewResolverClient(cc grpc.ClientConnInterface) ResolverClient {
	return &resolverClient{cc}
}

func (c *resolverClient) ResolveTag(ctx context.Context, in *ResolveTagRequest, opts ...grpc.CallOption) (*ResolveTagResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ResolveTagResponse)
	err := c.cc.Invoke(ctx, Resolver_ResolveTag_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ResolverServer is the server API for Resolver service.
// All implementations should embed UnimplementedResolverServer
// for forward compatibility.
type ResolverServer interface {
	ResolveTag(context.Context, *ResolveTagRequest) (*ResolveTagResponse, error)
}

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

func (UnimplementedResolverServer) ResolveTag(context.Context, *ResolveTagRequest) (*ResolveTagResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ResolveTag not implemented")
}
func (UnimplementedResolverServer) testEmbeddedByValue() {}

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

func RegisterResolverServer(s grpc.ServiceRegistrar, srv ResolverServer) {
	// If the following call pancis, it indicates UnimplementedResolverServer 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(&Resolver_ServiceDesc, srv)
}

func _Resolver_ResolveTag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ResolveTagRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ResolverServer).ResolveTag(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Resolver_ResolveTag_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ResolverServer).ResolveTag(ctx, req.(*ResolveTagRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// Resolver_ServiceDesc is the grpc.ServiceDesc for Resolver service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Resolver_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "bonanza.storage.tag.Resolver",
	HandlerType: (*ResolverServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ResolveTag",
			Handler:    _Resolver_ResolveTag_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "bonanza.build/pkg/proto/storage/tag/tag.proto",
}

const (
	Updater_UpdateTag_FullMethodName = "/bonanza.storage.tag.Updater/UpdateTag"
)

// UpdaterClient is the client API for Updater 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 UpdaterClient interface {
	UpdateTag(ctx context.Context, in *UpdateTagRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

type updaterClient struct {
	cc grpc.ClientConnInterface
}

func NewUpdaterClient(cc grpc.ClientConnInterface) UpdaterClient {
	return &updaterClient{cc}
}

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

// UpdaterServer is the server API for Updater service.
// All implementations should embed UnimplementedUpdaterServer
// for forward compatibility.
type UpdaterServer interface {
	UpdateTag(context.Context, *UpdateTagRequest) (*emptypb.Empty, error)
}

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

func (UnimplementedUpdaterServer) UpdateTag(context.Context, *UpdateTagRequest) (*emptypb.Empty, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpdateTag not implemented")
}
func (UnimplementedUpdaterServer) testEmbeddedByValue() {}

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

func RegisterUpdaterServer(s grpc.ServiceRegistrar, srv UpdaterServer) {
	// If the following call pancis, it indicates UnimplementedUpdaterServer 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(&Updater_ServiceDesc, srv)
}

func _Updater_UpdateTag_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(UpdateTagRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(UpdaterServer).UpdateTag(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Updater_UpdateTag_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(UpdaterServer).UpdateTag(ctx, req.(*UpdateTagRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// Updater_ServiceDesc is the grpc.ServiceDesc for Updater service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Updater_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "bonanza.storage.tag.Updater",
	HandlerType: (*UpdaterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "UpdateTag",
			Handler:    _Updater_UpdateTag_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "bonanza.build/pkg/proto/storage/tag/tag.proto",
}
