package nano;

import nano.FundingReportOverviewListRequest;
import nano.SortedListRequest;

/* compiled from: TbsSdkJava */
public class FundingReportOverviewListRequestBuilder {

    private int beginPosition;

    private int bkId;

    private SortedListRequest.SortedList_Request.ClassTypeList classTypeList;

    private FundingReportOverviewListRequest.FROverviewList_Request.DateRange dateRange;

    private int[] fieldIds;

    private int[] goodsIds;

    private SortedListRequest.SortedList_Request.GroupInfo groupInfo;

    private int limitSize;

    private SortedListRequest.SortedList_Request.SortOptions sortOptions;

    public FundingReportOverviewListRequest.FROverviewList_Request create() {
        FundingReportOverviewListRequest.FROverviewList_Request fROverviewList_Request = new FundingReportOverviewListRequest.FROverviewList_Request();
        SortedListRequest.SortedList_Request sortedList_Request = new SortedListRequest.SortedList_Request();
        SortedListRequest.SortedList_Request.GroupInfo groupInfo2 = this.groupInfo;
        if (groupInfo2 != null) {
            sortedList_Request.setGroup(groupInfo2);
        } else {
            SortedListRequest.SortedList_Request.ClassTypeList classTypeList2 = this.classTypeList;
            if (classTypeList2 != null) {
                sortedList_Request.setSystem(classTypeList2);
            } else {
                int i10 = this.bkId;
                if (i10 != 0) {
                    sortedList_Request.setGoods(i10);
                } else if (this.goodsIds != null) {
                    SortedListRequest.SortedList_Request.GoodsList goodsList = new SortedListRequest.SortedList_Request.GoodsList();
                    goodsList.goodsId = this.goodsIds;
                    sortedList_Request.setCustom(goodsList);
                }
            }
        }
        sortedList_Request.fieldsId = this.fieldIds;
        SortedListRequest.SortedList_Request.SortOptions sortOptions2 = this.sortOptions;
        if (sortOptions2 != null) {
            sortedList_Request.sortOption = sortOptions2;
        }
        sortedList_Request.setBeginPosition(this.beginPosition);
        sortedList_Request.setLimitSize(this.limitSize);
        fROverviewList_Request.request = sortedList_Request;
        FundingReportOverviewListRequest.FROverviewList_Request.DateRange dateRange2 = this.dateRange;
        if (dateRange2 != null) {
            fROverviewList_Request.dateRange = dateRange2;
        }
        return fROverviewList_Request;
    }

    public FundingReportOverviewListRequestBuilder setBeginPosition(int i10) {
        this.beginPosition = i10;
        return this;
    }

    public FundingReportOverviewListRequestBuilder setBkId(int i10) {
        this.bkId = i10;
        return this;
    }

    public FundingReportOverviewListRequestBuilder setClassType(SortedListRequest.SortedList_Request.ClassTypeList.ClassType[] classTypeArr) {
        if (classTypeArr != null) {
            SortedListRequest.SortedList_Request.ClassTypeList classTypeList2 = new SortedListRequest.SortedList_Request.ClassTypeList();
            this.classTypeList = classTypeList2;
            classTypeList2.exchangeCategory = classTypeArr;
        }
        return this;
    }

    public FundingReportOverviewListRequestBuilder setDateRange(FundingReportOverviewListRequest.FROverviewList_Request.DateRange dateRange2) {
        this.dateRange = dateRange2;
        return this;
    }

    public FundingReportOverviewListRequestBuilder setFieldIds(int[] iArr) {
        this.fieldIds = iArr;
        return this;
    }

    public FundingReportOverviewListRequestBuilder setGoodsIds(int[] iArr) {
        this.goodsIds = iArr;
        return this;
    }

    public FundingReportOverviewListRequestBuilder setGroupInfo(SortedListRequest.SortedList_Request.GroupInfo groupInfo2) {
        this.groupInfo = groupInfo2;
        return this;
    }

    public FundingReportOverviewListRequestBuilder setLimitSize(int i10) {
        this.limitSize = i10;
        return this;
    }

    public FundingReportOverviewListRequestBuilder setSortOptions(int i10, int i11) {
        SortedListRequest.SortedList_Request.SortOptions sortOptions2 = new SortedListRequest.SortedList_Request.SortOptions();
        this.sortOptions = sortOptions2;
        sortOptions2.setSortField(i10);
        if (i11 == 1) {
            this.sortOptions.setSortAsce(true);
        } else if (i11 == 2) {
            this.sortOptions.setSortAsce(false);
        }
        return this;
    }

    public FundingReportOverviewListRequestBuilder setSortOptions(int i10, boolean z9) {
        SortedListRequest.SortedList_Request.SortOptions sortOptions2 = new SortedListRequest.SortedList_Request.SortOptions();
        this.sortOptions = sortOptions2;
        sortOptions2.setSortField(i10);
        this.sortOptions.setSortAsce(z9);
        return this;
    }
}
