147 lines
5 KiB
Java
147 lines
5 KiB
Java
package com.discord.models.domain;
|
|
|
|
import b.d.b.a.a;
|
|
import com.discord.models.domain.Model;
|
|
import d0.z.d.m;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import kotlin.jvm.internal.Ref$IntRef;
|
|
import kotlin.jvm.internal.Ref$LongRef;
|
|
/* compiled from: ModelReadState.kt */
|
|
public final class ModelReadState {
|
|
private final long channelId;
|
|
private final long lastMessageId;
|
|
private final int mentionCount;
|
|
private final int version;
|
|
|
|
/* compiled from: ModelReadState.kt */
|
|
public static final class Parser implements Model.Parser<ModelReadState> {
|
|
public static final Parser INSTANCE = new Parser();
|
|
|
|
private Parser() {
|
|
}
|
|
|
|
@Override // com.discord.models.domain.Model.Parser
|
|
public ModelReadState parse(Model.JsonReader jsonReader) {
|
|
m.checkNotNullParameter(jsonReader, "reader");
|
|
Ref$IntRef ref$IntRef = new Ref$IntRef();
|
|
ref$IntRef.element = 0;
|
|
Ref$LongRef ref$LongRef = new Ref$LongRef();
|
|
ref$LongRef.element = 0;
|
|
Ref$LongRef ref$LongRef2 = new Ref$LongRef();
|
|
ref$LongRef2.element = 0;
|
|
Ref$LongRef ref$LongRef3 = new Ref$LongRef();
|
|
ref$LongRef3.element = 0;
|
|
Ref$LongRef ref$LongRef4 = new Ref$LongRef();
|
|
ref$LongRef4.element = 0;
|
|
Ref$IntRef ref$IntRef2 = new Ref$IntRef();
|
|
ref$IntRef2.element = 0;
|
|
jsonReader.nextObject(new ModelReadState$Parser$parse$1(ref$LongRef3, jsonReader, ref$IntRef, ref$LongRef, ref$LongRef2, ref$LongRef4, ref$IntRef2));
|
|
return new ModelReadState(ref$LongRef3.element, ref$LongRef4.element, ref$LongRef.element, ref$LongRef2.element, ref$IntRef.element, ref$IntRef2.element, null);
|
|
}
|
|
}
|
|
|
|
public ModelReadState(long j, long j2, int i, int i2) {
|
|
this.channelId = j;
|
|
this.lastMessageId = j2;
|
|
this.mentionCount = i;
|
|
this.version = i2;
|
|
}
|
|
|
|
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
|
|
private ModelReadState(long j, long j2, long j3, long j4, int i, int i2) {
|
|
this(j2 != 0 ? j2 : j, j3 != 0 ? j3 : j4, i, i2);
|
|
}
|
|
|
|
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
|
|
public /* synthetic */ ModelReadState(long j, long j2, long j3, long j4, int i, int i2, int i3, DefaultConstructorMarker defaultConstructorMarker) {
|
|
this(j, j2, (i3 & 4) != 0 ? 0 : j3, (i3 & 8) != 0 ? 0 : j4, i, i2);
|
|
}
|
|
|
|
public /* synthetic */ ModelReadState(long j, long j2, long j3, long j4, int i, int i2, DefaultConstructorMarker defaultConstructorMarker) {
|
|
this(j, j2, j3, j4, i, i2);
|
|
}
|
|
|
|
public static /* synthetic */ ModelReadState copy$default(ModelReadState modelReadState, long j, long j2, int i, int i2, int i3, Object obj) {
|
|
if ((i3 & 1) != 0) {
|
|
j = modelReadState.channelId;
|
|
}
|
|
if ((i3 & 2) != 0) {
|
|
j2 = modelReadState.lastMessageId;
|
|
}
|
|
if ((i3 & 4) != 0) {
|
|
i = modelReadState.mentionCount;
|
|
}
|
|
if ((i3 & 8) != 0) {
|
|
i2 = modelReadState.version;
|
|
}
|
|
return modelReadState.copy(j, j2, i, i2);
|
|
}
|
|
|
|
public final long component1() {
|
|
return this.channelId;
|
|
}
|
|
|
|
public final long component2() {
|
|
return this.lastMessageId;
|
|
}
|
|
|
|
public final int component3() {
|
|
return this.mentionCount;
|
|
}
|
|
|
|
public final int component4() {
|
|
return this.version;
|
|
}
|
|
|
|
public final ModelReadState copy(long j, long j2, int i, int i2) {
|
|
return new ModelReadState(j, j2, i, i2);
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (!(obj instanceof ModelReadState)) {
|
|
return false;
|
|
}
|
|
ModelReadState modelReadState = (ModelReadState) obj;
|
|
return this.channelId == modelReadState.channelId && this.lastMessageId == modelReadState.lastMessageId && this.mentionCount == modelReadState.mentionCount && this.version == modelReadState.version;
|
|
}
|
|
|
|
public final long getChannelId() {
|
|
return this.channelId;
|
|
}
|
|
|
|
public final long getLastMessageId() {
|
|
return this.lastMessageId;
|
|
}
|
|
|
|
public final int getMentionCount() {
|
|
return this.mentionCount;
|
|
}
|
|
|
|
public final int getVersion() {
|
|
return this.version;
|
|
}
|
|
|
|
public int hashCode() {
|
|
long j = this.channelId;
|
|
long j2 = this.lastMessageId;
|
|
return (((((((int) (j ^ (j >>> 32))) * 31) + ((int) (j2 ^ (j2 >>> 32)))) * 31) + this.mentionCount) * 31) + this.version;
|
|
}
|
|
|
|
public final boolean isMentioned() {
|
|
return this.mentionCount > 0;
|
|
}
|
|
|
|
public String toString() {
|
|
StringBuilder R = a.R("ModelReadState(channelId=");
|
|
R.append(this.channelId);
|
|
R.append(", lastMessageId=");
|
|
R.append(this.lastMessageId);
|
|
R.append(", mentionCount=");
|
|
R.append(this.mentionCount);
|
|
R.append(", version=");
|
|
return a.A(R, this.version, ")");
|
|
}
|
|
}
|