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

package services

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 ToUserService service

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

// Client API for ToUserService service

type ToUserService interface {
	GetRelationStatus(ctx context.Context, in *GetRelationStatus_Request, opts ...client.CallOption) (*GetRelationStatus_Response, error)
	GetRelationsStatus(ctx context.Context, in *GetRelationsStatus_Request, opts ...client.CallOption) (*GetRelationsStatus_Response, error)
}

type toUserService struct {
	c    client.Client
	name string
}

func NewToUserService(name string, c client.Client) ToUserService {
	return &toUserService{
		c:    c,
		name: name,
	}
}

func (c *toUserService) GetRelationStatus(ctx context.Context, in *GetRelationStatus_Request, opts ...client.CallOption) (*GetRelationStatus_Response, error) {
	req := c.c.NewRequest(c.name, "ToUserService.GetRelationStatus", in)
	out := new(GetRelationStatus_Response)
	err := c.c.Call(ctx, req, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *toUserService) GetRelationsStatus(ctx context.Context, in *GetRelationsStatus_Request, opts ...client.CallOption) (*GetRelationsStatus_Response, error) {
	req := c.c.NewRequest(c.name, "ToUserService.GetRelationsStatus", in)
	out := new(GetRelationsStatus_Response)
	err := c.c.Call(ctx, req, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// Server API for ToUserService service

type ToUserServiceHandler interface {
	GetRelationStatus(context.Context, *GetRelationStatus_Request, *GetRelationStatus_Response) error
	GetRelationsStatus(context.Context, *GetRelationsStatus_Request, *GetRelationsStatus_Response) error
}

func RegisterToUserServiceHandler(s server.Server, hdlr ToUserServiceHandler, opts ...server.HandlerOption) error {
	type toUserService interface {
		GetRelationStatus(ctx context.Context, in *GetRelationStatus_Request, out *GetRelationStatus_Response) error
		GetRelationsStatus(ctx context.Context, in *GetRelationsStatus_Request, out *GetRelationsStatus_Response) error
	}
	type ToUserService struct {
		toUserService
	}
	h := &toUserServiceHandler{hdlr}
	return s.Handle(s.NewHandler(&ToUserService{h}, opts...))
}

type toUserServiceHandler struct {
	ToUserServiceHandler
}

func (h *toUserServiceHandler) GetRelationStatus(ctx context.Context, in *GetRelationStatus_Request, out *GetRelationStatus_Response) error {
	return h.ToUserServiceHandler.GetRelationStatus(ctx, in, out)
}

func (h *toUserServiceHandler) GetRelationsStatus(ctx context.Context, in *GetRelationsStatus_Request, out *GetRelationsStatus_Response) error {
	return h.ToUserServiceHandler.GetRelationsStatus(ctx, in, out)
}
