得物.apk(点击下载) / LuckyCatInfoMessage.java


package com.shizhuang.duapp.modules.live.biz_lucky_cat.im;

import android.os.Parcel;
import android.os.Parcelable;
import com.goim.bootstrap.core.config.MessageLevel;
import com.google.protobuf.InvalidProtocolBufferException;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.shizhuang.duapp.message.LuckyCatInfoMessageProto;
import com.shizhuang.duapp.modules.live.common.model.live.message.BaseLiveChatMessage;
import com.shizhuang.duapp.modules.live.common.test.IMTest;
import fd0.c;
import kotlin.Metadata;
import kotlin.jvm.JvmStatic;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlinx.android.parcel.Parcelize;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@Parcelize
@Metadata(bv = {}, d1 = {"\u0000J\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\t\n\u0002\b\f\n\u0002\u0010\u000b\n\u0002\b\u0005\n\u0002\u0010\u000e\n\u0002\b\t\n\u0002\u0010\u0012\n\u0002\b\u0005\b\u0007\u0018\u0000 /2\u00020\u00012\u00020\u0002:\u00010BC\u0012\n\b\u0002\u0010\u0010\u001a\u0004\u0018\u00010\u000f\u0012\n\b\u0002\u0010\u0016\u001a\u0004\u0018\u00010\u000f\u0012\n\b\u0002\u0010\u0019\u001a\u0004\u0018\u00010\u000f\u0012\n\b\u0002\u0010\u001d\u001a\u0004\u0018\u00010\u001c\u0012\n\b\u0002\u0010#\u001a\u0004\u0018\u00010\"¢\u0006\u0004\b)\u0010*B\u0011\b\u0016\u0012\u0006\u0010\u0005\u001a\u00020\u0003¢\u0006\u0004\b)\u0010+B\u0011\b\u0016\u0012\u0006\u0010-\u001a\u00020,¢\u0006\u0004\b)\u0010.J\b\u0010\u0004\u001a\u00020\u0003H\u0016J\u000e\u0010\u0007\u001a\u00020\u00062\u0006\u0010\u0005\u001a\u00020\u0003J\u0012\u0010\n\u001a\u0004\u0018\u00010\u00012\u0006\u0010\t\u001a\u00020\bH\u0016J\u0019\u0010\u000e\u001a\u00020\u00062\u0006\u0010\f\u001a\u00020\u000b2\u0006\u0010\r\u001a\u00020\bHÖ\u0001R$\u0010\u0010\u001a\u0004\u0018\u00010\u000f8\u0006@\u0006X†\u000e¢\u0006\u0012\n\u0004\b\u0010\u0010\u0011\u001a\u0004\b\u0012\u0010\u0013\"\u0004\b\u0014\u0010\u0015R$\u0010\u0016\u001a\u0004\u0018\u00010\u000f8\u0006@\u0006X†\u000e¢\u0006\u0012\n\u0004\b\u0016\u0010\u0011\u001a\u0004\b\u0017\u0010\u0013\"\u0004\b\u0018\u0010\u0015R$\u0010\u0019\u001a\u0004\u0018\u00010\u000f8\u0006@\u0006X†\u000e¢\u0006\u0012\n\u0004\b\u0019\u0010\u0011\u001a\u0004\b\u001a\u0010\u0013\"\u0004\b\u001b\u0010\u0015R$\u0010\u001d\u001a\u0004\u0018\u00010\u001c8\u0006@\u0006X†\u000e¢\u0006\u0012\n\u0004\b\u001d\u0010\u001e\u001a\u0004\b\u001d\u0010\u001f\"\u0004\b \u0010!R$\u0010#\u001a\u0004\u0018\u00010\"8\u0006@\u0006X†\u000e¢\u0006\u0012\n\u0004\b#\u0010$\u001a\u0004\b%\u0010&\"\u0004\b'\u0010(¨\u00061"}, d2 = {"Lcom/shizhuang/duapp/modules/live/biz_lucky_cat/im/LuckyCatInfoMessage;", "Lcom/shizhuang/duapp/modules/live/common/model/live/message/BaseLiveChatMessage;", "Landroid/os/Parcelable;", "Lcom/shizhuang/duapp/message/LuckyCatInfoMessageProto$LuckyCatInfoMessage;", "toProtoMessage", "proto", "", "setParamsByProtoBody", "", "ct", "mock", "Landroid/os/Parcel;", "parcel", "flags", "writeToParcel", "", "curScore", "Ljava/lang/Long;", "getCurScore", "()Ljava/lang/Long;", "setCurScore", "(Ljava/lang/Long;)V", "totalScore", "getTotalScore", "setTotalScore", "activityId", "getActivityId", "setActivityId", "", "isGold", "Ljava/lang/Boolean;", "()Ljava/lang/Boolean;", "setGold", "(Ljava/lang/Boolean;)V", "", "h5Url", "Ljava/lang/String;", "getH5Url", "()Ljava/lang/String;", "setH5Url", "(Ljava/lang/String;)V", "<init>", "(Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Boolean;Ljava/lang/String;)V", "(Lcom/shizhuang/duapp/message/LuckyCatInfoMessageProto$LuckyCatInfoMessage;)V", "", "bytes", "([B)V", "Companion", "a", "du_live_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: LuckyCatInfoMessage.kt */
public final class LuckyCatInfoMessage extends BaseLiveChatMessage {
    public static final Parcelable.Creator<LuckyCatInfoMessage> CREATOR = new b();
    @NotNull
    public static final a Companion = new a(null);
    public static ChangeQuickRedirect changeQuickRedirect;
    @Nullable
    private Long activityId;
    @Nullable
    private Long curScore;
    @Nullable
    private String h5Url;
    @Nullable
    private Boolean isGold;
    @Nullable
    private Long totalScore;

    /* compiled from: LuckyCatInfoMessage.kt */
    public static final class a {
        public static ChangeQuickRedirect changeQuickRedirect;

        public a(DefaultConstructorMarker defaultConstructorMarker) {
        }
    }

    public static final class b implements Parcelable.Creator<LuckyCatInfoMessage> {
        public static ChangeQuickRedirect changeQuickRedirect;

        /* Return type fixed from 'java.lang.Object' to match base method */
        @Override // android.os.Parcelable.Creator
        public LuckyCatInfoMessage createFromParcel(Parcel parcel) {
            Boolean bool;
            boolean z = true;
            PatchProxyResult proxy = PatchProxy.proxy(new Object[]{parcel}, this, changeQuickRedirect, false, 191275, new Class[]{Parcel.class}, LuckyCatInfoMessage.class);
            if (proxy.isSupported) {
                return (LuckyCatInfoMessage) proxy.result;
            }
            Long valueOf = parcel.readInt() != 0 ? Long.valueOf(parcel.readLong()) : null;
            Long valueOf2 = parcel.readInt() != 0 ? Long.valueOf(parcel.readLong()) : null;
            Long valueOf3 = parcel.readInt() != 0 ? Long.valueOf(parcel.readLong()) : null;
            if (parcel.readInt() != 0) {
                if (parcel.readInt() == 0) {
                    z = false;
                }
                bool = Boolean.valueOf(z);
            } else {
                bool = null;
            }
            return new LuckyCatInfoMessage(valueOf, valueOf2, valueOf3, bool, parcel.readString());
        }

        /* Return type fixed from 'java.lang.Object[]' to match base method */
        @Override // android.os.Parcelable.Creator
        public LuckyCatInfoMessage[] newArray(int i) {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 191274, new Class[]{Integer.TYPE}, LuckyCatInfoMessage[].class);
            return proxy.isSupported ? (LuckyCatInfoMessage[]) proxy.result : new LuckyCatInfoMessage[i];
        }
    }

    public LuckyCatInfoMessage() {
        this(null, null, null, null, null, 31, null);
    }

    /* JADX INFO: this call moved to the top of the method (can break code semantics) */
    public /* synthetic */ LuckyCatInfoMessage(Long l, Long l12, Long l13, Boolean bool, String str, int i, DefaultConstructorMarker defaultConstructorMarker) {
        this((i & 1) != 0 ? 0L : l, (i & 2) != 0 ? 0L : l12, (i & 4) == 0 ? l13 : 0L, (i & 8) != 0 ? Boolean.FALSE : bool, (i & 16) != 0 ? "" : str);
    }

    @JvmStatic
    @Nullable
    public static final LuckyCatInfoMessage toProtoMessage(@NotNull byte[] bArr) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{bArr}, null, changeQuickRedirect, true, 191272, new Class[]{byte[].class}, LuckyCatInfoMessage.class);
        if (proxy.isSupported) {
            return (LuckyCatInfoMessage) proxy.result;
        }
        Object[] objArr = {bArr};
        PatchProxyResult proxy2 = PatchProxy.proxy(objArr, Companion, a.changeQuickRedirect, false, 191273, new Class[]{byte[].class}, LuckyCatInfoMessage.class);
        if (proxy2.isSupported) {
            return (LuckyCatInfoMessage) proxy2.result;
        }
        try {
            return new LuckyCatInfoMessage(LuckyCatInfoMessageProto.LuckyCatInfoMessage.parseFrom(bArr));
        } catch (InvalidProtocolBufferException e) {
            e.printStackTrace();
            return null;
        }
    }

    @Nullable
    public final Long getActivityId() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 191265, new Class[0], Long.class);
        return proxy.isSupported ? (Long) proxy.result : this.activityId;
    }

    @Nullable
    public final Long getCurScore() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 191261, new Class[0], Long.class);
        return proxy.isSupported ? (Long) proxy.result : this.curScore;
    }

    @Nullable
    public final String getH5Url() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 191269, new Class[0], String.class);
        return proxy.isSupported ? (String) proxy.result : this.h5Url;
    }

    @Nullable
    public final Long getTotalScore() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 191263, new Class[0], Long.class);
        return proxy.isSupported ? (Long) proxy.result : this.totalScore;
    }

    @Nullable
    public final Boolean isGold() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 191267, new Class[0], Boolean.class);
        return proxy.isSupported ? (Boolean) proxy.result : this.isGold;
    }

    @Override // com.shizhuang.duapp.modules.live.common.model.live.message.MockInterface
    @Nullable
    public BaseLiveChatMessage mock(int i) {
        boolean z = true;
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 191260, new Class[]{Integer.TYPE}, BaseLiveChatMessage.class);
        if (proxy.isSupported) {
            return (BaseLiveChatMessage) proxy.result;
        }
        this.totalScore = 1000L;
        IMTest iMTest = IMTest.f18606a;
        this.curScore = Long.valueOf((long) iMTest.c().nextInt(1000));
        if (iMTest.c().nextInt(2) != 1) {
            z = false;
        }
        this.isGold = Boolean.valueOf(z);
        this.activityId = 1000L;
        this.h5Url = "http://www.baidu.com";
        return this;
    }

    public final void setActivityId(@Nullable Long l) {
        if (!PatchProxy.proxy(new Object[]{l}, this, changeQuickRedirect, false, 191266, new Class[]{Long.class}, Void.TYPE).isSupported) {
            this.activityId = l;
        }
    }

    public final void setCurScore(@Nullable Long l) {
        if (!PatchProxy.proxy(new Object[]{l}, this, changeQuickRedirect, false, 191262, new Class[]{Long.class}, Void.TYPE).isSupported) {
            this.curScore = l;
        }
    }

    public final void setGold(@Nullable Boolean bool) {
        if (!PatchProxy.proxy(new Object[]{bool}, this, changeQuickRedirect, false, 191268, new Class[]{Boolean.class}, Void.TYPE).isSupported) {
            this.isGold = bool;
        }
    }

    public final void setH5Url(@Nullable String str) {
        if (!PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 191270, new Class[]{String.class}, Void.TYPE).isSupported) {
            this.h5Url = str;
        }
    }

    public final void setParamsByProtoBody(@NotNull LuckyCatInfoMessageProto.LuckyCatInfoMessage luckyCatInfoMessage) {
        if (!PatchProxy.proxy(new Object[]{luckyCatInfoMessage}, this, changeQuickRedirect, false, 191259, new Class[]{LuckyCatInfoMessageProto.LuckyCatInfoMessage.class}, Void.TYPE).isSupported) {
            this.curScore = Long.valueOf(luckyCatInfoMessage.getCurScore());
            this.totalScore = Long.valueOf(luckyCatInfoMessage.getTotalScore());
            this.activityId = Long.valueOf(luckyCatInfoMessage.getActivityId());
            this.isGold = Boolean.valueOf(luckyCatInfoMessage.getIsGold());
            this.h5Url = luckyCatInfoMessage.getH5Url();
        }
    }

    public final void setTotalScore(@Nullable Long l) {
        if (!PatchProxy.proxy(new Object[]{l}, this, changeQuickRedirect, false, 191264, new Class[]{Long.class}, Void.TYPE).isSupported) {
            this.totalScore = l;
        }
    }

    @Override // com.shizhuang.duapp.modules.live.common.model.live.message.BaseLiveChatMessage
    public void writeToParcel(@NotNull Parcel parcel, int i) {
        if (!PatchProxy.proxy(new Object[]{parcel, new Integer(i)}, this, changeQuickRedirect, false, 191271, new Class[]{Parcel.class, Integer.TYPE}, Void.TYPE).isSupported) {
            Long l = this.curScore;
            if (l != null) {
                gy.a.p(parcel, 1, l);
            } else {
                parcel.writeInt(0);
            }
            Long l12 = this.totalScore;
            if (l12 != null) {
                gy.a.p(parcel, 1, l12);
            } else {
                parcel.writeInt(0);
            }
            Long l13 = this.activityId;
            if (l13 != null) {
                gy.a.p(parcel, 1, l13);
            } else {
                parcel.writeInt(0);
            }
            Boolean bool = this.isGold;
            if (bool != null) {
                c.r(parcel, 1, bool);
            } else {
                parcel.writeInt(0);
            }
            parcel.writeString(this.h5Url);
        }
    }

    public LuckyCatInfoMessage(@Nullable Long l, @Nullable Long l12, @Nullable Long l13, @Nullable Boolean bool, @Nullable String str) {
        this.curScore = l;
        this.totalScore = l12;
        this.activityId = l13;
        this.isGold = bool;
        this.h5Url = str;
        this.category = 2000;
        this.priorityLevel = MessageLevel.HIGH.getLevel();
    }

    @Override // com.shizhuang.duapp.modules.live.common.model.live.message.BaseLiveChatMessage
    @NotNull
    public LuckyCatInfoMessageProto.LuckyCatInfoMessage toProtoMessage() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 191258, new Class[0], LuckyCatInfoMessageProto.LuckyCatInfoMessage.class);
        if (proxy.isSupported) {
            return (LuckyCatInfoMessageProto.LuckyCatInfoMessage) proxy.result;
        }
        LuckyCatInfoMessageProto.LuckyCatInfoMessage.b newBuilder = LuckyCatInfoMessageProto.LuckyCatInfoMessage.newBuilder();
        Long l = this.curScore;
        long j = 0;
        LuckyCatInfoMessageProto.LuckyCatInfoMessage.b n = newBuilder.n(l != null ? l.longValue() : 0);
        Long l12 = this.totalScore;
        LuckyCatInfoMessageProto.LuckyCatInfoMessage.b r = n.r(l12 != null ? l12.longValue() : 0);
        Long l13 = this.activityId;
        if (l13 != null) {
            j = l13.longValue();
        }
        LuckyCatInfoMessageProto.LuckyCatInfoMessage.b m = r.m(j);
        Boolean bool = this.isGold;
        LuckyCatInfoMessageProto.LuckyCatInfoMessage.b p = m.p(bool != null ? bool.booleanValue() : false);
        String str = this.h5Url;
        if (str == null) {
            str = "";
        }
        PatchProxyResult proxy2 = PatchProxy.proxy(new Object[]{str}, p, LuckyCatInfoMessageProto.LuckyCatInfoMessage.b.changeQuickRedirect, false, 56492, new Class[]{String.class}, LuckyCatInfoMessageProto.LuckyCatInfoMessage.b.class);
        if (proxy2.isSupported) {
            p = (LuckyCatInfoMessageProto.LuckyCatInfoMessage.b) proxy2.result;
        } else {
            p.f = str;
            p.onChanged();
        }
        return p.build();
    }

    public LuckyCatInfoMessage(@NotNull LuckyCatInfoMessageProto.LuckyCatInfoMessage luckyCatInfoMessage) {
        this(null, null, null, null, null, 31, null);
        setParamsByProtoBody(luckyCatInfoMessage);
    }

    public LuckyCatInfoMessage(@NotNull byte[] bArr) {
        this(null, null, null, null, null, 31, null);
        try {
            setParamsByProtoBody(LuckyCatInfoMessageProto.LuckyCatInfoMessage.parseFrom(bArr));
        } catch (InvalidProtocolBufferException e) {
            e.printStackTrace();
        }
    }
}