package com.ss.android.ugc.aweme.ecommerce.combinepayment.ordersubmit.repository.dto;

import X.M12;
import com.bytedance.covode.number.Covode;
import com.google.gson.a.c;
import com.ss.android.ugc.aweme.ecommerce.api.model.Price;
import java.util.List;
import java.util.Objects;

public final class Summary {
    @c(LIZ = "bill_items")
    public final List<BillItem> billItems;
    @c(LIZ = "desc")
    public final String desc;
    @c(LIZ = "total")
    public final Price total;
    @c(LIZ = "total_discount")
    public final Price totalDiscount;

    static {
        Covode.recordClassIndex(68983);
    }

    public static /* synthetic */ Summary copy$default(Summary summary, List<BillItem> list, Price price, Price price2, String str, int i, Object obj) {
        if ((i & 1) != 0) {
            list = summary.billItems;
        }
        if ((i & 2) != 0) {
            price = summary.total;
        }
        if ((i & 4) != 0) {
            price2 = summary.totalDiscount;
        }
        if ((i & 8) != 0) {
            str = summary.desc;
        }
        return summary.copy(list, price, price2, str);
    }

    private Object[] getObjects() {
        return new Object[]{this.billItems, this.total, this.totalDiscount, this.desc};
    }

    public final Summary copy(List<BillItem> list, Price price, Price price2, String str) {
        return new Summary(list, price, price2, str);
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof Summary)) {
            return false;
        }
        return M12.LIZ(((Summary) obj).getObjects(), getObjects());
    }

    public final int hashCode() {
        return Objects.hash(getObjects());
    }

    public final String toString() {
        return M12.LIZ("Summary:%s,%s,%s,%s", getObjects());
    }

    public final List<BillItem> getBillItems() {
        return this.billItems;
    }

    public final String getDesc() {
        return this.desc;
    }

    public final Price getTotal() {
        return this.total;
    }

    public final Price getTotalDiscount() {
        return this.totalDiscount;
    }

    public final Summary merge(Summary summary) {
        if (summary == null) {
            return this;
        }
        List<BillItem> list = summary.billItems;
        if (list == null) {
            list = this.billItems;
        }
        Price price = summary.total;
        if (price == null) {
            price = this.total;
        }
        Price price2 = summary.totalDiscount;
        if (price2 == null) {
            price2 = this.totalDiscount;
        }
        String str = summary.desc;
        if (str == null) {
            str = this.desc;
        }
        return new Summary(list, price, price2, str);
    }

    public Summary(List<BillItem> list, Price price, Price price2, String str) {
        this.billItems = list;
        this.total = price;
        this.totalDiscount = price2;
        this.desc = str;
    }
}
