// Code generated by protoc-gen-liverpc v0.1, DO NOT EDIT.
// source: v1/Area.proto

package v1

import context "context"

import proto "github.com/golang/protobuf/proto"
import "go-common/library/net/rpc/liverpc"

var _ proto.Message // generate to suppress unused imports

// ==============
// Area Interface
// ==============

type AreaRPCClient interface {
	// * 获取父分区列表
	//
	GetParentList(ctx context.Context, req *AreaGetParentListReq, opts ...liverpc.CallOption) (resp *AreaGetParentListResp, err error)

	// * 获取分区详情
	//
	GetDetail(ctx context.Context, req *AreaGetDetailReq, opts ...liverpc.CallOption) (resp *AreaGetDetailResp, err error)
}

// ====================
// Area Live Rpc Client
// ====================

type areaRPCClient struct {
	client *liverpc.Client
}

// NewAreaRPCClient creates a client that implements the AreaRPCClient interface.
func NewAreaRPCClient(client *liverpc.Client) AreaRPCClient {
	return &areaRPCClient{
		client: client,
	}
}

func (c *areaRPCClient) GetParentList(ctx context.Context, in *AreaGetParentListReq, opts ...liverpc.CallOption) (*AreaGetParentListResp, error) {
	out := new(AreaGetParentListResp)
	err := doRPCRequest(ctx, c.client, 1, "Area.getParentList", in, out, opts)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *areaRPCClient) GetDetail(ctx context.Context, in *AreaGetDetailReq, opts ...liverpc.CallOption) (*AreaGetDetailResp, error) {
	out := new(AreaGetDetailResp)
	err := doRPCRequest(ctx, c.client, 1, "Area.getDetail", in, out, opts)
	if err != nil {
		return nil, err
	}
	return out, nil
}
