package com.ifpos.bytello.share.sdk.model;

import android.os.Parcel;
import android.os.Parcelable;
import android.os.SystemClock;
import d.b.a.a.a;
import g.h0.c.g;
import g.h0.c.l;
import g.i;
import kotlinx.parcelize.Parcelize;

/* JADX INFO: compiled from: ApiMessage.kt */
/* JADX INFO: loaded from: classes.dex */
@i
@Parcelize
public final class ApiMessage implements Parcelable {
    public static final Parcelable.Creator<ApiMessage> CREATOR = new Creator();
    private final String namespace;
    private final String payload;
    private final long timestamp;
    private final int version;

    /* JADX INFO: compiled from: ApiMessage.kt */
    @i
    public static final class Creator implements Parcelable.Creator<ApiMessage> {
        /* JADX WARN: Can't rename method to resolve collision */
        @Override // android.os.Parcelable.Creator
        public final ApiMessage createFromParcel(Parcel parcel) {
            l.f(parcel, "parcel");
            return new ApiMessage(parcel.readString(), parcel.readString(), parcel.readLong(), parcel.readInt());
        }

        /* JADX WARN: Can't rename method to resolve collision */
        @Override // android.os.Parcelable.Creator
        public final ApiMessage[] newArray(int i2) {
            return new ApiMessage[i2];
        }
    }

    public ApiMessage(String str, String str2, long j2, int i2) {
        l.f(str, "namespace");
        l.f(str2, "payload");
        this.namespace = str;
        this.payload = str2;
        this.timestamp = j2;
        this.version = i2;
    }

    public static /* synthetic */ ApiMessage copy$default(ApiMessage apiMessage, String str, String str2, long j2, int i2, int i3, Object obj) {
        if ((i3 & 1) != 0) {
            str = apiMessage.namespace;
        }
        if ((i3 & 2) != 0) {
            str2 = apiMessage.payload;
        }
        String str3 = str2;
        if ((i3 & 4) != 0) {
            j2 = apiMessage.timestamp;
        }
        long j3 = j2;
        if ((i3 & 8) != 0) {
            i2 = apiMessage.version;
        }
        return apiMessage.copy(str, str3, j3, i2);
    }

    public final String component1() {
        return this.namespace;
    }

    public final String component2() {
        return this.payload;
    }

    public final long component3() {
        return this.timestamp;
    }

    public final int component4() {
        return this.version;
    }

    public final ApiMessage copy(String str, String str2, long j2, int i2) {
        l.f(str, "namespace");
        l.f(str2, "payload");
        return new ApiMessage(str, str2, j2, i2);
    }

    @Override // android.os.Parcelable
    public int describeContents() {
        return 0;
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof ApiMessage)) {
            return false;
        }
        ApiMessage apiMessage = (ApiMessage) obj;
        return l.a(this.namespace, apiMessage.namespace) && l.a(this.payload, apiMessage.payload) && this.timestamp == apiMessage.timestamp && this.version == apiMessage.version;
    }

    public final String getNamespace() {
        return this.namespace;
    }

    public final String getPayload() {
        return this.payload;
    }

    public final long getTimestamp() {
        return this.timestamp;
    }

    public final int getVersion() {
        return this.version;
    }

    public int hashCode() {
        return Integer.hashCode(this.version) + ((Long.hashCode(this.timestamp) + a.x(this.payload, this.namespace.hashCode() * 31, 31)) * 31);
    }

    public String toString() {
        return "ApiMessage(namespace=" + this.namespace + ", payload=" + this.payload + ", timestamp=" + this.timestamp + ", version=" + this.version + ")";
    }

    @Override // android.os.Parcelable
    public void writeToParcel(Parcel parcel, int i2) {
        l.f(parcel, "out");
        parcel.writeString(this.namespace);
        parcel.writeString(this.payload);
        parcel.writeLong(this.timestamp);
        parcel.writeInt(this.version);
    }

    public /* synthetic */ ApiMessage(String str, String str2, long j2, int i2, int i3, g gVar) {
        this(str, str2, (i3 & 4) != 0 ? SystemClock.elapsedRealtimeNanos() : j2, (i3 & 8) != 0 ? 3 : i2);
    }
}
