commonMain.tools.ozone.moderation.SubjectStatusView.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 tools.ozone.moderation
import com.atproto.admin.RepoRef
import com.atproto.repo.StrongRef
import kotlin.Boolean
import kotlin.Long
import kotlin.String
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.Cid
import sh.christian.ozone.api.Did
import sh.christian.ozone.api.model.ReadOnlyList
import sh.christian.ozone.api.model.Timestamp
import sh.christian.ozone.api.runtime.valueClassSerializer
@Serializable
public sealed interface SubjectStatusViewSubjectUnion {
public class AdminRepoRefSerializer : KSerializer by valueClassSerializer(
serialName = "com.atproto.admin.defs#repoRef",
constructor = ::AdminRepoRef,
valueProvider = AdminRepoRef::value,
valueSerializerProvider = { RepoRef.serializer() },
)
@Serializable(with = AdminRepoRefSerializer::class)
@JvmInline
@SerialName("com.atproto.admin.defs#repoRef")
public value class AdminRepoRef(
public val `value`: RepoRef,
) : SubjectStatusViewSubjectUnion
public class RepoStrongRefSerializer : KSerializer by valueClassSerializer(
serialName = "com.atproto.repo.strongRef",
constructor = ::RepoStrongRef,
valueProvider = RepoStrongRef::value,
valueSerializerProvider = { StrongRef.serializer() },
)
@Serializable(with = RepoStrongRefSerializer::class)
@JvmInline
@SerialName("com.atproto.repo.strongRef")
public value class RepoStrongRef(
public val `value`: StrongRef,
) : SubjectStatusViewSubjectUnion
}
@Serializable
public sealed interface SubjectStatusViewHostingUnion {
public class AccountHostingSerializer : KSerializer by valueClassSerializer(
serialName = "tools.ozone.moderation.defs#accountHosting",
constructor = ::AccountHosting,
valueProvider = AccountHosting::value,
valueSerializerProvider = { tools.ozone.moderation.AccountHosting.serializer() },
)
@Serializable(with = AccountHostingSerializer::class)
@JvmInline
@SerialName("tools.ozone.moderation.defs#accountHosting")
public value class AccountHosting(
public val `value`: tools.ozone.moderation.AccountHosting,
) : SubjectStatusViewHostingUnion
public class RecordHostingSerializer : KSerializer by valueClassSerializer(
serialName = "tools.ozone.moderation.defs#recordHosting",
constructor = ::RecordHosting,
valueProvider = RecordHosting::value,
valueSerializerProvider = { tools.ozone.moderation.RecordHosting.serializer() },
)
@Serializable(with = RecordHostingSerializer::class)
@JvmInline
@SerialName("tools.ozone.moderation.defs#recordHosting")
public value class RecordHosting(
public val `value`: tools.ozone.moderation.RecordHosting,
) : SubjectStatusViewHostingUnion
}
/**
* @param updatedAt Timestamp referencing when the last update was made to the moderation status of
* the subject
* @param createdAt Timestamp referencing the first moderation status impacting event was emitted on
* the subject
* @param comment Sticky comment on the subject.
* @param lastAppealedAt Timestamp referencing when the author of the subject appealed a moderation
* action
* @param appealed True indicates that the a previously taken moderator action was appealed against,
* by the author of the content. False indicates last appeal was resolved by moderators.
*/
@Serializable
public data class SubjectStatusView(
public val id: Long,
public val subject: SubjectStatusViewSubjectUnion,
public val hosting: SubjectStatusViewHostingUnion? = null,
public val subjectBlobCids: ReadOnlyList = persistentListOf(),
public val subjectRepoHandle: String? = null,
/**
* Timestamp referencing when the last update was made to the moderation status of the subject
*/
public val updatedAt: Timestamp,
/**
* Timestamp referencing the first moderation status impacting event was emitted on the subject
*/
public val createdAt: Timestamp,
public val reviewState: Token,
/**
* Sticky comment on the subject.
*/
public val comment: String? = null,
public val muteUntil: Timestamp? = null,
public val muteReportingUntil: Timestamp? = null,
public val lastReviewedBy: Did? = null,
public val lastReviewedAt: Timestamp? = null,
public val lastReportedAt: Timestamp? = null,
/**
* Timestamp referencing when the author of the subject appealed a moderation action
*/
public val lastAppealedAt: Timestamp? = null,
public val takendown: Boolean? = null,
/**
* True indicates that the a previously taken moderator action was appealed against, by the author
* of the content. False indicates last appeal was resolved by moderators.
*/
public val appealed: Boolean? = null,
public val suspendUntil: Timestamp? = null,
public val tags: ReadOnlyList = persistentListOf(),
)