// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             (unknown)
// source: api/protobuf/goflake.proto

package proto

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.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

// FlakeServiceClient is the client API for FlakeService 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 FlakeServiceClient interface {
	GetUUID(ctx context.Context, in *GetUUIDRequest, opts ...grpc.CallOption) (*GetUUIDResponse, error)
	Decompose(ctx context.Context, in *DecomposeRequest, opts ...grpc.CallOption) (*DecomposeResponse, error)
}

type flakeServiceClient struct {
	cc grpc.ClientConnInterface
}

func NewFlakeServiceClient(cc grpc.ClientConnInterface) FlakeServiceClient {
	return &flakeServiceClient{cc}
}

func (c *flakeServiceClient) GetUUID(ctx context.Context, in *GetUUIDRequest, opts ...grpc.CallOption) (*GetUUIDResponse, error) {
	out := new(GetUUIDResponse)
	err := c.cc.Invoke(ctx, "/goflake.FlakeService/GetUUID", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *flakeServiceClient) Decompose(ctx context.Context, in *DecomposeRequest, opts ...grpc.CallOption) (*DecomposeResponse, error) {
	out := new(DecomposeResponse)
	err := c.cc.Invoke(ctx, "/goflake.FlakeService/Decompose", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// FlakeServiceServer is the server API for FlakeService service.
// All implementations must embed UnimplementedFlakeServiceServer
// for forward compatibility
type FlakeServiceServer interface {
	GetUUID(context.Context, *GetUUIDRequest) (*GetUUIDResponse, error)
	Decompose(context.Context, *DecomposeRequest) (*DecomposeResponse, error)
	mustEmbedUnimplementedFlakeServiceServer()
}

// UnimplementedFlakeServiceServer must be embedded to have forward compatible implementations.
type UnimplementedFlakeServiceServer struct {
}

func (UnimplementedFlakeServiceServer) GetUUID(context.Context, *GetUUIDRequest) (*GetUUIDResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method GetUUID not implemented")
}
func (UnimplementedFlakeServiceServer) Decompose(context.Context, *DecomposeRequest) (*DecomposeResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method Decompose not implemented")
}
func (UnimplementedFlakeServiceServer) mustEmbedUnimplementedFlakeServiceServer() {}

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

func RegisterFlakeServiceServer(s grpc.ServiceRegistrar, srv FlakeServiceServer) {
	s.RegisterService(&FlakeService_ServiceDesc, srv)
}

func _FlakeService_GetUUID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(GetUUIDRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FlakeServiceServer).GetUUID(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/goflake.FlakeService/GetUUID",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FlakeServiceServer).GetUUID(ctx, req.(*GetUUIDRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _FlakeService_Decompose_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(DecomposeRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(FlakeServiceServer).Decompose(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/goflake.FlakeService/Decompose",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(FlakeServiceServer).Decompose(ctx, req.(*DecomposeRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// FlakeService_ServiceDesc is the grpc.ServiceDesc for FlakeService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var FlakeService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "goflake.FlakeService",
	HandlerType: (*FlakeServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetUUID",
			Handler:    _FlakeService_GetUUID_Handler,
		},
		{
			MethodName: "Decompose",
			Handler:    _FlakeService_Decompose_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/protobuf/goflake.proto",
}
