package com.ss.android.ugc.aweme.ecommerce.review.repo.dto;

import X.4q6;
import X.C5902CHa;
import X.C5907CHf;
import X.C5923CHv;
import X.CHN;
import X.CHR;
import X.CI8;
import X.CJI;
import X.CO3;
import X.Lel;
import X.M12;
import android.os.Parcel;
import android.os.Parcelable;
import com.bytedance.covode.number.Covode;
import com.google.gson.a.c;
import com.ss.android.ugc.aweme.ecommerce.pdp.repository.dto.BrickStyle;
import com.ss.android.ugc.aweme.ecommerce.service.vo.Image;
import java.util.List;
import java.util.Objects;

public final class ReviewItemStruct implements Parcelable, CJI {
    public static final Parcelable.Creator<ReviewItemStruct> CREATOR = new C5923CHv();
    @c(LIZ = "review")
    public final MainReview LIZ;
    @c(LIZ = "sku_specification")
    public final String LIZIZ;
    @c(LIZ = "sku_id")
    public final String LIZJ;
    @c(LIZ = "digg_count")
    public final Integer LIZLLL;
    @c(LIZ = "is_digged")
    public final Boolean LJ;
    @c(LIZ = "is_owner")
    public final Boolean LJFF;
    @c(LIZ = "review_user")
    public final User LJI;
    @c(LIZ = "review_tags")
    public final List<ReviewTags> LJII;
    @c(LIZ = "is_anonymous")
    public final Boolean LJIIIIZZ;
    public int LJIIIZ;

    static {
        Covode.recordClassIndex(72199);
    }

    private ReviewItemStruct LIZ(MainReview mainReview, String str, String str2, Integer num, Boolean bool, Boolean bool2, User user, List<ReviewTags> list, Boolean bool3) {
        MainReview mainReview2 = mainReview;
        String str3 = str2;
        M12.LIZ(mainReview2, str3);
        return new ReviewItemStruct(mainReview2, str, str3, num, bool, bool2, user, list, bool3);
    }

    public static /* synthetic */ ReviewItemStruct LIZ(ReviewItemStruct reviewItemStruct, Integer num, Boolean bool) {
        ReviewItemStruct reviewItemStruct2 = reviewItemStruct;
        return reviewItemStruct2.LIZ(reviewItemStruct2.LIZ, reviewItemStruct2.LIZIZ, reviewItemStruct2.LIZJ, num, bool, reviewItemStruct2.LJFF, reviewItemStruct2.LJI, reviewItemStruct2.LJII, reviewItemStruct2.LJIIIIZZ);
    }

    private Object[] LIZJ() {
        return new Object[]{this.LIZ, this.LIZIZ, this.LIZJ, this.LIZLLL, this.LJ, this.LJFF, this.LJI, this.LJII, this.LJIIIIZZ};
    }

    public final BrickStyle LIZIZ() {
        return null;
    }

    public final int describeContents() {
        return 0;
    }

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

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

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

    public final void writeToParcel(Parcel parcel, int i) {
        M12.LIZ(parcel);
        this.LIZ.writeToParcel(parcel, 0);
        parcel.writeString(this.LIZIZ);
        parcel.writeString(this.LIZJ);
        Integer num = this.LIZLLL;
        if (num != null) {
            parcel.writeInt(1);
            parcel.writeInt(num.intValue());
        } else {
            parcel.writeInt(0);
        }
        Boolean bool = this.LJ;
        if (bool != null) {
            parcel.writeInt(1);
            parcel.writeInt(bool.booleanValue() ? 1 : 0);
        } else {
            parcel.writeInt(0);
        }
        Boolean bool2 = this.LJFF;
        if (bool2 != null) {
            parcel.writeInt(1);
            parcel.writeInt(bool2.booleanValue() ? 1 : 0);
        } else {
            parcel.writeInt(0);
        }
        User user = this.LJI;
        if (user != null) {
            parcel.writeInt(1);
            user.writeToParcel(parcel, 0);
        } else {
            parcel.writeInt(0);
        }
        List<ReviewTags> list = this.LJII;
        if (list != null) {
            parcel.writeInt(1);
            parcel.writeInt(list.size());
            for (ReviewTags writeToParcel : list) {
                writeToParcel.writeToParcel(parcel, 0);
            }
        } else {
            parcel.writeInt(0);
        }
        Boolean bool3 = this.LJIIIIZZ;
        if (bool3 != null) {
            parcel.writeInt(1);
            parcel.writeInt(bool3.booleanValue() ? 1 : 0);
            return;
        }
        parcel.writeInt(0);
    }

