得物.apk(点击下载) / LiveSelloutLampMessage.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.google.protobuf.RepeatedFieldBuilderV3;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.shizhuang.duapp.message.LiveSelloutLampMessageProto;
import com.shizhuang.duapp.modules.live.common.model.live.LiveSelloutLampSubModel;
import com.shizhuang.duapp.modules.live.common.model.user.LiveLiteUserModel;
import java.util.ArrayList;
import java.util.List;
import org.jetbrains.annotations.Nullable;

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

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

        @Override // android.os.Parcelable.Creator
        public LiveSelloutLampMessage[] newArray(int i) {
            PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 198516, new Class[]{Integer.TYPE}, LiveSelloutLampMessage[].class);
            return proxy.isSupported ? (LiveSelloutLampMessage[]) proxy.result : new LiveSelloutLampMessage[i];
        }
    };
    public static ChangeQuickRedirect changeQuickRedirect;
    public String content;
    public List<LiveSelloutLampSubModel> list;
    public Long spuId;

    public LiveSelloutLampMessage() {
        this.category = 64;
        this.priorityLevel = MessageLevel.WHITE_LIST.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, 198510, 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, 198514, new Class[]{Integer.TYPE}, BaseLiveChatMessage.class);
        if (proxy.isSupported) {
            return (BaseLiveChatMessage) proxy.result;
        }
        LiveLiteUserModel liveLiteUserModel = new LiveLiteUserModel();
        this.userInfo = liveLiteUserModel;
        liveLiteUserModel.userId = "1792220164";
        liveLiteUserModel.userName = "叶落落落落落";
        liveLiteUserModel.icon = "https://qiniu.dewucdn.com/FshWfBCVKCxQo8wKvgYQByUjpNmU";
        this.content = "叶落落落落购买了吴磊同款6371";
        this.spuId = 1857825L;
        return this;
    }

    public void setParamsByProtoBody(LiveSelloutLampMessageProto.LiveSelloutLampMessage liveSelloutLampMessage) {
        if (!PatchProxy.proxy(new Object[]{liveSelloutLampMessage}, this, changeQuickRedirect, false, 198512, new Class[]{LiveSelloutLampMessageProto.LiveSelloutLampMessage.class}, Void.TYPE).isSupported) {
            ArrayList arrayList = new ArrayList();
            for (int i = 0; i < liveSelloutLampMessage.getListList().size(); i++) {
                arrayList.add(new LiveSelloutLampSubModel(liveSelloutLampMessage.getListList().get(i)));
            }
            this.list = arrayList;
        }
    }

    @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, 198511, new Class[]{Parcel.class, Integer.TYPE}, Void.TYPE).isSupported) {
            super.writeToParcel(parcel, i);
            parcel.writeTypedList(this.list);
        }
    }

    @Override // com.shizhuang.duapp.modules.live.common.model.live.message.BaseLiveChatMessage
    public LiveSelloutLampMessageProto.LiveSelloutLampMessage toProtoMessage() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 198513, new Class[0], LiveSelloutLampMessageProto.LiveSelloutLampMessage.class);
        if (proxy.isSupported) {
            return (LiveSelloutLampMessageProto.LiveSelloutLampMessage) proxy.result;
        }
        LiveSelloutLampMessageProto.LiveSelloutLampMessage.b newBuilder = LiveSelloutLampMessageProto.LiveSelloutLampMessage.newBuilder();
        if (this.list == null) {
            this.list = new ArrayList();
        }
        for (int i = 0; i < this.list.size(); i++) {
            LiveSelloutLampMessageProto.LiveSelloutLampSubMessage protoMessage = this.list.get(i).toProtoMessage();
            PatchProxyResult proxy2 = PatchProxy.proxy(new Object[]{new Integer(i), protoMessage}, newBuilder, LiveSelloutLampMessageProto.LiveSelloutLampMessage.b.changeQuickRedirect, false, 55710, new Class[]{Integer.TYPE, LiveSelloutLampMessageProto.LiveSelloutLampSubMessage.class}, LiveSelloutLampMessageProto.LiveSelloutLampMessage.b.class);
            if (proxy2.isSupported) {
                LiveSelloutLampMessageProto.LiveSelloutLampMessage.b bVar = (LiveSelloutLampMessageProto.LiveSelloutLampMessage.b) proxy2.result;
            } else {
                RepeatedFieldBuilderV3<LiveSelloutLampMessageProto.LiveSelloutLampSubMessage, LiveSelloutLampMessageProto.LiveSelloutLampSubMessage.b, LiveSelloutLampMessageProto.LiveSelloutLampSubMessageOrBuilder> repeatedFieldBuilderV3 = newBuilder.d;
                if (repeatedFieldBuilderV3 == null) {
                    newBuilder.h();
                    newBuilder.f10603c.set(i, protoMessage);
                    newBuilder.onChanged();
                } else {
                    repeatedFieldBuilderV3.setMessage(i, protoMessage);
                }
            }
        }
        return newBuilder.build();
    }

    public LiveSelloutLampMessage(String str, Long l) {
        this.category = 64;
        this.priorityLevel = MessageLevel.WHITE_LIST.getLevel();
        this.content = str;
        this.spuId = l;
    }

    public LiveSelloutLampMessage(Parcel parcel) {
        super(parcel);
        this.list = parcel.createTypedArrayList(LiveSelloutLampSubModel.CREATOR);
    }

    public LiveSelloutLampMessage(byte[] bArr) {
        try {
            setParamsByProtoBody(LiveSelloutLampMessageProto.LiveSelloutLampMessage.parseFrom(bArr));
        } catch (InvalidProtocolBufferException e) {
            e.printStackTrace();
        }
    }

    public LiveSelloutLampMessage(LiveSelloutLampMessageProto.LiveSelloutLampMessage liveSelloutLampMessage) {
        setParamsByProtoBody(liveSelloutLampMessage);
    }
}