commonMain.app.bsky.feed.ReplyRef.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bluesky Show documentation
Show all versions of bluesky Show documentation
Bluesky Social API bindings for Kotlin.
The newest version!
@file:Suppress("DEPRECATION")
package app.bsky.feed
import app.bsky.actor.ProfileViewBasic
import kotlin.Suppress
import kotlin.jvm.JvmInline
import kotlinx.serialization.KSerializer
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
import sh.christian.ozone.api.model.JsonContent
import sh.christian.ozone.api.runtime.valueClassSerializer
@Serializable
public sealed interface ReplyRefRootUnion {
public class PostViewSerializer : KSerializer by valueClassSerializer(
serialName = "app.bsky.feed.defs#postView",
constructor = ::PostView,
valueProvider = PostView::value,
valueSerializerProvider = { app.bsky.feed.PostView.serializer() },
)
@JvmInline
@Serializable(with = PostViewSerializer::class)
@SerialName("app.bsky.feed.defs#postView")
public value class PostView(
public val `value`: app.bsky.feed.PostView,
) : ReplyRefRootUnion
public class NotFoundPostSerializer : KSerializer by valueClassSerializer(
serialName = "app.bsky.feed.defs#notFoundPost",
constructor = ::NotFoundPost,
valueProvider = NotFoundPost::value,
valueSerializerProvider = { app.bsky.feed.NotFoundPost.serializer() },
)
@JvmInline
@Serializable(with = NotFoundPostSerializer::class)
@SerialName("app.bsky.feed.defs#notFoundPost")
public value class NotFoundPost(
public val `value`: app.bsky.feed.NotFoundPost,
) : ReplyRefRootUnion
public class BlockedPostSerializer : KSerializer by valueClassSerializer(
serialName = "app.bsky.feed.defs#blockedPost",
constructor = ::BlockedPost,
valueProvider = BlockedPost::value,
valueSerializerProvider = { app.bsky.feed.BlockedPost.serializer() },
)
@JvmInline
@Serializable(with = BlockedPostSerializer::class)
@SerialName("app.bsky.feed.defs#blockedPost")
public value class BlockedPost(
public val `value`: app.bsky.feed.BlockedPost,
) : ReplyRefRootUnion
@JvmInline
@Serializable
public value class Unknown(
public val `value`: JsonContent,
) : ReplyRefRootUnion
}
@Serializable
public sealed interface ReplyRefParentUnion {
public class PostViewSerializer : KSerializer by valueClassSerializer(
serialName = "app.bsky.feed.defs#postView",
constructor = ::PostView,
valueProvider = PostView::value,
valueSerializerProvider = { app.bsky.feed.PostView.serializer() },
)
@JvmInline
@Serializable(with = PostViewSerializer::class)
@SerialName("app.bsky.feed.defs#postView")
public value class PostView(
public val `value`: app.bsky.feed.PostView,
) : ReplyRefParentUnion
public class NotFoundPostSerializer : KSerializer by valueClassSerializer(
serialName = "app.bsky.feed.defs#notFoundPost",
constructor = ::NotFoundPost,
valueProvider = NotFoundPost::value,
valueSerializerProvider = { app.bsky.feed.NotFoundPost.serializer() },
)
@JvmInline
@Serializable(with = NotFoundPostSerializer::class)
@SerialName("app.bsky.feed.defs#notFoundPost")
public value class NotFoundPost(
public val `value`: app.bsky.feed.NotFoundPost,
) : ReplyRefParentUnion
public class BlockedPostSerializer : KSerializer by valueClassSerializer(
serialName = "app.bsky.feed.defs#blockedPost",
constructor = ::BlockedPost,
valueProvider = BlockedPost::value,
valueSerializerProvider = { app.bsky.feed.BlockedPost.serializer() },
)
@JvmInline
@Serializable(with = BlockedPostSerializer::class)
@SerialName("app.bsky.feed.defs#blockedPost")
public value class BlockedPost(
public val `value`: app.bsky.feed.BlockedPost,
) : ReplyRefParentUnion
@JvmInline
@Serializable
public value class Unknown(
public val `value`: JsonContent,
) : ReplyRefParentUnion
}
/**
* @param grandparentAuthor When parent is a reply to another post, this is the author of that post.
*/
@Serializable
public data class ReplyRef(
public val root: ReplyRefRootUnion,
public val parent: ReplyRefParentUnion,
/**
* When parent is a reply to another post, this is the author of that post.
*/
public val grandparentAuthor: ProfileViewBasic? = null,
)
© 2015 - 2024 Weber Informatics LLC | Privacy Policy