    public final int LIZ() {
        return this.LJIIIZ;
    }

    public static final class User implements Parcelable {
        public static final Parcelable.Creator<User> CREATOR = new CI8();
        @c(LIZ = "user_id")
        public final String LIZ;
        @c(LIZ = "name")
        public final String LIZIZ;
        @c(LIZ = "avatar")
        public final Image LIZJ;
        @c(LIZ = "link")
        public final String LIZLLL;

        static {
            Covode.recordClassIndex(72207);
        }

        private Object[] LIZ() {
            return new Object[]{this.LIZ, this.LIZIZ, this.LIZJ, this.LIZLLL};
        }

        public final int describeContents() {
            return 0;
        }

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

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

        public final String toString() {
            return M12.LIZ("ReviewItemStruct$User:%s,%s,%s,%s", LIZ());
        }

        public final void writeToParcel(Parcel parcel, int i) {
            M12.LIZ(parcel);
            parcel.writeString(this.LIZ);
            parcel.writeString(this.LIZIZ);
            parcel.writeParcelable(this.LIZJ, i);
            parcel.writeString(this.LIZLLL);
        }

        public /* synthetic */ User() {
            this((String) null, (String) null, (Image) null, (String) null);
        }

        public User(String str, String str2, Image image, String str3) {
            this.LIZ = str;
            this.LIZIZ = str2;
            this.LIZJ = image;
            this.LIZLLL = str3;
        }
    }

    public static final class AppendReview implements Parcelable {
        public static final Parcelable.Creator<AppendReview> CREATOR = new CHR();
        @c(LIZ = "text")
        public final String LIZ;
        @c(LIZ = "images")
        public final List<Image> LIZIZ;
        @c(LIZ = "days_from_purchase")
        public final String LIZJ;
        @c(LIZ = "reply_append_review")
        public final String LIZLLL;

        static {
            Covode.recordClassIndex(72200);
        }

        private Object[] LIZ() {
            return new Object[]{this.LIZ, this.LIZIZ, this.LIZJ, this.LIZLLL};
        }

        public final int describeContents() {
            return 0;
        }

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

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

        public final String toString() {
            return M12.LIZ("ReviewItemStruct$AppendReview:%s,%s,%s,%s", LIZ());
        }

        public final void writeToParcel(Parcel parcel, int i) {
            M12.LIZ(parcel);
            parcel.writeString(this.LIZ);
            List<Image> list = this.LIZIZ;
            parcel.writeInt(list.size());
            for (Image writeParcelable : list) {
                parcel.writeParcelable(writeParcelable, i);
            }
            parcel.writeString(this.LIZJ);
            parcel.writeString(this.LIZLLL);
        }

        public /* synthetic */ AppendReview() {
            this("", Lel.INSTANCE, "", (String) null);
        }

        public AppendReview(String str, List<Image> list, String str2, String str3) {
            M12.LIZ(str, list, str2);
            this.LIZ = str;
            this.LIZIZ = list;
            this.LIZJ = str2;
            this.LIZLLL = str3;
        }
    }

    public static final class MainReview implements Parcelable {
        public static final Parcelable.Creator<MainReview> CREATOR = new CHN();
        @c(LIZ = "review_id")
        public final String LIZ;
        @c(LIZ = "rating")
        public final String LIZIZ;
        @c(LIZ = "display_text")
        public final String LIZJ;
        @c(LIZ = "images")
        public final List<Image> LIZLLL;
        @c(LIZ = "review_timestamp")
        public final String LJ;
        @c(LIZ = "append_review")
        public final AppendReview LJFF;
        @c(LIZ = "reply_main_review")
        public final String LJI;
        @c(LIZ = "has_origin_text")
        public final boolean LJII;
        @c(LIZ = "display_review_text")
        public final List<DisplayReviewText> LJIIIIZZ;

        static {
            Covode.recordClassIndex(72205);
        }

        private Object[] LIZLLL() {
            return new Object[]{this.LIZ, this.LIZIZ, this.LIZJ, this.LIZLLL, this.LJ, this.LJFF, this.LJI, Boolean.valueOf(this.LJII), this.LJIIIIZZ};
        }

        public final int describeContents() {
            return 0;
        }

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

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

        public final String toString() {
            return M12.LIZ("ReviewItemStruct$MainReview:%s,%s,%s,%s,%s,%s,%s,%s,%s", LIZLLL());
        }

        public final void writeToParcel(Parcel parcel, int i) {
            M12.LIZ(parcel);
            parcel.writeString(this.LIZ);
            parcel.writeString(this.LIZIZ);
            parcel.writeString(this.LIZJ);
            List<Image> list = this.LIZLLL;
            if (list != null) {
                parcel.writeInt(1);
                parcel.writeInt(list.size());
                for (Image writeParcelable : list) {
                    parcel.writeParcelable(writeParcelable, i);
                }
            } else {
                parcel.writeInt(0);
            }
            parcel.writeString(this.LJ);
            AppendReview appendReview = this.LJFF;
            if (appendReview != null) {
                parcel.writeInt(1);
                appendReview.writeToParcel(parcel, 0);
            } else {
                parcel.writeInt(0);
            }
            parcel.writeString(this.LJI);
            parcel.writeInt(this.LJII ? 1 : 0);
            List<DisplayReviewText> list2 = this.LJIIIIZZ;
            if (list2 != null) {
                parcel.writeInt(1);
                parcel.writeInt(list2.size());
                for (DisplayReviewText writeToParcel : list2) {
                    writeToParcel.writeToParcel(parcel, 0);
                }
                return;
            }
            parcel.writeInt(0);
        }

        public final boolean LIZ() {
            if (LIZIZ() || LIZJ()) {
                return true;
            }
            return false;
        }

        public final boolean LIZIZ() {
            if (!4q6.LIZ(this.LIZJ) || !this.LJII) {
                return false;
            }
            return true;
        }

        public final boolean LIZJ() {
            List<Image> list = this.LIZLLL;
            if (list == null || !(!list.isEmpty())) {
                return false;
            }
            return true;
        }

        public /* synthetic */ MainReview() {
            this("", "0", (String) null, (List<Image>) null, "0", (AppendReview) null, (String) null, false, (List<DisplayReviewText>) null);
        }

        public MainReview(String str, String str2, String str3, List<Image> list, String str4, AppendReview appendReview, String str5, boolean z, List<DisplayReviewText> list2) {
            M12.LIZ(str, str2, str4);
            this.LIZ = str;
            this.LIZIZ = str2;
            this.LIZJ = str3;
            this.LIZLLL = list;
            this.LJ = str4;
            this.LJFF = appendReview;
            this.LJI = str5;
            this.LJII = z;
            this.LJIIIIZZ = list2;
        }
    }

    public /* synthetic */ ReviewItemStruct() {
        this(new MainReview(), (String) null, "", (Integer) null, (Boolean) null, (Boolean) null, (User) null, (List<ReviewTags>) null, (Boolean) null);
    }

    public static final class DisplayReviewText implements Parcelable {
        public static final Parcelable.Creator<DisplayReviewText> CREATOR = new C5902CHa();
        public static final C5907CHf LJ = new C5907CHf((byte) 0);
        @c(LIZ = "text_type")
        public final int LIZ;
        @c(LIZ = "plain_text")
        public final String LIZIZ;
        @c(LIZ = "tag_key")
        public final String LIZJ;
        @c(LIZ = "tag_text")
        public final String LIZLLL;

        static {
            Covode.recordClassIndex(72202);
        }

        private Object[] LIZ() {
            return new Object[]{Integer.valueOf(this.LIZ), this.LIZIZ, this.LIZJ, this.LIZLLL};
        }

        public final int describeContents() {
            return 0;
        }

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

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

        public final String toString() {
            return M12.LIZ("ReviewItemStruct$DisplayReviewText:%s,%s,%s,%s", LIZ());
        }

        public final void writeToParcel(Parcel parcel, int i) {
            M12.LIZ(parcel);
            parcel.writeInt(this.LIZ);
            parcel.writeString(this.LIZIZ);
            parcel.writeString(this.LIZJ);
            parcel.writeString(this.LIZLLL);
        }

        public DisplayReviewText(int i, String str, String str2, String str3) {
            this.LIZ = i;
            this.LIZIZ = str;
            this.LIZJ = str2;
            this.LIZLLL = str3;
        }
    }

    public ReviewItemStruct(MainReview mainReview, String str, String str2, Integer num, Boolean bool, Boolean bool2, User user, List<ReviewTags> list, Boolean bool3) {
        M12.LIZ(mainReview, str2);
        this.LIZ = mainReview;
        this.LIZIZ = str;
        this.LIZJ = str2;
        this.LIZLLL = num;
        this.LJ = bool;
        this.LJFF = bool2;
        this.LJI = user;
        this.LJII = list;
        this.LJIIIIZZ = bool3;
        this.LJIIIZ = CO3.REVIEW.getValue();
    }
}
