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

com.pubnub.api.models.consumer.access_manager.PNAccessManagerGrantResults.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.consumer.access_manager

import com.google.gson.annotations.SerializedName
import com.pubnub.api.PubNub

/**
 * Result of the [PubNub.grant] operation
 *
 * @property level Permissions level, one of `subkey`, `subkey+auth`, `channel`, `channel-group`,
 * `channel-group+auth` level.
 * @property ttl Time in minutes for which granted permissions are valid. Value of `0` means indefinite.
 * @property subscribeKey The subscribe key.
 * @property channels Access rights per channel.
 * @property channelGroups Access rights per channel group.
 */
class PNAccessManagerGrantResult(
    val level: String,
    val ttl: Int,
    val subscribeKey: String,
    val channels: Map?>,
    val channelGroups: Map?>
)

class PNAccessManagerKeyData {

    /**
     * Is `true` if *read* rights are granted.
     */
    @SerializedName("r")
    internal var readEnabled: Boolean = false

    /**
     * Is `true` if *write* rights are granted.
     */
    @SerializedName("w")
    internal var writeEnabled: Boolean = false

    /**
     * Is `true` if *manage* rights are granted.
     */
    @SerializedName("m")
    internal var manageEnabled: Boolean = false

    /**
     * Is `true` if *delete* rights are granted.
     */
    @SerializedName("d")
    internal var deleteEnabled: Boolean = false
}

class PNAccessManagerKeysData {
    @SerializedName("auths")
    internal val authKeys: Map? = null
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy