Session v1.18.2版本的 MD5 值为:92ce129e957021e1a845dcaca5ce957d

以下内容为反编译后的 OpenGroupApi.java 源代码,内容仅作参考


package org.session.libsession.messaging.open_groups;

import android.provider.Downloads;
import androidx.core.view.PointerIconCompat;
import androidx.exifinterface.media.ExifInterface;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.core.JsonPointer;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import com.fasterxml.jackson.databind.type.CollectionType;
import com.fasterxml.jackson.databind.type.TypeFactory;
import com.google.android.exoplayer2.text.ttml.TtmlNode;
import com.google.android.exoplayer2.upstream.DataSchemeDataSource;
import com.goterl.lazysodium.LazySodiumAndroid;
import com.goterl.lazysodium.SodiumAndroid;
import com.goterl.lazysodium.utils.KeyPair;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import kotlin.Lazy;
import kotlin.LazyKt;
import kotlin.Metadata;
import kotlin.Pair;
import kotlin.TuplesKt;
import kotlin.Unit;
import kotlin.collections.ArraysKt;
import kotlin.collections.CollectionsKt;
import kotlin.collections.MapsKt;
import kotlin.jvm.JvmStatic;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.ranges.RangesKt;
import kotlin.text.Charsets;
import kotlinx.coroutines.flow.MutableSharedFlow;
import kotlinx.coroutines.flow.SharedFlowKt;
import network.loki.messenger.libsession_util.util.ConfigPush$$ExternalSyntheticBackport0;
import nl.komponents.kovenant.Context;
import nl.komponents.kovenant.Promise;
import nl.komponents.kovenant.functional.KovenantFnMoniadic;
import okhttp3.Headers;
import okhttp3.HttpUrl;
import okhttp3.MediaType;
import okhttp3.Request;
import okhttp3.RequestBody;
import org.apache.commons.beanutils.PropertyUtils;
import org.apache.http.HttpHeaders;
import org.session.libsession.database.StorageProtocol;
import org.session.libsession.messaging.MessagingModuleConfiguration;
import org.session.libsession.messaging.open_groups.Endpoint;
import org.session.libsession.messaging.open_groups.OpenGroupApi;
import org.session.libsession.messaging.utilities.SessionId;
import org.session.libsession.messaging.utilities.SodiumUtilities;
import org.session.libsession.snode.OnionRequestAPI;
import org.session.libsession.snode.OnionResponse;
import org.session.libsession.snode.SnodeAPI;
import org.session.libsession.utilities.TextSecurePreferences;
import org.session.libsignal.utilities.Base64;
import org.session.libsignal.utilities.HTTP;
import org.session.libsignal.utilities.Hex;
import org.session.libsignal.utilities.IdPrefix;
import org.session.libsignal.utilities.JsonUtil;
import org.session.libsignal.utilities.Log;
import org.session.libsignal.utilities.TrimmingKt;
import org.thoughtcrime.securesms.database.DraftDatabase;
import org.thoughtcrime.securesms.database.GroupDatabase;
import org.thoughtcrime.securesms.home.UserDetailsBottomSheet;
import org.thoughtcrime.securesms.mediasend.MediaSendActivity;
import org.whispersystems.curve25519.Curve25519;

