// Code generated by Kitex v0.4.4. DO NOT EDIT.

package feedservice

import (
	rpc "common/kitex_gen/douyin/rpc"
	"context"
	client "github.com/cloudwego/kitex/client"
	callopt "github.com/cloudwego/kitex/client/callopt"
)

// Client is designed to provide IDL-compatible methods with call-option parameter for kitex framework.
type Client interface {
	Feed(ctx context.Context, req *rpc.DouyinFeedRequest, callOptions ...callopt.Option) (r *rpc.DouyinFeedResponse, err error)
	Publish(ctx context.Context, req *rpc.DouyinPublishActionRequest, callOptions ...callopt.Option) (r *rpc.DouyinPublishActionResponse, err error)
	List(ctx context.Context, req *rpc.DouyinPublishListRequest, callOptions ...callopt.Option) (r *rpc.DouyinPublishListResponse, err error)
	Relation(ctx context.Context, req *rpc.DouyinRelationActionRequest, callOptions ...callopt.Option) (r *rpc.DouyinRelationActionResponse, err error)
	Following(ctx context.Context, req *rpc.DouyinRelationFollowListRequest, callOptions ...callopt.Option) (r *rpc.DouyinRelationFollowListResponse, err error)
	Follower(ctx context.Context, req *rpc.DouyinRelationFollowerListRequest, callOptions ...callopt.Option) (r *rpc.DouyinRelationFollowerListResponse, err error)
	Friend(ctx context.Context, req *rpc.DouyinRelationFriendListRequest, callOptions ...callopt.Option) (r *rpc.DouyinRelationFriendListResponse, err error)
	VideoInfo(ctx context.Context, req *rpc.VideoBatchInfoRequest, callOptions ...callopt.Option) (r *rpc.VideoBatchInfoResponse, err error)
	IsFriend(ctx context.Context, req *rpc.FriendCheckRequest, callOptions ...callopt.Option) (r *rpc.FriendCheckResponse, err error)
}

// NewClient creates a client for the service defined in IDL.
func NewClient(destService string, opts ...client.Option) (Client, error) {
	var options []client.Option
	options = append(options, client.WithDestService(destService))

	options = append(options, opts...)

	kc, err := client.NewClient(serviceInfo(), options...)
	if err != nil {
		return nil, err
	}
	return &kFeedServiceClient{
		kClient: newServiceClient(kc),
	}, nil
}

// MustNewClient creates a client for the service defined in IDL. It panics if any error occurs.
func MustNewClient(destService string, opts ...client.Option) Client {
	kc, err := NewClient(destService, opts...)
	if err != nil {
		panic(err)
	}
	return kc
}

type kFeedServiceClient struct {
	*kClient
}

func (p *kFeedServiceClient) Feed(ctx context.Context, req *rpc.DouyinFeedRequest, callOptions ...callopt.Option) (r *rpc.DouyinFeedResponse, err error) {
	ctx = client.NewCtxWithCallOptions(ctx, callOptions)
	return p.kClient.Feed(ctx, req)
}

func (p *kFeedServiceClient) Publish(ctx context.Context, req *rpc.DouyinPublishActionRequest, callOptions ...callopt.Option) (r *rpc.DouyinPublishActionResponse, err error) {
	ctx = client.NewCtxWithCallOptions(ctx, callOptions)
	return p.kClient.Publish(ctx, req)
}

func (p *kFeedServiceClient) List(ctx context.Context, req *rpc.DouyinPublishListRequest, callOptions ...callopt.Option) (r *rpc.DouyinPublishListResponse, err error) {
	ctx = client.NewCtxWithCallOptions(ctx, callOptions)
	return p.kClient.List(ctx, req)
}

func (p *kFeedServiceClient) Relation(ctx context.Context, req *rpc.DouyinRelationActionRequest, callOptions ...callopt.Option) (r *rpc.DouyinRelationActionResponse, err error) {
	ctx = client.NewCtxWithCallOptions(ctx, callOptions)
	return p.kClient.Relation(ctx, req)
}

func (p *kFeedServiceClient) Following(ctx context.Context, req *rpc.DouyinRelationFollowListRequest, callOptions ...callopt.Option) (r *rpc.DouyinRelationFollowListResponse, err error) {
	ctx = client.NewCtxWithCallOptions(ctx, callOptions)
	return p.kClient.Following(ctx, req)
}

func (p *kFeedServiceClient) Follower(ctx context.Context, req *rpc.DouyinRelationFollowerListRequest, callOptions ...callopt.Option) (r *rpc.DouyinRelationFollowerListResponse, err error) {
	ctx = client.NewCtxWithCallOptions(ctx, callOptions)
	return p.kClient.Follower(ctx, req)
}

func (p *kFeedServiceClient) Friend(ctx context.Context, req *rpc.DouyinRelationFriendListRequest, callOptions ...callopt.Option) (r *rpc.DouyinRelationFriendListResponse, err error) {
	ctx = client.NewCtxWithCallOptions(ctx, callOptions)
	return p.kClient.Friend(ctx, req)
}

func (p *kFeedServiceClient) VideoInfo(ctx context.Context, req *rpc.VideoBatchInfoRequest, callOptions ...callopt.Option) (r *rpc.VideoBatchInfoResponse, err error) {
	ctx = client.NewCtxWithCallOptions(ctx, callOptions)
	return p.kClient.VideoInfo(ctx, req)
}

func (p *kFeedServiceClient) IsFriend(ctx context.Context, req *rpc.FriendCheckRequest, callOptions ...callopt.Option) (r *rpc.FriendCheckResponse, err error) {
	ctx = client.NewCtxWithCallOptions(ctx, callOptions)
	return p.kClient.IsFriend(ctx, req)
}
