得物.apk(点击下载) / CommentateGoodMessage.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.CommentateGoodMessageProto;
import com.shizhuang.duapp.modules.live.common.test.IMTest;
import org.jetbrains.annotations.Nullable;
public class CommentateGoodMessage extends BaseLiveChatMessage {
public static final Parcelable.Creator<CommentateGoodMessage> CREATOR = new Parcelable.Creator<CommentateGoodMessage>() {
/* class com.shizhuang.duapp.modules.live.common.model.live.message.CommentateGoodMessage.AnonymousClass1 */
public static ChangeQuickRedirect changeQuickRedirect;
@Override // android.os.Parcelable.Creator
public CommentateGoodMessage createFromParcel(Parcel parcel) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{parcel}, this, changeQuickRedirect, false, 198237, new Class[]{Parcel.class}, CommentateGoodMessage.class);
return proxy.isSupported ? (CommentateGoodMessage) proxy.result : new CommentateGoodMessage(parcel);
}
@Override // android.os.Parcelable.Creator
public CommentateGoodMessage[] newArray(int i) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 198238, new Class[]{Integer.TYPE}, CommentateGoodMessage[].class);
return proxy.isSupported ? (CommentateGoodMessage[]) proxy.result : new CommentateGoodMessage[i];
}
};
public static ChangeQuickRedirect changeQuickRedirect;
public long productId;
public String url;
public int value;
public CommentateGoodMessage() {
this.category = 26;
this.priorityLevel = MessageLevel.LOW.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, 198234, 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, 198236, new Class[]{Integer.TYPE}, BaseLiveChatMessage.class);
if (proxy.isSupported) {
return (BaseLiveChatMessage) proxy.result;
}
this.url = "https://cdn.poizon.com/source-img/origin-img/20201205/9c60360334794ba090ddd3b74874d22b.jpg";
this.value = IMTest.f18606a.c().nextInt(1000);
this.productId = 17017;
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, 198235, new Class[]{Parcel.class, Integer.TYPE}, Void.TYPE).isSupported) {
super.writeToParcel(parcel, i);
parcel.writeString(this.url);
parcel.writeInt(this.value);
parcel.writeLong(this.productId);
}
}
@Override // com.shizhuang.duapp.modules.live.common.model.live.message.BaseLiveChatMessage
public CommentateGoodMessageProto.CommentateGoodMessage toProtoMessage() {
PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 198233, new Class[0], CommentateGoodMessageProto.CommentateGoodMessage.class);
if (proxy.isSupported) {
return (CommentateGoodMessageProto.CommentateGoodMessage) proxy.result;
}
CommentateGoodMessageProto.CommentateGoodMessage.b newBuilder = CommentateGoodMessageProto.CommentateGoodMessage.newBuilder();
String str = this.url;
if (str == null) {
str = "";
}
PatchProxyResult proxy2 = PatchProxy.proxy(new Object[]{str}, newBuilder, CommentateGoodMessageProto.CommentateGoodMessage.b.changeQuickRedirect, false, 53769, new Class[]{String.class}, CommentateGoodMessageProto.CommentateGoodMessage.b.class);
if (proxy2.isSupported) {
newBuilder = (CommentateGoodMessageProto.CommentateGoodMessage.b) proxy2.result;
} else {
newBuilder.b = str;
newBuilder.onChanged();
}
return newBuilder.q(this.value).n(this.productId).build();
}
public CommentateGoodMessage(byte[] bArr) {
try {
CommentateGoodMessageProto.CommentateGoodMessage parseFrom = CommentateGoodMessageProto.CommentateGoodMessage.parseFrom(bArr);
this.url = parseFrom.getUrl();
this.value = parseFrom.getValue();
this.productId = parseFrom.getProductId();
} catch (InvalidProtocolBufferException e) {
e.printStackTrace();
}
}
public CommentateGoodMessage(CommentateGoodMessageProto.CommentateGoodMessage commentateGoodMessage) {
this.url = commentateGoodMessage.getUrl();
this.value = commentateGoodMessage.getValue();
this.productId = commentateGoodMessage.getProductId();
}
public CommentateGoodMessage(Parcel parcel) {
super(parcel);
this.url = parcel.readString();
this.value = parcel.readInt();
this.productId = parcel.readLong();
}
}