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


package com.shizhuang.duapp.modules.live.common.model.live.message;

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.DemandCommentMessageProto;
import org.jetbrains.annotations.Nullable;

public class DemandCommentMessage extends BaseLiveChatMessage {
    public static final Parcelable.Creator<DemandCommentMessage> CREATOR = new Parcelable.Creator<DemandCommentMessage>() {
        /* class com.shizhuang.duapp.modules.live.common.model.live.message.DemandCommentMessage.AnonymousClass1 */
        public static ChangeQuickRedirect changeQuickRedirect;

        @Override // android.os.Parcelable.Creator
        public DemandCommentMessage createFromParcel(Parcel parcel) {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[]{parcel}, this, changeQuickRedirect, false, 198250, new Class[]{Parcel.class}, DemandCommentMessage.class);
            return proxy.isSupported ? (DemandCommentMessage) proxy.result : new DemandCommentMessage(parcel);
        }

        @Override // android.os.Parcelable.Creator
        public DemandCommentMessage[] newArray(int i) {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 198251, new Class[]{Integer.TYPE}, DemandCommentMessage[].class);
            return proxy.isSupported ? (DemandCommentMessage[]) proxy.result : new DemandCommentMessage[i];
        }
    };
    public static ChangeQuickRedirect changeQuickRedirect;
    public String logoUrl;
    public Long productId;
    public Long propertyValueId;
    public String title;

    public DemandCommentMessage() {
        this.category = 109;
        this.priorityLevel = MessageLevel.HIGH.getLevel();
    }

    @Override // com.shizhuang.duapp.modules.live.common.model.live.message.BaseLiveChatMessage
    public int describeContents() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 198246, new Class[0], Integer.TYPE);
        if (proxy.isSupported) {
            return ((Integer) proxy.result).intValue();
        }
        return 0;
    }

    @Override // com.shizhuang.duapp.modules.live.common.model.live.message.MockInterface
    @Nullable
    public BaseLiveChatMessage mock(int i) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 198249, new Class[]{Integer.TYPE}, BaseLiveChatMessage.class);
        if (proxy.isSupported) {
            return (BaseLiveChatMessage) proxy.result;
        }
        this.productId = 1055752L;
        this.propertyValueId = 0L;
        this.logoUrl = "https://cdn.poizon.com/source-img/origin-img/20201204/4c993537327f41e9bb2d75e87821ad10.jpg";
        this.title = "【618推荐】【陈小春同款】CASIO 卡西欧 简约运动防水 复古经典小方块 学生男女小银块 日韩表 银色 A158WA-1";
        return this;
    }

    @Override // com.shizhuang.duapp.modules.live.common.model.live.message.BaseLiveChatMessage
    public void writeToParcel(Parcel parcel, int i) {
        if (!PatchProxy.proxy(new Object[]{parcel, new Integer(i)}, this, changeQuickRedirect, false, 198247, new Class[]{Parcel.class, Integer.TYPE}, Void.TYPE).isSupported) {
            super.writeToParcel(parcel, i);
            parcel.writeString(this.title);
            parcel.writeString(this.logoUrl);
            parcel.writeValue(this.productId);
            parcel.writeValue(this.propertyValueId);
        }
    }

    @Override // com.shizhuang.duapp.modules.live.common.model.live.message.BaseLiveChatMessage
    public DemandCommentMessageProto.DemandCommentMessage toProtoMessage() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 198248, new Class[0], DemandCommentMessageProto.DemandCommentMessage.class);
        if (proxy.isSupported) {
            return (DemandCommentMessageProto.DemandCommentMessage) proxy.result;
        }
        DemandCommentMessageProto.DemandCommentMessage.b newBuilder = DemandCommentMessageProto.DemandCommentMessage.newBuilder();
        Long l = this.productId;
        long j = 0;
        DemandCommentMessageProto.DemandCommentMessage.b n = newBuilder.n(l == null ? 0 : l.longValue());
        String str = this.title;
        String str2 = "";
        if (str == null) {
            str = str2;
        }
        PatchProxyResult proxy2 = PatchProxy.proxy(new Object[]{str}, n, DemandCommentMessageProto.DemandCommentMessage.b.changeQuickRedirect, false, 53970, new Class[]{String.class}, DemandCommentMessageProto.DemandCommentMessage.b.class);
        if (proxy2.isSupported) {
            n = (DemandCommentMessageProto.DemandCommentMessage.b) proxy2.result;
        } else {
            n.f10573c = str;
            n.onChanged();
        }
        Long l12 = this.propertyValueId;
        if (l12 != null) {
            j = l12.longValue();
        }
        DemandCommentMessageProto.DemandCommentMessage.b o = n.o(j);
        String str3 = this.logoUrl;
        if (str3 != null) {
            str2 = str3;
        }
        PatchProxyResult proxy3 = PatchProxy.proxy(new Object[]{str2}, o, DemandCommentMessageProto.DemandCommentMessage.b.changeQuickRedirect, false, 53978, new Class[]{String.class}, DemandCommentMessageProto.DemandCommentMessage.b.class);
        if (proxy3.isSupported) {
            o = (DemandCommentMessageProto.DemandCommentMessage.b) proxy3.result;
        } else {
            o.e = str2;
            o.onChanged();
        }
        return o.build();
    }

    public DemandCommentMessage(Parcel parcel) {
        super(parcel);
        this.title = parcel.readString();
        this.logoUrl = parcel.readString();
        this.productId = (Long) parcel.readValue(Long.class.getClassLoader());
        this.productId = (Long) parcel.readValue(Long.class.getClassLoader());
    }

    public DemandCommentMessage(DemandCommentMessageProto.DemandCommentMessage demandCommentMessage) {
        this.productId = Long.valueOf(demandCommentMessage.getProductId());
        this.title = demandCommentMessage.getTitle();
        this.propertyValueId = Long.valueOf(demandCommentMessage.getPropertyValueId());
        this.logoUrl = demandCommentMessage.getLogoUrl();
    }

    public DemandCommentMessage(byte[] bArr) {
        try {
            DemandCommentMessageProto.DemandCommentMessage parseFrom = DemandCommentMessageProto.DemandCommentMessage.parseFrom(bArr);
            this.productId = Long.valueOf(parseFrom.getProductId());
            this.title = parseFrom.getTitle();
            this.propertyValueId = Long.valueOf(parseFrom.getPropertyValueId());
            this.logoUrl = parseFrom.getLogoUrl();
        } catch (InvalidProtocolBufferException e) {
            e.printStackTrace();
        }
    }
}