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.Objects;

public final class ShopBill {
    @c(LIZ = "product_total")
    public final String productTotal;
    @c(LIZ = "total")
    public final Price total;
    @c(LIZ = "total_discount")
    public final String totalDiscount;

    static {
        Covode.recordClassIndex(68981);
    }

    public static /* synthetic */ ShopBill copy$default(ShopBill shopBill, String str, Price price, String str2, int i, Object obj) {
        if ((i & 1) != 0) {
            str = shopBill.productTotal;
        }
        if ((i & 2) != 0) {
            price = shopBill.total;
        }
        if ((i & 4) != 0) {
            str2 = shopBill.totalDiscount;
        }
        return shopBill.copy(str, price, str2);
    }

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

    public final ShopBill copy(String str, Price price, String str2) {
        return new ShopBill(str, price, str2);
    }

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

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

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

    public final String getProductTotal() {
        return this.productTotal;
    }

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

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

    public final ShopBill merge(ShopBill shopBill) {
        if (shopBill == null) {
            return this;
        }
        String str = shopBill.productTotal;
        if (str == null) {
            str = this.productTotal;
        }
        Price price = shopBill.total;
        if (price == null) {
            price = this.total;
        }
        return new ShopBill(str, price, shopBill.totalDiscount);
    }

    public ShopBill(String str, Price price, String str2) {
        this.productTotal = str;
        this.total = price;
        this.totalDiscount = str2;
    }
}
