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

commonMain.com.pubnub.api.models.consumer.objects.channel.PNChannelMetadata.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!

The newest version!
package com.pubnub.api.models.consumer.objects.channel

import com.pubnub.api.utils.PatchValue

data class PNChannelMetadata(
    val id: String,
    val name: PatchValue? = null,
    val description: PatchValue? = null,
    val custom: PatchValue?>? = null,
    val updated: PatchValue? = null,
    val eTag: PatchValue? = null,
    val type: PatchValue? = null,
    val status: PatchValue? = null,
) {
    /**
     * Merge information from this `PNChannelMetadata` with new data from `update`, returning a new `PNChannelMetadata` instance.
     */
    operator fun plus(update: PNChannelMetadata): PNChannelMetadata {
        return copy(
            name = update.name ?: name,
            description = update.description ?: description,
            custom = update.custom ?: custom,
            updated = update.updated ?: updated,
            eTag = update.eTag ?: eTag,
            type = update.type ?: type,
            status = update.status ?: status,
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy