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

package relation

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

import (
	context "context"
	api "github.com/micro/go-micro/v2/api"
	client "github.com/micro/go-micro/v2/client"
	server "github.com/micro/go-micro/v2/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 RelationService service

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

// Client API for RelationService service

type RelationService interface {
	RelationAction(ctx context.Context, in *DouyinRelationActionRequest, opts ...client.CallOption) (*DouyinRelationActionResponse, error)
	FollowList(ctx context.Context, in *DouyinRelationFollowListRequest, opts ...client.CallOption) (*DouyinRelationFollowListResponse, error)
	FollowerList(ctx context.Context, in *DouyinRelationFollowerListRequest, opts ...client.CallOption) (*DouyinRelationFollowerListResponse, error)
	FriendList(ctx context.Context, in *DouyinRelationFriendListRequest, opts ...client.CallOption) (*DouyinRelationFriendListResponse, error)
}

type relationService struct {
	c    client.Client
	name string
}

func NewRelationService(name string, c client.Client) RelationService {
	return &relationService{
		c:    c,
		name: name,
	}
}

func (c *relationService) RelationAction(ctx context.Context, in *DouyinRelationActionRequest, opts ...client.CallOption) (*DouyinRelationActionResponse, error) {
	req := c.c.NewRequest(c.name, "RelationService.RelationAction", in)
	out := new(DouyinRelationActionResponse)
	err := c.c.Call(ctx, req, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *relationService) FollowList(ctx context.Context, in *DouyinRelationFollowListRequest, opts ...client.CallOption) (*DouyinRelationFollowListResponse, error) {
	req := c.c.NewRequest(c.name, "RelationService.FollowList", in)
	out := new(DouyinRelationFollowListResponse)
	err := c.c.Call(ctx, req, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *relationService) FollowerList(ctx context.Context, in *DouyinRelationFollowerListRequest, opts ...client.CallOption) (*DouyinRelationFollowerListResponse, error) {
	req := c.c.NewRequest(c.name, "RelationService.FollowerList", in)
	out := new(DouyinRelationFollowerListResponse)
	err := c.c.Call(ctx, req, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *relationService) FriendList(ctx context.Context, in *DouyinRelationFriendListRequest, opts ...client.CallOption) (*DouyinRelationFriendListResponse, error) {
	req := c.c.NewRequest(c.name, "RelationService.FriendList", in)
	out := new(DouyinRelationFriendListResponse)
	err := c.c.Call(ctx, req, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// Server API for RelationService service

type RelationServiceHandler interface {
	RelationAction(context.Context, *DouyinRelationActionRequest, *DouyinRelationActionResponse) error
	FollowList(context.Context, *DouyinRelationFollowListRequest, *DouyinRelationFollowListResponse) error
	FollowerList(context.Context, *DouyinRelationFollowerListRequest, *DouyinRelationFollowerListResponse) error
	FriendList(context.Context, *DouyinRelationFriendListRequest, *DouyinRelationFriendListResponse) error
}

func RegisterRelationServiceHandler(s server.Server, hdlr RelationServiceHandler, opts ...server.HandlerOption) error {
	type relationService interface {
		RelationAction(ctx context.Context, in *DouyinRelationActionRequest, out *DouyinRelationActionResponse) error
		FollowList(ctx context.Context, in *DouyinRelationFollowListRequest, out *DouyinRelationFollowListResponse) error
		FollowerList(ctx context.Context, in *DouyinRelationFollowerListRequest, out *DouyinRelationFollowerListResponse) error
		FriendList(ctx context.Context, in *DouyinRelationFriendListRequest, out *DouyinRelationFriendListResponse) error
	}
	type RelationService struct {
		relationService
	}
	h := &relationServiceHandler{hdlr}
	return s.Handle(s.NewHandler(&RelationService{h}, opts...))
}

type relationServiceHandler struct {
	RelationServiceHandler
}

func (h *relationServiceHandler) RelationAction(ctx context.Context, in *DouyinRelationActionRequest, out *DouyinRelationActionResponse) error {
	return h.RelationServiceHandler.RelationAction(ctx, in, out)
}

func (h *relationServiceHandler) FollowList(ctx context.Context, in *DouyinRelationFollowListRequest, out *DouyinRelationFollowListResponse) error {
	return h.RelationServiceHandler.FollowList(ctx, in, out)
}

func (h *relationServiceHandler) FollowerList(ctx context.Context, in *DouyinRelationFollowerListRequest, out *DouyinRelationFollowerListResponse) error {
	return h.RelationServiceHandler.FollowerList(ctx, in, out)
}

func (h *relationServiceHandler) FriendList(ctx context.Context, in *DouyinRelationFriendListRequest, out *DouyinRelationFriendListResponse) error {
	return h.RelationServiceHandler.FriendList(ctx, in, out)
}
