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

commonMain.com.pubnub.api.models.consumer.objects.member.PNMember.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.member

import com.pubnub.api.models.consumer.objects.uuid.PNUUIDMetadata
import com.pubnub.api.utils.PatchValue
import com.pubnub.kmp.CustomObject

data class PNMember(
    val uuid: PNUUIDMetadata,
    val custom: PatchValue?>? = null,
    val updated: String,
    val eTag: String,
    val status: PatchValue?,
) {
    data class Partial(
        val uuidId: String,
        override val custom: CustomObject? = null,
        override val status: String? = null,
    ) : MemberInput {
        override val uuid: String = uuidId
    }

    // let's not make this public for now, but keep the implementation around in case it's needed
    private operator fun plus(update: PNMember): PNMember {
        return PNMember(
            uuid + update.uuid,
            update.custom ?: custom,
            update.updated,
            update.eTag,
            update.status ?: status
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy