// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             v4.25.4
// source: artifact/artifact.proto

package artifact

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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	ArtifactService_GetArtifact_FullMethodName      = "/vorpal.artifact.ArtifactService/GetArtifact"
	ArtifactService_GetArtifactAlias_FullMethodName = "/vorpal.artifact.ArtifactService/GetArtifactAlias"
	ArtifactService_GetArtifacts_FullMethodName     = "/vorpal.artifact.ArtifactService/GetArtifacts"
	ArtifactService_StoreArtifact_FullMethodName    = "/vorpal.artifact.ArtifactService/StoreArtifact"
)

// ArtifactServiceClient is the client API for ArtifactService 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 ArtifactServiceClient interface {
	GetArtifact(ctx context.Context, in *ArtifactRequest, opts ...grpc.CallOption) (*Artifact, error)
	GetArtifactAlias(ctx context.Context, in *GetArtifactAliasRequest, opts ...grpc.CallOption) (*GetArtifactAliasResponse, error)
	GetArtifacts(ctx context.Context, in *ArtifactsRequest, opts ...grpc.CallOption) (*ArtifactsResponse, error)
	StoreArtifact(ctx context.Context, in *StoreArtifactRequest, opts ...grpc.CallOption) (*ArtifactResponse, error)
}

type artifactServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewArtifactServiceClient(cc grpc.ClientConnInterface) ArtifactServiceClient {
	return &artifactServiceClient{cc}
}

func (c *artifactServiceClient) GetArtifact(ctx context.Context, in *ArtifactRequest, opts ...grpc.CallOption) (*Artifact, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(Artifact)
	err := c.cc.Invoke(ctx, ArtifactService_GetArtifact_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *artifactServiceClient) GetArtifactAlias(ctx context.Context, in *GetArtifactAliasRequest, opts ...grpc.CallOption) (*GetArtifactAliasResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetArtifactAliasResponse)
	err := c.cc.Invoke(ctx, ArtifactService_GetArtifactAlias_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *artifactServiceClient) GetArtifacts(ctx context.Context, in *ArtifactsRequest, opts ...grpc.CallOption) (*ArtifactsResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ArtifactsResponse)
	err := c.cc.Invoke(ctx, ArtifactService_GetArtifacts_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *artifactServiceClient) StoreArtifact(ctx context.Context, in *StoreArtifactRequest, opts ...grpc.CallOption) (*ArtifactResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ArtifactResponse)
	err := c.cc.Invoke(ctx, ArtifactService_StoreArtifact_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// ArtifactServiceServer is the server API for ArtifactService service.
// All implementations must embed UnimplementedArtifactServiceServer
// for forward compatibility.
type ArtifactServiceServer interface {
	GetArtifact(context.Context, *ArtifactRequest) (*Artifact, error)
	GetArtifactAlias(context.Context, *GetArtifactAliasRequest) (*GetArtifactAliasResponse, error)
	GetArtifacts(context.Context, *ArtifactsRequest) (*ArtifactsResponse, error)
	StoreArtifact(context.Context, *StoreArtifactRequest) (*ArtifactResponse, error)
	mustEmbedUnimplementedArtifactServiceServer()
}

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

func (UnimplementedArtifactServiceServer) GetArtifact(context.Context, *ArtifactRequest) (*Artifact, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetArtifact not implemented")
}
func (UnimplementedArtifactServiceServer) GetArtifactAlias(context.Context, *GetArtifactAliasRequest) (*GetArtifactAliasResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetArtifactAlias not implemented")
}
func (UnimplementedArtifactServiceServer) GetArtifacts(context.Context, *ArtifactsRequest) (*ArtifactsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetArtifacts not implemented")
}
func (UnimplementedArtifactServiceServer) StoreArtifact(context.Context, *StoreArtifactRequest) (*ArtifactResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method StoreArtifact not implemented")
}
func (UnimplementedArtifactServiceServer) mustEmbedUnimplementedArtifactServiceServer() {}
func (UnimplementedArtifactServiceServer) testEmbeddedByValue()                         {}

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

func RegisterArtifactServiceServer(s grpc.ServiceRegistrar, srv ArtifactServiceServer) {
	// If the following call panics, it indicates UnimplementedArtifactServiceServer 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(&ArtifactService_ServiceDesc, srv)
}

func _ArtifactService_GetArtifact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ArtifactRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ArtifactServiceServer).GetArtifact(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ArtifactService_GetArtifact_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ArtifactServiceServer).GetArtifact(ctx, req.(*ArtifactRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ArtifactService_GetArtifactAlias_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetArtifactAliasRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ArtifactServiceServer).GetArtifactAlias(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ArtifactService_GetArtifactAlias_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ArtifactServiceServer).GetArtifactAlias(ctx, req.(*GetArtifactAliasRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ArtifactService_GetArtifacts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ArtifactsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ArtifactServiceServer).GetArtifacts(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ArtifactService_GetArtifacts_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ArtifactServiceServer).GetArtifacts(ctx, req.(*ArtifactsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _ArtifactService_StoreArtifact_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(StoreArtifactRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(ArtifactServiceServer).StoreArtifact(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: ArtifactService_StoreArtifact_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(ArtifactServiceServer).StoreArtifact(ctx, req.(*StoreArtifactRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// ArtifactService_ServiceDesc is the grpc.ServiceDesc for ArtifactService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var ArtifactService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "vorpal.artifact.ArtifactService",
	HandlerType: (*ArtifactServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetArtifact",
			Handler:    _ArtifactService_GetArtifact_Handler,
		},
		{
			MethodName: "GetArtifactAlias",
			Handler:    _ArtifactService_GetArtifactAlias_Handler,
		},
		{
			MethodName: "GetArtifacts",
			Handler:    _ArtifactService_GetArtifacts_Handler,
		},
		{
			MethodName: "StoreArtifact",
			Handler:    _ArtifactService_StoreArtifact_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "artifact/artifact.proto",
}
