// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             v6.31.1
// source: internal/protov1/plugin.proto

package protov1

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 (
	DagBundle_GetMetadata_FullMethodName = "/bundle.v1.DagBundle/GetMetadata"
	DagBundle_Execute_FullMethodName     = "/bundle.v1.DagBundle/Execute"
)

// DagBundleClient is the client API for DagBundle 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 DagBundleClient interface {
	// GetMetadata returns upfront information about server capabilities and
	// supported resource types without requiring the server to instantiate all
	// bundle and task information, which could be memory intensive.
	GetMetadata(ctx context.Context, in *GetMetadata_Request, opts ...grpc.CallOption) (*GetMetadata_Response, error)
	Execute(ctx context.Context, in *Execute_Request, opts ...grpc.CallOption) (*Execute_Response, error)
}

type dagBundleClient struct {
	cc grpc.ClientConnInterface
}

func NewDagBundleClient(cc grpc.ClientConnInterface) DagBundleClient {
	return &dagBundleClient{cc}
}

func (c *dagBundleClient) GetMetadata(ctx context.Context, in *GetMetadata_Request, opts ...grpc.CallOption) (*GetMetadata_Response, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(GetMetadata_Response)
	err := c.cc.Invoke(ctx, DagBundle_GetMetadata_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *dagBundleClient) Execute(ctx context.Context, in *Execute_Request, opts ...grpc.CallOption) (*Execute_Response, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(Execute_Response)
	err := c.cc.Invoke(ctx, DagBundle_Execute_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// DagBundleServer is the server API for DagBundle service.
// All implementations must embed UnimplementedDagBundleServer
// for forward compatibility.
type DagBundleServer interface {
	// GetMetadata returns upfront information about server capabilities and
	// supported resource types without requiring the server to instantiate all
	// bundle and task information, which could be memory intensive.
	GetMetadata(context.Context, *GetMetadata_Request) (*GetMetadata_Response, error)
	Execute(context.Context, *Execute_Request) (*Execute_Response, error)
	mustEmbedUnimplementedDagBundleServer()
}

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

func (UnimplementedDagBundleServer) GetMetadata(context.Context, *GetMetadata_Request) (*GetMetadata_Response, error) {
	return nil, status.Error(codes.Unimplemented, "method GetMetadata not implemented")
}
func (UnimplementedDagBundleServer) Execute(context.Context, *Execute_Request) (*Execute_Response, error) {
	return nil, status.Error(codes.Unimplemented, "method Execute not implemented")
}
func (UnimplementedDagBundleServer) mustEmbedUnimplementedDagBundleServer() {}
func (UnimplementedDagBundleServer) testEmbeddedByValue()                   {}

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

func RegisterDagBundleServer(s grpc.ServiceRegistrar, srv DagBundleServer) {
	// If the following call panics, it indicates UnimplementedDagBundleServer 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(&DagBundle_ServiceDesc, srv)
}

func _DagBundle_GetMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetMetadata_Request)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DagBundleServer).GetMetadata(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: DagBundle_GetMetadata_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DagBundleServer).GetMetadata(ctx, req.(*GetMetadata_Request))
	}
	return interceptor(ctx, in, info, handler)
}

func _DagBundle_Execute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(Execute_Request)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DagBundleServer).Execute(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: DagBundle_Execute_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DagBundleServer).Execute(ctx, req.(*Execute_Request))
	}
	return interceptor(ctx, in, info, handler)
}

// DagBundle_ServiceDesc is the grpc.ServiceDesc for DagBundle service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var DagBundle_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "bundle.v1.DagBundle",
	HandlerType: (*DagBundleServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetMetadata",
			Handler:    _DagBundle_GetMetadata_Handler,
		},
		{
			MethodName: "Execute",
			Handler:    _DagBundle_Execute_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "internal/protov1/plugin.proto",
}
