commonMain.app.bsky.feed.ThreadViewPost.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bluesky-jvm Show documentation
Show all versions of bluesky-jvm Show documentation
Bluesky Social API bindings for Kotlin.
The newest version!
@file:Suppress("DEPRECATION")
package app.bsky.feed
import kotlin.Suppress
import kotlin.jvm.JvmInline
import kotlinx.collections.immutable.persistentListOf
import kotlinx.serialization.KSerializer
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import sh.christian.ozone.api.model.ReadOnlyList
import sh.christian.ozone.api.runtime.valueClassSerializer
@Serializable
public sealed interface ThreadViewPostParentUnion {
public class ThreadViewPostSerializer : KSerializer by valueClassSerializer(
serialName = "app.bsky.feed.defs#threadViewPost",
constructor = ::ThreadViewPost,
valueProvider = ThreadViewPost::value,
valueSerializerProvider = { app.bsky.feed.ThreadViewPost.serializer() },
)
@Serializable(with = ThreadViewPostSerializer::class)
@JvmInline
@SerialName("app.bsky.feed.defs#threadViewPost")
public value class ThreadViewPost(
public val `value`: app.bsky.feed.ThreadViewPost,
) : ThreadViewPostParentUnion
public class NotFoundPostSerializer : KSerializer by valueClassSerializer(
serialName = "app.bsky.feed.defs#notFoundPost",
constructor = ::NotFoundPost,
valueProvider = NotFoundPost::value,
valueSerializerProvider = { app.bsky.feed.NotFoundPost.serializer() },
)
@Serializable(with = NotFoundPostSerializer::class)
@JvmInline
@SerialName("app.bsky.feed.defs#notFoundPost")
public value class NotFoundPost(
public val `value`: app.bsky.feed.NotFoundPost,
) : ThreadViewPostParentUnion
public class BlockedPostSerializer : KSerializer by valueClassSerializer(
serialName = "app.bsky.feed.defs#blockedPost",
constructor = ::BlockedPost,
valueProvider = BlockedPost::value,
valueSerializerProvider = { app.bsky.feed.BlockedPost.serializer() },
)
@Serializable(with = BlockedPostSerializer::class)
@JvmInline
@SerialName("app.bsky.feed.defs#blockedPost")
public value class BlockedPost(
public val `value`: app.bsky.feed.BlockedPost,
) : ThreadViewPostParentUnion
}
@Serializable
public sealed interface ThreadViewPostReplieUnion {
public class ThreadViewPostSerializer : KSerializer by valueClassSerializer(
serialName = "app.bsky.feed.defs#threadViewPost",
constructor = ::ThreadViewPost,
valueProvider = ThreadViewPost::value,
valueSerializerProvider = { app.bsky.feed.ThreadViewPost.serializer() },
)
@Serializable(with = ThreadViewPostSerializer::class)
@JvmInline
@SerialName("app.bsky.feed.defs#threadViewPost")
public value class ThreadViewPost(
public val `value`: app.bsky.feed.ThreadViewPost,
) : ThreadViewPostReplieUnion
public class NotFoundPostSerializer : KSerializer by valueClassSerializer(
serialName = "app.bsky.feed.defs#notFoundPost",
constructor = ::NotFoundPost,
valueProvider = NotFoundPost::value,
valueSerializerProvider = { app.bsky.feed.NotFoundPost.serializer() },
)
@Serializable(with = NotFoundPostSerializer::class)
@JvmInline
@SerialName("app.bsky.feed.defs#notFoundPost")
public value class NotFoundPost(
public val `value`: app.bsky.feed.NotFoundPost,
) : ThreadViewPostReplieUnion
public class BlockedPostSerializer : KSerializer by valueClassSerializer(
serialName = "app.bsky.feed.defs#blockedPost",
constructor = ::BlockedPost,
valueProvider = BlockedPost::value,
valueSerializerProvider = { app.bsky.feed.BlockedPost.serializer() },
)
@Serializable(with = BlockedPostSerializer::class)
@JvmInline
@SerialName("app.bsky.feed.defs#blockedPost")
public value class BlockedPost(
public val `value`: app.bsky.feed.BlockedPost,
) : ThreadViewPostReplieUnion
}
@Serializable
public data class ThreadViewPost(
public val post: PostView,
public val parent: ThreadViewPostParentUnion? = null,
public val replies: ReadOnlyList = persistentListOf(),
)