package com.ss.android.ugc.aweme.shortvideo.model;

import X.2HN;
import X.C44216nr;
import X.M12;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import com.bytedance.covode.number.Covode;
import com.google.gson.a.c;
import java.io.Serializable;
import java.util.Objects;
import kotlin.h.b.n;

public final class RecordStickerSegmentInfo implements Parcelable, Serializable {
    public static final Parcelable.Creator<RecordStickerSegmentInfo> CREATOR = new Creator();
    public static final Companion Companion = new Companion((2HN) null);
    @c(LIZ = "is_use_voice_recognize_sticker")
    public boolean isUseVoiceRecognizeSticker;

    public static class Creator implements Parcelable.Creator<RecordStickerSegmentInfo> {
        static {
            Covode.recordClassIndex(111046);
        }

        public final RecordStickerSegmentInfo createFromParcel(Parcel parcel) {
            M12.LIZ(parcel);
            return new RecordStickerSegmentInfo(parcel.readInt() != 0);
        }

        public final RecordStickerSegmentInfo[] newArray(int i) {
            return new RecordStickerSegmentInfo[i];
        }
    }

    static {
        Covode.recordClassIndex(111044);
    }

    public RecordStickerSegmentInfo() {
        this(false, 1, (2HN) null);
    }

    public static final byte[] bundleToBytes(Bundle bundle) {
        return Companion.bundleToBytes(bundle);
    }

    public static final Bundle bytesToBundle(byte[] bArr) {
        return Companion.bytesToBundle(bArr);
    }

    public static /* synthetic */ RecordStickerSegmentInfo copy$default(RecordStickerSegmentInfo recordStickerSegmentInfo, boolean z, int i, Object obj) {
        if ((i & 1) != 0) {
            z = recordStickerSegmentInfo.isUseVoiceRecognizeSticker;
        }
        return recordStickerSegmentInfo.copy(z);
    }

    private Object[] getObjects() {
        return new Object[]{Boolean.valueOf(this.isUseVoiceRecognizeSticker)};
    }

    public static final void register(C44216nr r1) {
        Companion.register(r1);
    }

    public final RecordStickerSegmentInfo copy(boolean z) {
        return new RecordStickerSegmentInfo(z);
    }

    public final int describeContents() {
        return 0;
    }

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

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

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

    public final void writeToParcel(Parcel parcel, int i) {
        M12.LIZ(parcel);
        parcel.writeInt(this.isUseVoiceRecognizeSticker ? 1 : 0);
    }

    public static final class Companion {
        static {
            Covode.recordClassIndex(111045);
        }

        public Companion() {
        }

        public /* synthetic */ Companion(2HN r1) {
            this();
        }

        public final void register(C44216nr r3) {
            M12.LIZ(r3);
            r3.LIZ("extra_key_record_sticker_info", RecordStickerSegmentInfo.class);
        }

        public final byte[] bundleToBytes(Bundle bundle) {
            M12.LIZ(bundle);
            Parcel obtain = Parcel.obtain();
            n.LIZIZ(obtain, "");
            obtain.writeBundle(bundle);
            byte[] marshall = obtain.marshall();
            obtain.recycle();
            return marshall;
        }

        public final Bundle bytesToBundle(byte[] bArr) {
            M12.LIZ(bArr);
            Parcel obtain = Parcel.obtain();
            n.LIZIZ(obtain, "");
            obtain.unmarshall(bArr, 0, bArr.length);
            obtain.setDataPosition(0);
            Bundle readBundle = obtain.readBundle(RecordStickerSegmentInfo.class.getClassLoader());
            obtain.recycle();
            if (readBundle == null) {
                n.LIZIZ();
            }
            return readBundle;
        }
    }

    public final boolean isUseVoiceRecognizeSticker() {
        return this.isUseVoiceRecognizeSticker;
    }

    public final void setUseVoiceRecognizeSticker(boolean z) {
        this.isUseVoiceRecognizeSticker = z;
    }

    public RecordStickerSegmentInfo(boolean z) {
        this.isUseVoiceRecognizeSticker = z;
    }

    /* JADX INFO: this call moved to the top of the method (can break code semantics) */
    public /* synthetic */ RecordStickerSegmentInfo(boolean z, int i, 2HN r4) {
        this((i & 1) != 0 ? false : z);
    }
}
