All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pubnub.api.models.server.SubscribeMessage.kt Maven / Gradle / Ivy

Go to download

PubNub is a cross-platform client-to-client (1:1 and 1:many) push service in the cloud, capable of broadcasting real-time messages to millions of web and mobile clients simultaneously, in less than a quarter second!

There is a newer version: 10.2.0
Show newest version
package com.pubnub.api.models.server

import com.google.gson.JsonElement
import com.google.gson.annotations.SerializedName
import com.pubnub.api.workers.SubscribeMessageProcessor.Companion.TYPE_FILES
import com.pubnub.api.workers.SubscribeMessageProcessor.Companion.TYPE_MESSAGE

class SubscribeMessage(
    @SerializedName("a")
    internal val shard: String?,

    @SerializedName("b")
    internal val subscriptionMatch: String?,

    @SerializedName("c")
    internal val channel: String?,

    @SerializedName("d")
    internal val payload: JsonElement?,

    @SerializedName("f")
    internal val flags: String?,

    @SerializedName("i")
    internal val issuingClientId: String?,

    @SerializedName("k")
    internal val subscribeKey: String?,

    @SerializedName("o")
    internal val originationMetadata: OriginationMetaData?,

    @SerializedName("p")
    internal val publishMetaData: PublishMetaData?,

    @SerializedName("u")
    internal val userMetadata: JsonElement?,

    @SerializedName("e")
    internal val type: Int?

) {

    fun supportsEncryption() = type in arrayOf(null, TYPE_MESSAGE, TYPE_FILES)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy