// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.5.1
// - protoc             (unknown)
// source: authzed/api/v0/developer.proto

package v0

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 (
	DeveloperService_Share_FullMethodName        = "/authzed.api.v0.DeveloperService/Share"
	DeveloperService_LookupShared_FullMethodName = "/authzed.api.v0.DeveloperService/LookupShared"
)

// DeveloperServiceClient is the client API for DeveloperService 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 DeveloperServiceClient interface {
	Share(ctx context.Context, in *ShareRequest, opts ...grpc.CallOption) (*ShareResponse, error)
	LookupShared(ctx context.Context, in *LookupShareRequest, opts ...grpc.CallOption) (*LookupShareResponse, error)
}

type developerServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewDeveloperServiceClient(cc grpc.ClientConnInterface) DeveloperServiceClient {
	return &developerServiceClient{cc}
}

func (c *developerServiceClient) Share(ctx context.Context, in *ShareRequest, opts ...grpc.CallOption) (*ShareResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(ShareResponse)
	err := c.cc.Invoke(ctx, DeveloperService_Share_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *developerServiceClient) LookupShared(ctx context.Context, in *LookupShareRequest, opts ...grpc.CallOption) (*LookupShareResponse, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(LookupShareResponse)
	err := c.cc.Invoke(ctx, DeveloperService_LookupShared_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// DeveloperServiceServer is the server API for DeveloperService service.
// All implementations must embed UnimplementedDeveloperServiceServer
// for forward compatibility.
type DeveloperServiceServer interface {
	Share(context.Context, *ShareRequest) (*ShareResponse, error)
	LookupShared(context.Context, *LookupShareRequest) (*LookupShareResponse, error)
	mustEmbedUnimplementedDeveloperServiceServer()
}

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

func (UnimplementedDeveloperServiceServer) Share(context.Context, *ShareRequest) (*ShareResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Share not implemented")
}
func (UnimplementedDeveloperServiceServer) LookupShared(context.Context, *LookupShareRequest) (*LookupShareResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method LookupShared not implemented")
}
func (UnimplementedDeveloperServiceServer) mustEmbedUnimplementedDeveloperServiceServer() {}
func (UnimplementedDeveloperServiceServer) testEmbeddedByValue()                          {}

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

func RegisterDeveloperServiceServer(s grpc.ServiceRegistrar, srv DeveloperServiceServer) {
	// If the following call pancis, it indicates UnimplementedDeveloperServiceServer 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(&DeveloperService_ServiceDesc, srv)
}

func _DeveloperService_Share_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(ShareRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DeveloperServiceServer).Share(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: DeveloperService_Share_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DeveloperServiceServer).Share(ctx, req.(*ShareRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _DeveloperService_LookupShared_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(LookupShareRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(DeveloperServiceServer).LookupShared(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: DeveloperService_LookupShared_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(DeveloperServiceServer).LookupShared(ctx, req.(*LookupShareRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// DeveloperService_ServiceDesc is the grpc.ServiceDesc for DeveloperService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var DeveloperService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "authzed.api.v0.DeveloperService",
	HandlerType: (*DeveloperServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Share",
			Handler:    _DeveloperService_Share_Handler,
		},
		{
			MethodName: "LookupShared",
			Handler:    _DeveloperService_LookupShared_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "authzed/api/v0/developer.proto",
}
