// Code generated by protoc-gen-micro. DO NOT EDIT.
// source: proto/emoji.proto

package emoji

import (
	fmt "fmt"
	proto "github.com/golang/protobuf/proto"
	math "math"
)

import (
	context "context"
	api "github.com/micro/micro/v3/service/api"
	client "github.com/micro/micro/v3/service/client"
	server "github.com/micro/micro/v3/service/server"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package

// Reference imports to suppress errors if they are not otherwise used.
var _ api.Endpoint
var _ context.Context
var _ client.Option
var _ server.Option

// Api Endpoints for Emoji service

func NewEmojiEndpoints() []*api.Endpoint {
	return []*api.Endpoint{}
}

// Client API for Emoji service

type EmojiService interface {
	Find(ctx context.Context, in *FindRequest, opts ...client.CallOption) (*FindResponse, error)
	Flag(ctx context.Context, in *FlagRequest, opts ...client.CallOption) (*FlagResponse, error)
	Print(ctx context.Context, in *PrintRequest, opts ...client.CallOption) (*PrintResponse, error)
	Send(ctx context.Context, in *SendRequest, opts ...client.CallOption) (*SendResponse, error)
}

type emojiService struct {
	c    client.Client
	name string
}

func NewEmojiService(name string, c client.Client) EmojiService {
	return &emojiService{
		c:    c,
		name: name,
	}
}

func (c *emojiService) Find(ctx context.Context, in *FindRequest, opts ...client.CallOption) (*FindResponse, error) {
	req := c.c.NewRequest(c.name, "Emoji.Find", in)
	out := new(FindResponse)
	err := c.c.Call(ctx, req, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *emojiService) Flag(ctx context.Context, in *FlagRequest, opts ...client.CallOption) (*FlagResponse, error) {
	req := c.c.NewRequest(c.name, "Emoji.Flag", in)
	out := new(FlagResponse)
	err := c.c.Call(ctx, req, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *emojiService) Print(ctx context.Context, in *PrintRequest, opts ...client.CallOption) (*PrintResponse, error) {
	req := c.c.NewRequest(c.name, "Emoji.Print", in)
	out := new(PrintResponse)
	err := c.c.Call(ctx, req, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *emojiService) Send(ctx context.Context, in *SendRequest, opts ...client.CallOption) (*SendResponse, error) {
	req := c.c.NewRequest(c.name, "Emoji.Send", in)
	out := new(SendResponse)
	err := c.c.Call(ctx, req, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// Server API for Emoji service

type EmojiHandler interface {
	Find(context.Context, *FindRequest, *FindResponse) error
	Flag(context.Context, *FlagRequest, *FlagResponse) error
	Print(context.Context, *PrintRequest, *PrintResponse) error
	Send(context.Context, *SendRequest, *SendResponse) error
}

func RegisterEmojiHandler(s server.Server, hdlr EmojiHandler, opts ...server.HandlerOption) error {
	type emoji interface {
		Find(ctx context.Context, in *FindRequest, out *FindResponse) error
		Flag(ctx context.Context, in *FlagRequest, out *FlagResponse) error
		Print(ctx context.Context, in *PrintRequest, out *PrintResponse) error
		Send(ctx context.Context, in *SendRequest, out *SendResponse) error
	}
	type Emoji struct {
		emoji
	}
	h := &emojiHandler{hdlr}
	return s.Handle(s.NewHandler(&Emoji{h}, opts...))
}

type emojiHandler struct {
	EmojiHandler
}

func (h *emojiHandler) Find(ctx context.Context, in *FindRequest, out *FindResponse) error {
	return h.EmojiHandler.Find(ctx, in, out)
}

func (h *emojiHandler) Flag(ctx context.Context, in *FlagRequest, out *FlagResponse) error {
	return h.EmojiHandler.Flag(ctx, in, out)
}

func (h *emojiHandler) Print(ctx context.Context, in *PrintRequest, out *PrintResponse) error {
	return h.EmojiHandler.Print(ctx, in, out)
}

func (h *emojiHandler) Send(ctx context.Context, in *SendRequest, out *SendResponse) error {
	return h.EmojiHandler.Send(ctx, in, out)
}
