// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.1
// - protoc             v3.19.4
// source: snowflake.proto

package snowflake

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 (
	SnowflakeService_NextId_FullMethodName  = "/snowflake.SnowflakeService/NextId"
	SnowflakeService_NextIds_FullMethodName = "/snowflake.SnowflakeService/NextIds"
)

// SnowflakeServiceClient is the client API for SnowflakeService 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 SnowflakeServiceClient interface {
	NextId(ctx context.Context, in *NextIdReq, opts ...grpc.CallOption) (*NextIdResp, error)
	NextIds(ctx context.Context, in *NextIdsReq, opts ...grpc.CallOption) (*NextIdsResp, error)
}

type snowflakeServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewSnowflakeServiceClient(cc grpc.ClientConnInterface) SnowflakeServiceClient {
	return &snowflakeServiceClient{cc}
}

func (c *snowflakeServiceClient) NextId(ctx context.Context, in *NextIdReq, opts ...grpc.CallOption) (*NextIdResp, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(NextIdResp)
	err := c.cc.Invoke(ctx, SnowflakeService_NextId_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *snowflakeServiceClient) NextIds(ctx context.Context, in *NextIdsReq, opts ...grpc.CallOption) (*NextIdsResp, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(NextIdsResp)
	err := c.cc.Invoke(ctx, SnowflakeService_NextIds_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// SnowflakeServiceServer is the server API for SnowflakeService service.
// All implementations must embed UnimplementedSnowflakeServiceServer
// for forward compatibility.
type SnowflakeServiceServer interface {
	NextId(context.Context, *NextIdReq) (*NextIdResp, error)
	NextIds(context.Context, *NextIdsReq) (*NextIdsResp, error)
	mustEmbedUnimplementedSnowflakeServiceServer()
}

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

func (UnimplementedSnowflakeServiceServer) NextId(context.Context, *NextIdReq) (*NextIdResp, error) {
	return nil, status.Error(codes.Unimplemented, "method NextId not implemented")
}
func (UnimplementedSnowflakeServiceServer) NextIds(context.Context, *NextIdsReq) (*NextIdsResp, error) {
	return nil, status.Error(codes.Unimplemented, "method NextIds not implemented")
}
func (UnimplementedSnowflakeServiceServer) mustEmbedUnimplementedSnowflakeServiceServer() {}
func (UnimplementedSnowflakeServiceServer) testEmbeddedByValue()                          {}

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

func RegisterSnowflakeServiceServer(s grpc.ServiceRegistrar, srv SnowflakeServiceServer) {
	// If the following call panics, it indicates UnimplementedSnowflakeServiceServer 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(&SnowflakeService_ServiceDesc, srv)
}

func _SnowflakeService_NextId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(NextIdReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SnowflakeServiceServer).NextId(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SnowflakeService_NextId_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SnowflakeServiceServer).NextId(ctx, req.(*NextIdReq))
	}
	return interceptor(ctx, in, info, handler)
}

func _SnowflakeService_NextIds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(NextIdsReq)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(SnowflakeServiceServer).NextIds(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: SnowflakeService_NextIds_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(SnowflakeServiceServer).NextIds(ctx, req.(*NextIdsReq))
	}
	return interceptor(ctx, in, info, handler)
}

// SnowflakeService_ServiceDesc is the grpc.ServiceDesc for SnowflakeService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SnowflakeService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "snowflake.SnowflakeService",
	HandlerType: (*SnowflakeServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "NextId",
			Handler:    _SnowflakeService_NextId_Handler,
		},
		{
			MethodName: "NextIds",
			Handler:    _SnowflakeService_NextIds_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "snowflake.proto",
}