@Metadata(d1 = {"\u0000Ü\u0001\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010%\n\u0002\u0010\u000b\n\u0002\b\u0005\n\u0002\u0010!\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\t\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0012\n\u0002\b\u0002\n\u0002\u0010$\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u000b\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b \bÆ\u0002\u0018\u00002\u00020\u0001:\u001arstuvwxyz{|}~\u007f\u0080\u0001\u0081\u0001\u0082\u0001\u0083\u0001\u0084\u0001\u0085\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J6\u0010&\u001a\u0012\u0012\u0004\u0012\u00020(\u0012\b\u0012\u00060)j\u0002`*0'2\u0006\u0010+\u001a\u00020\r2\u0006\u0010,\u001a\u00020\r2\u0006\u0010-\u001a\u00020\"2\u0006\u0010.\u001a\u00020\rJ0\u0010/\u001a\u0012\u0012\u0004\u0012\u000200\u0012\b\u0012\u00060)j\u0002`*0'2\u0006\u00101\u001a\u00020\r2\u0006\u0010+\u001a\u00020\r2\u0006\u0010,\u001a\u00020\rH\u0007J.\u00102\u001a\u0012\u0012\u0004\u0012\u000200\u0012\b\u0012\u00060)j\u0002`*0'2\u0006\u00101\u001a\u00020\r2\u0006\u0010+\u001a\u00020\r2\u0006\u0010,\u001a\u00020\rJ\u001e\u00103\u001a\u0004\u0018\u0001042\b\u00105\u001a\u0004\u0018\u0001062\b\u00107\u001a\u0004\u0018\u00010\u0001H\u0002J\"\u00108\u001a\u0016\u0012\f\u0012\n\u0012\u0002\b\u0003\u0012\u0002\b\u000309\u0012\u0004\u0012\u00020)0'2\u0006\u0010,\u001a\u00020\rJ6\u0010:\u001a\u0012\u0012\u0004\u0012\u00020;\u0012\b\u0012\u00060)j\u0002`*0'2\u0006\u0010+\u001a\u00020\r2\u0006\u0010,\u001a\u00020\r2\u0006\u0010-\u001a\u00020\"2\u0006\u0010.\u001a\u00020\rJ0\u0010<\u001a\u0012\u0012\u0004\u0012\u000200\u0012\b\u0012\u00060)j\u0002`*0'2\u0006\u0010=\u001a\u00020\"2\u0006\u0010+\u001a\u00020\r2\u0006\u0010,\u001a\u00020\rH\u0007J6\u0010>\u001a\u0012\u0012\u0004\u0012\u00020?\u0012\b\u0012\u00060)j\u0002`*0'2\u0006\u0010+\u001a\u00020\r2\u0006\u0010,\u001a\u00020\r2\u0006\u0010-\u001a\u00020\"2\u0006\u0010.\u001a\u00020\rJ.\u0010@\u001a\u0012\u0012\u0004\u0012\u000206\u0012\b\u0012\u00060)j\u0002`*0'2\u0006\u0010A\u001a\u00020\r2\u0006\u0010+\u001a\u00020\r2\u0006\u0010,\u001a\u00020\rJ.\u0010B\u001a\u0012\u0012\u0004\u0012\u000206\u0012\b\u0012\u00060)j\u0002`*0'2\u0006\u0010,\u001a\u00020\r2\u0006\u0010C\u001a\u00020\r2\u0006\u0010D\u001a\u00020\rJ\u001e\u0010E\u001a\u0018\u0012\n\u0012\b\u0012\u0004\u0012\u00020F0\b\u0012\b\u0012\u00060)j\u0002`*0'H\u0002J<\u0010G\u001a\u001c\u0012\u000e\u0012\f\u0012\b\u0012\u0006\u0012\u0002\b\u00030H0\b\u0012\b\u0012\u00060)j\u0002`*0'2\u0006\u0010I\u001a\u00020J2\u0010\u0010K\u001a\f\u0012\b\u0012\u0006\u0012\u0002\b\u00030L0\u0017H\u0002J\u001e\u0010M\u001a\u0012\u0012\u0004\u0012\u00020N\u0012\b\u0012\u00060)j\u0002`*0'2\u0006\u0010,\u001a\u00020\rJ2\u0010O\u001a\u001e\u0012\u0010\u0012\u000e\u0012\u0004\u0012\u00020N\u0012\u0004\u0012\u00020F0P\u0012\b\u0012\u00060)j\u0002`*0'2\u0006\u0010+\u001a\u00020\r2\u0006\u0010,\u001a\u00020\rJ\u001c\u0010Q\u001a\u0018\u0012\n\u0012\b\u0012\u0004\u0012\u00020\t0\b\u0012\b\u0012\u00060)j\u0002`*0'J\u0016\u0010R\u001a\u0012\u0012\u0004\u0012\u00020N\u0012\b\u0012\u00060)j\u0002`*0'J,\u0010S\u001a\u0018\u0012\n\u0012\b\u0012\u0004\u0012\u00020T0\b\u0012\b\u0012\u00060)j\u0002`*0'2\u0006\u0010+\u001a\u00020\r2\u0006\u0010,\u001a\u00020\rJ&\u0010U\u001a\u0012\u0012\u0004\u0012\u00020V\u0012\b\u0012\u00060)j\u0002`*0'2\u0006\u0010+\u001a\u00020\r2\u0006\u0010,\u001a\u00020\rJ,\u0010W\u001a\u0018\u0012\n\u0012\b\u0012\u0004\u0012\u00020X0\b\u0012\b\u0012\u00060)j\u0002`*0'2\u0006\u0010+\u001a\u00020\r2\u0006\u0010,\u001a\u00020\rJ>\u0010Y\u001a\u001a\u0012\f\u0012\n\u0012\u0002\b\u0003\u0012\u0002\b\u000309\u0012\b\u0012\u00060)j\u0002`*0'2\u0006\u0010+\u001a\u00020\r2\u0006\u0010,\u001a\u00020\r2\u0006\u0010-\u001a\u00020\"2\u0006\u0010.\u001a\u00020\rJ \u0010Z\u001a\u0012\u0012\u0004\u0012\u000206\u0012\b\u0012\u00060)j\u0002`*0'2\u0006\u0010I\u001a\u00020JH\u0002J(\u0010[\u001a\u001a\u0012\f\u0012\n\u0012\u0002\b\u0003\u0012\u0002\b\u000309\u0012\b\u0012\u00060)j\u0002`*0'2\u0006\u0010I\u001a\u00020JH\u0002J&\u0010\\\u001a\u0012\u0012\u0004\u0012\u00020F\u0012\b\u0012\u00060)j\u0002`*0'2\u0006\u0010]\u001a\u00020\r2\u0006\u0010,\u001a\u00020\rJ<\u0010^\u001a\u001c\u0012\u000e\u0012\f\u0012\b\u0012\u0006\u0012\u0002\b\u00030H0\b\u0012\b\u0012\u00060)j\u0002`*0'2\u0006\u0010,\u001a\u00020\r2\u0010\u0010K\u001a\f\u0012\b\u0012\u0006\u0012\u0002\b\u00030L0\u0017H\u0002J4\u0010_\u001a\b\u0012\u0004\u0012\u00020X0\b2\u0006\u0010+\u001a\u00020\r2\u0006\u0010,\u001a\u00020\r2\u0014\u0010`\u001a\u0010\u0012\f\u0012\n\u0012\u0002\b\u0003\u0012\u0002\b\u0003090\bH\u0002J6\u0010a\u001a\u001c\u0012\u000e\u0012\f\u0012\b\u0012\u0006\u0012\u0002\b\u00030H0\b\u0012\b\u0012\u00060)j\u0002`*0'2\f\u0010b\u001a\b\u0012\u0004\u0012\u00020\r0\b2\u0006\u0010,\u001a\u00020\rJ \u0010c\u001a\u0012\u0012\u0004\u0012\u00020d\u0012\b\u0012\u00060)j\u0002`*0'2\u0006\u0010I\u001a\u00020JH\u0002J.\u0010e\u001a\u0012\u0012\u0004\u0012\u00020f\u0012\b\u0012\u00060)j\u0002`*0'2\u0006\u0010g\u001a\u00020\r2\u0006\u0010h\u001a\u00020\r2\u0006\u0010,\u001a\u00020\rJc\u0010i\u001a\u0012\u0012\u0004\u0012\u00020X\u0012\b\u0012\u00060)j\u0002`*0'2\u0006\u0010g\u001a\u00020X2\u0006\u0010+\u001a\u00020\r2\u0006\u0010,\u001a\u00020\r2\u0010\b\u0002\u0010j\u001a\n\u0012\u0004\u0012\u00020\r\u0018\u00010\b2\n\b\u0002\u0010k\u001a\u0004\u0018\u00010\u00112\u0010\b\u0002\u0010l\u001a\n\u0012\u0004\u0012\u00020\r\u0018\u00010\b¢\u0006\u0002\u0010mJ<\u0010n\u001a\u001c\u0012\u000e\u0012\f\u0012\b\u0012\u0006\u0012\u0002\b\u00030H0\b\u0012\b\u0012\u00060)j\u0002`*0'2\u0006\u0010,\u001a\u00020\r2\u0010\u0010K\u001a\f\u0012\b\u0012\u0006\u0012\u0002\b\u00030L0\u0017H\u0002J.\u0010o\u001a\u0012\u0012\u0004\u0012\u000200\u0012\b\u0012\u00060)j\u0002`*0'2\u0006\u00101\u001a\u00020\r2\u0006\u0010+\u001a\u00020\r2\u0006\u0010,\u001a\u00020\rJ.\u0010p\u001a\u0012\u0012\u0004\u0012\u00020\"\u0012\b\u0012\u00060)j\u0002`*0'2\u0006\u0010q\u001a\u0002062\u0006\u0010+\u001a\u00020\r2\u0006\u0010,\u001a\u00020\rR\u0016\u0010\u0003\u001a\n \u0005*\u0004\u0018\u00010\u00040\u0004X\u0082\u0004¢\u0006\u0002\n\u0000R\u001d\u0010\u0006\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\t0\b0\u0007¢\u0006\b\n\u0000\u001a\u0004\b\n\u0010\u000bR\u000e\u0010\f\u001a\u00020\rX\u0086T¢\u0006\u0002\n\u0000R\u000e\u0010\u000e\u001a\u00020\rX\u0086T¢\u0006\u0002\n\u0000R\u001a\u0010\u000f\u001a\u000e\u0012\u0004\u0012\u00020\r\u0012\u0004\u0012\u00020\u00110\u0010X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0012\u001a\u00020\u0011X\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\u0013\u001a\u00020\rX\u0086T¢\u0006\u0002\n\u0000R\u000e\u0010\u0014\u001a\u00020\rX\u0086T¢\u0006\u0002\n\u0000R\u000e\u0010\u0015\u001a\u00020\rX\u0086T¢\u0006\u0002\n\u0000R\u0017\u0010\u0016\u001a\b\u0012\u0004\u0012\u00020\u00180\u0017¢\u0006\b\n\u0000\u001a\u0004\b\u0019\u0010\u001aR\u001b\u0010\u001b\u001a\u00020\u001c8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\u001f\u0010 \u001a\u0004\b\u001d\u0010\u001eR\u001b\u0010!\u001a\u00020\"8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b%\u0010 \u001a\u0004\b#\u0010$¨\u0006\u0086\u0001"}, d2 = {"Lorg/session/libsession/messaging/open_groups/OpenGroupApi;", "", "()V", "curve", "Lorg/whispersystems/curve25519/Curve25519;", "kotlin.jvm.PlatformType", "defaultRooms", "Lkotlinx/coroutines/flow/MutableSharedFlow;", "", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$DefaultGroup;", "getDefaultRooms", "()Lkotlinx/coroutines/flow/MutableSharedFlow;", "defaultServer", "", "defaultServerPublicKey", "hasPerformedInitialPoll", "", "", "hasUpdatedLastOpenDate", "httpDefaultServer", "legacyDefaultServer", "legacyServerIP", "pendingReactions", "", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$PendingReaction;", "getPendingReactions", "()Ljava/util/List;", "sodium", "Lcom/goterl/lazysodium/LazySodiumAndroid;", "getSodium", "()Lcom/goterl/lazysodium/LazySodiumAndroid;", "sodium$delegate", "Lkotlin/Lazy;", "timeSinceLastOpen", "", "getTimeSinceLastOpen", "()J", "timeSinceLastOpen$delegate", "addReaction", "Lnl/komponents/kovenant/Promise;", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$AddReactionResponse;", "Ljava/lang/Exception;", "Lkotlin/Exception;", "room", "server", "messageId", "emoji", "ban", "", UserDetailsBottomSheet.ARGUMENT_PUBLIC_KEY, "banAndDeleteAll", "createBody", "Lokhttp3/RequestBody;", "body", "", "parameters", "deleteAllInboxMessages", "", "deleteAllReactions", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$DeleteAllReactionsResponse;", "deleteMessage", "serverID", "deleteReaction", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$DeleteReactionResponse;", "download", "fileId", "downloadOpenGroupProfilePicture", "roomID", "imageId", "getAllRooms", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$RoomInfo;", "getBatchResponseJson", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$BatchResponse;", "request", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Request;", "requests", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$BatchRequestInfo;", "getCapabilities", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Capabilities;", "getCapabilitiesAndRoomInfo", "Lkotlin/Pair;", "getDefaultRoomsIfNeeded", "getDefaultServerCapabilities", "getDeletedMessages", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$MessageDeletion;", "getMemberCount", "", "getMessages", "Lorg/session/libsession/messaging/open_groups/OpenGroupMessage;", "getReactors", "getResponseBody", "getResponseBodyJson", "getRoomInfo", "roomToken", "parallelBatch", "parseMessages", "rawMessages", "poll", "rooms", "send", "Lorg/session/libsession/snode/OnionResponse;", "sendDirectMessage", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$DirectMessage;", MediaSendActivity.EXTRA_MESSAGE, "blindedSessionId", "sendMessage", "whisperTo", "whisperMods", "fileIds", "(Lorg/session/libsession/messaging/open_groups/OpenGroupMessage;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/Boolean;Ljava/util/List;)Lnl/komponents/kovenant/Promise;", "sequentialBatch", "unban", "upload", "file", "AddReactionResponse", "BatchRequest", "BatchRequestInfo", "BatchResponse", "Capabilities", "Capability", "DefaultGroup", "DeleteAllReactionsResponse", "DeleteReactionResponse", "DirectMessage", "Error", "Message", "MessageDeletion", "PendingReaction", "PinnedMessage", "Reaction", "Request", "RoomInfo", "RoomPollInfo", "SendMessageRequest", "libsession_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
public final class OpenGroupApi {
    public static final String defaultServer = "https://open.getsession.org";
    public static final String defaultServerPublicKey = "a03c383cf63c3c4efe67acc52112a6dd734b3a946b9545f488aaa93da7991238";
    private static boolean hasUpdatedLastOpenDate = false;
    public static final String httpDefaultServer = "http://open.getsession.org";
    public static final String legacyDefaultServer = "http://116.203.70.33";
    public static final String legacyServerIP = "116.203.70.33";
    public static final OpenGroupApi INSTANCE = new OpenGroupApi();
    private static final Curve25519 curve = Curve25519.getInstance(Curve25519.BEST);
    private static final MutableSharedFlow<List<DefaultGroup>> defaultRooms = SharedFlowKt.MutableSharedFlow$default(1, 0, null, 6, null);
    private static final Map<String, Boolean> hasPerformedInitialPoll = new LinkedHashMap();

    private static final Lazy sodium = LazyKt.lazy(new Function0<LazySodiumAndroid>() {
        @Override
        public final LazySodiumAndroid invoke() {
            return new LazySodiumAndroid(new SodiumAndroid());
        }
    });

    private static final Lazy timeSinceLastOpen = LazyKt.lazy(new Function0<Long>() {
        @Override
        public final Long invoke() {
            return Long.valueOf(System.currentTimeMillis() - TextSecurePreferences.INSTANCE.getLastOpenTimeDate(MessagingModuleConfiguration.INSTANCE.getShared().getContext()));
        }
    });
    private static final List<PendingReaction> pendingReactions = new ArrayList();

    @Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0010\n\u0002\b\u0005\b\u0086\u0001\u0018\u00002\b\u0012\u0004\u0012\u00020\u00000\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002j\u0002\b\u0003j\u0002\b\u0004j\u0002\b\u0005¨\u0006\u0006"}, d2 = {"Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Capability;", "", "(Ljava/lang/String;I)V", "SOGS", "BLIND", "REACTIONS", "libsession_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    public enum Capability {
        SOGS,
        BLIND,
        REACTIONS
    }

    @Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
    public class WhenMappings {
        public static final int[] $EnumSwitchMapping$0;

        static {
            int[] iArr = new int[HTTP.Verb.values().length];
            try {
                iArr[HTTP.Verb.GET.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                iArr[HTTP.Verb.PUT.ordinal()] = 2;
            } catch (NoSuchFieldError unused2) {
            }
            try {
                iArr[HTTP.Verb.POST.ordinal()] = 3;
            } catch (NoSuchFieldError unused3) {
            }
            try {
                iArr[HTTP.Verb.DELETE.ordinal()] = 4;
            } catch (NoSuchFieldError unused4) {
            }
            $EnumSwitchMapping$0 = iArr;
        }
    }

    private OpenGroupApi() {
    }

    public final MutableSharedFlow<List<DefaultGroup>> getDefaultRooms() {
        return defaultRooms;
    }

    private final LazySodiumAndroid getSodium() {
        return (LazySodiumAndroid) sodium.getValue();
    }

    private final long getTimeSinceLastOpen() {
        return ((Number) timeSinceLastOpen.getValue()).longValue();
    }

    public final List<PendingReaction> getPendingReactions() {
        return pendingReactions;
    }

    @Metadata(d1 = {"\u00004\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\b6\u0018\u00002\u00060\u0001j\u0002`\u0002:\u0007\u0006\u0007\b\t\n\u000b\fB\u000f\b\u0004\u0012\u0006\u0010\u0003\u001a\u00020\u0004¢\u0006\u0002\u0010\u0005\u0082\u0001\u0007\r\u000e\u000f\u0010\u0011\u0012\u0013¨\u0006\u0014"}, d2 = {"Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Error;", "Ljava/lang/Exception;", "Lkotlin/Exception;", MediaSendActivity.EXTRA_MESSAGE, "", "(Ljava/lang/String;)V", "DecryptionFailed", "Generic", "InvalidURL", "NoEd25519KeyPair", "NoPublicKey", "ParsingFailed", "SigningFailed", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Error$DecryptionFailed;", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Error$Generic;", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Error$InvalidURL;", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Error$NoEd25519KeyPair;", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Error$NoPublicKey;", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Error$ParsingFailed;", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Error$SigningFailed;", "libsession_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    public static abstract class Error extends Exception {
        public Error(String str, DefaultConstructorMarker defaultConstructorMarker) {
            this(str);
        }

        @Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\bÆ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002¨\u0006\u0003"}, d2 = {"Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Error$Generic;", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Error;", "()V", "libsession_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
        public static final class Generic extends Error {
            public static final Generic INSTANCE = new Generic();

            private Generic() {
                super("An error occurred.", null);
            }
        }

        private Error(String str) {
            super(str);
        }

        @Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\bÆ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002¨\u0006\u0003"}, d2 = {"Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Error$ParsingFailed;", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Error;", "()V", "libsession_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
        public static final class ParsingFailed extends Error {
            public static final ParsingFailed INSTANCE = new ParsingFailed();

            private ParsingFailed() {
                super("Invalid response.", null);
            }
        }

        @Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\bÆ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002¨\u0006\u0003"}, d2 = {"Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Error$DecryptionFailed;", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Error;", "()V", "libsession_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
        public static final class DecryptionFailed extends Error {
            public static final DecryptionFailed INSTANCE = new DecryptionFailed();

            private DecryptionFailed() {
                super("Couldn't decrypt response.", null);
            }
        }

        @Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\bÆ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002¨\u0006\u0003"}, d2 = {"Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Error$SigningFailed;", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Error;", "()V", "libsession_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
        public static final class SigningFailed extends Error {
            public static final SigningFailed INSTANCE = new SigningFailed();

            private SigningFailed() {
                super("Couldn't sign message.", null);
            }
        }

        @Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\bÆ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002¨\u0006\u0003"}, d2 = {"Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Error$InvalidURL;", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Error;", "()V", "libsession_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
        public static final class InvalidURL extends Error {
            public static final InvalidURL INSTANCE = new InvalidURL();

            private InvalidURL() {
                super("Invalid URL.", null);
            }
        }

        @Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\bÆ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002¨\u0006\u0003"}, d2 = {"Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Error$NoPublicKey;", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Error;", "()V", "libsession_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
        public static final class NoPublicKey extends Error {
            public static final NoPublicKey INSTANCE = new NoPublicKey();

            private NoPublicKey() {
                super("Couldn't find server public key.", null);
            }
        }

        @Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\bÆ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002¨\u0006\u0003"}, d2 = {"Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Error$NoEd25519KeyPair;", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Error;", "()V", "libsession_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
        public static final class NoEd25519KeyPair extends Error {
            public static final NoEd25519KeyPair INSTANCE = new NoEd25519KeyPair();

            private NoEd25519KeyPair() {
                super("Couldn't find ed25519 key pair.", null);
            }
        }
    }

    @Metadata(d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010\u0012\n\u0002\b\r\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0002\b\u0086\b\u0018\u00002\u00020\u0001B\u001f\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0003\u0012\b\u0010\u0005\u001a\u0004\u0018\u00010\u0006¢\u0006\u0002\u0010\u0007J\t\u0010\u000f\u001a\u00020\u0003HÆ\u0003J\t\u0010\u0010\u001a\u00020\u0003HÆ\u0003J\u000b\u0010\u0011\u001a\u0004\u0018\u00010\u0006HÆ\u0003J)\u0010\u0012\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u00032\b\b\u0002\u0010\u0004\u001a\u00020\u00032\n\b\u0002\u0010\u0005\u001a\u0004\u0018\u00010\u0006HÆ\u0001J\u0013\u0010\u0013\u001a\u00020\u00142\b\u0010\u0015\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\u0016\u001a\u00020\u0017HÖ\u0001J\t\u0010\u0018\u001a\u00020\u0003HÖ\u0001R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\b\u0010\tR\u0013\u0010\u0005\u001a\u0004\u0018\u00010\u0006¢\u0006\b\n\u0000\u001a\u0004\b\n\u0010\u000bR\u0011\u0010\f\u001a\u00020\u00038F¢\u0006\u0006\u001a\u0004\b\r\u0010\tR\u0011\u0010\u0004\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u000e\u0010\t¨\u0006\u0019"}, d2 = {"Lorg/session/libsession/messaging/open_groups/OpenGroupApi$DefaultGroup;", "", TtmlNode.ATTR_ID, "", "name", DraftDatabase.Draft.IMAGE, "", "(Ljava/lang/String;Ljava/lang/String;[B)V", "getId", "()Ljava/lang/String;", "getImage", "()[B", "joinURL", "getJoinURL", "getName", "component1", "component2", "component3", "copy", "equals", "", "other", "hashCode", "", "toString", "libsession_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    public static final class DefaultGroup {
        private final String id;
        private final byte[] image;
        private final String name;

        public static DefaultGroup copy$default(DefaultGroup defaultGroup, String str, String str2, byte[] bArr, int i, Object obj) {
            if ((i & 1) != 0) {
                str = defaultGroup.id;
            }
            if ((i & 2) != 0) {
                str2 = defaultGroup.name;
            }
            if ((i & 4) != 0) {
                bArr = defaultGroup.image;
            }
            return defaultGroup.copy(str, str2, bArr);
        }

        public final String getId() {
            return this.id;
        }

        public final String getName() {
            return this.name;
        }

        public final byte[] getImage() {
            return this.image;
        }

        public final DefaultGroup copy(String id, String name, byte[] image) {
            Intrinsics.checkNotNullParameter(id, "id");
            Intrinsics.checkNotNullParameter(name, "name");
            return new DefaultGroup(id, name, image);
        }

        public boolean equals(Object other) {
            if (this == other) {
                return true;
            }
            if (!(other instanceof DefaultGroup)) {
                return false;
            }
            DefaultGroup defaultGroup = (DefaultGroup) other;
            return Intrinsics.areEqual(this.id, defaultGroup.id) && Intrinsics.areEqual(this.name, defaultGroup.name) && Intrinsics.areEqual(this.image, defaultGroup.image);
        }

        public int hashCode() {
            int hashCode = ((this.id.hashCode() * 31) + this.name.hashCode()) * 31;
            byte[] bArr = this.image;
            return hashCode + (bArr == null ? 0 : Arrays.hashCode(bArr));
        }

        public String toString() {
            return "DefaultGroup(id=" + this.id + ", name=" + this.name + ", image=" + Arrays.toString(this.image) + PropertyUtils.MAPPED_DELIM2;
        }

        public DefaultGroup(String id, String name, byte[] bArr) {
            Intrinsics.checkNotNullParameter(id, "id");
            Intrinsics.checkNotNullParameter(name, "name");
            this.id = id;
            this.name = name;
            this.image = bArr;
        }

        public final String getId() {
            return this.id;
        }

        public final byte[] getImage() {
            return this.image;
        }

        public final String getName() {
            return this.name;
        }

        public final String getJoinURL() {
            return "https://open.getsession.org/" + this.id + "?public_key=a03c383cf63c3c4efe67acc52112a6dd734b3a946b9545f488aaa93da7991238";
        }
    }

    @JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
    @Metadata(d1 = {"\u0000:\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0010\b\n\u0000\n\u0002\u0010\t\n\u0002\b\u0005\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\bK\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0087\b\u0018\u00002\u00020\u0001B\u009f\u0002\u0012\b\b\u0002\u0010\u0002\u001a\u00020\u0003\u0012\b\b\u0002\u0010\u0004\u001a\u00020\u0003\u0012\b\b\u0002\u0010\u0005\u001a\u00020\u0003\u0012\b\b\u0002\u0010\u0006\u001a\u00020\u0007\u0012\b\b\u0002\u0010\b\u001a\u00020\t\u0012\b\b\u0002\u0010\n\u001a\u00020\t\u0012\b\b\u0002\u0010\u000b\u001a\u00020\u0007\u0012\b\b\u0002\u0010\f\u001a\u00020\u0007\u0012\n\b\u0002\u0010\r\u001a\u0004\u0018\u00010\u0003\u0012\u000e\b\u0002\u0010\u000e\u001a\b\u0012\u0004\u0012\u00020\u00100\u000f\u0012\b\b\u0002\u0010\u0011\u001a\u00020\u0012\u0012\b\b\u0002\u0010\u0013\u001a\u00020\u0012\u0012\u000e\b\u0002\u0010\u0014\u001a\b\u0012\u0004\u0012\u00020\u00030\u000f\u0012\u000e\b\u0002\u0010\u0015\u001a\b\u0012\u0004\u0012\u00020\u00030\u000f\u0012\b\b\u0002\u0010\u0016\u001a\u00020\u0012\u0012\b\b\u0002\u0010\u0017\u001a\u00020\u0012\u0012\u000e\b\u0002\u0010\u0018\u001a\b\u0012\u0004\u0012\u00020\u00030\u000f\u0012\u000e\b\u0002\u0010\u0019\u001a\b\u0012\u0004\u0012\u00020\u00030\u000f\u0012\b\b\u0002\u0010\u001a\u001a\u00020\u0012\u0012\b\b\u0002\u0010\u001b\u001a\u00020\u0012\u0012\b\b\u0002\u0010\u001c\u001a\u00020\u0012\u0012\b\b\u0002\u0010\u001d\u001a\u00020\u0012\u0012\b\b\u0002\u0010\u001e\u001a\u00020\u0012\u0012\b\b\u0002\u0010\u001f\u001a\u00020\u0012\u0012\b\b\u0002\u0010 \u001a\u00020\u0012¢\u0006\u0002\u0010!J\t\u0010@\u001a\u00020\u0003HÆ\u0003J\u000f\u0010A\u001a\b\u0012\u0004\u0012\u00020\u00100\u000fHÆ\u0003J\t\u0010B\u001a\u00020\u0012HÆ\u0003J\t\u0010C\u001a\u00020\u0012HÆ\u0003J\u000f\u0010D\u001a\b\u0012\u0004\u0012\u00020\u00030\u000fHÆ\u0003J\u000f\u0010E\u001a\b\u0012\u0004\u0012\u00020\u00030\u000fHÆ\u0003J\t\u0010F\u001a\u00020\u0012HÆ\u0003J\t\u0010G\u001a\u00020\u0012HÆ\u0003J\u000f\u0010H\u001a\b\u0012\u0004\u0012\u00020\u00030\u000fHÆ\u0003J\u000f\u0010I\u001a\b\u0012\u0004\u0012\u00020\u00030\u000fHÆ\u0003J\t\u0010J\u001a\u00020\u0012HÆ\u0003J\t\u0010K\u001a\u00020\u0003HÆ\u0003J\t\u0010L\u001a\u00020\u0012HÆ\u0003J\t\u0010M\u001a\u00020\u0012HÆ\u0003J\t\u0010N\u001a\u00020\u0012HÆ\u0003J\t\u0010O\u001a\u00020\u0012HÆ\u0003J\t\u0010P\u001a\u00020\u0012HÆ\u0003J\t\u0010Q\u001a\u00020\u0012HÆ\u0003J\t\u0010R\u001a\u00020\u0003HÆ\u0003J\t\u0010S\u001a\u00020\u0007HÆ\u0003J\t\u0010T\u001a\u00020\tHÆ\u0003J\t\u0010U\u001a\u00020\tHÆ\u0003J\t\u0010V\u001a\u00020\u0007HÆ\u0003J\t\u0010W\u001a\u00020\u0007HÆ\u0003J\u000b\u0010X\u001a\u0004\u0018\u00010\u0003HÆ\u0003J£\u0002\u0010Y\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u00032\b\b\u0002\u0010\u0004\u001a\u00020\u00032\b\b\u0002\u0010\u0005\u001a\u00020\u00032\b\b\u0002\u0010\u0006\u001a\u00020\u00072\b\b\u0002\u0010\b\u001a\u00020\t2\b\b\u0002\u0010\n\u001a\u00020\t2\b\b\u0002\u0010\u000b\u001a\u00020\u00072\b\b\u0002\u0010\f\u001a\u00020\u00072\n\b\u0002\u0010\r\u001a\u0004\u0018\u00010\u00032\u000e\b\u0002\u0010\u000e\u001a\b\u0012\u0004\u0012\u00020\u00100\u000f2\b\b\u0002\u0010\u0011\u001a\u00020\u00122\b\b\u0002\u0010\u0013\u001a\u00020\u00122\u000e\b\u0002\u0010\u0014\u001a\b\u0012\u0004\u0012\u00020\u00030\u000f2\u000e\b\u0002\u0010\u0015\u001a\b\u0012\u0004\u0012\u00020\u00030\u000f2\b\b\u0002\u0010\u0016\u001a\u00020\u00122\b\b\u0002\u0010\u0017\u001a\u00020\u00122\u000e\b\u0002\u0010\u0018\u001a\b\u0012\u0004\u0012\u00020\u00030\u000f2\u000e\b\u0002\u0010\u0019\u001a\b\u0012\u0004\u0012\u00020\u00030\u000f2\b\b\u0002\u0010\u001a\u001a\u00020\u00122\b\b\u0002\u0010\u001b\u001a\u00020\u00122\b\b\u0002\u0010\u001c\u001a\u00020\u00122\b\b\u0002\u0010\u001d\u001a\u00020\u00122\b\b\u0002\u0010\u001e\u001a\u00020\u00122\b\b\u0002\u0010\u001f\u001a\u00020\u00122\b\b\u0002\u0010 \u001a\u00020\u0012HÆ\u0001J\u0013\u0010Z\u001a\u00020\u00122\b\u0010[\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\\\u001a\u00020\u0007HÖ\u0001J\u0006\u0010]\u001a\u00020^J\t\u0010_\u001a\u00020\u0003HÖ\u0001R\u0011\u0010\u000b\u001a\u00020\u0007¢\u0006\b\n\u0000\u001a\u0004\b\"\u0010#R\u0011\u0010\f\u001a\u00020\u0007¢\u0006\b\n\u0000\u001a\u0004\b$\u0010#R\u0011\u0010\u0011\u001a\u00020\u0012¢\u0006\b\n\u0000\u001a\u0004\b%\u0010&R\u0017\u0010\u0014\u001a\b\u0012\u0004\u0012\u00020\u00030\u000f¢\u0006\b\n\u0000\u001a\u0004\b'\u0010(R\u0011\u0010\n\u001a\u00020\t¢\u0006\b\n\u0000\u001a\u0004\b)\u0010*R\u0011\u0010\u001c\u001a\u00020\u0012¢\u0006\b\n\u0000\u001a\u0004\b+\u0010&R\u0011\u0010\u001b\u001a\u00020\u0012¢\u0006\b\n\u0000\u001a\u0004\b,\u0010&R\u0011\u0010 \u001a\u00020\u0012¢\u0006\b\n\u0000\u001a\u0004\b-\u0010&R\u0011\u0010\u001e\u001a\u00020\u0012¢\u0006\b\n\u0000\u001a\u0004\b.\u0010&R\u0011\u0010\u0005\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b/\u00100R\u0011\u0010\u0013\u001a\u00020\u0012¢\u0006\b\n\u0000\u001a\u0004\b1\u0010&R\u0011\u0010\u0017\u001a\u00020\u0012¢\u0006\b\n\u0000\u001a\u0004\b2\u0010&R\u0017\u0010\u0015\u001a\b\u0012\u0004\u0012\u00020\u00030\u000f¢\u0006\b\n\u0000\u001a\u0004\b3\u0010(R\u0017\u0010\u0019\u001a\b\u0012\u0004\u0012\u00020\u00030\u000f¢\u0006\b\n\u0000\u001a\u0004\b4\u0010(R\u0013\u0010\r\u001a\u0004\u0018\u00010\u0003¢\u0006\b\n\u0000\u001a\u0004\b5\u00100R\u0011\u0010\u0006\u001a\u00020\u0007¢\u0006\b\n\u0000\u001a\u0004\b6\u0010#R\u0011\u0010\b\u001a\u00020\t¢\u0006\b\n\u0000\u001a\u0004\b7\u0010*R\u0011\u0010\u0016\u001a\u00020\u0012¢\u0006\b\n\u0000\u001a\u0004\b8\u0010&R\u0017\u0010\u0018\u001a\b\u0012\u0004\u0012\u00020\u00030\u000f¢\u0006\b\n\u0000\u001a\u0004\b9\u0010(R\u0011\u0010\u0004\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b:\u00100R\u0017\u0010\u000e\u001a\b\u0012\u0004\u0012\u00020\u00100\u000f¢\u0006\b\n\u0000\u001a\u0004\b;\u0010(R\u0011\u0010\u001a\u001a\u00020\u0012¢\u0006\b\n\u0000\u001a\u0004\b<\u0010&R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b=\u00100R\u0011\u0010\u001f\u001a\u00020\u0012¢\u0006\b\n\u0000\u001a\u0004\b>\u0010&R\u0011\u0010\u001d\u001a\u00020\u0012¢\u0006\b\n\u0000\u001a\u0004\b?\u0010&¨\u0006`"}, d2 = {"Lorg/session/libsession/messaging/open_groups/OpenGroupApi$RoomInfo;", "", "token", "", "name", Downloads.Impl.COLUMN_DESCRIPTION, "infoUpdates", "", "messageSequence", "", "created", "activeUsers", "activeUsersCutoff", "imageId", "pinnedMessages", "", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$PinnedMessage;", "admin", "", "globalAdmin", GroupDatabase.ADMINS, "hiddenAdmins", "moderator", "globalModerator", "moderators", "hiddenModerators", "read", "defaultRead", "defaultAccessible", "write", "defaultWrite", "upload", "defaultUpload", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;IJJIILjava/lang/String;Ljava/util/List;ZZLjava/util/List;Ljava/util/List;ZZLjava/util/List;Ljava/util/List;ZZZZZZZ)V", "getActiveUsers", "()I", "getActiveUsersCutoff", "getAdmin", "()Z", "getAdmins", "()Ljava/util/List;", "getCreated", "()J", "getDefaultAccessible", "getDefaultRead", "getDefaultUpload", "getDefaultWrite", "getDescription", "()Ljava/lang/String;", "getGlobalAdmin", "getGlobalModerator", "getHiddenAdmins", "getHiddenModerators", "getImageId", "getInfoUpdates", "getMessageSequence", "getModerator", "getModerators", "getName", "getPinnedMessages", "getRead", "getToken", "getUpload", "getWrite", "component1", "component10", "component11", "component12", "component13", "component14", "component15", "component16", "component17", "component18", "component19", "component2", "component20", "component21", "component22", "component23", "component24", "component25", "component3", "component4", "component5", "component6", "component7", "component8", "component9", "copy", "equals", "other", "hashCode", "toPollInfo", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$RoomPollInfo;", "toString", "libsession_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    public static final class RoomInfo {
        private final int activeUsers;
        private final int activeUsersCutoff;
        private final boolean admin;
        private final List<String> admins;
        private final long created;
        private final boolean defaultAccessible;
        private final boolean defaultRead;
        private final boolean defaultUpload;
        private final boolean defaultWrite;
        private final String description;
        private final boolean globalAdmin;
        private final boolean globalModerator;
        private final List<String> hiddenAdmins;
        private final List<String> hiddenModerators;
        private final String imageId;
        private final int infoUpdates;
        private final long messageSequence;
        private final boolean moderator;
        private final List<String> moderators;
        private final String name;
        private final List<PinnedMessage> pinnedMessages;
        private final boolean read;
        private final String token;
        private final boolean upload;
        private final boolean write;

        public RoomInfo() {
            this(null, null, null, 0, 0L, 0L, 0, 0, null, null, false, false, null, null, false, false, null, null, false, false, false, false, false, false, false, 33554431, null);
        }

        public final String getToken() {
            return this.token;
        }

        public final List<PinnedMessage> component10() {
            return this.pinnedMessages;
        }

        public final boolean getAdmin() {
            return this.admin;
        }

        public final boolean getGlobalAdmin() {
            return this.globalAdmin;
        }

        public final List<String> component13() {
            return this.admins;
        }

        public final List<String> component14() {
            return this.hiddenAdmins;
        }

        public final boolean getModerator() {
            return this.moderator;
        }

        public final boolean getGlobalModerator() {
            return this.globalModerator;
        }

        public final List<String> component17() {
            return this.moderators;
        }

        public final List<String> component18() {
            return this.hiddenModerators;
        }

        public final boolean getRead() {
            return this.read;
        }

        public final String getName() {
            return this.name;
        }

        public final boolean getDefaultRead() {
            return this.defaultRead;
        }

        public final boolean getDefaultAccessible() {
            return this.defaultAccessible;
        }

        public final boolean getWrite() {
            return this.write;
        }

        public final boolean getDefaultWrite() {
            return this.defaultWrite;
        }

        public final boolean getUpload() {
            return this.upload;
        }

        public final boolean getDefaultUpload() {
            return this.defaultUpload;
        }

        public final String getDescription() {
            return this.description;
        }

        public final int getInfoUpdates() {
            return this.infoUpdates;
        }

        public final long getMessageSequence() {
            return this.messageSequence;
        }

        public final long getCreated() {
            return this.created;
        }

        public final int getActiveUsers() {
            return this.activeUsers;
        }

        public final int getActiveUsersCutoff() {
            return this.activeUsersCutoff;
        }

        public final String getImageId() {
            return this.imageId;
        }

        public final RoomInfo copy(String token, String name, String description, int infoUpdates, long messageSequence, long created, int activeUsers, int activeUsersCutoff, String imageId, List<PinnedMessage> pinnedMessages, boolean admin, boolean globalAdmin, List<String> admins, List<String> hiddenAdmins, boolean moderator, boolean globalModerator, List<String> moderators, List<String> hiddenModerators, boolean read, boolean defaultRead, boolean defaultAccessible, boolean write, boolean defaultWrite, boolean upload, boolean defaultUpload) {
            Intrinsics.checkNotNullParameter(token, "token");
            Intrinsics.checkNotNullParameter(name, "name");
            Intrinsics.checkNotNullParameter(description, "description");
            Intrinsics.checkNotNullParameter(pinnedMessages, "pinnedMessages");
            Intrinsics.checkNotNullParameter(admins, "admins");
            Intrinsics.checkNotNullParameter(hiddenAdmins, "hiddenAdmins");
            Intrinsics.checkNotNullParameter(moderators, "moderators");
            Intrinsics.checkNotNullParameter(hiddenModerators, "hiddenModerators");
            return new RoomInfo(token, name, description, infoUpdates, messageSequence, created, activeUsers, activeUsersCutoff, imageId, pinnedMessages, admin, globalAdmin, admins, hiddenAdmins, moderator, globalModerator, moderators, hiddenModerators, read, defaultRead, defaultAccessible, write, defaultWrite, upload, defaultUpload);
        }

        public boolean equals(Object other) {
            if (this == other) {
                return true;
            }
            if (!(other instanceof RoomInfo)) {
                return false;
            }
            RoomInfo roomInfo = (RoomInfo) other;
            return Intrinsics.areEqual(this.token, roomInfo.token) && Intrinsics.areEqual(this.name, roomInfo.name) && Intrinsics.areEqual(this.description, roomInfo.description) && this.infoUpdates == roomInfo.infoUpdates && this.messageSequence == roomInfo.messageSequence && this.created == roomInfo.created && this.activeUsers == roomInfo.activeUsers && this.activeUsersCutoff == roomInfo.activeUsersCutoff && Intrinsics.areEqual(this.imageId, roomInfo.imageId) && Intrinsics.areEqual(this.pinnedMessages, roomInfo.pinnedMessages) && this.admin == roomInfo.admin && this.globalAdmin == roomInfo.globalAdmin && Intrinsics.areEqual(this.admins, roomInfo.admins) && Intrinsics.areEqual(this.hiddenAdmins, roomInfo.hiddenAdmins) && this.moderator == roomInfo.moderator && this.globalModerator == roomInfo.globalModerator && Intrinsics.areEqual(this.moderators, roomInfo.moderators) && Intrinsics.areEqual(this.hiddenModerators, roomInfo.hiddenModerators) && this.read == roomInfo.read && this.defaultRead == roomInfo.defaultRead && this.defaultAccessible == roomInfo.defaultAccessible && this.write == roomInfo.write && this.defaultWrite == roomInfo.defaultWrite && this.upload == roomInfo.upload && this.defaultUpload == roomInfo.defaultUpload;
        }

        public int hashCode() {
            int hashCode = ((((((((((((((this.token.hashCode() * 31) + this.name.hashCode()) * 31) + this.description.hashCode()) * 31) + this.infoUpdates) * 31) + ConfigPush$$ExternalSyntheticBackport0.m(this.messageSequence)) * 31) + ConfigPush$$ExternalSyntheticBackport0.m(this.created)) * 31) + this.activeUsers) * 31) + this.activeUsersCutoff) * 31;
            String str = this.imageId;
            int hashCode2 = (((hashCode + (str == null ? 0 : str.hashCode())) * 31) + this.pinnedMessages.hashCode()) * 31;
            boolean z = this.admin;
            int i = z;
            if (z != 0) {
                i = 1;
            }
            int i2 = (hashCode2 + i) * 31;
            boolean z2 = this.globalAdmin;
            int i3 = z2;
            if (z2 != 0) {
                i3 = 1;
            }
            int hashCode3 = (((((i2 + i3) * 31) + this.admins.hashCode()) * 31) + this.hiddenAdmins.hashCode()) * 31;
            boolean z3 = this.moderator;
            int i4 = z3;
            if (z3 != 0) {
                i4 = 1;
            }
            int i5 = (hashCode3 + i4) * 31;
            boolean z4 = this.globalModerator;
            int i6 = z4;
            if (z4 != 0) {
                i6 = 1;
            }
            int hashCode4 = (((((i5 + i6) * 31) + this.moderators.hashCode()) * 31) + this.hiddenModerators.hashCode()) * 31;
            boolean z5 = this.read;
            int i7 = z5;
            if (z5 != 0) {
                i7 = 1;
            }
            int i8 = (hashCode4 + i7) * 31;
            boolean z6 = this.defaultRead;
            int i9 = z6;
            if (z6 != 0) {
                i9 = 1;
            }
            int i10 = (i8 + i9) * 31;
            boolean z7 = this.defaultAccessible;
            int i11 = z7;
            if (z7 != 0) {
                i11 = 1;
            }
            int i12 = (i10 + i11) * 31;
            boolean z8 = this.write;
            int i13 = z8;
            if (z8 != 0) {
                i13 = 1;
            }
            int i14 = (i12 + i13) * 31;
            boolean z9 = this.defaultWrite;
            int i15 = z9;
            if (z9 != 0) {
                i15 = 1;
            }
            int i16 = (i14 + i15) * 31;
            boolean z10 = this.upload;
            int i17 = z10;
            if (z10 != 0) {
                i17 = 1;
            }
            int i18 = (i16 + i17) * 31;
            boolean z11 = this.defaultUpload;
            return i18 + (z11 ? 1 : z11 ? 1 : 0);
        }

        public String toString() {
            return "RoomInfo(token=" + this.token + ", name=" + this.name + ", description=" + this.description + ", infoUpdates=" + this.infoUpdates + ", messageSequence=" + this.messageSequence + ", created=" + this.created + ", activeUsers=" + this.activeUsers + ", activeUsersCutoff=" + this.activeUsersCutoff + ", imageId=" + this.imageId + ", pinnedMessages=" + this.pinnedMessages + ", admin=" + this.admin + ", globalAdmin=" + this.globalAdmin + ", admins=" + this.admins + ", hiddenAdmins=" + this.hiddenAdmins + ", moderator=" + this.moderator + ", globalModerator=" + this.globalModerator + ", moderators=" + this.moderators + ", hiddenModerators=" + this.hiddenModerators + ", read=" + this.read + ", defaultRead=" + this.defaultRead + ", defaultAccessible=" + this.defaultAccessible + ", write=" + this.write + ", defaultWrite=" + this.defaultWrite + ", upload=" + this.upload + ", defaultUpload=" + this.defaultUpload + PropertyUtils.MAPPED_DELIM2;
        }

        public RoomInfo(String token, String name, String description, int i, long j, long j2, int i2, int i3, String str, List<PinnedMessage> pinnedMessages, boolean z, boolean z2, List<String> admins, List<String> hiddenAdmins, boolean z3, boolean z4, List<String> moderators, List<String> hiddenModerators, boolean z5, boolean z6, boolean z7, boolean z8, boolean z9, boolean z10, boolean z11) {
            Intrinsics.checkNotNullParameter(token, "token");
            Intrinsics.checkNotNullParameter(name, "name");
            Intrinsics.checkNotNullParameter(description, "description");
            Intrinsics.checkNotNullParameter(pinnedMessages, "pinnedMessages");
            Intrinsics.checkNotNullParameter(admins, "admins");
            Intrinsics.checkNotNullParameter(hiddenAdmins, "hiddenAdmins");
            Intrinsics.checkNotNullParameter(moderators, "moderators");
            Intrinsics.checkNotNullParameter(hiddenModerators, "hiddenModerators");
            this.token = token;
            this.name = name;
            this.description = description;
            this.infoUpdates = i;
            this.messageSequence = j;
            this.created = j2;
            this.activeUsers = i2;
            this.activeUsersCutoff = i3;
            this.imageId = str;
            this.pinnedMessages = pinnedMessages;
            this.admin = z;
            this.globalAdmin = z2;
            this.admins = admins;
            this.hiddenAdmins = hiddenAdmins;
            this.moderator = z3;
            this.globalModerator = z4;
            this.moderators = moderators;
            this.hiddenModerators = hiddenModerators;
            this.read = z5;
            this.defaultRead = z6;
            this.defaultAccessible = z7;
            this.write = z8;
            this.defaultWrite = z9;
            this.upload = z10;
            this.defaultUpload = z11;
        }

        public final String getToken() {
            return this.token;
        }

        public final String getName() {
            return this.name;
        }

        public final String getDescription() {
            return this.description;
        }

        public final int getInfoUpdates() {
            return this.infoUpdates;
        }

        public final long getMessageSequence() {
            return this.messageSequence;
        }

        public final long getCreated() {
            return this.created;
        }

        public final int getActiveUsers() {
            return this.activeUsers;
        }

        public final int getActiveUsersCutoff() {
            return this.activeUsersCutoff;
        }

        public final String getImageId() {
            return this.imageId;
        }

        public RoomInfo(String str, String str2, String str3, int i, long j, long j2, int i2, int i3, String str4, List list, boolean z, boolean z2, List list2, List list3, boolean z3, boolean z4, List list4, List list5, boolean z5, boolean z6, boolean z7, boolean z8, boolean z9, boolean z10, boolean z11, int i4, DefaultConstructorMarker defaultConstructorMarker) {
            this((i4 & 1) != 0 ? "" : str, (i4 & 2) != 0 ? "" : str2, (i4 & 4) == 0 ? str3 : "", (i4 & 8) != 0 ? 0 : i, (i4 & 16) != 0 ? 0L : j, (i4 & 32) == 0 ? j2 : 0L, (i4 & 64) != 0 ? 0 : i2, (i4 & 128) != 0 ? 0 : i3, (i4 & 256) != 0 ? null : str4, (i4 & 512) != 0 ? CollectionsKt.emptyList() : list, (i4 & 1024) != 0 ? false : z, (i4 & 2048) != 0 ? false : z2, (i4 & 4096) != 0 ? CollectionsKt.emptyList() : list2, (i4 & 8192) != 0 ? CollectionsKt.emptyList() : list3, (i4 & 16384) != 0 ? false : z3, (i4 & 32768) != 0 ? false : z4, (i4 & 65536) != 0 ? CollectionsKt.emptyList() : list4, (i4 & 131072) != 0 ? CollectionsKt.emptyList() : list5, (i4 & 262144) != 0 ? false : z5, (i4 & 524288) != 0 ? false : z6, (i4 & 1048576) != 0 ? false : z7, (i4 & 2097152) != 0 ? false : z8, (i4 & 4194304) != 0 ? false : z9, (i4 & 8388608) != 0 ? false : z10, (i4 & 16777216) != 0 ? false : z11);
        }

        public final List<PinnedMessage> getPinnedMessages() {
            return this.pinnedMessages;
        }

        public final boolean getAdmin() {
            return this.admin;
        }

        public final boolean getGlobalAdmin() {
            return this.globalAdmin;
        }

        public final List<String> getAdmins() {
            return this.admins;
        }

        public final List<String> getHiddenAdmins() {
            return this.hiddenAdmins;
        }

        public final boolean getModerator() {
            return this.moderator;
        }

        public final boolean getGlobalModerator() {
            return this.globalModerator;
        }

        public final List<String> getModerators() {
            return this.moderators;
        }

        public final List<String> getHiddenModerators() {
            return this.hiddenModerators;
        }

        public final boolean getRead() {
            return this.read;
        }

        public final boolean getDefaultRead() {
            return this.defaultRead;
        }

        public final boolean getDefaultAccessible() {
            return this.defaultAccessible;
        }

        public final boolean getWrite() {
            return this.write;
        }

        public final boolean getDefaultWrite() {
            return this.defaultWrite;
        }

        public final boolean getUpload() {
            return this.upload;
        }

        public final boolean getDefaultUpload() {
            return this.defaultUpload;
        }

        public final RoomPollInfo toPollInfo() {
            return new RoomPollInfo(this.token, this.activeUsers, this.admin, this.globalAdmin, this.moderator, this.globalModerator, this.read, this.defaultRead, this.defaultAccessible, this.write, this.defaultWrite, this.upload, this.defaultUpload, this);
        }
    }

    @JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
    @Metadata(d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\t\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u000b\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0002\b\u0087\b\u0018\u00002\u00020\u0001B#\u0012\b\b\u0002\u0010\u0002\u001a\u00020\u0003\u0012\b\b\u0002\u0010\u0004\u001a\u00020\u0003\u0012\b\b\u0002\u0010\u0005\u001a\u00020\u0006¢\u0006\u0002\u0010\u0007J\t\u0010\r\u001a\u00020\u0003HÆ\u0003J\t\u0010\u000e\u001a\u00020\u0003HÆ\u0003J\t\u0010\u000f\u001a\u00020\u0006HÆ\u0003J'\u0010\u0010\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u00032\b\b\u0002\u0010\u0004\u001a\u00020\u00032\b\b\u0002\u0010\u0005\u001a\u00020\u0006HÆ\u0001J\u0013\u0010\u0011\u001a\u00020\u00122\b\u0010\u0013\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\u0014\u001a\u00020\u0015HÖ\u0001J\t\u0010\u0016\u001a\u00020\u0006HÖ\u0001R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\b\u0010\tR\u0011\u0010\u0004\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\n\u0010\tR\u0011\u0010\u0005\u001a\u00020\u0006¢\u0006\b\n\u0000\u001a\u0004\b\u000b\u0010\f¨\u0006\u0017"}, d2 = {"Lorg/session/libsession/messaging/open_groups/OpenGroupApi$PinnedMessage;", "", TtmlNode.ATTR_ID, "", "pinnedAt", "pinnedBy", "", "(JJLjava/lang/String;)V", "getId", "()J", "getPinnedAt", "getPinnedBy", "()Ljava/lang/String;", "component1", "component2", "component3", "copy", "equals", "", "other", "hashCode", "", "toString", "libsession_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    public static final class PinnedMessage {
        private final long id;
        private final long pinnedAt;
        private final String pinnedBy;

        public PinnedMessage() {
            this(0L, 0L, null, 7, null);
        }

        public static PinnedMessage copy$default(PinnedMessage pinnedMessage, long j, long j2, String str, int i, Object obj) {
            if ((i & 1) != 0) {
                j = pinnedMessage.id;
            }
            long j3 = j;
            if ((i & 2) != 0) {
                j2 = pinnedMessage.pinnedAt;
            }
            long j4 = j2;
            if ((i & 4) != 0) {
                str = pinnedMessage.pinnedBy;
            }
            return pinnedMessage.copy(j3, j4, str);
        }

        public final long getId() {
            return this.id;
        }

        public final long getPinnedAt() {
            return this.pinnedAt;
        }

        public final String getPinnedBy() {
            return this.pinnedBy;
        }

        public final PinnedMessage copy(long id, long pinnedAt, String pinnedBy) {
            Intrinsics.checkNotNullParameter(pinnedBy, "pinnedBy");
            return new PinnedMessage(id, pinnedAt, pinnedBy);
        }

        public boolean equals(Object other) {
            if (this == other) {
                return true;
            }
            if (!(other instanceof PinnedMessage)) {
                return false;
            }
            PinnedMessage pinnedMessage = (PinnedMessage) other;
            return this.id == pinnedMessage.id && this.pinnedAt == pinnedMessage.pinnedAt && Intrinsics.areEqual(this.pinnedBy, pinnedMessage.pinnedBy);
        }

        public int hashCode() {
            return (((ConfigPush$$ExternalSyntheticBackport0.m(this.id) * 31) + ConfigPush$$ExternalSyntheticBackport0.m(this.pinnedAt)) * 31) + this.pinnedBy.hashCode();
        }

        public String toString() {
            return "PinnedMessage(id=" + this.id + ", pinnedAt=" + this.pinnedAt + ", pinnedBy=" + this.pinnedBy + PropertyUtils.MAPPED_DELIM2;
        }

        public PinnedMessage(long j, long j2, String pinnedBy) {
            Intrinsics.checkNotNullParameter(pinnedBy, "pinnedBy");
            this.id = j;
            this.pinnedAt = j2;
            this.pinnedBy = pinnedBy;
        }

        public PinnedMessage(long j, long j2, String str, int i, DefaultConstructorMarker defaultConstructorMarker) {
            this((i & 1) != 0 ? 0L : j, (i & 2) == 0 ? j2 : 0L, (i & 4) != 0 ? "" : str);
        }

        public final long getId() {
            return this.id;
        }

        public final long getPinnedAt() {
            return this.pinnedAt;
        }

        public final String getPinnedBy() {
            return this.pinnedBy;
        }
    }

    @JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
    @Metadata(d1 = {"\u0000:\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010$\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u000f\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0002\b\u0087\b\u0018\u0000*\u0004\b\u0000\u0010\u00012\u00020\u0002B9\u0012\u0006\u0010\u0003\u001a\u00020\u0004\u0012\u0006\u0010\u0005\u001a\u00020\u0006\u0012\u0014\b\u0002\u0010\u0007\u001a\u000e\u0012\u0004\u0012\u00020\t\u0012\u0004\u0012\u00020\t0\b\u0012\f\u0010\n\u001a\b\u0012\u0004\u0012\u00028\u00000\u000b¢\u0006\u0002\u0010\fJ\t\u0010\u0015\u001a\u00020\u0004HÆ\u0003J\t\u0010\u0016\u001a\u00020\u0006HÆ\u0003J\u0015\u0010\u0017\u001a\u000e\u0012\u0004\u0012\u00020\t\u0012\u0004\u0012\u00020\t0\bHÆ\u0003J\u000f\u0010\u0018\u001a\b\u0012\u0004\u0012\u00028\u00000\u000bHÆ\u0003JI\u0010\u0019\u001a\b\u0012\u0004\u0012\u00028\u00000\u00002\b\b\u0002\u0010\u0003\u001a\u00020\u00042\b\b\u0002\u0010\u0005\u001a\u00020\u00062\u0014\b\u0002\u0010\u0007\u001a\u000e\u0012\u0004\u0012\u00020\t\u0012\u0004\u0012\u00020\t0\b2\u000e\b\u0002\u0010\n\u001a\b\u0012\u0004\u0012\u00028\u00000\u000bHÆ\u0001J\u0013\u0010\u001a\u001a\u00020\u001b2\b\u0010\u001c\u001a\u0004\u0018\u00010\u0002HÖ\u0003J\t\u0010\u001d\u001a\u00020\u001eHÖ\u0001J\t\u0010\u001f\u001a\u00020\tHÖ\u0001R\u0011\u0010\u0005\u001a\u00020\u0006¢\u0006\b\n\u0000\u001a\u0004\b\r\u0010\u000eR\u001d\u0010\u0007\u001a\u000e\u0012\u0004\u0012\u00020\t\u0012\u0004\u0012\u00020\t0\b¢\u0006\b\n\u0000\u001a\u0004\b\u000f\u0010\u0010R\u0011\u0010\u0003\u001a\u00020\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0011\u0010\u0012R\u0017\u0010\n\u001a\b\u0012\u0004\u0012\u00028\u00000\u000b¢\u0006\b\n\u0000\u001a\u0004\b\u0013\u0010\u0014¨\u0006 "}, d2 = {"Lorg/session/libsession/messaging/open_groups/OpenGroupApi$BatchRequestInfo;", ExifInterface.GPS_DIRECTION_TRUE, "", "request", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$BatchRequest;", "endpoint", "Lorg/session/libsession/messaging/open_groups/Endpoint;", "queryParameters", "", "", "responseType", "Lcom/fasterxml/jackson/core/type/TypeReference;", "(Lorg/session/libsession/messaging/open_groups/OpenGroupApi$BatchRequest;Lorg/session/libsession/messaging/open_groups/Endpoint;Ljava/util/Map;Lcom/fasterxml/jackson/core/type/TypeReference;)V", "getEndpoint", "()Lorg/session/libsession/messaging/open_groups/Endpoint;", "getQueryParameters", "()Ljava/util/Map;", "getRequest", "()Lorg/session/libsession/messaging/open_groups/OpenGroupApi$BatchRequest;", "getResponseType", "()Lcom/fasterxml/jackson/core/type/TypeReference;", "component1", "component2", "component3", "component4", "copy", "equals", "", "other", "hashCode", "", "toString", "libsession_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    public static final class BatchRequestInfo<T> {
        private final Endpoint endpoint;
        private final Map<String, String> queryParameters;
        private final BatchRequest request;
        private final TypeReference<T> responseType;

        public static BatchRequestInfo copy$default(BatchRequestInfo batchRequestInfo, BatchRequest batchRequest, Endpoint endpoint, Map map, TypeReference typeReference, int i, Object obj) {
            if ((i & 1) != 0) {
                batchRequest = batchRequestInfo.request;
            }
            if ((i & 2) != 0) {
                endpoint = batchRequestInfo.endpoint;
            }
            if ((i & 4) != 0) {
                map = batchRequestInfo.queryParameters;
            }
            if ((i & 8) != 0) {
                typeReference = batchRequestInfo.responseType;
            }
            return batchRequestInfo.copy(batchRequest, endpoint, map, typeReference);
        }

        public final BatchRequest getRequest() {
            return this.request;
        }

        public final Endpoint getEndpoint() {
            return this.endpoint;
        }

        public final Map<String, String> component3() {
            return this.queryParameters;
        }

        public final TypeReference<T> component4() {
            return this.responseType;
        }

        public final BatchRequestInfo<T> copy(BatchRequest request, Endpoint endpoint, Map<String, String> queryParameters, TypeReference<T> responseType) {
            Intrinsics.checkNotNullParameter(request, "request");
            Intrinsics.checkNotNullParameter(endpoint, "endpoint");
            Intrinsics.checkNotNullParameter(queryParameters, "queryParameters");
            Intrinsics.checkNotNullParameter(responseType, "responseType");
            return new BatchRequestInfo<>(request, endpoint, queryParameters, responseType);
        }

        public boolean equals(Object other) {
            if (this == other) {
                return true;
            }
            if (!(other instanceof BatchRequestInfo)) {
                return false;
            }
            BatchRequestInfo batchRequestInfo = (BatchRequestInfo) other;
            return Intrinsics.areEqual(this.request, batchRequestInfo.request) && Intrinsics.areEqual(this.endpoint, batchRequestInfo.endpoint) && Intrinsics.areEqual(this.queryParameters, batchRequestInfo.queryParameters) && Intrinsics.areEqual(this.responseType, batchRequestInfo.responseType);
        }

        public int hashCode() {
            return (((((this.request.hashCode() * 31) + this.endpoint.hashCode()) * 31) + this.queryParameters.hashCode()) * 31) + this.responseType.hashCode();
        }

        public String toString() {
            return "BatchRequestInfo(request=" + this.request + ", endpoint=" + this.endpoint + ", queryParameters=" + this.queryParameters + ", responseType=" + this.responseType + PropertyUtils.MAPPED_DELIM2;
        }

        public BatchRequestInfo(BatchRequest request, Endpoint endpoint, Map<String, String> queryParameters, TypeReference<T> responseType) {
            Intrinsics.checkNotNullParameter(request, "request");
            Intrinsics.checkNotNullParameter(endpoint, "endpoint");
            Intrinsics.checkNotNullParameter(queryParameters, "queryParameters");
            Intrinsics.checkNotNullParameter(responseType, "responseType");
            this.request = request;
            this.endpoint = endpoint;
            this.queryParameters = queryParameters;
            this.responseType = responseType;
        }

        public final BatchRequest getRequest() {
            return this.request;
        }

        public final Endpoint getEndpoint() {
            return this.endpoint;
        }

        public BatchRequestInfo(BatchRequest batchRequest, Endpoint endpoint, Map map, TypeReference typeReference, int i, DefaultConstructorMarker defaultConstructorMarker) {
            this(batchRequest, endpoint, (i & 4) != 0 ? MapsKt.emptyMap() : map, typeReference);
        }

        public final Map<String, String> getQueryParameters() {
            return this.queryParameters;
        }

        public final TypeReference<T> getResponseType() {
            return this.responseType;
        }
    }

    @JsonInclude(JsonInclude.Include.NON_NULL)
    @Metadata(d1 = {"\u00006\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010$\n\u0002\b\u0003\n\u0002\u0010\u0012\n\u0002\b\u0013\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0002\b\u0087\b\u0018\u00002\u00020\u0001B[\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\u0014\b\u0002\u0010\u0006\u001a\u000e\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u00050\u0007\u0012\u0016\b\u0002\u0010\b\u001a\u0010\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u0001\u0018\u00010\u0007\u0012\n\b\u0002\u0010\t\u001a\u0004\u0018\u00010\u0005\u0012\n\b\u0002\u0010\n\u001a\u0004\u0018\u00010\u000b¢\u0006\u0002\u0010\fJ\t\u0010\u0017\u001a\u00020\u0003HÆ\u0003J\t\u0010\u0018\u001a\u00020\u0005HÆ\u0003J\u0015\u0010\u0019\u001a\u000e\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u00050\u0007HÆ\u0003J\u0017\u0010\u001a\u001a\u0010\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u0001\u0018\u00010\u0007HÆ\u0003J\u000b\u0010\u001b\u001a\u0004\u0018\u00010\u0005HÆ\u0003J\u000b\u0010\u001c\u001a\u0004\u0018\u00010\u000bHÆ\u0003Jc\u0010\u001d\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u00032\b\b\u0002\u0010\u0004\u001a\u00020\u00052\u0014\b\u0002\u0010\u0006\u001a\u000e\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u00050\u00072\u0016\b\u0002\u0010\b\u001a\u0010\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u0001\u0018\u00010\u00072\n\b\u0002\u0010\t\u001a\u0004\u0018\u00010\u00052\n\b\u0002\u0010\n\u001a\u0004\u0018\u00010\u000bHÆ\u0001J\u0013\u0010\u001e\u001a\u00020\u001f2\b\u0010 \u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010!\u001a\u00020\"HÖ\u0001J\t\u0010#\u001a\u00020\u0005HÖ\u0001R\u0013\u0010\t\u001a\u0004\u0018\u00010\u0005¢\u0006\b\n\u0000\u001a\u0004\b\r\u0010\u000eR\u0013\u0010\n\u001a\u0004\u0018\u00010\u000b¢\u0006\b\n\u0000\u001a\u0004\b\u000f\u0010\u0010R\u001d\u0010\u0006\u001a\u000e\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u00050\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u0011\u0010\u0012R\u001f\u0010\b\u001a\u0010\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u0001\u0018\u00010\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u0013\u0010\u0012R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0014\u0010\u0015R\u0011\u0010\u0004\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u0016\u0010\u000e¨\u0006$"}, d2 = {"Lorg/session/libsession/messaging/open_groups/OpenGroupApi$BatchRequest;", "", "method", "Lorg/session/libsignal/utilities/HTTP$Verb;", "path", "", Downloads.Impl.RequestHeaders.URI_SEGMENT, "", "json", "b64", "bytes", "", "(Lorg/session/libsignal/utilities/HTTP$Verb;Ljava/lang/String;Ljava/util/Map;Ljava/util/Map;Ljava/lang/String;[B)V", "getB64", "()Ljava/lang/String;", "getBytes", "()[B", "getHeaders", "()Ljava/util/Map;", "getJson", "getMethod", "()Lorg/session/libsignal/utilities/HTTP$Verb;", "getPath", "component1", "component2", "component3", "component4", "component5", "component6", "copy", "equals", "", "other", "hashCode", "", "toString", "libsession_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    public static final class BatchRequest {
        private final String b64;
        private final byte[] bytes;
        private final Map<String, String> headers;
        private final Map<String, Object> json;
        private final HTTP.Verb method;
        private final String path;

        public static BatchRequest copy$default(BatchRequest batchRequest, HTTP.Verb verb, String str, Map map, Map map2, String str2, byte[] bArr, int i, Object obj) {
            if ((i & 1) != 0) {
                verb = batchRequest.method;
            }
            if ((i & 2) != 0) {
                str = batchRequest.path;
            }
            String str3 = str;
            if ((i & 4) != 0) {
                map = batchRequest.headers;
            }
            Map map3 = map;
            if ((i & 8) != 0) {
                map2 = batchRequest.json;
            }
            Map map4 = map2;
            if ((i & 16) != 0) {
                str2 = batchRequest.b64;
            }
            String str4 = str2;
            if ((i & 32) != 0) {
                bArr = batchRequest.bytes;
            }
            return batchRequest.copy(verb, str3, map3, map4, str4, bArr);
        }

        public final HTTP.Verb getMethod() {
            return this.method;
        }

        public final String getPath() {
            return this.path;
        }

        public final Map<String, String> component3() {
            return this.headers;
        }

        public final Map<String, Object> component4() {
            return this.json;
        }

        public final String getB64() {
            return this.b64;
        }

        public final byte[] getBytes() {
            return this.bytes;
        }

        public final BatchRequest copy(HTTP.Verb method, String path, Map<String, String> headers, Map<String, ? extends Object> json, String b64, byte[] bytes) {
            Intrinsics.checkNotNullParameter(method, "method");
            Intrinsics.checkNotNullParameter(path, "path");
            Intrinsics.checkNotNullParameter(headers, "headers");
            return new BatchRequest(method, path, headers, json, b64, bytes);
        }

        public boolean equals(Object other) {
            if (this == other) {
                return true;
            }
            if (!(other instanceof BatchRequest)) {
                return false;
            }
            BatchRequest batchRequest = (BatchRequest) other;
            return this.method == batchRequest.method && Intrinsics.areEqual(this.path, batchRequest.path) && Intrinsics.areEqual(this.headers, batchRequest.headers) && Intrinsics.areEqual(this.json, batchRequest.json) && Intrinsics.areEqual(this.b64, batchRequest.b64) && Intrinsics.areEqual(this.bytes, batchRequest.bytes);
        }

        public int hashCode() {
            int hashCode = ((((this.method.hashCode() * 31) + this.path.hashCode()) * 31) + this.headers.hashCode()) * 31;
            Map<String, Object> map = this.json;
            int hashCode2 = (hashCode + (map == null ? 0 : map.hashCode())) * 31;
            String str = this.b64;
            int hashCode3 = (hashCode2 + (str == null ? 0 : str.hashCode())) * 31;
            byte[] bArr = this.bytes;
            return hashCode3 + (bArr != null ? Arrays.hashCode(bArr) : 0);
        }

        public String toString() {
            return "BatchRequest(method=" + this.method + ", path=" + this.path + ", headers=" + this.headers + ", json=" + this.json + ", b64=" + this.b64 + ", bytes=" + Arrays.toString(this.bytes) + PropertyUtils.MAPPED_DELIM2;
        }

        public BatchRequest(HTTP.Verb method, String path, Map<String, String> headers, Map<String, ? extends Object> map, String str, byte[] bArr) {
            Intrinsics.checkNotNullParameter(method, "method");
            Intrinsics.checkNotNullParameter(path, "path");
            Intrinsics.checkNotNullParameter(headers, "headers");
            this.method = method;
            this.path = path;
            this.headers = headers;
            this.json = map;
            this.b64 = str;
            this.bytes = bArr;
        }

        public final HTTP.Verb getMethod() {
            return this.method;
        }

        public final String getPath() {
            return this.path;
        }

        public BatchRequest(HTTP.Verb verb, String str, Map map, Map map2, String str2, byte[] bArr, int i, DefaultConstructorMarker defaultConstructorMarker) {
            this(verb, str, (i & 4) != 0 ? MapsKt.emptyMap() : map, (i & 8) != 0 ? null : map2, (i & 16) != 0 ? null : str2, (i & 32) != 0 ? null : bArr);
        }

        public final Map<String, String> getHeaders() {
            return this.headers;
        }

        public final Map<String, Object> getJson() {
            return this.json;
        }

        public final String getB64() {
            return this.b64;
        }

        public final byte[] getBytes() {
            return this.bytes;
        }
    }

    @Metadata(d1 = {"\u0000,\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010$\n\u0002\u0010\u000e\n\u0002\b\u0012\n\u0002\u0010\u000b\n\u0002\b\u0004\b\u0086\b\u0018\u0000*\u0004\b\u0000\u0010\u00012\u00020\u0002B3\u0012\u0006\u0010\u0003\u001a\u00020\u0004\u0012\u0006\u0010\u0005\u001a\u00020\u0006\u0012\u0012\u0010\u0007\u001a\u000e\u0012\u0004\u0012\u00020\t\u0012\u0004\u0012\u00020\t0\b\u0012\b\u0010\n\u001a\u0004\u0018\u00018\u0000¢\u0006\u0002\u0010\u000bJ\t\u0010\u0015\u001a\u00020\u0004HÆ\u0003J\t\u0010\u0016\u001a\u00020\u0006HÆ\u0003J\u0015\u0010\u0017\u001a\u000e\u0012\u0004\u0012\u00020\t\u0012\u0004\u0012\u00020\t0\bHÆ\u0003J\u0010\u0010\u0018\u001a\u0004\u0018\u00018\u0000HÆ\u0003¢\u0006\u0002\u0010\rJJ\u0010\u0019\u001a\b\u0012\u0004\u0012\u00028\u00000\u00002\b\b\u0002\u0010\u0003\u001a\u00020\u00042\b\b\u0002\u0010\u0005\u001a\u00020\u00062\u0014\b\u0002\u0010\u0007\u001a\u000e\u0012\u0004\u0012\u00020\t\u0012\u0004\u0012\u00020\t0\b2\n\b\u0002\u0010\n\u001a\u0004\u0018\u00018\u0000HÆ\u0001¢\u0006\u0002\u0010\u001aJ\u0013\u0010\u001b\u001a\u00020\u001c2\b\u0010\u001d\u001a\u0004\u0018\u00010\u0002HÖ\u0003J\t\u0010\u001e\u001a\u00020\u0006HÖ\u0001J\t\u0010\u001f\u001a\u00020\tHÖ\u0001R\u0015\u0010\n\u001a\u0004\u0018\u00018\u0000¢\u0006\n\n\u0002\u0010\u000e\u001a\u0004\b\f\u0010\rR\u0011\u0010\u0005\u001a\u00020\u0006¢\u0006\b\n\u0000\u001a\u0004\b\u000f\u0010\u0010R\u0011\u0010\u0003\u001a\u00020\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0011\u0010\u0012R\u001d\u0010\u0007\u001a\u000e\u0012\u0004\u0012\u00020\t\u0012\u0004\u0012\u00020\t0\b¢\u0006\b\n\u0000\u001a\u0004\b\u0013\u0010\u0014¨\u0006 "}, d2 = {"Lorg/session/libsession/messaging/open_groups/OpenGroupApi$BatchResponse;", ExifInterface.GPS_DIRECTION_TRUE, "", "endpoint", "Lorg/session/libsession/messaging/open_groups/Endpoint;", "code", "", Downloads.Impl.RequestHeaders.URI_SEGMENT, "", "", "body", "(Lorg/session/libsession/messaging/open_groups/Endpoint;ILjava/util/Map;Ljava/lang/Object;)V", "getBody", "()Ljava/lang/Object;", "Ljava/lang/Object;", "getCode", "()I", "getEndpoint", "()Lorg/session/libsession/messaging/open_groups/Endpoint;", "getHeaders", "()Ljava/util/Map;", "component1", "component2", "component3", "component4", "copy", "(Lorg/session/libsession/messaging/open_groups/Endpoint;ILjava/util/Map;Ljava/lang/Object;)Lorg/session/libsession/messaging/open_groups/OpenGroupApi$BatchResponse;", "equals", "", "other", "hashCode", "toString", "libsession_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    public static final class BatchResponse<T> {
        private final T body;
        private final int code;
        private final Endpoint endpoint;
        private final Map<String, String> headers;

        public static BatchResponse copy$default(BatchResponse batchResponse, Endpoint endpoint, int i, Map map, Object obj, int i2, Object obj2) {
            if ((i2 & 1) != 0) {
                endpoint = batchResponse.endpoint;
            }
            if ((i2 & 2) != 0) {
                i = batchResponse.code;
            }
            if ((i2 & 4) != 0) {
                map = batchResponse.headers;
            }
            if ((i2 & 8) != 0) {
                obj = batchResponse.body;
            }
            return batchResponse.copy(endpoint, i, map, obj);
        }

        public final Endpoint getEndpoint() {
            return this.endpoint;
        }

        public final int getCode() {
            return this.code;
        }

        public final Map<String, String> component3() {
            return this.headers;
        }

        public final T component4() {
            return this.body;
        }

        public final BatchResponse<T> copy(Endpoint endpoint, int code, Map<String, String> headers, T body) {
            Intrinsics.checkNotNullParameter(endpoint, "endpoint");
            Intrinsics.checkNotNullParameter(headers, "headers");
            return new BatchResponse<>(endpoint, code, headers, body);
        }

        public boolean equals(Object other) {
            if (this == other) {
                return true;
            }
            if (!(other instanceof BatchResponse)) {
                return false;
            }
            BatchResponse batchResponse = (BatchResponse) other;
            return Intrinsics.areEqual(this.endpoint, batchResponse.endpoint) && this.code == batchResponse.code && Intrinsics.areEqual(this.headers, batchResponse.headers) && Intrinsics.areEqual(this.body, batchResponse.body);
        }

        public int hashCode() {
            int hashCode = ((((this.endpoint.hashCode() * 31) + this.code) * 31) + this.headers.hashCode()) * 31;
            T t = this.body;
            return hashCode + (t == null ? 0 : t.hashCode());
        }

        public String toString() {
            return "BatchResponse(endpoint=" + this.endpoint + ", code=" + this.code + ", headers=" + this.headers + ", body=" + this.body + PropertyUtils.MAPPED_DELIM2;
        }

        public BatchResponse(Endpoint endpoint, int i, Map<String, String> headers, T t) {
            Intrinsics.checkNotNullParameter(endpoint, "endpoint");
            Intrinsics.checkNotNullParameter(headers, "headers");
            this.endpoint = endpoint;
            this.code = i;
            this.headers = headers;
            this.body = t;
        }

        public final Endpoint getEndpoint() {
            return this.endpoint;
        }

        public final int getCode() {
            return this.code;
        }

        public final Map<String, String> getHeaders() {
            return this.headers;
        }

        public final T getBody() {
            return this.body;
        }
    }

    @Metadata(d1 = {"\u0000&\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010 \n\u0002\u0010\u000e\n\u0002\b\t\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0002\b\u0086\b\u0018\u00002\u00020\u0001B%\u0012\u000e\b\u0002\u0010\u0002\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003\u0012\u000e\b\u0002\u0010\u0005\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003¢\u0006\u0002\u0010\u0006J\u000f\u0010\n\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003HÆ\u0003J\u000f\u0010\u000b\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003HÆ\u0003J)\u0010\f\u001a\u00020\u00002\u000e\b\u0002\u0010\u0002\u001a\b\u0012\u0004\u0012\u00020\u00040\u00032\u000e\b\u0002\u0010\u0005\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003HÆ\u0001J\u0013\u0010\r\u001a\u00020\u000e2\b\u0010\u000f\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\u0010\u001a\u00020\u0011HÖ\u0001J\t\u0010\u0012\u001a\u00020\u0004HÖ\u0001R\u0017\u0010\u0002\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0007\u0010\bR\u0017\u0010\u0005\u001a\b\u0012\u0004\u0012\u00020\u00040\u0003¢\u0006\b\n\u0000\u001a\u0004\b\t\u0010\b¨\u0006\u0013"}, d2 = {"Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Capabilities;", "", "capabilities", "", "", "missing", "(Ljava/util/List;Ljava/util/List;)V", "getCapabilities", "()Ljava/util/List;", "getMissing", "component1", "component2", "copy", "equals", "", "other", "hashCode", "", "toString", "libsession_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    public static final class Capabilities {
        private final List<String> capabilities;
        private final List<String> missing;

        public Capabilities() {
            this(null, 0 == true ? 1 : 0, 3, 0 == true ? 1 : 0);
        }

        public static Capabilities copy$default(Capabilities capabilities, List list, List list2, int i, Object obj) {
            if ((i & 1) != 0) {
                list = capabilities.capabilities;
            }
            if ((i & 2) != 0) {
                list2 = capabilities.missing;
            }
            return capabilities.copy(list, list2);
        }

        public final List<String> component1() {
            return this.capabilities;
        }

        public final List<String> component2() {
            return this.missing;
        }

        public final Capabilities copy(List<String> capabilities, List<String> missing) {
            Intrinsics.checkNotNullParameter(capabilities, "capabilities");
            Intrinsics.checkNotNullParameter(missing, "missing");
            return new Capabilities(capabilities, missing);
        }

        public boolean equals(Object other) {
            if (this == other) {
                return true;
            }
            if (!(other instanceof Capabilities)) {
                return false;
            }
            Capabilities capabilities = (Capabilities) other;
            return Intrinsics.areEqual(this.capabilities, capabilities.capabilities) && Intrinsics.areEqual(this.missing, capabilities.missing);
        }

        public int hashCode() {
            return (this.capabilities.hashCode() * 31) + this.missing.hashCode();
        }

        public String toString() {
            return "Capabilities(capabilities=" + this.capabilities + ", missing=" + this.missing + PropertyUtils.MAPPED_DELIM2;
        }

        public Capabilities(List<String> capabilities, List<String> missing) {
            Intrinsics.checkNotNullParameter(capabilities, "capabilities");
            Intrinsics.checkNotNullParameter(missing, "missing");
            this.capabilities = capabilities;
            this.missing = missing;
        }

        public Capabilities(List list, List list2, int i, DefaultConstructorMarker defaultConstructorMarker) {
            this((i & 1) != 0 ? CollectionsKt.emptyList() : list, (i & 2) != 0 ? CollectionsKt.emptyList() : list2);
        }

        public final List<String> getCapabilities() {
            return this.capabilities;
        }

        public final List<String> getMissing() {
            return this.missing;
        }
    }

    @JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
    @Metadata(d1 = {"\u0000&\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u000b\n\u0002\u0018\u0002\n\u0002\b'\b\u0087\b\u0018\u00002\u00020\u0001B\u0093\u0001\u0012\b\b\u0002\u0010\u0002\u001a\u00020\u0003\u0012\b\b\u0002\u0010\u0004\u001a\u00020\u0005\u0012\b\b\u0002\u0010\u0006\u001a\u00020\u0007\u0012\b\b\u0002\u0010\b\u001a\u00020\u0007\u0012\b\b\u0002\u0010\t\u001a\u00020\u0007\u0012\b\b\u0002\u0010\n\u001a\u00020\u0007\u0012\b\b\u0002\u0010\u000b\u001a\u00020\u0007\u0012\b\b\u0002\u0010\f\u001a\u00020\u0007\u0012\b\b\u0002\u0010\r\u001a\u00020\u0007\u0012\b\b\u0002\u0010\u000e\u001a\u00020\u0007\u0012\b\b\u0002\u0010\u000f\u001a\u00020\u0007\u0012\b\b\u0002\u0010\u0010\u001a\u00020\u0007\u0012\b\b\u0002\u0010\u0011\u001a\u00020\u0007\u0012\n\b\u0002\u0010\u0012\u001a\u0004\u0018\u00010\u0013¢\u0006\u0002\u0010\u0014J\t\u0010'\u001a\u00020\u0003HÆ\u0003J\t\u0010(\u001a\u00020\u0007HÆ\u0003J\t\u0010)\u001a\u00020\u0007HÆ\u0003J\t\u0010*\u001a\u00020\u0007HÆ\u0003J\t\u0010+\u001a\u00020\u0007HÆ\u0003J\u000b\u0010,\u001a\u0004\u0018\u00010\u0013HÆ\u0003J\t\u0010-\u001a\u00020\u0005HÆ\u0003J\t\u0010.\u001a\u00020\u0007HÆ\u0003J\t\u0010/\u001a\u00020\u0007HÆ\u0003J\t\u00100\u001a\u00020\u0007HÆ\u0003J\t\u00101\u001a\u00020\u0007HÆ\u0003J\t\u00102\u001a\u00020\u0007HÆ\u0003J\t\u00103\u001a\u00020\u0007HÆ\u0003J\t\u00104\u001a\u00020\u0007HÆ\u0003J\u0097\u0001\u00105\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u00032\b\b\u0002\u0010\u0004\u001a\u00020\u00052\b\b\u0002\u0010\u0006\u001a\u00020\u00072\b\b\u0002\u0010\b\u001a\u00020\u00072\b\b\u0002\u0010\t\u001a\u00020\u00072\b\b\u0002\u0010\n\u001a\u00020\u00072\b\b\u0002\u0010\u000b\u001a\u00020\u00072\b\b\u0002\u0010\f\u001a\u00020\u00072\b\b\u0002\u0010\r\u001a\u00020\u00072\b\b\u0002\u0010\u000e\u001a\u00020\u00072\b\b\u0002\u0010\u000f\u001a\u00020\u00072\b\b\u0002\u0010\u0010\u001a\u00020\u00072\b\b\u0002\u0010\u0011\u001a\u00020\u00072\n\b\u0002\u0010\u0012\u001a\u0004\u0018\u00010\u0013HÆ\u0001J\u0013\u00106\u001a\u00020\u00072\b\u00107\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u00108\u001a\u00020\u0005HÖ\u0001J\t\u00109\u001a\u00020\u0003HÖ\u0001R\u0011\u0010\u0004\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u0015\u0010\u0016R\u0011\u0010\u0006\u001a\u00020\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u0017\u0010\u0018R\u0011\u0010\r\u001a\u00020\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u0019\u0010\u0018R\u0011\u0010\f\u001a\u00020\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u001a\u0010\u0018R\u0011\u0010\u0011\u001a\u00020\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u001b\u0010\u0018R\u0011\u0010\u000f\u001a\u00020\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u001c\u0010\u0018R\u0013\u0010\u0012\u001a\u0004\u0018\u00010\u0013¢\u0006\b\n\u0000\u001a\u0004\b\u001d\u0010\u001eR\u0011\u0010\b\u001a\u00020\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u001f\u0010\u0018R\u0011\u0010\n\u001a\u00020\u0007¢\u0006\b\n\u0000\u001a\u0004\b \u0010\u0018R\u0011\u0010\t\u001a\u00020\u0007¢\u0006\b\n\u0000\u001a\u0004\b!\u0010\u0018R\u0011\u0010\u000b\u001a\u00020\u0007¢\u0006\b\n\u0000\u001a\u0004\b\"\u0010\u0018R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b#\u0010$R\u0011\u0010\u0010\u001a\u00020\u0007¢\u0006\b\n\u0000\u001a\u0004\b%\u0010\u0018R\u0011\u0010\u000e\u001a\u00020\u0007¢\u0006\b\n\u0000\u001a\u0004\b&\u0010\u0018¨\u0006:"}, d2 = {"Lorg/session/libsession/messaging/open_groups/OpenGroupApi$RoomPollInfo;", "", "token", "", "activeUsers", "", "admin", "", "globalAdmin", "moderator", "globalModerator", "read", "defaultRead", "defaultAccessible", "write", "defaultWrite", "upload", "defaultUpload", "details", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$RoomInfo;", "(Ljava/lang/String;IZZZZZZZZZZZLorg/session/libsession/messaging/open_groups/OpenGroupApi$RoomInfo;)V", "getActiveUsers", "()I", "getAdmin", "()Z", "getDefaultAccessible", "getDefaultRead", "getDefaultUpload", "getDefaultWrite", "getDetails", "()Lorg/session/libsession/messaging/open_groups/OpenGroupApi$RoomInfo;", "getGlobalAdmin", "getGlobalModerator", "getModerator", "getRead", "getToken", "()Ljava/lang/String;", "getUpload", "getWrite", "component1", "component10", "component11", "component12", "component13", "component14", "component2", "component3", "component4", "component5", "component6", "component7", "component8", "component9", "copy", "equals", "other", "hashCode", "toString", "libsession_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    public static final class RoomPollInfo {
        private final int activeUsers;
        private final boolean admin;
        private final boolean defaultAccessible;
        private final boolean defaultRead;
        private final boolean defaultUpload;
        private final boolean defaultWrite;
        private final RoomInfo details;
        private final boolean globalAdmin;
        private final boolean globalModerator;
        private final boolean moderator;
        private final boolean read;
        private final String token;
        private final boolean upload;
        private final boolean write;

        public RoomPollInfo() {
            this(null, 0, false, false, false, false, false, false, false, false, false, false, false, null, 16383, null);
        }

        public final String getToken() {
            return this.token;
        }

        public final boolean getWrite() {
            return this.write;
        }

        public final boolean getDefaultWrite() {
            return this.defaultWrite;
        }

        public final boolean getUpload() {
            return this.upload;
        }

        public final boolean getDefaultUpload() {
            return this.defaultUpload;
        }

        public final RoomInfo getDetails() {
            return this.details;
        }

        public final int getActiveUsers() {
            return this.activeUsers;
        }

        public final boolean getAdmin() {
            return this.admin;
        }

        public final boolean getGlobalAdmin() {
            return this.globalAdmin;
        }

        public final boolean getModerator() {
            return this.moderator;
        }

        public final boolean getGlobalModerator() {
            return this.globalModerator;
        }

        public final boolean getRead() {
            return this.read;
        }

        public final boolean getDefaultRead() {
            return this.defaultRead;
        }

        public final boolean getDefaultAccessible() {
            return this.defaultAccessible;
        }

        public final RoomPollInfo copy(String token, int activeUsers, boolean admin, boolean globalAdmin, boolean moderator, boolean globalModerator, boolean read, boolean defaultRead, boolean defaultAccessible, boolean write, boolean defaultWrite, boolean upload, boolean defaultUpload, RoomInfo details) {
            Intrinsics.checkNotNullParameter(token, "token");
            return new RoomPollInfo(token, activeUsers, admin, globalAdmin, moderator, globalModerator, read, defaultRead, defaultAccessible, write, defaultWrite, upload, defaultUpload, details);
        }

        public boolean equals(Object other) {
            if (this == other) {
                return true;
            }
            if (!(other instanceof RoomPollInfo)) {
                return false;
            }
            RoomPollInfo roomPollInfo = (RoomPollInfo) other;
            return Intrinsics.areEqual(this.token, roomPollInfo.token) && this.activeUsers == roomPollInfo.activeUsers && this.admin == roomPollInfo.admin && this.globalAdmin == roomPollInfo.globalAdmin && this.moderator == roomPollInfo.moderator && this.globalModerator == roomPollInfo.globalModerator && this.read == roomPollInfo.read && this.defaultRead == roomPollInfo.defaultRead && this.defaultAccessible == roomPollInfo.defaultAccessible && this.write == roomPollInfo.write && this.defaultWrite == roomPollInfo.defaultWrite && this.upload == roomPollInfo.upload && this.defaultUpload == roomPollInfo.defaultUpload && Intrinsics.areEqual(this.details, roomPollInfo.details);
        }

        public int hashCode() {
            int hashCode = ((this.token.hashCode() * 31) + this.activeUsers) * 31;
            boolean z = this.admin;
            int i = z;
            if (z != 0) {
                i = 1;
            }
            int i2 = (hashCode + i) * 31;
            boolean z2 = this.globalAdmin;
            int i3 = z2;
            if (z2 != 0) {
                i3 = 1;
            }
            int i4 = (i2 + i3) * 31;
            boolean z3 = this.moderator;
            int i5 = z3;
            if (z3 != 0) {
                i5 = 1;
            }
            int i6 = (i4 + i5) * 31;
            boolean z4 = this.globalModerator;
            int i7 = z4;
            if (z4 != 0) {
                i7 = 1;
            }
            int i8 = (i6 + i7) * 31;
            boolean z5 = this.read;
            int i9 = z5;
            if (z5 != 0) {
                i9 = 1;
            }
            int i10 = (i8 + i9) * 31;
            boolean z6 = this.defaultRead;
            int i11 = z6;
            if (z6 != 0) {
                i11 = 1;
            }
            int i12 = (i10 + i11) * 31;
            boolean z7 = this.defaultAccessible;
            int i13 = z7;
            if (z7 != 0) {
                i13 = 1;
            }
            int i14 = (i12 + i13) * 31;
            boolean z8 = this.write;
            int i15 = z8;
            if (z8 != 0) {
                i15 = 1;
            }
            int i16 = (i14 + i15) * 31;
            boolean z9 = this.defaultWrite;
            int i17 = z9;
            if (z9 != 0) {
                i17 = 1;
            }
            int i18 = (i16 + i17) * 31;
            boolean z10 = this.upload;
            int i19 = z10;
            if (z10 != 0) {
                i19 = 1;
            }
            int i20 = (i18 + i19) * 31;
            boolean z11 = this.defaultUpload;
            int i21 = (i20 + (z11 ? 1 : z11 ? 1 : 0)) * 31;
            RoomInfo roomInfo = this.details;
            return i21 + (roomInfo == null ? 0 : roomInfo.hashCode());
        }

        public String toString() {
            return "RoomPollInfo(token=" + this.token + ", activeUsers=" + this.activeUsers + ", admin=" + this.admin + ", globalAdmin=" + this.globalAdmin + ", moderator=" + this.moderator + ", globalModerator=" + this.globalModerator + ", read=" + this.read + ", defaultRead=" + this.defaultRead + ", defaultAccessible=" + this.defaultAccessible + ", write=" + this.write + ", defaultWrite=" + this.defaultWrite + ", upload=" + this.upload + ", defaultUpload=" + this.defaultUpload + ", details=" + this.details + PropertyUtils.MAPPED_DELIM2;
        }

        public RoomPollInfo(String token, int i, boolean z, boolean z2, boolean z3, boolean z4, boolean z5, boolean z6, boolean z7, boolean z8, boolean z9, boolean z10, boolean z11, RoomInfo roomInfo) {
            Intrinsics.checkNotNullParameter(token, "token");
            this.token = token;
            this.activeUsers = i;
            this.admin = z;
            this.globalAdmin = z2;
            this.moderator = z3;
            this.globalModerator = z4;
            this.read = z5;
            this.defaultRead = z6;
            this.defaultAccessible = z7;
            this.write = z8;
            this.defaultWrite = z9;
            this.upload = z10;
            this.defaultUpload = z11;
            this.details = roomInfo;
        }

        public RoomPollInfo(String str, int i, boolean z, boolean z2, boolean z3, boolean z4, boolean z5, boolean z6, boolean z7, boolean z8, boolean z9, boolean z10, boolean z11, RoomInfo roomInfo, int i2, DefaultConstructorMarker defaultConstructorMarker) {
            this((i2 & 1) != 0 ? "" : str, (i2 & 2) != 0 ? 0 : i, (i2 & 4) != 0 ? false : z, (i2 & 8) != 0 ? false : z2, (i2 & 16) != 0 ? false : z3, (i2 & 32) != 0 ? false : z4, (i2 & 64) != 0 ? false : z5, (i2 & 128) != 0 ? false : z6, (i2 & 256) != 0 ? false : z7, (i2 & 512) != 0 ? false : z8, (i2 & 1024) != 0 ? false : z9, (i2 & 2048) != 0 ? false : z10, (i2 & 4096) == 0 ? z11 : false, (i2 & 8192) != 0 ? null : roomInfo);
        }

        public final String getToken() {
            return this.token;
        }

        public final int getActiveUsers() {
            return this.activeUsers;
        }

        public final boolean getAdmin() {
            return this.admin;
        }

        public final boolean getGlobalAdmin() {
            return this.globalAdmin;
        }

        public final boolean getModerator() {
            return this.moderator;
        }

        public final boolean getGlobalModerator() {
            return this.globalModerator;
        }

        public final boolean getRead() {
            return this.read;
        }

        public final boolean getDefaultRead() {
            return this.defaultRead;
        }

        public final boolean getDefaultAccessible() {
            return this.defaultAccessible;
        }

        public final boolean getWrite() {
            return this.write;
        }

        public final boolean getDefaultWrite() {
            return this.defaultWrite;
        }

        public final boolean getUpload() {
            return this.upload;
        }

        public final boolean getDefaultUpload() {
            return this.defaultUpload;
        }

        public final RoomInfo getDetails() {
            return this.details;
        }
    }

    @JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
    @Metadata(d1 = {"\u0000(\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0015\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0002\b\u0087\b\u0018\u00002\u00020\u0001BA\u0012\b\b\u0002\u0010\u0002\u001a\u00020\u0003\u0012\b\b\u0002\u0010\u0004\u001a\u00020\u0005\u0012\b\b\u0002\u0010\u0006\u001a\u00020\u0005\u0012\b\b\u0002\u0010\u0007\u001a\u00020\u0003\u0012\b\b\u0002\u0010\b\u001a\u00020\u0003\u0012\b\b\u0002\u0010\t\u001a\u00020\u0005¢\u0006\u0002\u0010\nJ\t\u0010\u0013\u001a\u00020\u0003HÆ\u0003J\t\u0010\u0014\u001a\u00020\u0005HÆ\u0003J\t\u0010\u0015\u001a\u00020\u0005HÆ\u0003J\t\u0010\u0016\u001a\u00020\u0003HÆ\u0003J\t\u0010\u0017\u001a\u00020\u0003HÆ\u0003J\t\u0010\u0018\u001a\u00020\u0005HÆ\u0003JE\u0010\u0019\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u00032\b\b\u0002\u0010\u0004\u001a\u00020\u00052\b\b\u0002\u0010\u0006\u001a\u00020\u00052\b\b\u0002\u0010\u0007\u001a\u00020\u00032\b\b\u0002\u0010\b\u001a\u00020\u00032\b\b\u0002\u0010\t\u001a\u00020\u0005HÆ\u0001J\u0013\u0010\u001a\u001a\u00020\u001b2\b\u0010\u001c\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\u001d\u001a\u00020\u001eHÖ\u0001J\t\u0010\u001f\u001a\u00020\u0005HÖ\u0001R\u0011\u0010\b\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u000b\u0010\fR\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\r\u0010\fR\u0011\u0010\t\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u000e\u0010\u000fR\u0011\u0010\u0007\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0010\u0010\fR\u0011\u0010\u0006\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u0011\u0010\u000fR\u0011\u0010\u0004\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u0012\u0010\u000f¨\u0006 "}, d2 = {"Lorg/session/libsession/messaging/open_groups/OpenGroupApi$DirectMessage;", "", TtmlNode.ATTR_ID, "", "sender", "", "recipient", "postedAt", "expiresAt", MediaSendActivity.EXTRA_MESSAGE, "(JLjava/lang/String;Ljava/lang/String;JJLjava/lang/String;)V", "getExpiresAt", "()J", "getId", "getMessage", "()Ljava/lang/String;", "getPostedAt", "getRecipient", "getSender", "component1", "component2", "component3", "component4", "component5", "component6", "copy", "equals", "", "other", "hashCode", "", "toString", "libsession_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    public static final class DirectMessage {
        private final long expiresAt;
        private final long id;
        private final String message;
        private final long postedAt;
        private final String recipient;
        private final String sender;

        public DirectMessage() {
            this(0L, null, null, 0L, 0L, null, 63, null);
        }

        public final long getId() {
            return this.id;
        }

        public final String getSender() {
            return this.sender;
        }

        public final String getRecipient() {
            return this.recipient;
        }

        public final long getPostedAt() {
            return this.postedAt;
        }

        public final long getExpiresAt() {
            return this.expiresAt;
        }

        public final String getMessage() {
            return this.message;
        }

        public final DirectMessage copy(long id, String sender, String recipient, long postedAt, long expiresAt, String message) {
            Intrinsics.checkNotNullParameter(sender, "sender");
            Intrinsics.checkNotNullParameter(recipient, "recipient");
            Intrinsics.checkNotNullParameter(message, "message");
            return new DirectMessage(id, sender, recipient, postedAt, expiresAt, message);
        }

        public boolean equals(Object other) {
            if (this == other) {
                return true;
            }
            if (!(other instanceof DirectMessage)) {
                return false;
            }
            DirectMessage directMessage = (DirectMessage) other;
            return this.id == directMessage.id && Intrinsics.areEqual(this.sender, directMessage.sender) && Intrinsics.areEqual(this.recipient, directMessage.recipient) && this.postedAt == directMessage.postedAt && this.expiresAt == directMessage.expiresAt && Intrinsics.areEqual(this.message, directMessage.message);
        }

        public int hashCode() {
            return (((((((((ConfigPush$$ExternalSyntheticBackport0.m(this.id) * 31) + this.sender.hashCode()) * 31) + this.recipient.hashCode()) * 31) + ConfigPush$$ExternalSyntheticBackport0.m(this.postedAt)) * 31) + ConfigPush$$ExternalSyntheticBackport0.m(this.expiresAt)) * 31) + this.message.hashCode();
        }

        public String toString() {
            return "DirectMessage(id=" + this.id + ", sender=" + this.sender + ", recipient=" + this.recipient + ", postedAt=" + this.postedAt + ", expiresAt=" + this.expiresAt + ", message=" + this.message + PropertyUtils.MAPPED_DELIM2;
        }

        public DirectMessage(long j, String sender, String recipient, long j2, long j3, String message) {
            Intrinsics.checkNotNullParameter(sender, "sender");
            Intrinsics.checkNotNullParameter(recipient, "recipient");
            Intrinsics.checkNotNullParameter(message, "message");
            this.id = j;
            this.sender = sender;
            this.recipient = recipient;
            this.postedAt = j2;
            this.expiresAt = j3;
            this.message = message;
        }

        public DirectMessage(long j, String str, String str2, long j2, long j3, String str3, int i, DefaultConstructorMarker defaultConstructorMarker) {
            this((i & 1) != 0 ? 0L : j, (i & 2) != 0 ? "" : str, (i & 4) != 0 ? "" : str2, (i & 8) != 0 ? 0L : j2, (i & 16) == 0 ? j3 : 0L, (i & 32) == 0 ? str3 : "");
        }

        public final long getId() {
            return this.id;
        }

        public final String getSender() {
            return this.sender;
        }

        public final String getRecipient() {
            return this.recipient;
        }

        public final long getPostedAt() {
            return this.postedAt;
        }

        public final long getExpiresAt() {
            return this.expiresAt;
        }

        public final String getMessage() {
            return this.message;
        }
    }

    @JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
    @Metadata(d1 = {"\u0000:\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0006\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\u0006\n\u0002\u0010$\n\u0002\u0018\u0002\n\u0002\b\"\n\u0002\u0010\b\n\u0002\b\u0002\b\u0087\b\u0018\u00002\u00020\u0001B\u008f\u0001\u0012\b\b\u0002\u0010\u0002\u001a\u00020\u0003\u0012\b\b\u0002\u0010\u0004\u001a\u00020\u0005\u0012\b\b\u0002\u0010\u0006\u001a\u00020\u0007\u0012\b\b\u0002\u0010\b\u001a\u00020\u0003\u0012\b\b\u0002\u0010\t\u001a\u00020\u0003\u0012\b\b\u0002\u0010\n\u001a\u00020\u000b\u0012\b\b\u0002\u0010\f\u001a\u00020\u000b\u0012\b\b\u0002\u0010\r\u001a\u00020\u0005\u0012\b\b\u0002\u0010\u000e\u001a\u00020\u0005\u0012\n\b\u0002\u0010\u000f\u001a\u0004\u0018\u00010\u0005\u0012\n\b\u0002\u0010\u0010\u001a\u0004\u0018\u00010\u0005\u0012\u0016\b\u0002\u0010\u0011\u001a\u0010\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u0013\u0018\u00010\u0012¢\u0006\u0002\u0010\u0014J\t\u0010&\u001a\u00020\u0003HÆ\u0003J\u000b\u0010'\u001a\u0004\u0018\u00010\u0005HÆ\u0003J\u000b\u0010(\u001a\u0004\u0018\u00010\u0005HÆ\u0003J\u0017\u0010)\u001a\u0010\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u0013\u0018\u00010\u0012HÆ\u0003J\t\u0010*\u001a\u00020\u0005HÆ\u0003J\t\u0010+\u001a\u00020\u0007HÆ\u0003J\t\u0010,\u001a\u00020\u0003HÆ\u0003J\t\u0010-\u001a\u00020\u0003HÆ\u0003J\t\u0010.\u001a\u00020\u000bHÆ\u0003J\t\u0010/\u001a\u00020\u000bHÆ\u0003J\t\u00100\u001a\u00020\u0005HÆ\u0003J\t\u00101\u001a\u00020\u0005HÆ\u0003J\u0093\u0001\u00102\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u00032\b\b\u0002\u0010\u0004\u001a\u00020\u00052\b\b\u0002\u0010\u0006\u001a\u00020\u00072\b\b\u0002\u0010\b\u001a\u00020\u00032\b\b\u0002\u0010\t\u001a\u00020\u00032\b\b\u0002\u0010\n\u001a\u00020\u000b2\b\b\u0002\u0010\f\u001a\u00020\u000b2\b\b\u0002\u0010\r\u001a\u00020\u00052\b\b\u0002\u0010\u000e\u001a\u00020\u00052\n\b\u0002\u0010\u000f\u001a\u0004\u0018\u00010\u00052\n\b\u0002\u0010\u0010\u001a\u0004\u0018\u00010\u00052\u0016\b\u0002\u0010\u0011\u001a\u0010\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u0013\u0018\u00010\u0012HÆ\u0001J\u0013\u00103\u001a\u00020\u000b2\b\u00104\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u00105\u001a\u000206HÖ\u0001J\t\u00107\u001a\u00020\u0005HÖ\u0001R\u0013\u0010\u000f\u001a\u0004\u0018\u00010\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u0015\u0010\u0016R\u0011\u0010\n\u001a\u00020\u000b¢\u0006\b\n\u0000\u001a\u0004\b\u0017\u0010\u0018R\u0011\u0010\b\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0019\u0010\u001aR\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u001b\u0010\u001aR\u0011\u0010\u0006\u001a\u00020\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u001c\u0010\u001dR\u001f\u0010\u0011\u001a\u0010\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u0013\u0018\u00010\u0012¢\u0006\b\n\u0000\u001a\u0004\b\u001e\u0010\u001fR\u0011\u0010\t\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b \u0010\u001aR\u0011\u0010\u0004\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b!\u0010\u0016R\u0013\u0010\u0010\u001a\u0004\u0018\u00010\u0005¢\u0006\b\n\u0000\u001a\u0004\b\"\u0010\u0016R\u0011\u0010\f\u001a\u00020\u000b¢\u0006\b\n\u0000\u001a\u0004\b#\u0010\u0018R\u0011\u0010\r\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b$\u0010\u0016R\u0011\u0010\u000e\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b%\u0010\u0016¨\u00068"}, d2 = {"Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Message;", "", TtmlNode.ATTR_ID, "", "sessionId", "", "posted", "", "edited", "seqno", Downloads.Impl.COLUMN_DELETED, "", "whisper", "whisperMods", "whisperTo", DataSchemeDataSource.SCHEME_DATA, "signature", "reactions", "", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Reaction;", "(JLjava/lang/String;DJJZZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;)V", "getData", "()Ljava/lang/String;", "getDeleted", "()Z", "getEdited", "()J", "getId", "getPosted", "()D", "getReactions", "()Ljava/util/Map;", "getSeqno", "getSessionId", "getSignature", "getWhisper", "getWhisperMods", "getWhisperTo", "component1", "component10", "component11", "component12", "component2", "component3", "component4", "component5", "component6", "component7", "component8", "component9", "copy", "equals", "other", "hashCode", "", "toString", "libsession_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    public static final class Message {
        private final String data;
        private final boolean deleted;
        private final long edited;
        private final long id;
        private final double posted;
        private final Map<String, Reaction> reactions;
        private final long seqno;
        private final String sessionId;
        private final String signature;
        private final boolean whisper;
        private final String whisperMods;
        private final String whisperTo;

        public Message() {
            this(0L, null, 0.0d, 0L, 0L, false, false, null, null, null, null, null, 4095, null);
        }

        public final long getId() {
            return this.id;
        }

        public final String getData() {
            return this.data;
        }

        public final String getSignature() {
            return this.signature;
        }

        public final Map<String, Reaction> component12() {
            return this.reactions;
        }

        public final String getSessionId() {
            return this.sessionId;
        }

        public final double getPosted() {
            return this.posted;
        }

        public final long getEdited() {
            return this.edited;
        }

        public final long getSeqno() {
            return this.seqno;
        }

        public final boolean getDeleted() {
            return this.deleted;
        }

        public final boolean getWhisper() {
            return this.whisper;
        }

        public final String getWhisperMods() {
            return this.whisperMods;
        }

        public final String getWhisperTo() {
            return this.whisperTo;
        }

        public final Message copy(long id, String sessionId, double posted, long edited, long seqno, boolean deleted, boolean whisper, String whisperMods, String whisperTo, String data, String signature, Map<String, Reaction> reactions) {
            Intrinsics.checkNotNullParameter(sessionId, "sessionId");
            Intrinsics.checkNotNullParameter(whisperMods, "whisperMods");
            Intrinsics.checkNotNullParameter(whisperTo, "whisperTo");
            return new Message(id, sessionId, posted, edited, seqno, deleted, whisper, whisperMods, whisperTo, data, signature, reactions);
        }

        public boolean equals(Object other) {
            if (this == other) {
                return true;
            }
            if (!(other instanceof Message)) {
                return false;
            }
            Message message = (Message) other;
            return this.id == message.id && Intrinsics.areEqual(this.sessionId, message.sessionId) && Double.compare(this.posted, message.posted) == 0 && this.edited == message.edited && this.seqno == message.seqno && this.deleted == message.deleted && this.whisper == message.whisper && Intrinsics.areEqual(this.whisperMods, message.whisperMods) && Intrinsics.areEqual(this.whisperTo, message.whisperTo) && Intrinsics.areEqual(this.data, message.data) && Intrinsics.areEqual(this.signature, message.signature) && Intrinsics.areEqual(this.reactions, message.reactions);
        }

        public int hashCode() {
            int m = ((((((((ConfigPush$$ExternalSyntheticBackport0.m(this.id) * 31) + this.sessionId.hashCode()) * 31) + OpenGroupApi$Message$$ExternalSyntheticBackport0.m(this.posted)) * 31) + ConfigPush$$ExternalSyntheticBackport0.m(this.edited)) * 31) + ConfigPush$$ExternalSyntheticBackport0.m(this.seqno)) * 31;
            boolean z = this.deleted;
            int i = z;
            if (z != 0) {
                i = 1;
            }
            int i2 = (m + i) * 31;
            boolean z2 = this.whisper;
            int hashCode = (((((i2 + (z2 ? 1 : z2 ? 1 : 0)) * 31) + this.whisperMods.hashCode()) * 31) + this.whisperTo.hashCode()) * 31;
            String str = this.data;
            int hashCode2 = (hashCode + (str == null ? 0 : str.hashCode())) * 31;
            String str2 = this.signature;
            int hashCode3 = (hashCode2 + (str2 == null ? 0 : str2.hashCode())) * 31;
            Map<String, Reaction> map = this.reactions;
            return hashCode3 + (map != null ? map.hashCode() : 0);
        }

        public String toString() {
            return "Message(id=" + this.id + ", sessionId=" + this.sessionId + ", posted=" + this.posted + ", edited=" + this.edited + ", seqno=" + this.seqno + ", deleted=" + this.deleted + ", whisper=" + this.whisper + ", whisperMods=" + this.whisperMods + ", whisperTo=" + this.whisperTo + ", data=" + this.data + ", signature=" + this.signature + ", reactions=" + this.reactions + PropertyUtils.MAPPED_DELIM2;
        }

        public Message(long j, String sessionId, double d, long j2, long j3, boolean z, boolean z2, String whisperMods, String whisperTo, String str, String str2, Map<String, Reaction> map) {
            Intrinsics.checkNotNullParameter(sessionId, "sessionId");
            Intrinsics.checkNotNullParameter(whisperMods, "whisperMods");
            Intrinsics.checkNotNullParameter(whisperTo, "whisperTo");
            this.id = j;
            this.sessionId = sessionId;
            this.posted = d;
            this.edited = j2;
            this.seqno = j3;
            this.deleted = z;
            this.whisper = z2;
            this.whisperMods = whisperMods;
            this.whisperTo = whisperTo;
            this.data = str;
            this.signature = str2;
            this.reactions = map;
        }

        public Message(long j, String str, double d, long j2, long j3, boolean z, boolean z2, String str2, String str3, String str4, String str5, Map map, int i, DefaultConstructorMarker defaultConstructorMarker) {
            this((i & 1) != 0 ? 0L : j, (i & 2) != 0 ? "" : str, (i & 4) != 0 ? 0.0d : d, (i & 8) != 0 ? 0L : j2, (i & 16) == 0 ? j3 : 0L, (i & 32) != 0 ? false : z, (i & 64) == 0 ? z2 : false, (i & 128) != 0 ? "" : str2, (i & 256) == 0 ? str3 : "", (i & 512) != 0 ? null : str4, (i & 1024) != 0 ? null : str5, (i & 2048) != 0 ? null : map);
        }

        public final long getId() {
            return this.id;
        }

        public final String getSessionId() {
            return this.sessionId;
        }

        public final double getPosted() {
            return this.posted;
        }

        public final long getEdited() {
            return this.edited;
        }

        public final long getSeqno() {
            return this.seqno;
        }

        public final boolean getDeleted() {
            return this.deleted;
        }

        public final boolean getWhisper() {
            return this.whisper;
        }

        public final String getWhisperMods() {
            return this.whisperMods;
        }

        public final String getWhisperTo() {
            return this.whisperTo;
        }

        public final String getData() {
            return this.data;
        }

        public final String getSignature() {
            return this.signature;
        }

        public final Map<String, Reaction> getReactions() {
            return this.reactions;
        }
    }

    @Metadata(d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0010 \n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0011\n\u0002\u0010\b\n\u0002\b\u0002\b\u0086\b\u0018\u00002\u00020\u0001B3\u0012\b\b\u0002\u0010\u0002\u001a\u00020\u0003\u0012\u000e\b\u0002\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005\u0012\b\b\u0002\u0010\u0007\u001a\u00020\b\u0012\b\b\u0002\u0010\t\u001a\u00020\u0003¢\u0006\u0002\u0010\nJ\t\u0010\u0012\u001a\u00020\u0003HÆ\u0003J\u000f\u0010\u0013\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005HÆ\u0003J\t\u0010\u0014\u001a\u00020\bHÆ\u0003J\t\u0010\u0015\u001a\u00020\u0003HÆ\u0003J7\u0010\u0016\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u00032\u000e\b\u0002\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00060\u00052\b\b\u0002\u0010\u0007\u001a\u00020\b2\b\b\u0002\u0010\t\u001a\u00020\u0003HÆ\u0001J\u0013\u0010\u0017\u001a\u00020\b2\b\u0010\u0018\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\u0019\u001a\u00020\u001aHÖ\u0001J\t\u0010\u001b\u001a\u00020\u0006HÖ\u0001R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u000b\u0010\fR\u0011\u0010\t\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\r\u0010\fR\u0017\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u000e\u0010\u000fR\u0011\u0010\u0007\u001a\u00020\b¢\u0006\b\n\u0000\u001a\u0004\b\u0010\u0010\u0011¨\u0006\u001c"}, d2 = {"Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Reaction;", "", "count", "", "reactors", "", "", "you", "", "index", "(JLjava/util/List;ZJ)V", "getCount", "()J", "getIndex", "getReactors", "()Ljava/util/List;", "getYou", "()Z", "component1", "component2", "component3", "component4", "copy", "equals", "other", "hashCode", "", "toString", "libsession_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    public static final class Reaction {
        private final long count;
        private final long index;
        private final List<String> reactors;
        private final boolean you;

        public Reaction() {
            this(0L, null, false, 0L, 15, null);
        }

        public static Reaction copy$default(Reaction reaction, long j, List list, boolean z, long j2, int i, Object obj) {
            if ((i & 1) != 0) {
                j = reaction.count;
            }
            long j3 = j;
            if ((i & 2) != 0) {
                list = reaction.reactors;
            }
            List list2 = list;
            if ((i & 4) != 0) {
                z = reaction.you;
            }
            boolean z2 = z;
            if ((i & 8) != 0) {
                j2 = reaction.index;
            }
            return reaction.copy(j3, list2, z2, j2);
        }

        public final long getCount() {
            return this.count;
        }

        public final List<String> component2() {
            return this.reactors;
        }

        public final boolean getYou() {
            return this.you;
        }

        public final long getIndex() {
            return this.index;
        }

        public final Reaction copy(long count, List<String> reactors, boolean you, long index) {
            Intrinsics.checkNotNullParameter(reactors, "reactors");
            return new Reaction(count, reactors, you, index);
        }

        public boolean equals(Object other) {
            if (this == other) {
                return true;
            }
            if (!(other instanceof Reaction)) {
                return false;
            }
            Reaction reaction = (Reaction) other;
            return this.count == reaction.count && Intrinsics.areEqual(this.reactors, reaction.reactors) && this.you == reaction.you && this.index == reaction.index;
        }

        public int hashCode() {
            int m = ((ConfigPush$$ExternalSyntheticBackport0.m(this.count) * 31) + this.reactors.hashCode()) * 31;
            boolean z = this.you;
            int i = z;
            if (z != 0) {
                i = 1;
            }
            return ((m + i) * 31) + ConfigPush$$ExternalSyntheticBackport0.m(this.index);
        }

        public String toString() {
            return "Reaction(count=" + this.count + ", reactors=" + this.reactors + ", you=" + this.you + ", index=" + this.index + PropertyUtils.MAPPED_DELIM2;
        }

        public Reaction(long j, List<String> reactors, boolean z, long j2) {
            Intrinsics.checkNotNullParameter(reactors, "reactors");
            this.count = j;
            this.reactors = reactors;
            this.you = z;
            this.index = j2;
        }

        public final long getCount() {
            return this.count;
        }

        public Reaction(long j, List list, boolean z, long j2, int i, DefaultConstructorMarker defaultConstructorMarker) {
            this((i & 1) != 0 ? 0L : j, (i & 2) != 0 ? CollectionsKt.emptyList() : list, (i & 4) != 0 ? false : z, (i & 8) != 0 ? 0L : j2);
        }

        public final List<String> getReactors() {
            return this.reactors;
        }

        public final boolean getYou() {
            return this.you;
        }

        public final long getIndex() {
            return this.index;
        }
    }

    @Metadata(d1 = {"\u0000$\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u000b\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0000\b\u0086\b\u0018\u00002\u00020\u0001B\u0015\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005¢\u0006\u0002\u0010\u0006J\t\u0010\u000b\u001a\u00020\u0003HÆ\u0003J\t\u0010\f\u001a\u00020\u0005HÆ\u0003J\u001d\u0010\r\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u00032\b\b\u0002\u0010\u0004\u001a\u00020\u0005HÆ\u0001J\u0013\u0010\u000e\u001a\u00020\u00052\b\u0010\u000f\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\u0010\u001a\u00020\u0011HÖ\u0001J\t\u0010\u0012\u001a\u00020\u0013HÖ\u0001R\u0011\u0010\u0004\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u0007\u0010\bR\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\t\u0010\n¨\u0006\u0014"}, d2 = {"Lorg/session/libsession/messaging/open_groups/OpenGroupApi$AddReactionResponse;", "", "seqNo", "", "added", "", "(JZ)V", "getAdded", "()Z", "getSeqNo", "()J", "component1", "component2", "copy", "equals", "other", "hashCode", "", "toString", "", "libsession_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    public static final class AddReactionResponse {
        private final boolean added;
        private final long seqNo;

        public static AddReactionResponse copy$default(AddReactionResponse addReactionResponse, long j, boolean z, int i, Object obj) {
            if ((i & 1) != 0) {
                j = addReactionResponse.seqNo;
            }
            if ((i & 2) != 0) {
                z = addReactionResponse.added;
            }
            return addReactionResponse.copy(j, z);
        }

        public final long getSeqNo() {
            return this.seqNo;
        }

        public final boolean getAdded() {
            return this.added;
        }

        public final AddReactionResponse copy(long seqNo, boolean added) {
            return new AddReactionResponse(seqNo, added);
        }

        public boolean equals(Object other) {
            if (this == other) {
                return true;
            }
            if (!(other instanceof AddReactionResponse)) {
                return false;
            }
            AddReactionResponse addReactionResponse = (AddReactionResponse) other;
            return this.seqNo == addReactionResponse.seqNo && this.added == addReactionResponse.added;
        }

        public int hashCode() {
            int m = ConfigPush$$ExternalSyntheticBackport0.m(this.seqNo) * 31;
            boolean z = this.added;
            int i = z;
            if (z != 0) {
                i = 1;
            }
            return m + i;
        }

        public String toString() {
            return "AddReactionResponse(seqNo=" + this.seqNo + ", added=" + this.added + PropertyUtils.MAPPED_DELIM2;
        }

        public AddReactionResponse(long j, boolean z) {
            this.seqNo = j;
            this.added = z;
        }

        public final long getSeqNo() {
            return this.seqNo;
        }

        public final boolean getAdded() {
            return this.added;
        }
    }

    @Metadata(d1 = {"\u0000$\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u000b\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0000\b\u0086\b\u0018\u00002\u00020\u0001B\u0015\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005¢\u0006\u0002\u0010\u0006J\t\u0010\u000b\u001a\u00020\u0003HÆ\u0003J\t\u0010\f\u001a\u00020\u0005HÆ\u0003J\u001d\u0010\r\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u00032\b\b\u0002\u0010\u0004\u001a\u00020\u0005HÆ\u0001J\u0013\u0010\u000e\u001a\u00020\u00052\b\u0010\u000f\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\u0010\u001a\u00020\u0011HÖ\u0001J\t\u0010\u0012\u001a\u00020\u0013HÖ\u0001R\u0011\u0010\u0004\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u0007\u0010\bR\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\t\u0010\n¨\u0006\u0014"}, d2 = {"Lorg/session/libsession/messaging/open_groups/OpenGroupApi$DeleteReactionResponse;", "", "seqNo", "", "removed", "", "(JZ)V", "getRemoved", "()Z", "getSeqNo", "()J", "component1", "component2", "copy", "equals", "other", "hashCode", "", "toString", "", "libsession_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    public static final class DeleteReactionResponse {
        private final boolean removed;
        private final long seqNo;

        public static DeleteReactionResponse copy$default(DeleteReactionResponse deleteReactionResponse, long j, boolean z, int i, Object obj) {
            if ((i & 1) != 0) {
                j = deleteReactionResponse.seqNo;
            }
            if ((i & 2) != 0) {
                z = deleteReactionResponse.removed;
            }
            return deleteReactionResponse.copy(j, z);
        }

        public final long getSeqNo() {
            return this.seqNo;
        }

        public final boolean getRemoved() {
            return this.removed;
        }

        public final DeleteReactionResponse copy(long seqNo, boolean removed) {
            return new DeleteReactionResponse(seqNo, removed);
        }

        public boolean equals(Object other) {
            if (this == other) {
                return true;
            }
            if (!(other instanceof DeleteReactionResponse)) {
                return false;
            }
            DeleteReactionResponse deleteReactionResponse = (DeleteReactionResponse) other;
            return this.seqNo == deleteReactionResponse.seqNo && this.removed == deleteReactionResponse.removed;
        }

        public int hashCode() {
            int m = ConfigPush$$ExternalSyntheticBackport0.m(this.seqNo) * 31;
            boolean z = this.removed;
            int i = z;
            if (z != 0) {
                i = 1;
            }
            return m + i;
        }

        public String toString() {
            return "DeleteReactionResponse(seqNo=" + this.seqNo + ", removed=" + this.removed + PropertyUtils.MAPPED_DELIM2;
        }

        public DeleteReactionResponse(long j, boolean z) {
            this.seqNo = j;
            this.removed = z;
        }

        public final long getSeqNo() {
            return this.seqNo;
        }

        public final boolean getRemoved() {
            return this.removed;
        }
    }

    @Metadata(d1 = {"\u0000$\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u000b\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0000\b\u0086\b\u0018\u00002\u00020\u0001B\u0015\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005¢\u0006\u0002\u0010\u0006J\t\u0010\u000b\u001a\u00020\u0003HÆ\u0003J\t\u0010\f\u001a\u00020\u0005HÆ\u0003J\u001d\u0010\r\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u00032\b\b\u0002\u0010\u0004\u001a\u00020\u0005HÆ\u0001J\u0013\u0010\u000e\u001a\u00020\u00052\b\u0010\u000f\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\u0010\u001a\u00020\u0011HÖ\u0001J\t\u0010\u0012\u001a\u00020\u0013HÖ\u0001R\u0011\u0010\u0004\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u0007\u0010\bR\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\t\u0010\n¨\u0006\u0014"}, d2 = {"Lorg/session/libsession/messaging/open_groups/OpenGroupApi$DeleteAllReactionsResponse;", "", "seqNo", "", "removed", "", "(JZ)V", "getRemoved", "()Z", "getSeqNo", "()J", "component1", "component2", "copy", "equals", "other", "hashCode", "", "toString", "", "libsession_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    public static final class DeleteAllReactionsResponse {
        private final boolean removed;
        private final long seqNo;

        public static DeleteAllReactionsResponse copy$default(DeleteAllReactionsResponse deleteAllReactionsResponse, long j, boolean z, int i, Object obj) {
            if ((i & 1) != 0) {
                j = deleteAllReactionsResponse.seqNo;
            }
            if ((i & 2) != 0) {
                z = deleteAllReactionsResponse.removed;
            }
            return deleteAllReactionsResponse.copy(j, z);
        }

        public final long getSeqNo() {
            return this.seqNo;
        }

        public final boolean getRemoved() {
            return this.removed;
        }

        public final DeleteAllReactionsResponse copy(long seqNo, boolean removed) {
            return new DeleteAllReactionsResponse(seqNo, removed);
        }

        public boolean equals(Object other) {
            if (this == other) {
                return true;
            }
            if (!(other instanceof DeleteAllReactionsResponse)) {
                return false;
            }
            DeleteAllReactionsResponse deleteAllReactionsResponse = (DeleteAllReactionsResponse) other;
            return this.seqNo == deleteAllReactionsResponse.seqNo && this.removed == deleteAllReactionsResponse.removed;
        }

        public int hashCode() {
            int m = ConfigPush$$ExternalSyntheticBackport0.m(this.seqNo) * 31;
            boolean z = this.removed;
            int i = z;
            if (z != 0) {
                i = 1;
            }
            return m + i;
        }

        public String toString() {
            return "DeleteAllReactionsResponse(seqNo=" + this.seqNo + ", removed=" + this.removed + PropertyUtils.MAPPED_DELIM2;
        }

        public DeleteAllReactionsResponse(long j, boolean z) {
            this.seqNo = j;
            this.removed = z;
        }

        public final long getSeqNo() {
            return this.seqNo;
        }

        public final boolean getRemoved() {
            return this.removed;
        }
    }

    @Metadata(d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010\t\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u001a\n\u0002\u0010\b\n\u0002\b\u0002\b\u0086\b\u0018\u00002\u00020\u0001B9\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0003\u0012\u0006\u0010\u0005\u001a\u00020\u0006\u0012\u0006\u0010\u0007\u001a\u00020\u0003\u0012\u0006\u0010\b\u001a\u00020\t\u0012\n\b\u0002\u0010\n\u001a\u0004\u0018\u00010\u0006¢\u0006\u0002\u0010\u000bJ\t\u0010\u0019\u001a\u00020\u0003HÆ\u0003J\t\u0010\u001a\u001a\u00020\u0003HÆ\u0003J\t\u0010\u001b\u001a\u00020\u0006HÆ\u0003J\t\u0010\u001c\u001a\u00020\u0003HÆ\u0003J\t\u0010\u001d\u001a\u00020\tHÆ\u0003J\u0010\u0010\u001e\u001a\u0004\u0018\u00010\u0006HÆ\u0003¢\u0006\u0002\u0010\u0014JL\u0010\u001f\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u00032\b\b\u0002\u0010\u0004\u001a\u00020\u00032\b\b\u0002\u0010\u0005\u001a\u00020\u00062\b\b\u0002\u0010\u0007\u001a\u00020\u00032\b\b\u0002\u0010\b\u001a\u00020\t2\n\b\u0002\u0010\n\u001a\u0004\u0018\u00010\u0006HÆ\u0001¢\u0006\u0002\u0010 J\u0013\u0010!\u001a\u00020\t2\b\u0010\"\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010#\u001a\u00020$HÖ\u0001J\t\u0010%\u001a\u00020\u0003HÖ\u0001R\u0011\u0010\b\u001a\u00020\t¢\u0006\b\n\u0000\u001a\u0004\b\f\u0010\rR\u0011\u0010\u0007\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u000e\u0010\u000fR\u0011\u0010\u0005\u001a\u00020\u0006¢\u0006\b\n\u0000\u001a\u0004\b\u0010\u0010\u0011R\u0011\u0010\u0004\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0012\u0010\u000fR\u001e\u0010\n\u001a\u0004\u0018\u00010\u0006X\u0086\u000e¢\u0006\u0010\n\u0002\u0010\u0017\u001a\u0004\b\u0013\u0010\u0014\"\u0004\b\u0015\u0010\u0016R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0018\u0010\u000f¨\u0006&"}, d2 = {"Lorg/session/libsession/messaging/open_groups/OpenGroupApi$PendingReaction;", "", "server", "", "room", "messageId", "", "emoji", "add", "", "seqNo", "(Ljava/lang/String;Ljava/lang/String;JLjava/lang/String;ZLjava/lang/Long;)V", "getAdd", "()Z", "getEmoji", "()Ljava/lang/String;", "getMessageId", "()J", "getRoom", "getSeqNo", "()Ljava/lang/Long;", "setSeqNo", "(Ljava/lang/Long;)V", "Ljava/lang/Long;", "getServer", "component1", "component2", "component3", "component4", "component5", "component6", "copy", "(Ljava/lang/String;Ljava/lang/String;JLjava/lang/String;ZLjava/lang/Long;)Lorg/session/libsession/messaging/open_groups/OpenGroupApi$PendingReaction;", "equals", "other", "hashCode", "", "toString", "libsession_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    public static final class PendingReaction {
        private final boolean add;
        private final String emoji;
        private final long messageId;
        private final String room;
        private Long seqNo;
        private final String server;

        public static PendingReaction copy$default(PendingReaction pendingReaction, String str, String str2, long j, String str3, boolean z, Long l, int i, Object obj) {
            if ((i & 1) != 0) {
                str = pendingReaction.server;
            }
            if ((i & 2) != 0) {
                str2 = pendingReaction.room;
            }
            String str4 = str2;
            if ((i & 4) != 0) {
                j = pendingReaction.messageId;
            }
            long j2 = j;
            if ((i & 8) != 0) {
                str3 = pendingReaction.emoji;
            }
            String str5 = str3;
            if ((i & 16) != 0) {
                z = pendingReaction.add;
            }
            boolean z2 = z;
            if ((i & 32) != 0) {
                l = pendingReaction.seqNo;
            }
            return pendingReaction.copy(str, str4, j2, str5, z2, l);
        }

        public final String getServer() {
            return this.server;
        }

        public final String getRoom() {
            return this.room;
        }

        public final long getMessageId() {
            return this.messageId;
        }

        public final String getEmoji() {
            return this.emoji;
        }

        public final boolean getAdd() {
            return this.add;
        }

        public final Long getSeqNo() {
            return this.seqNo;
        }

        public final PendingReaction copy(String server, String room, long messageId, String emoji, boolean add, Long seqNo) {
            Intrinsics.checkNotNullParameter(server, "server");
            Intrinsics.checkNotNullParameter(room, "room");
            Intrinsics.checkNotNullParameter(emoji, "emoji");
            return new PendingReaction(server, room, messageId, emoji, add, seqNo);
        }

        public boolean equals(Object other) {
            if (this == other) {
                return true;
            }
            if (!(other instanceof PendingReaction)) {
                return false;
            }
            PendingReaction pendingReaction = (PendingReaction) other;
            return Intrinsics.areEqual(this.server, pendingReaction.server) && Intrinsics.areEqual(this.room, pendingReaction.room) && this.messageId == pendingReaction.messageId && Intrinsics.areEqual(this.emoji, pendingReaction.emoji) && this.add == pendingReaction.add && Intrinsics.areEqual(this.seqNo, pendingReaction.seqNo);
        }

        public int hashCode() {
            int hashCode = ((((((this.server.hashCode() * 31) + this.room.hashCode()) * 31) + ConfigPush$$ExternalSyntheticBackport0.m(this.messageId)) * 31) + this.emoji.hashCode()) * 31;
            boolean z = this.add;
            int i = z;
            if (z != 0) {
                i = 1;
            }
            int i2 = (hashCode + i) * 31;
            Long l = this.seqNo;
            return i2 + (l == null ? 0 : l.hashCode());
        }

        public String toString() {
            return "PendingReaction(server=" + this.server + ", room=" + this.room + ", messageId=" + this.messageId + ", emoji=" + this.emoji + ", add=" + this.add + ", seqNo=" + this.seqNo + PropertyUtils.MAPPED_DELIM2;
        }

        public PendingReaction(String server, String room, long j, String emoji, boolean z, Long l) {
            Intrinsics.checkNotNullParameter(server, "server");
            Intrinsics.checkNotNullParameter(room, "room");
            Intrinsics.checkNotNullParameter(emoji, "emoji");
            this.server = server;
            this.room = room;
            this.messageId = j;
            this.emoji = emoji;
            this.add = z;
            this.seqNo = l;
        }

        public PendingReaction(String str, String str2, long j, String str3, boolean z, Long l, int i, DefaultConstructorMarker defaultConstructorMarker) {
            this(str, str2, j, str3, z, (i & 32) != 0 ? null : l);
        }

        public final String getServer() {
            return this.server;
        }

        public final String getRoom() {
            return this.room;
        }

        public final long getMessageId() {
            return this.messageId;
        }

        public final String getEmoji() {
            return this.emoji;
        }

        public final boolean getAdd() {
            return this.add;
        }

        public final Long getSeqNo() {
            return this.seqNo;
        }

        public final void setSeqNo(Long l) {
            this.seqNo = l;
        }
    }

    @JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
    @Metadata(d1 = {"\u0000(\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010 \n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0015\n\u0002\u0010\b\n\u0002\b\u0002\b\u0087\b\u0018\u00002\u00020\u0001BM\u0012\n\b\u0002\u0010\u0002\u001a\u0004\u0018\u00010\u0003\u0012\n\b\u0002\u0010\u0004\u001a\u0004\u0018\u00010\u0003\u0012\u0010\b\u0002\u0010\u0005\u001a\n\u0012\u0004\u0012\u00020\u0003\u0018\u00010\u0006\u0012\n\b\u0002\u0010\u0007\u001a\u0004\u0018\u00010\b\u0012\u0010\b\u0002\u0010\t\u001a\n\u0012\u0004\u0012\u00020\u0003\u0018\u00010\u0006¢\u0006\u0002\u0010\nJ\u000b\u0010\u0014\u001a\u0004\u0018\u00010\u0003HÆ\u0003J\u000b\u0010\u0015\u001a\u0004\u0018\u00010\u0003HÆ\u0003J\u0011\u0010\u0016\u001a\n\u0012\u0004\u0012\u00020\u0003\u0018\u00010\u0006HÆ\u0003J\u0010\u0010\u0017\u001a\u0004\u0018\u00010\bHÆ\u0003¢\u0006\u0002\u0010\u0011J\u0011\u0010\u0018\u001a\n\u0012\u0004\u0012\u00020\u0003\u0018\u00010\u0006HÆ\u0003JV\u0010\u0019\u001a\u00020\u00002\n\b\u0002\u0010\u0002\u001a\u0004\u0018\u00010\u00032\n\b\u0002\u0010\u0004\u001a\u0004\u0018\u00010\u00032\u0010\b\u0002\u0010\u0005\u001a\n\u0012\u0004\u0012\u00020\u0003\u0018\u00010\u00062\n\b\u0002\u0010\u0007\u001a\u0004\u0018\u00010\b2\u0010\b\u0002\u0010\t\u001a\n\u0012\u0004\u0012\u00020\u0003\u0018\u00010\u0006HÆ\u0001¢\u0006\u0002\u0010\u001aJ\u0013\u0010\u001b\u001a\u00020\b2\b\u0010\u001c\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\u001d\u001a\u00020\u001eHÖ\u0001J\t\u0010\u001f\u001a\u00020\u0003HÖ\u0001R\u0013\u0010\u0002\u001a\u0004\u0018\u00010\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u000b\u0010\fR\u0019\u0010\t\u001a\n\u0012\u0004\u0012\u00020\u0003\u0018\u00010\u0006¢\u0006\b\n\u0000\u001a\u0004\b\r\u0010\u000eR\u0013\u0010\u0004\u001a\u0004\u0018\u00010\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u000f\u0010\fR\u0015\u0010\u0007\u001a\u0004\u0018\u00010\b¢\u0006\n\n\u0002\u0010\u0012\u001a\u0004\b\u0010\u0010\u0011R\u0019\u0010\u0005\u001a\n\u0012\u0004\u0012\u00020\u0003\u0018\u00010\u0006¢\u0006\b\n\u0000\u001a\u0004\b\u0013\u0010\u000e¨\u0006 "}, d2 = {"Lorg/session/libsession/messaging/open_groups/OpenGroupApi$SendMessageRequest;", "", DataSchemeDataSource.SCHEME_DATA, "", "signature", "whisperTo", "", "whisperMods", "", "files", "(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/Boolean;Ljava/util/List;)V", "getData", "()Ljava/lang/String;", "getFiles", "()Ljava/util/List;", "getSignature", "getWhisperMods", "()Ljava/lang/Boolean;", "Ljava/lang/Boolean;", "getWhisperTo", "component1", "component2", "component3", "component4", "component5", "copy", "(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/Boolean;Ljava/util/List;)Lorg/session/libsession/messaging/open_groups/OpenGroupApi$SendMessageRequest;", "equals", "other", "hashCode", "", "toString", "libsession_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    public static final class SendMessageRequest {
        private final String data;
        private final List<String> files;
        private final String signature;
        private final Boolean whisperMods;
        private final List<String> whisperTo;

        public SendMessageRequest() {
            this(null, null, null, null, null, 31, null);
        }

        public static SendMessageRequest copy$default(SendMessageRequest sendMessageRequest, String str, String str2, List list, Boolean bool, List list2, int i, Object obj) {
            if ((i & 1) != 0) {
                str = sendMessageRequest.data;
            }
            if ((i & 2) != 0) {
                str2 = sendMessageRequest.signature;
            }
            String str3 = str2;
            if ((i & 4) != 0) {
                list = sendMessageRequest.whisperTo;
            }
            List list3 = list;
            if ((i & 8) != 0) {
                bool = sendMessageRequest.whisperMods;
            }
            Boolean bool2 = bool;
            if ((i & 16) != 0) {
                list2 = sendMessageRequest.files;
            }
            return sendMessageRequest.copy(str, str3, list3, bool2, list2);
        }

        public final String getData() {
            return this.data;
        }

        public final String getSignature() {
            return this.signature;
        }

        public final List<String> component3() {
            return this.whisperTo;
        }

        public final Boolean getWhisperMods() {
            return this.whisperMods;
        }

        public final List<String> component5() {
            return this.files;
        }

        public final SendMessageRequest copy(String data, String signature, List<String> whisperTo, Boolean whisperMods, List<String> files) {
            return new SendMessageRequest(data, signature, whisperTo, whisperMods, files);
        }

        public boolean equals(Object other) {
            if (this == other) {
                return true;
            }
            if (!(other instanceof SendMessageRequest)) {
                return false;
            }
            SendMessageRequest sendMessageRequest = (SendMessageRequest) other;
            return Intrinsics.areEqual(this.data, sendMessageRequest.data) && Intrinsics.areEqual(this.signature, sendMessageRequest.signature) && Intrinsics.areEqual(this.whisperTo, sendMessageRequest.whisperTo) && Intrinsics.areEqual(this.whisperMods, sendMessageRequest.whisperMods) && Intrinsics.areEqual(this.files, sendMessageRequest.files);
        }

        public int hashCode() {
            String str = this.data;
            int hashCode = (str == null ? 0 : str.hashCode()) * 31;
            String str2 = this.signature;
            int hashCode2 = (hashCode + (str2 == null ? 0 : str2.hashCode())) * 31;
            List<String> list = this.whisperTo;
            int hashCode3 = (hashCode2 + (list == null ? 0 : list.hashCode())) * 31;
            Boolean bool = this.whisperMods;
            int hashCode4 = (hashCode3 + (bool == null ? 0 : bool.hashCode())) * 31;
            List<String> list2 = this.files;
            return hashCode4 + (list2 != null ? list2.hashCode() : 0);
        }

        public String toString() {
            return "SendMessageRequest(data=" + this.data + ", signature=" + this.signature + ", whisperTo=" + this.whisperTo + ", whisperMods=" + this.whisperMods + ", files=" + this.files + PropertyUtils.MAPPED_DELIM2;
        }

        public SendMessageRequest(String str, String str2, List<String> list, Boolean bool, List<String> list2) {
            this.data = str;
            this.signature = str2;
            this.whisperTo = list;
            this.whisperMods = bool;
            this.files = list2;
        }

        public SendMessageRequest(String str, String str2, List list, Boolean bool, List list2, int i, DefaultConstructorMarker defaultConstructorMarker) {
            this((i & 1) != 0 ? null : str, (i & 2) != 0 ? null : str2, (i & 4) != 0 ? null : list, (i & 8) != 0 ? null : bool, (i & 16) != 0 ? null : list2);
        }

        public final String getData() {
            return this.data;
        }

        public final String getSignature() {
            return this.signature;
        }

        public final List<String> getWhisperTo() {
            return this.whisperTo;
        }

        public final Boolean getWhisperMods() {
            return this.whisperMods;
        }

        public final List<String> getFiles() {
            return this.files;
        }
    }

    @Metadata(d1 = {"\u0000(\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\t\n\u0002\b\t\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\b\u0086\b\u0018\u0000 \u00132\u00020\u0001:\u0001\u0013B\u0019\u0012\b\b\u0003\u0010\u0002\u001a\u00020\u0003\u0012\b\b\u0003\u0010\u0004\u001a\u00020\u0003¢\u0006\u0002\u0010\u0005J\t\u0010\t\u001a\u00020\u0003HÆ\u0003J\t\u0010\n\u001a\u00020\u0003HÆ\u0003J\u001d\u0010\u000b\u001a\u00020\u00002\b\b\u0003\u0010\u0002\u001a\u00020\u00032\b\b\u0003\u0010\u0004\u001a\u00020\u0003HÆ\u0001J\u0013\u0010\f\u001a\u00020\r2\b\u0010\u000e\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\u000f\u001a\u00020\u0010HÖ\u0001J\t\u0010\u0011\u001a\u00020\u0012HÖ\u0001R\u0011\u0010\u0004\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u0006\u0010\u0007R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\b\u0010\u0007¨\u0006\u0014"}, d2 = {"Lorg/session/libsession/messaging/open_groups/OpenGroupApi$MessageDeletion;", "", TtmlNode.ATTR_ID, "", "deletedMessageServerID", "(JJ)V", "getDeletedMessageServerID", "()J", "getId", "component1", "component2", "copy", "equals", "", "other", "hashCode", "", "toString", "", "Companion", "libsession_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    public static final class MessageDeletion {

        public static final Companion INSTANCE = new Companion(null);
        private static final MessageDeletion empty = new MessageDeletion(0, 0, 3, null);
        private final long deletedMessageServerID;
        private final long id;

        public MessageDeletion() {
            this(0L, 0L, 3, null);
        }

        public static MessageDeletion copy$default(MessageDeletion messageDeletion, long j, long j2, int i, Object obj) {
            if ((i & 1) != 0) {
                j = messageDeletion.id;
            }
            if ((i & 2) != 0) {
                j2 = messageDeletion.deletedMessageServerID;
            }
            return messageDeletion.copy(j, j2);
        }

        public final long getId() {
            return this.id;
        }

        public final long getDeletedMessageServerID() {
            return this.deletedMessageServerID;
        }

        public final MessageDeletion copy(@JsonProperty("id") long id, @JsonProperty("deleted_message_id") long deletedMessageServerID) {
            return new MessageDeletion(id, deletedMessageServerID);
        }

        public boolean equals(Object other) {
            if (this == other) {
                return true;
            }
            if (!(other instanceof MessageDeletion)) {
                return false;
            }
            MessageDeletion messageDeletion = (MessageDeletion) other;
            return this.id == messageDeletion.id && this.deletedMessageServerID == messageDeletion.deletedMessageServerID;
        }

        public int hashCode() {
            return (ConfigPush$$ExternalSyntheticBackport0.m(this.id) * 31) + ConfigPush$$ExternalSyntheticBackport0.m(this.deletedMessageServerID);
        }

        public String toString() {
            return "MessageDeletion(id=" + this.id + ", deletedMessageServerID=" + this.deletedMessageServerID + PropertyUtils.MAPPED_DELIM2;
        }

        public MessageDeletion(@JsonProperty("id") long j, @JsonProperty("deleted_message_id") long j2) {
            this.id = j;
            this.deletedMessageServerID = j2;
        }

        public MessageDeletion(long j, long j2, int i, DefaultConstructorMarker defaultConstructorMarker) {
            this((i & 1) != 0 ? 0L : j, (i & 2) != 0 ? 0L : j2);
        }

        public final long getId() {
            return this.id;
        }

        public final long getDeletedMessageServerID() {
            return this.deletedMessageServerID;
        }

        @Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u0011\u0010\u0003\u001a\u00020\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0005\u0010\u0006¨\u0006\u0007"}, d2 = {"Lorg/session/libsession/messaging/open_groups/OpenGroupApi$MessageDeletion$Companion;", "", "()V", "empty", "Lorg/session/libsession/messaging/open_groups/OpenGroupApi$MessageDeletion;", "getEmpty", "()Lorg/session/libsession/messaging/open_groups/OpenGroupApi$MessageDeletion;", "libsession_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
        public static final class Companion {
            public Companion(DefaultConstructorMarker defaultConstructorMarker) {
                this();
            }

            private Companion() {
            }

            public final MessageDeletion getEmpty() {
                return MessageDeletion.empty;
            }
        }
    }

    @Metadata(d1 = {"\u0000<\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010$\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0012\n\u0002\b \n\u0002\u0010\b\n\u0002\b\u0002\b\u0086\b\u0018\u00002\u00020\u0001B\u007f\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\b\u0010\u0004\u001a\u0004\u0018\u00010\u0005\u0012\u0006\u0010\u0006\u001a\u00020\u0005\u0012\u0006\u0010\u0007\u001a\u00020\b\u0012\u0014\b\u0002\u0010\t\u001a\u000e\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u00050\n\u0012\n\b\u0002\u0010\u000b\u001a\u0004\u0018\u00010\u0001\u0012\u0014\b\u0002\u0010\f\u001a\u000e\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u00050\n\u0012\b\b\u0002\u0010\r\u001a\u00020\u000e\u0012\n\b\u0002\u0010\u000f\u001a\u0004\u0018\u00010\u0010\u0012\b\b\u0002\u0010\u0011\u001a\u00020\u000e¢\u0006\u0002\u0010\u0012J\t\u0010#\u001a\u00020\u0003HÆ\u0003J\t\u0010$\u001a\u00020\u000eHÆ\u0003J\u000b\u0010%\u001a\u0004\u0018\u00010\u0005HÆ\u0003J\t\u0010&\u001a\u00020\u0005HÆ\u0003J\t\u0010'\u001a\u00020\bHÆ\u0003J\u0015\u0010(\u001a\u000e\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u00050\nHÆ\u0003J\u000b\u0010)\u001a\u0004\u0018\u00010\u0001HÆ\u0003J\u0015\u0010*\u001a\u000e\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u00050\nHÆ\u0003J\t\u0010+\u001a\u00020\u000eHÆ\u0003J\u000b\u0010,\u001a\u0004\u0018\u00010\u0010HÆ\u0003J\u008b\u0001\u0010-\u001a\u00020\u00002\b\b\u0002\u0010\u0002\u001a\u00020\u00032\n\b\u0002\u0010\u0004\u001a\u0004\u0018\u00010\u00052\b\b\u0002\u0010\u0006\u001a\u00020\u00052\b\b\u0002\u0010\u0007\u001a\u00020\b2\u0014\b\u0002\u0010\t\u001a\u000e\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u00050\n2\n\b\u0002\u0010\u000b\u001a\u0004\u0018\u00010\u00012\u0014\b\u0002\u0010\f\u001a\u000e\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u00050\n2\b\b\u0002\u0010\r\u001a\u00020\u000e2\n\b\u0002\u0010\u000f\u001a\u0004\u0018\u00010\u00102\b\b\u0002\u0010\u0011\u001a\u00020\u000eHÆ\u0001J\u0013\u0010.\u001a\u00020\u000e2\b\u0010/\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u00100\u001a\u000201HÖ\u0001J\t\u00102\u001a\u00020\u0005HÖ\u0001R\u0013\u0010\u000f\u001a\u0004\u0018\u00010\u0010¢\u0006\b\n\u0000\u001a\u0004\b\u0013\u0010\u0014R\u0011\u0010\u0007\u001a\u00020\b¢\u0006\b\n\u0000\u001a\u0004\b\u0015\u0010\u0016R\u001d\u0010\f\u001a\u000e\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u00050\n¢\u0006\b\n\u0000\u001a\u0004\b\u0017\u0010\u0018R\u0011\u0010\r\u001a\u00020\u000e¢\u0006\b\n\u0000\u001a\u0004\b\r\u0010\u0019R\u0013\u0010\u000b\u001a\u0004\u0018\u00010\u0001¢\u0006\b\n\u0000\u001a\u0004\b\u001a\u0010\u001bR\u001d\u0010\t\u001a\u000e\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u00050\n¢\u0006\b\n\u0000\u001a\u0004\b\u001c\u0010\u0018R\u0013\u0010\u0004\u001a\u0004\u0018\u00010\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u001d\u0010\u001eR\u0011\u0010\u0006\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u001f\u0010\u001eR\u0011\u0010\u0011\u001a\u00020\u000e¢\u0006\b\n\u0000\u001a\u0004\b \u0010\u0019R\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b!\u0010\"¨\u00063"}, d2 = {"Lorg/session/libsession/messaging/open_groups/OpenGroupApi$Request;", "", "verb", "Lorg/session/libsignal/utilities/HTTP$Verb;", "room", "", "server", "endpoint", "Lorg/session/libsession/messaging/open_groups/Endpoint;", "queryParameters", "", "parameters", Downloads.Impl.RequestHeaders.URI_SEGMENT, "isAuthRequired", "", "body", "", "useOnionRouting", "(Lorg/session/libsignal/utilities/HTTP$Verb;Ljava/lang/String;Ljava/lang/String;Lorg/session/libsession/messaging/open_groups/Endpoint;Ljava/util/Map;Ljava/lang/Object;Ljava/util/Map;Z[BZ)V", "getBody", "()[B", "getEndpoint", "()Lorg/session/libsession/messaging/open_groups/Endpoint;", "getHeaders", "()Ljava/util/Map;", "()Z", "getParameters", "()Ljava/lang/Object;", "getQueryParameters", "getRoom", "()Ljava/lang/String;", "getServer", "getUseOnionRouting", "getVerb", "()Lorg/session/libsignal/utilities/HTTP$Verb;", "component1", "component10", "component2", "component3", "component4", "component5", "component6", "component7", "component8", "component9", "copy", "equals", "other", "hashCode", "", "toString", "libsession_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    public static final class Request {
        private final byte[] body;
        private final Endpoint endpoint;
        private final Map<String, String> headers;
        private final boolean isAuthRequired;
        private final Object parameters;
        private final Map<String, String> queryParameters;
        private final String room;
        private final String server;
        private final boolean useOnionRouting;
        private final HTTP.Verb verb;

        public final HTTP.Verb getVerb() {
            return this.verb;
        }

        public final boolean getUseOnionRouting() {
            return this.useOnionRouting;
        }

        public final String getRoom() {
            return this.room;
        }

        public final String getServer() {
            return this.server;
        }

        public final Endpoint getEndpoint() {
            return this.endpoint;
        }

        public final Map<String, String> component5() {
            return this.queryParameters;
        }

        public final Object getParameters() {
            return this.parameters;
        }

        public final Map<String, String> component7() {
            return this.headers;
        }

        public final boolean getIsAuthRequired() {
            return this.isAuthRequired;
        }

        public final byte[] getBody() {
            return this.body;
        }

        public final Request copy(HTTP.Verb verb, String room, String server, Endpoint endpoint, Map<String, String> queryParameters, Object parameters, Map<String, String> headers, boolean isAuthRequired, byte[] body, boolean useOnionRouting) {
            Intrinsics.checkNotNullParameter(verb, "verb");
            Intrinsics.checkNotNullParameter(server, "server");
            Intrinsics.checkNotNullParameter(endpoint, "endpoint");
            Intrinsics.checkNotNullParameter(queryParameters, "queryParameters");
            Intrinsics.checkNotNullParameter(headers, "headers");
            return new Request(verb, room, server, endpoint, queryParameters, parameters, headers, isAuthRequired, body, useOnionRouting);
        }

        public boolean equals(Object other) {
            if (this == other) {
                return true;
            }
            if (!(other instanceof Request)) {
                return false;
            }
            Request request = (Request) other;
            return this.verb == request.verb && Intrinsics.areEqual(this.room, request.room) && Intrinsics.areEqual(this.server, request.server) && Intrinsics.areEqual(this.endpoint, request.endpoint) && Intrinsics.areEqual(this.queryParameters, request.queryParameters) && Intrinsics.areEqual(this.parameters, request.parameters) && Intrinsics.areEqual(this.headers, request.headers) && this.isAuthRequired == request.isAuthRequired && Intrinsics.areEqual(this.body, request.body) && this.useOnionRouting == request.useOnionRouting;
        }

        public int hashCode() {
            int hashCode = this.verb.hashCode() * 31;
            String str = this.room;
            int hashCode2 = (((((((hashCode + (str == null ? 0 : str.hashCode())) * 31) + this.server.hashCode()) * 31) + this.endpoint.hashCode()) * 31) + this.queryParameters.hashCode()) * 31;
            Object obj = this.parameters;
            int hashCode3 = (((hashCode2 + (obj == null ? 0 : obj.hashCode())) * 31) + this.headers.hashCode()) * 31;
            boolean z = this.isAuthRequired;
            int i = z;
            if (z != 0) {
                i = 1;
            }
            int i2 = (hashCode3 + i) * 31;
            byte[] bArr = this.body;
            int hashCode4 = (i2 + (bArr != null ? Arrays.hashCode(bArr) : 0)) * 31;
            boolean z2 = this.useOnionRouting;
            return hashCode4 + (z2 ? 1 : z2 ? 1 : 0);
        }

        public String toString() {
            return "Request(verb=" + this.verb + ", room=" + this.room + ", server=" + this.server + ", endpoint=" + this.endpoint + ", queryParameters=" + this.queryParameters + ", parameters=" + this.parameters + ", headers=" + this.headers + ", isAuthRequired=" + this.isAuthRequired + ", body=" + Arrays.toString(this.body) + ", useOnionRouting=" + this.useOnionRouting + PropertyUtils.MAPPED_DELIM2;
        }

        public Request(HTTP.Verb verb, String str, String server, Endpoint endpoint, Map<String, String> queryParameters, Object obj, Map<String, String> headers, boolean z, byte[] bArr, boolean z2) {
            Intrinsics.checkNotNullParameter(verb, "verb");
            Intrinsics.checkNotNullParameter(server, "server");
            Intrinsics.checkNotNullParameter(endpoint, "endpoint");
            Intrinsics.checkNotNullParameter(queryParameters, "queryParameters");
            Intrinsics.checkNotNullParameter(headers, "headers");
            this.verb = verb;
            this.room = str;
            this.server = server;
            this.endpoint = endpoint;
            this.queryParameters = queryParameters;
            this.parameters = obj;
            this.headers = headers;
            this.isAuthRequired = z;
            this.body = bArr;
            this.useOnionRouting = z2;
        }

        public final HTTP.Verb getVerb() {
            return this.verb;
        }

        public final String getRoom() {
            return this.room;
        }

        public final String getServer() {
            return this.server;
        }

        public final Endpoint getEndpoint() {
            return this.endpoint;
        }

        public Request(HTTP.Verb verb, String str, String str2, Endpoint endpoint, Map map, Object obj, Map map2, boolean z, byte[] bArr, boolean z2, int i, DefaultConstructorMarker defaultConstructorMarker) {
            this(verb, str, str2, endpoint, (i & 16) != 0 ? MapsKt.emptyMap() : map, (i & 32) != 0 ? null : obj, (i & 64) != 0 ? MapsKt.emptyMap() : map2, (i & 128) != 0 ? true : z, (i & 256) != 0 ? null : bArr, (i & 512) != 0 ? true : z2);
        }

        public final Map<String, String> getQueryParameters() {
            return this.queryParameters;
        }

        public final Object getParameters() {
            return this.parameters;
        }

        public final Map<String, String> getHeaders() {
            return this.headers;
        }

        public final boolean isAuthRequired() {
            return this.isAuthRequired;
        }

        public final byte[] getBody() {
            return this.body;
        }

        public final boolean getUseOnionRouting() {
            return this.useOnionRouting;
        }
    }

    private final RequestBody createBody(byte[] body, Object parameters) {
        if (body != null) {
            return RequestBody.create(MediaType.get("application/octet-stream"), body);
        }
        if (parameters == null) {
            return null;
        }
        return RequestBody.create(MediaType.get("application/json"), JsonUtil.toJson(parameters));
    }

    private final Promise<byte[], Exception> getResponseBody(Request request) {
        return KovenantFnMoniadic.map(send(request), new Function1<OnionResponse, byte[]>() {
            @Override
            public final byte[] invoke(OnionResponse response) {
                Intrinsics.checkNotNullParameter(response, "response");
                byte[] body = response.getBody();
                if (body != null) {
                    return body;
                }
                throw OpenGroupApi.Error.ParsingFailed.INSTANCE;
            }
        });
    }

    private final Promise<Map<?, ?>, Exception> getResponseBodyJson(Request request) {
        return KovenantFnMoniadic.map(send(request), new Function1<OnionResponse, Map<?, ?>>() {
            @Override
            public final Map<?, ?> invoke(OnionResponse it) {
                Intrinsics.checkNotNullParameter(it, "it");
                return (Map) JsonUtil.fromJson(it.getBody(), Map.class);
            }
        });
    }

    private final Promise<OnionResponse, Exception> send(Request request) {
        if (HttpUrl.parse(request.getServer()) == null) {
            return Promise.Companion.ofFail$default(Promise.INSTANCE, Error.InvalidURL.INSTANCE, null, 2, null);
        }
        StringBuilder sb = new StringBuilder(request.getServer() + JsonPointer.SEPARATOR + request.getEndpoint().getValue());
        if (request.getVerb() == HTTP.Verb.GET && (!request.getQueryParameters().isEmpty())) {
            sb.append("?");
            for (Map.Entry<String, String> entry : request.getQueryParameters().entrySet()) {
                sb.append(entry.getKey() + '=' + entry.getValue());
            }
        }
        return send$execute(request, sb);
    }

    private static final Promise<OnionResponse, Exception> send$execute(Request request, StringBuilder sb) {
        KeyPair keyPair;
        Context context;
        int i;
        String str;
        Unit unit;
        byte[] bArr;
        List<String> serverCapabilities = MessagingModuleConfiguration.INSTANCE.getShared().getStorage().getServerCapabilities(request.getServer());
        String openGroupPublicKey = MessagingModuleConfiguration.INSTANCE.getShared().getStorage().getOpenGroupPublicKey(request.getServer());
        if (openGroupPublicKey == null) {
            return Promise.Companion.ofFail$default(Promise.INSTANCE, Error.NoPublicKey.INSTANCE, null, 2, null);
        }
        KeyPair invoke = MessagingModuleConfiguration.INSTANCE.getShared().getGetUserED25519KeyPair().invoke();
        if (invoke == null) {
            return Promise.Companion.ofFail$default(Promise.INSTANCE, Error.NoEd25519KeyPair.INSTANCE, null, 2, null);
        }
        String sb2 = sb.toString();
        Intrinsics.checkNotNullExpressionValue(sb2, "urlBuilder.toString()");
        Map mutableMap = MapsKt.toMutableMap(request.getHeaders());
        if (request.isAuthRequired()) {
            OpenGroupApi openGroupApi = INSTANCE;
            byte[] nonce = openGroupApi.getSodium().nonce(16);
            long seconds = TimeUnit.MILLISECONDS.toSeconds(SnodeAPI.getNowWithOffset());
            byte[] bArr2 = new byte[64];
            byte[] bArr3 = new byte[0];
            if (request.getParameters() != null) {
                String json = JsonUtil.toJson(request.getParameters());
                Intrinsics.checkNotNullExpressionValue(json, "toJson(request.parameters)");
                byte[] bytes = json.getBytes(Charsets.UTF_8);
                Intrinsics.checkNotNullExpressionValue(bytes, "this as java.lang.String).getBytes(charset)");
                byte[] bArr4 = new byte[64];
                keyPair = invoke;
                if (openGroupApi.getSodium().cryptoGenericHash(bArr4, 64, bytes, bytes.length)) {
                    bArr3 = bArr4;
                }
            } else {
                keyPair = invoke;
                if (request.getBody() != null) {
                    byte[] bArr5 = new byte[64];
                    if (openGroupApi.getSodium().cryptoGenericHash(bArr5, 64, request.getBody(), request.getBody().length)) {
                        bArr3 = bArr5;
                    }
                }
            }
            byte[] fromStringCondensed = Hex.fromStringCondensed(openGroupPublicKey);
            Intrinsics.checkNotNullExpressionValue(fromStringCondensed, "fromStringCondensed(publicKey)");
            Intrinsics.checkNotNullExpressionValue(nonce, "nonce");
            byte[] plus = ArraysKt.plus(fromStringCondensed, nonce);
            byte[] bytes2 = String.valueOf(seconds).getBytes(Charsets.US_ASCII);
            Intrinsics.checkNotNullExpressionValue(bytes2, "this as java.lang.String).getBytes(charset)");
            byte[] plus2 = ArraysKt.plus(plus, bytes2);
            byte[] bytes3 = request.getVerb().getRawValue().getBytes(Charsets.UTF_8);
            Intrinsics.checkNotNullExpressionValue(bytes3, "this as java.lang.String).getBytes(charset)");
            byte[] plus3 = ArraysKt.plus(plus2, bytes3);
            byte[] bytes4 = (JsonPointer.SEPARATOR + request.getEndpoint().getValue()).getBytes(Charsets.UTF_8);
            Intrinsics.checkNotNullExpressionValue(bytes4, "this as java.lang.String).getBytes(charset)");
            byte[] plus4 = ArraysKt.plus(ArraysKt.plus(plus3, bytes4), bArr3);
            if (!serverCapabilities.isEmpty()) {
                String lowerCase = "BLIND".toLowerCase(Locale.ROOT);
                Intrinsics.checkNotNullExpressionValue(lowerCase, "this as java.lang.String).toLowerCase(Locale.ROOT)");
                if (!serverCapabilities.contains(lowerCase)) {
                    IdPrefix idPrefix = IdPrefix.UN_BLINDED;
                    byte[] asBytes = keyPair.getPublicKey().getAsBytes();
                    Intrinsics.checkNotNullExpressionValue(asBytes, "ed25519KeyPair.publicKey.asBytes");
                    str = new SessionId(idPrefix, asBytes).getHexString();
                    openGroupApi.getSodium().cryptoSignDetached(bArr2, plus4, plus4.length, keyPair.getSecretKey().getAsBytes());
                    bArr = bArr2;
                    String encodeBytes = Base64.encodeBytes(nonce);
                    Intrinsics.checkNotNullExpressionValue(encodeBytes, "encodeBytes(nonce)");
                    mutableMap.put("X-SOGS-Nonce", encodeBytes);
                    mutableMap.put("X-SOGS-Timestamp", String.valueOf(seconds));
                    mutableMap.put("X-SOGS-Pubkey", str);
                    String encodeBytes2 = Base64.encodeBytes(bArr);
                    Intrinsics.checkNotNullExpressionValue(encodeBytes2, "encodeBytes(signature)");
                    mutableMap.put("X-SOGS-Signature", encodeBytes2);
                }
            }
            KeyPair keyPair2 = keyPair;
            KeyPair blindedKeyPair = SodiumUtilities.blindedKeyPair(openGroupPublicKey, keyPair2);
            if (blindedKeyPair != null) {
                IdPrefix idPrefix2 = IdPrefix.BLINDED;
                byte[] asBytes2 = blindedKeyPair.getPublicKey().getAsBytes();
                Intrinsics.checkNotNullExpressionValue(asBytes2, "keyPair.publicKey.asBytes");
                String hexString = new SessionId(idPrefix2, asBytes2).getHexString();
                SodiumUtilities sodiumUtilities = SodiumUtilities.INSTANCE;
                byte[] asBytes3 = keyPair2.getSecretKey().getAsBytes();
                Intrinsics.checkNotNullExpressionValue(asBytes3, "ed25519KeyPair.secretKey.asBytes");
                byte[] asBytes4 = blindedKeyPair.getSecretKey().getAsBytes();
                Intrinsics.checkNotNullExpressionValue(asBytes4, "keyPair.secretKey.asBytes");
                byte[] asBytes5 = blindedKeyPair.getPublicKey().getAsBytes();
                Intrinsics.checkNotNullExpressionValue(asBytes5, "keyPair.publicKey.asBytes");
                bArr = sodiumUtilities.sogsSignature(plus4, asBytes3, asBytes4, asBytes5);
                if (bArr != null) {
                    context = null;
                    i = 2;
                    unit = Unit.INSTANCE;
                    str = hexString;
                } else {
                    return Promise.Companion.ofFail$default(Promise.INSTANCE, Error.SigningFailed.INSTANCE, null, 2, null);
                }
            } else {
                context = null;
                i = 2;
                str = "";
                unit = null;
                bArr = bArr2;
            }
            if (unit == null) {
                return Promise.Companion.ofFail$default(Promise.INSTANCE, Error.SigningFailed.INSTANCE, context, i, context);
            }
            String encodeBytes3 = Base64.encodeBytes(nonce);
            Intrinsics.checkNotNullExpressionValue(encodeBytes3, "encodeBytes(nonce)");
            mutableMap.put("X-SOGS-Nonce", encodeBytes3);
            mutableMap.put("X-SOGS-Timestamp", String.valueOf(seconds));
            mutableMap.put("X-SOGS-Pubkey", str);
            String encodeBytes22 = Base64.encodeBytes(bArr);
            Intrinsics.checkNotNullExpressionValue(encodeBytes22, "encodeBytes(signature)");
            mutableMap.put("X-SOGS-Signature", encodeBytes22);
        }
        Request.Builder headers = new Request.Builder().url(sb2).headers(Headers.of((Map<String, String>) mutableMap));
        int i2 = WhenMappings.$EnumSwitchMapping$0[request.getVerb().ordinal()];
        if (i2 == 1) {
            headers.get();
        } else if (i2 == 2) {
            RequestBody createBody = INSTANCE.createBody(request.getBody(), request.getParameters());
            Intrinsics.checkNotNull(createBody);
            headers.put(createBody);
        } else if (i2 == 3) {
            RequestBody createBody2 = INSTANCE.createBody(request.getBody(), request.getParameters());
            Intrinsics.checkNotNull(createBody2);
            headers.post(createBody2);
        } else if (i2 == 4) {
            headers.delete(INSTANCE.createBody(request.getBody(), request.getParameters()));
        }
        String room = request.getRoom();
        if (!(room == null || room.length() == 0)) {
            headers.header("Room", request.getRoom());
        }
        if (request.getUseOnionRouting()) {
            OnionRequestAPI onionRequestAPI = OnionRequestAPI.INSTANCE;
            okhttp3.Request build = headers.build();
            Intrinsics.checkNotNullExpressionValue(build, "requestBuilder.build()");
            return OnionRequestAPI.sendOnionRequest$default(onionRequestAPI, build, request.getServer(), openGroupPublicKey, null, 8, null).fail(new Function1<Exception, Unit>() {
                @Override
                public Unit invoke(Exception exc) {
                    invoke2(exc);
                    return Unit.INSTANCE;
                }

                public final void invoke2(Exception e) {
                    Intrinsics.checkNotNullParameter(e, "e");
                    if (!(e instanceof HTTP.HTTPRequestFailedException)) {
                        Log.e("SOGS", "Failed onion request", e);
                        return;
                    }
                    Log.e("SOGS", "Failed onion request: " + e.getMessage());
                }
            });
        }
        return Promise.Companion.ofFail$default(Promise.INSTANCE, new IllegalStateException("It's currently not allowed to send non onion routed requests."), null, 2, null);
    }

    public final Promise<byte[], Exception> downloadOpenGroupProfilePicture(String server, String roomID, String imageId) {
        Intrinsics.checkNotNullParameter(server, "server");
        Intrinsics.checkNotNullParameter(roomID, "roomID");
        Intrinsics.checkNotNullParameter(imageId, "imageId");
        return getResponseBody(new Request(HTTP.Verb.GET, roomID, server, new Endpoint.RoomFileIndividual(roomID, imageId), null, null, null, false, null, false, PointerIconCompat.TYPE_TEXT, null));
    }

    public final Promise<Long, Exception> upload(byte[] file, String room, String server) {
        Intrinsics.checkNotNullParameter(file, "file");
        Intrinsics.checkNotNullParameter(room, "room");
        Intrinsics.checkNotNullParameter(server, "server");
        return KovenantFnMoniadic.map(getResponseBodyJson(new Request(HTTP.Verb.POST, room, server, new Endpoint.RoomFile(room), null, null, MapsKt.mapOf(TuplesKt.to("Content-Disposition", "attachment"), TuplesKt.to(HttpHeaders.CONTENT_TYPE, "application/octet-stream")), false, file, false, 688, null)), new Function1<Map<?, ?>, Long>() {
            @Override
            public final Long invoke(Map<?, ?> json) {
                Intrinsics.checkNotNullParameter(json, "json");
                Object obj = json.get(TtmlNode.ATTR_ID);
                Number number = obj instanceof Number ? (Number) obj : null;
                if (number != null) {
                    return Long.valueOf(number.longValue());
                }
                throw OpenGroupApi.Error.ParsingFailed.INSTANCE;
            }
        });
    }

    public final Promise<byte[], Exception> download(String fileId, String room, String server) {
        Intrinsics.checkNotNullParameter(fileId, "fileId");
        Intrinsics.checkNotNullParameter(room, "room");
        Intrinsics.checkNotNullParameter(server, "server");
        return getResponseBody(new Request(HTTP.Verb.GET, room, server, new Endpoint.RoomFileIndividual(room, fileId), null, null, null, false, null, false, PointerIconCompat.TYPE_TEXT, null));
    }

    public final Promise<OpenGroupMessage, Exception> sendMessage(OpenGroupMessage message, String room, String server, List<String> whisperTo, Boolean whisperMods, List<String> fileIds) {
        Intrinsics.checkNotNullParameter(message, "message");
        Intrinsics.checkNotNullParameter(room, "room");
        Intrinsics.checkNotNullParameter(server, "server");
        OpenGroupMessage sign = message.sign(room, server, IdPrefix.STANDARD);
        if (sign == null) {
            return Promise.Companion.ofFail$default(Promise.INSTANCE, Error.SigningFailed.INSTANCE, null, 2, null);
        }
        Map mutableMap = MapsKt.toMutableMap(sign.toJSON());
        List<String> list = fileIds;
        if (!(list == null || list.isEmpty())) {
            Pair pair = TuplesKt.to("files", fileIds);
            mutableMap.put(pair.getFirst(), pair.getSecond());
        }
        return KovenantFnMoniadic.map(getResponseBodyJson(new Request(HTTP.Verb.POST, room, server, new Endpoint.RoomMessage(room), null, mutableMap, null, false, null, false, 976, null)), new Function1<Map<?, ?>, OpenGroupMessage>() {
            @Override
            public final OpenGroupMessage invoke(Map<?, ?> json) {
                Intrinsics.checkNotNullParameter(json, "json");
                if (json == null) {
                    throw OpenGroupApi.Error.ParsingFailed.INSTANCE;
                }
                OpenGroupMessage fromJSON = OpenGroupMessage.INSTANCE.fromJSON(json);
                if (fromJSON == null) {
                    throw OpenGroupApi.Error.ParsingFailed.INSTANCE;
                }
                MessagingModuleConfiguration.INSTANCE.getShared().getStorage().addReceivedMessageTimestamp(fromJSON.getSentTimestamp());
                return fromJSON;
            }
        });
    }

    public final Promise<List<OpenGroupMessage>, Exception> getMessages(final String room, final String server) {
        Intrinsics.checkNotNullParameter(room, "room");
        Intrinsics.checkNotNullParameter(server, "server");
        StorageProtocol storage = MessagingModuleConfiguration.INSTANCE.getShared().getStorage();
        LinkedHashMap linkedHashMap = new LinkedHashMap();
        Long lastMessageServerID = storage.getLastMessageServerID(room, server);
        if (lastMessageServerID != null) {
            Pair pair = TuplesKt.to("from_server_id", String.valueOf(lastMessageServerID.longValue()));
            linkedHashMap.put(pair.getFirst(), pair.getSecond());
        }
        return KovenantFnMoniadic.map(getResponseBodyJson(new Request(HTTP.Verb.GET, room, server, new Endpoint.RoomMessage(room), linkedHashMap, null, null, false, null, false, 992, null)), new Function1<Map<?, ?>, List<? extends OpenGroupMessage>>() {
            {
                super(1);
            }

            @Override
            public final List<OpenGroupMessage> invoke(Map<?, ?> json) {
                List<OpenGroupMessage> parseMessages;
                Intrinsics.checkNotNullParameter(json, "json");
                Object obj = json.get("messages");
                List list = obj instanceof List ? (List) obj : null;
                if (list != null) {
                    parseMessages = OpenGroupApi.INSTANCE.parseMessages(room, server, list);
                    return parseMessages;
                }
                throw OpenGroupApi.Error.ParsingFailed.INSTANCE;
            }
        });
    }

    public final List<OpenGroupMessage> parseMessages(String room, String server, List<? extends Map<?, ?>> rawMessages) {
        boolean z;
        ArrayList arrayList = new ArrayList();
        Iterator<T> it = rawMessages.iterator();
        while (it.hasNext()) {
            Map<String, ? extends Object> map = (Map) it.next();
            Intrinsics.checkNotNull(map, "null cannot be cast to non-null type kotlin.collections.Map<kotlin.String, kotlin.Any>");
            OpenGroupMessage openGroupMessage = null;
            try {
                OpenGroupMessage fromJSON = OpenGroupMessage.INSTANCE.fromJSON(map);
                if (fromJSON != null && fromJSON.getServerID() != null) {
                    String sender = fromJSON.getSender();
                    if (sender != null && sender.length() != 0) {
                        z = false;
                        if (z) {
                            String sender2 = fromJSON.getSender();
                            byte[] decode = Base64.decode(fromJSON.getBase64EncodedData());
                            byte[] decode2 = Base64.decode(fromJSON.getBase64EncodedSignature());
                            if (curve.verifySignature(Hex.fromStringCondensed(TrimmingKt.removingIdPrefixIfNeeded(sender2)), decode, decode2)) {
                                openGroupMessage = fromJSON;
                            } else {
                                Log.d("Loki", "Ignoring message with invalid signature.");
                            }
                        }
                    }
                    z = true;
                    if (z) {
                    }
                }
            } catch (Exception unused) {
            }
        }
        return arrayList;
    }

    public final Promise<Map<?, ?>, Exception> getReactors(String room, String server, long messageId, String emoji) {
        Intrinsics.checkNotNullParameter(room, "room");
        Intrinsics.checkNotNullParameter(server, "server");
        Intrinsics.checkNotNullParameter(emoji, "emoji");
        return KovenantFnMoniadic.map(getResponseBody(new Request(HTTP.Verb.GET, room, server, new Endpoint.Reactors(room, messageId, emoji), null, null, null, false, null, false, PointerIconCompat.TYPE_TEXT, null)), new Function1<byte[], Map<?, ?>>() {
            @Override
            public final Map<?, ?> invoke(byte[] response) {
                Intrinsics.checkNotNullParameter(response, "response");
                return (Map) JsonUtil.fromJson(response, Map.class);
            }
        });
    }

    public final Promise<AddReactionResponse, Exception> addReaction(String room, String server, long messageId, String emoji) {
        Intrinsics.checkNotNullParameter(room, "room");
        Intrinsics.checkNotNullParameter(server, "server");
        Intrinsics.checkNotNullParameter(emoji, "emoji");
        Request request = new Request(HTTP.Verb.PUT, room, server, new Endpoint.Reaction(room, messageId, emoji), null, MapsKt.emptyMap(), null, false, null, false, 976, null);
        final PendingReaction pendingReaction = new PendingReaction(server, room, messageId, emoji, true, 0 == true ? 1 : 0, 32, 0 == true ? 1 : 0);
        return KovenantFnMoniadic.map(getResponseBody(request), new Function1<byte[], AddReactionResponse>() {
            {
                super(1);
            }

            @Override
            public final OpenGroupApi.AddReactionResponse invoke(byte[] response) {
                Intrinsics.checkNotNullParameter(response, "response");
                Object fromJson = JsonUtil.fromJson(response, (Class<Object>) OpenGroupApi.AddReactionResponse.class);
                OpenGroupApi.AddReactionResponse addReactionResponse = (OpenGroupApi.AddReactionResponse) fromJson;
                OpenGroupApi.INSTANCE.getPendingReactions().get(OpenGroupApi.INSTANCE.getPendingReactions().indexOf(OpenGroupApi.PendingReaction.this)).setSeqNo(Long.valueOf(addReactionResponse.getSeqNo()));
                return addReactionResponse;
            }
        });
    }

    public final Promise<DeleteReactionResponse, Exception> deleteReaction(String room, String server, long messageId, String emoji) {
        Intrinsics.checkNotNullParameter(room, "room");
        Intrinsics.checkNotNullParameter(server, "server");
        Intrinsics.checkNotNullParameter(emoji, "emoji");
        Request request = new Request(HTTP.Verb.DELETE, room, server, new Endpoint.Reaction(room, messageId, emoji), null, null, null, false, null, false, PointerIconCompat.TYPE_TEXT, null);
        final PendingReaction pendingReaction = new PendingReaction(server, room, messageId, emoji, true, 0 == true ? 1 : 0, 32, 0 == true ? 1 : 0);
        return KovenantFnMoniadic.map(getResponseBody(request), new Function1<byte[], DeleteReactionResponse>() {
            {
                super(1);
            }

            @Override
            public final OpenGroupApi.DeleteReactionResponse invoke(byte[] response) {
                Intrinsics.checkNotNullParameter(response, "response");
                Object fromJson = JsonUtil.fromJson(response, (Class<Object>) OpenGroupApi.DeleteReactionResponse.class);
                OpenGroupApi.DeleteReactionResponse deleteReactionResponse = (OpenGroupApi.DeleteReactionResponse) fromJson;
                OpenGroupApi.INSTANCE.getPendingReactions().get(OpenGroupApi.INSTANCE.getPendingReactions().indexOf(OpenGroupApi.PendingReaction.this)).setSeqNo(Long.valueOf(deleteReactionResponse.getSeqNo()));
                return deleteReactionResponse;
            }
        });
    }

    public final Promise<DeleteAllReactionsResponse, Exception> deleteAllReactions(String room, String server, long messageId, String emoji) {
        Intrinsics.checkNotNullParameter(room, "room");
        Intrinsics.checkNotNullParameter(server, "server");
        Intrinsics.checkNotNullParameter(emoji, "emoji");
        return KovenantFnMoniadic.map(getResponseBody(new Request(HTTP.Verb.DELETE, room, server, new Endpoint.ReactionDelete(room, messageId, emoji), null, null, null, false, null, false, PointerIconCompat.TYPE_TEXT, null)), new Function1<byte[], DeleteAllReactionsResponse>() {
            @Override
            public final OpenGroupApi.DeleteAllReactionsResponse invoke(byte[] response) {
                Intrinsics.checkNotNullParameter(response, "response");
                return (OpenGroupApi.DeleteAllReactionsResponse) JsonUtil.fromJson(response, OpenGroupApi.DeleteAllReactionsResponse.class);
            }
        });
    }

    @JvmStatic
    public static final Promise<Unit, Exception> deleteMessage(long serverID, String room, String server) {
        Intrinsics.checkNotNullParameter(room, "room");
        Intrinsics.checkNotNullParameter(server, "server");
        return KovenantFnMoniadic.map(INSTANCE.send(new Request(HTTP.Verb.DELETE, room, server, new Endpoint.RoomMessageIndividual(room, serverID), null, null, null, false, null, false, PointerIconCompat.TYPE_TEXT, null)), new Function1<OnionResponse, Unit>() {
            @Override
            public Unit invoke(OnionResponse onionResponse) {
                invoke2(onionResponse);
                return Unit.INSTANCE;
            }

            public final void invoke2(OnionResponse it) {
                Intrinsics.checkNotNullParameter(it, "it");
                Log.d("Loki", "Message deletion successful.");
            }
        });
    }

    public final Promise<List<MessageDeletion>, Exception> getDeletedMessages(final String room, final String server) {
        Intrinsics.checkNotNullParameter(room, "room");
        Intrinsics.checkNotNullParameter(server, "server");
        final StorageProtocol storage = MessagingModuleConfiguration.INSTANCE.getShared().getStorage();
        LinkedHashMap linkedHashMap = new LinkedHashMap();
        Long lastDeletionServerID = storage.getLastDeletionServerID(room, server);
        if (lastDeletionServerID != null) {
            linkedHashMap.put("from_server_id", String.valueOf(lastDeletionServerID.longValue()));
        }
        HTTP.Verb verb = HTTP.Verb.GET;
        String userPublicKey = storage.getUserPublicKey();
        if (userPublicKey == null) {
            userPublicKey = "";
        }
        return KovenantFnMoniadic.map(getResponseBody(new Request(verb, room, server, new Endpoint.RoomDeleteMessages(room, userPublicKey), linkedHashMap, null, null, false, null, false, 992, null)), new Function1<byte[], List<? extends MessageDeletion>>() {
            {
                super(1);
            }

            @Override
            public final List<OpenGroupApi.MessageDeletion> invoke(byte[] response) {
                Object obj;
                Intrinsics.checkNotNullParameter(response, "response");
                Map json = (Map) JsonUtil.fromJson(response, Map.class);
                CollectionType constructCollectionType = TypeFactory.defaultInstance().constructCollectionType(List.class, OpenGroupApi.MessageDeletion.class);
                Intrinsics.checkNotNullExpressionValue(json, "json");
                List<OpenGroupApi.MessageDeletion> list = (List) JsonUtil.fromJson(JsonUtil.toJson(json.get("ids")), constructCollectionType);
                if (list == null) {
                    throw OpenGroupApi.Error.ParsingFailed.INSTANCE;
                }
                Long lastDeletionServerID2 = StorageProtocol.this.getLastDeletionServerID(room, server);
                long longValue = lastDeletionServerID2 != null ? lastDeletionServerID2.longValue() : 0L;
                Iterator<T> it = list.iterator();
                if (it.hasNext()) {
                    Object next = it.next();
                    if (it.hasNext()) {
                        long id = ((OpenGroupApi.MessageDeletion) next).getId();
                        do {
                            Object next2 = it.next();
                            long id2 = ((OpenGroupApi.MessageDeletion) next2).getId();
                            if (id < id2) {
                                next = next2;
                                id = id2;
                            }
                        } while (it.hasNext());
                    }
                    obj = next;
                } else {
                    obj = null;
                }
                OpenGroupApi.MessageDeletion messageDeletion = (OpenGroupApi.MessageDeletion) obj;
                if (messageDeletion == null) {
                    messageDeletion = OpenGroupApi.MessageDeletion.INSTANCE.getEmpty();
                }
                if (messageDeletion.getId() > longValue) {
                    StorageProtocol.this.setLastDeletionServerID(room, server, messageDeletion.getId());
                }
                return list;
            }
        });
    }

    @JvmStatic
    public static final Promise<Unit, Exception> ban(final String publicKey, final String room, final String server) {
        Intrinsics.checkNotNullParameter(publicKey, "publicKey");
        Intrinsics.checkNotNullParameter(room, "room");
        Intrinsics.checkNotNullParameter(server, "server");
        return KovenantFnMoniadic.map(INSTANCE.send(new Request(HTTP.Verb.POST, room, server, new Endpoint.UserBan(publicKey), null, MapsKt.mapOf(TuplesKt.to("rooms", CollectionsKt.listOf(room))), null, false, null, false, 976, null)), new Function1<OnionResponse, Unit>() {
            {
                super(1);
            }

            @Override
            public Unit invoke(OnionResponse onionResponse) {
                invoke2(onionResponse);
                return Unit.INSTANCE;
            }

            public final void invoke2(OnionResponse it) {
                Intrinsics.checkNotNullParameter(it, "it");
                Log.d("Loki", "Banned user: " + publicKey + " from: " + server + '.' + room + '.');
            }
        });
    }

    public final Promise<Unit, Exception> banAndDeleteAll(final String publicKey, final String room, final String server) {
        Intrinsics.checkNotNullParameter(publicKey, "publicKey");
        Intrinsics.checkNotNullParameter(room, "room");
        Intrinsics.checkNotNullParameter(server, "server");
        Map map = null;
        return KovenantFnMoniadic.map(sequentialBatch(server, CollectionsKt.mutableListOf(new BatchRequestInfo(new BatchRequest(HTTP.Verb.POST, "/user/" + publicKey + "/ban", map, MapsKt.mapOf(TuplesKt.to("rooms", CollectionsKt.listOf(room))), null, null, 52, null), new Endpoint.UserBan(publicKey), null, new TypeReference<Object>() {
        }, 4, null), new BatchRequestInfo(new BatchRequest(HTTP.Verb.DELETE, "/room/" + room + "/all/" + publicKey, null, null, 0 == true ? 1 : 0, null, 60, null), new Endpoint.RoomDeleteMessages(room, publicKey), map, new TypeReference<Object>() {
        }, 4, 0 == true ? 1 : 0))), new Function1<List<? extends BatchResponse<?>>, Unit>() {
            {
                super(1);
            }

            @Override
            public Unit invoke(List<? extends OpenGroupApi.BatchResponse<?>> list) {
                invoke2(list);
                return Unit.INSTANCE;
            }

            public final void invoke2(List<? extends OpenGroupApi.BatchResponse<?>> it) {
                Intrinsics.checkNotNullParameter(it, "it");
                Log.d("Loki", "Banned user: " + publicKey + " from: " + server + '.' + room + '.');
            }
        });
    }

    public final Promise<Unit, Exception> unban(final String publicKey, final String room, final String server) {
        Intrinsics.checkNotNullParameter(publicKey, "publicKey");
        Intrinsics.checkNotNullParameter(room, "room");
        Intrinsics.checkNotNullParameter(server, "server");
        return KovenantFnMoniadic.map(send(new Request(HTTP.Verb.DELETE, room, server, new Endpoint.UserUnban(publicKey), null, null, null, false, null, false, PointerIconCompat.TYPE_TEXT, null)), new Function1<OnionResponse, Unit>() {
            {
                super(1);
            }

            @Override
            public Unit invoke(OnionResponse onionResponse) {
                invoke2(onionResponse);
                return Unit.INSTANCE;
            }

            public final void invoke2(OnionResponse it) {
                Intrinsics.checkNotNullParameter(it, "it");
                Log.d("Loki", "Unbanned user: " + publicKey + " from: " + server + '.' + room);
            }
        });
    }

    public final Promise<List<BatchResponse<?>>, Exception> poll(List<String> rooms, String server) {
        BatchRequestInfo<?> batchRequestInfo;
        BatchRequestInfo<?> batchRequestInfo2;
        BatchRequestInfo<?> batchRequestInfo3;
        Intrinsics.checkNotNullParameter(rooms, "rooms");
        Intrinsics.checkNotNullParameter(server, "server");
        StorageProtocol storage = MessagingModuleConfiguration.INSTANCE.getShared().getStorage();
        android.content.Context context = MessagingModuleConfiguration.INSTANCE.getShared().getContext();
        long timeSinceLastOpen2 = getTimeSinceLastOpen();
        Map<String, Boolean> map = hasPerformedInitialPoll;
        int i = 0;
        Object[] objArr = !Intrinsics.areEqual((Object) map.get(server), (Object) true) && timeSinceLastOpen2 > 1209600000;
        map.put(server, true);
        if (!hasUpdatedLastOpenDate) {
            hasUpdatedLastOpenDate = true;
            TextSecurePreferences.INSTANCE.setLastOpenDate(context);
        }
        Long lastInboxMessageId = storage.getLastInboxMessageId(server);
        Long lastOutboxMessageId = storage.getLastOutboxMessageId(server);
        Map map2 = null;
        List<BatchRequestInfo<?>> mutableListOf = CollectionsKt.mutableListOf(new BatchRequestInfo(new BatchRequest(HTTP.Verb.GET, "/capabilities", map2, null, null, null, 60, null), Endpoint.Capabilities.INSTANCE, map2, new TypeReference<Capabilities>() {
        }, 4, null == true ? 1 : 0));
        for (String str : rooms) {
            OpenGroup openGroup = storage.getOpenGroup(str, server);
            int infoUpdates = openGroup != null ? openGroup.getInfoUpdates() : i;
            Long lastMessageServerID = storage.getLastMessageServerID(str, server);
            long longValue = lastMessageServerID != null ? lastMessageServerID.longValue() : 0L;
            Map map3 = null;
            mutableListOf.add(new BatchRequestInfo<>(new BatchRequest(HTTP.Verb.GET, "/room/" + str + "/pollInfo/" + infoUpdates, map3, null, null, null, 60, null), new Endpoint.RoomPollInfo(str, infoUpdates), map3, new TypeReference<RoomPollInfo>() {
            }, 4, null == true ? 1 : 0));
            if (objArr != false || longValue == 0) {
                batchRequestInfo3 = new BatchRequestInfo<>(new BatchRequest(HTTP.Verb.GET, "/room/" + str + "/messages/recent?t=r&reactors=5", null, null, null, null, 60, null), new Endpoint.RoomMessagesRecent(str), null, new TypeReference<List<? extends Message>>() {
                }, 4, null == true ? 1 : 0);
            } else {
                Map map4 = null;
                batchRequestInfo3 = new BatchRequestInfo<>(new BatchRequest(HTTP.Verb.GET, "/room/" + str + "/messages/since/" + longValue + "?t=r&reactors=5", map4, null, null, null, 60, null), new Endpoint.RoomMessagesSince(str, longValue), map4, new TypeReference<List<? extends Message>>() {
                }, 4, null == true ? 1 : 0);
            }
            mutableListOf.add(batchRequestInfo3);
            i = 0;
        }
        List<String> serverCapabilities = storage.getServerCapabilities(server);
        boolean isCheckingCommunityRequests = storage.isCheckingCommunityRequests();
        String lowerCase = "BLIND".toLowerCase(Locale.ROOT);
        Intrinsics.checkNotNullExpressionValue(lowerCase, "this as java.lang.String).toLowerCase(Locale.ROOT)");
        if (serverCapabilities.contains(lowerCase) && isCheckingCommunityRequests) {
            if (lastInboxMessageId == null) {
                Map map5 = null;
                batchRequestInfo = new BatchRequestInfo<>(new BatchRequest(HTTP.Verb.GET, "/inbox", map5, null, null, null, 60, null), Endpoint.Inbox.INSTANCE, map5, new TypeReference<List<? extends DirectMessage>>() {
                }, 4, null == true ? 1 : 0);
            } else {
                batchRequestInfo = new BatchRequestInfo<>(new BatchRequest(HTTP.Verb.GET, "/inbox/since/" + lastInboxMessageId, null, null, null, null, 60, null), new Endpoint.InboxSince(lastInboxMessageId.longValue()), null, new TypeReference<List<? extends DirectMessage>>() {
                }, 4, null);
            }
            mutableListOf.add(batchRequestInfo);
            if (lastOutboxMessageId == null) {
                Map map6 = null;
                batchRequestInfo2 = new BatchRequestInfo<>(new BatchRequest(HTTP.Verb.GET, "/outbox", map6, null, null, null, 60, null), Endpoint.Outbox.INSTANCE, map6, new TypeReference<List<? extends DirectMessage>>() {
                }, 4, null == true ? 1 : 0);
            } else {
                batchRequestInfo2 = new BatchRequestInfo<>(new BatchRequest(HTTP.Verb.GET, "/outbox/since/" + lastOutboxMessageId, null, null, null, null, 60, null), new Endpoint.OutboxSince(lastOutboxMessageId.longValue()), null, new TypeReference<List<? extends DirectMessage>>() {
                }, 4, null);
            }
            mutableListOf.add(batchRequestInfo2);
        }
        return parallelBatch(server, mutableListOf);
    }

    private final Promise<List<BatchResponse<?>>, Exception> parallelBatch(String server, List<BatchRequestInfo<?>> requests) {
        HTTP.Verb verb = HTTP.Verb.POST;
        Endpoint.Batch batch = Endpoint.Batch.INSTANCE;
        List<BatchRequestInfo<?>> list = requests;
        ArrayList arrayList = new ArrayList(CollectionsKt.collectionSizeOrDefault(list, 10));
        Iterator<T> it = list.iterator();
        while (it.hasNext()) {
            arrayList.add(((BatchRequestInfo) it.next()).getRequest());
        }
        return getBatchResponseJson(new Request(verb, null, server, batch, null, arrayList, null, false, null, false, 976, null), requests);
    }

    private final Promise<List<BatchResponse<?>>, Exception> sequentialBatch(String server, List<BatchRequestInfo<?>> requests) {
        HTTP.Verb verb = HTTP.Verb.POST;
        Endpoint.Sequence sequence = Endpoint.Sequence.INSTANCE;
        List<BatchRequestInfo<?>> list = requests;
        ArrayList arrayList = new ArrayList(CollectionsKt.collectionSizeOrDefault(list, 10));
        Iterator<T> it = list.iterator();
        while (it.hasNext()) {
            arrayList.add(((BatchRequestInfo) it.next()).getRequest());
        }
        return getBatchResponseJson(new Request(verb, null, server, sequence, null, arrayList, null, false, null, false, 976, null), requests);
    }

    private final Promise<List<BatchResponse<?>>, Exception> getBatchResponseJson(Request request, final List<BatchRequestInfo<?>> requests) {
        return KovenantFnMoniadic.map(getResponseBody(request), new Function1<byte[], List<? extends BatchResponse<Object>>>() {
            {
                super(1);
            }

            @Override
            public final List<OpenGroupApi.BatchResponse<Object>> invoke(byte[] batch) {
                Intrinsics.checkNotNullParameter(batch, "batch");
                List list = (List) JsonUtil.fromJson(batch, List.class);
                if (list == null) {
                    throw OpenGroupApi.Error.ParsingFailed.INSTANCE;
                }
                List list2 = list;
                List<OpenGroupApi.BatchRequestInfo<?>> list3 = requests;
                ArrayList arrayList = new ArrayList(CollectionsKt.collectionSizeOrDefault(list2, 10));
                int i = 0;
                for (Object obj : list2) {
                    int i2 = i + 1;
                    if (i < 0) {
                        CollectionsKt.throwIndexOverflow();
                    }
                    Object obj2 = null;
                    Map map = obj instanceof Map ? (Map) obj : null;
                    if (map == null) {
                        throw OpenGroupApi.Error.ParsingFailed.INSTANCE;
                    }
                    Object obj3 = map.get("code");
                    Intrinsics.checkNotNull(obj3, "null cannot be cast to non-null type kotlin.Int");
                    int intValue = ((Integer) obj3).intValue();
                    Endpoint endpoint = list3.get(i).getEndpoint();
                    Object obj4 = map.get(Downloads.Impl.RequestHeaders.URI_SEGMENT);
                    Intrinsics.checkNotNull(obj4, "null cannot be cast to non-null type kotlin.collections.Map<kotlin.String, kotlin.String>");
                    Map map2 = (Map) obj4;
                    if (200 <= intValue && intValue < 300) {
                        String json = JsonUtil.toJson(map.get("body"));
                        if (!(!Intrinsics.areEqual(json, "[]"))) {
                            json = null;
                        }
                        if (json != null) {
                            obj2 = JsonUtil.fromJson(json, list3.get(i).getResponseType());
                        }
                    }
                    arrayList.add(new OpenGroupApi.BatchResponse(endpoint, intValue, map2, obj2));
                    i = i2;
                }
                return arrayList;
            }
        });
    }

    public final Promise<Capabilities, Exception> getDefaultServerCapabilities() {
        final StorageProtocol storage = MessagingModuleConfiguration.INSTANCE.getShared().getStorage();
        storage.setOpenGroupPublicKey(defaultServer, defaultServerPublicKey);
        return KovenantFnMoniadic.map(getCapabilities(defaultServer), new Function1<Capabilities, Capabilities>() {
            {
                super(1);
            }

            @Override
            public final OpenGroupApi.Capabilities invoke(OpenGroupApi.Capabilities capabilities) {
                Intrinsics.checkNotNullParameter(capabilities, "capabilities");
                StorageProtocol.this.setServerCapabilities(OpenGroupApi.defaultServer, capabilities.getCapabilities());
                return capabilities;
            }
        });
    }

    public final Promise<List<DefaultGroup>, Exception> getDefaultRoomsIfNeeded() {
        return KovenantFnMoniadic.map(getAllRooms(), new Function1<List<? extends RoomInfo>, List<? extends DefaultGroup>>() {
            @Override
            public List<? extends OpenGroupApi.DefaultGroup> invoke(List<? extends OpenGroupApi.RoomInfo> list) {
                return invoke2((List<OpenGroupApi.RoomInfo>) list);
            }

            public final List<OpenGroupApi.DefaultGroup> invoke2(List<OpenGroupApi.RoomInfo> groups) {
                byte[] bArr;
                boolean z;
                Intrinsics.checkNotNullParameter(groups, "groups");
                List<OpenGroupApi.RoomInfo> list = groups;
                ArrayList arrayList = new ArrayList(CollectionsKt.collectionSizeOrDefault(list, 10));
                for (OpenGroupApi.RoomInfo roomInfo : list) {
                    arrayList.add(new OpenGroupApi.DefaultGroup(roomInfo.getToken(), roomInfo.getName(), null));
                }
                ArrayList arrayList2 = arrayList;
                List list2 = (List) CollectionsKt.firstOrNull((List) OpenGroupApi.INSTANCE.getDefaultRooms().getReplayCache());
                if (list2 != null) {
                    List list3 = list2;
                    boolean z2 = false;
                    if (!(list3 instanceof Collection) || !list3.isEmpty()) {
                        Iterator it = list3.iterator();
                        while (it.hasNext()) {
                            byte[] image = ((OpenGroupApi.DefaultGroup) it.next()).getImage();
                            if (image != null) {
                                if (!(image.length == 0)) {
                                    z = true;
                                    if (!z) {
                                        break;
                                    }
                                }
                            }
                            z = false;
                            if (!z) {
                            }
                        }
                    }
                    z2 = true;
                    if (z2) {
                        OpenGroupApi.INSTANCE.getDefaultRooms().tryEmit(arrayList2);
                    }
                }
                LinkedHashMap linkedHashMap = new LinkedHashMap(RangesKt.coerceAtLeast(MapsKt.mapCapacity(CollectionsKt.collectionSizeOrDefault(list, 10)), 16));
                for (OpenGroupApi.RoomInfo roomInfo2 : list) {
                    String token = roomInfo2.getToken();
                    String imageId = roomInfo2.getImageId();
                    Pair pair = TuplesKt.to(token, imageId != null ? OpenGroupApi.INSTANCE.downloadOpenGroupProfilePicture(OpenGroupApi.defaultServer, roomInfo2.getToken(), imageId) : null);
                    linkedHashMap.put(pair.getFirst(), pair.getSecond());
                }
                ArrayList arrayList3 = new ArrayList(CollectionsKt.collectionSizeOrDefault(list, 10));
                for (OpenGroupApi.RoomInfo roomInfo3 : list) {
                    try {
                        Object obj = linkedHashMap.get(roomInfo3.getToken());
                        Intrinsics.checkNotNull(obj);
                        bArr = (byte[]) ((Promise) obj).get();
                    } catch (Exception unused) {
                        bArr = null;
                    }
                    arrayList3.add(new OpenGroupApi.DefaultGroup(roomInfo3.getToken(), roomInfo3.getName(), bArr));
                }
                return arrayList3;
            }
        }).success(new Function1<List<? extends DefaultGroup>, Unit>() {
            @Override
            public Unit invoke(List<? extends OpenGroupApi.DefaultGroup> list) {
                invoke2((List<OpenGroupApi.DefaultGroup>) list);
                return Unit.INSTANCE;
            }

            public final void invoke2(List<OpenGroupApi.DefaultGroup> list) {
                Intrinsics.checkNotNullParameter(list, "new");
                OpenGroupApi.INSTANCE.getDefaultRooms().tryEmit(list);
            }
        });
    }

    public final Promise<RoomInfo, Exception> getRoomInfo(String roomToken, String server) {
        Intrinsics.checkNotNullParameter(roomToken, "roomToken");
        Intrinsics.checkNotNullParameter(server, "server");
        return KovenantFnMoniadic.map(getResponseBody(new Request(HTTP.Verb.GET, null, server, new Endpoint.Room(roomToken), null, null, null, false, null, false, PointerIconCompat.TYPE_TEXT, null)), new Function1<byte[], RoomInfo>() {
            @Override
            public final OpenGroupApi.RoomInfo invoke(byte[] response) {
                Intrinsics.checkNotNullParameter(response, "response");
                return (OpenGroupApi.RoomInfo) JsonUtil.fromJson(response, OpenGroupApi.RoomInfo.class);
            }
        });
    }

    private final Promise<List<RoomInfo>, Exception> getAllRooms() {
        return KovenantFnMoniadic.map(getResponseBody(new Request(HTTP.Verb.GET, null, defaultServer, Endpoint.Rooms.INSTANCE, null, null, null, false, null, false, PointerIconCompat.TYPE_TEXT, null)), new Function1<byte[], List<? extends RoomInfo>>() {
            @Override
            public final List<OpenGroupApi.RoomInfo> invoke(byte[] response) {
                Intrinsics.checkNotNullParameter(response, "response");
                List list = (List) JsonUtil.fromJson(response, List.class);
                if (list == null) {
                    throw OpenGroupApi.Error.ParsingFailed.INSTANCE;
                }
                ArrayList arrayList = new ArrayList();
                Iterator it = list.iterator();
                while (it.hasNext()) {
                    OpenGroupApi.RoomInfo roomInfo = (OpenGroupApi.RoomInfo) JsonUtil.fromJson(JsonUtil.toJson(it.next()), OpenGroupApi.RoomInfo.class);
                    if (roomInfo != null) {
                        arrayList.add(roomInfo);
                    }
                }
                return arrayList;
            }
        });
    }

    public final Promise<Integer, Exception> getMemberCount(final String room, final String server) {
        Intrinsics.checkNotNullParameter(room, "room");
        Intrinsics.checkNotNullParameter(server, "server");
        return KovenantFnMoniadic.map(getRoomInfo(room, server), new Function1<RoomInfo, Integer>() {
            {
                super(1);
            }

            @Override
            public final Integer invoke(OpenGroupApi.RoomInfo info) {
                Intrinsics.checkNotNullParameter(info, "info");
                MessagingModuleConfiguration.INSTANCE.getShared().getStorage().setUserCount(room, server, info.getActiveUsers());
                return Integer.valueOf(info.getActiveUsers());
            }
        });
    }

    public final Promise<Capabilities, Exception> getCapabilities(String server) {
        Intrinsics.checkNotNullParameter(server, "server");
        return KovenantFnMoniadic.map(getResponseBody(new Request(HTTP.Verb.GET, null, server, Endpoint.Capabilities.INSTANCE, null, null, null, false, null, false, 880, null)), new Function1<byte[], Capabilities>() {
            @Override
            public final OpenGroupApi.Capabilities invoke(byte[] response) {
                Intrinsics.checkNotNullParameter(response, "response");
                return (OpenGroupApi.Capabilities) JsonUtil.fromJson(response, OpenGroupApi.Capabilities.class);
            }
        });
    }

    public final Promise<Pair<Capabilities, RoomInfo>, Exception> getCapabilitiesAndRoomInfo(String room, String server) {
        Intrinsics.checkNotNullParameter(room, "room");
        Intrinsics.checkNotNullParameter(server, "server");
        Map map = null;
        return KovenantFnMoniadic.map(sequentialBatch(server, CollectionsKt.mutableListOf(new BatchRequestInfo(new BatchRequest(HTTP.Verb.GET, "/capabilities", map, null, null, null, 60, null), Endpoint.Capabilities.INSTANCE, null, new TypeReference<Capabilities>() {
        }, 4, null), new BatchRequestInfo(new BatchRequest(HTTP.Verb.GET, "/room/" + room, null, null, 0 == true ? 1 : 0, null, 60, null), new Endpoint.Room(room), map, new TypeReference<RoomInfo>() {
        }, 4, 0 == true ? 1 : 0))), new Function1<List<? extends BatchResponse<?>>, Pair<? extends Capabilities, ? extends RoomInfo>>() {
            @Override
            public final Pair<OpenGroupApi.Capabilities, OpenGroupApi.RoomInfo> invoke(List<? extends OpenGroupApi.BatchResponse<?>> it) {
                Intrinsics.checkNotNullParameter(it, "it");
                OpenGroupApi.BatchResponse batchResponse = (OpenGroupApi.BatchResponse) CollectionsKt.firstOrNull((List) it);
                Object body = batchResponse != null ? batchResponse.getBody() : null;
                OpenGroupApi.Capabilities capabilities = body instanceof OpenGroupApi.Capabilities ? (OpenGroupApi.Capabilities) body : null;
                if (capabilities == null) {
                    throw OpenGroupApi.Error.ParsingFailed.INSTANCE;
                }
                OpenGroupApi.BatchResponse batchResponse2 = (OpenGroupApi.BatchResponse) CollectionsKt.lastOrNull((List) it);
                Object body2 = batchResponse2 != null ? batchResponse2.getBody() : null;
                OpenGroupApi.RoomInfo roomInfo = body2 instanceof OpenGroupApi.RoomInfo ? (OpenGroupApi.RoomInfo) body2 : null;
                if (roomInfo == null) {
                    throw OpenGroupApi.Error.ParsingFailed.INSTANCE;
                }
                return TuplesKt.to(capabilities, roomInfo);
            }
        });
    }

    public final Promise<DirectMessage, Exception> sendDirectMessage(String message, String blindedSessionId, String server) {
        Intrinsics.checkNotNullParameter(message, "message");
        Intrinsics.checkNotNullParameter(blindedSessionId, "blindedSessionId");
        Intrinsics.checkNotNullParameter(server, "server");
        return KovenantFnMoniadic.map(getResponseBody(new Request(HTTP.Verb.POST, null, server, new Endpoint.InboxFor(blindedSessionId), null, MapsKt.mapOf(TuplesKt.to(MediaSendActivity.EXTRA_MESSAGE, message)), null, false, null, false, 976, null)), new Function1<byte[], DirectMessage>() {
            @Override
            public final OpenGroupApi.DirectMessage invoke(byte[] response) {
                Intrinsics.checkNotNullParameter(response, "response");
                return (OpenGroupApi.DirectMessage) JsonUtil.fromJson(response, OpenGroupApi.DirectMessage.class);
            }
        });
    }

    public final Promise<Map<?, ?>, Exception> deleteAllInboxMessages(String server) {
        Intrinsics.checkNotNullParameter(server, "server");
        return KovenantFnMoniadic.map(getResponseBody(new Request(HTTP.Verb.DELETE, null, server, Endpoint.Inbox.INSTANCE, null, null, null, false, null, false, PointerIconCompat.TYPE_TEXT, null)), new Function1<byte[], Map<?, ?>>() {
            @Override
            public final Map<?, ?> invoke(byte[] response) {
                Intrinsics.checkNotNullParameter(response, "response");
                return (Map) JsonUtil.fromJson(response, Map.class);
            }
        });
    }
}