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

commonMain.tools.ozone.moderation.ModEventView.kt Maven / Gradle / Ivy

The newest version!
@file:Suppress("DEPRECATION")

package tools.ozone.moderation

import chat.bsky.convo.MessageRef
import com.atproto.admin.RepoRef
import com.atproto.repo.StrongRef
import kotlin.Long
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmInline
import kotlinx.serialization.KSerializer
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
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 ModEventViewEventUnion {
  public class ModEventTakedownSerializer : KSerializer by valueClassSerializer(
    serialName = "tools.ozone.moderation.defs#modEventTakedown",
    constructor = ::ModEventTakedown,
    valueProvider = ModEventTakedown::value,
    valueSerializerProvider = { tools.ozone.moderation.ModEventTakedown.serializer() },
  )

  @Serializable(with = ModEventTakedownSerializer::class)
  @JvmInline
  @SerialName("tools.ozone.moderation.defs#modEventTakedown")
  public value class ModEventTakedown(
    public val `value`: tools.ozone.moderation.ModEventTakedown,
  ) : ModEventViewEventUnion

  public class ModEventReverseTakedownSerializer : KSerializer by valueClassSerializer(
    serialName = "tools.ozone.moderation.defs#modEventReverseTakedown",
    constructor = ::ModEventReverseTakedown,
    valueProvider = ModEventReverseTakedown::value,
    valueSerializerProvider = { tools.ozone.moderation.ModEventReverseTakedown.serializer() },
  )

  @Serializable(with = ModEventReverseTakedownSerializer::class)
  @JvmInline
  @SerialName("tools.ozone.moderation.defs#modEventReverseTakedown")
  public value class ModEventReverseTakedown(
    public val `value`: tools.ozone.moderation.ModEventReverseTakedown,
  ) : ModEventViewEventUnion

  public class ModEventCommentSerializer : KSerializer by valueClassSerializer(
    serialName = "tools.ozone.moderation.defs#modEventComment",
    constructor = ::ModEventComment,
    valueProvider = ModEventComment::value,
    valueSerializerProvider = { tools.ozone.moderation.ModEventComment.serializer() },
  )

  @Serializable(with = ModEventCommentSerializer::class)
  @JvmInline
  @SerialName("tools.ozone.moderation.defs#modEventComment")
  public value class ModEventComment(
    public val `value`: tools.ozone.moderation.ModEventComment,
  ) : ModEventViewEventUnion

  public class ModEventReportSerializer : KSerializer by valueClassSerializer(
    serialName = "tools.ozone.moderation.defs#modEventReport",
    constructor = ::ModEventReport,
    valueProvider = ModEventReport::value,
    valueSerializerProvider = { tools.ozone.moderation.ModEventReport.serializer() },
  )

  @Serializable(with = ModEventReportSerializer::class)
  @JvmInline
  @SerialName("tools.ozone.moderation.defs#modEventReport")
  public value class ModEventReport(
    public val `value`: tools.ozone.moderation.ModEventReport,
  ) : ModEventViewEventUnion

  public class ModEventLabelSerializer : KSerializer by valueClassSerializer(
    serialName = "tools.ozone.moderation.defs#modEventLabel",
    constructor = ::ModEventLabel,
    valueProvider = ModEventLabel::value,
    valueSerializerProvider = { tools.ozone.moderation.ModEventLabel.serializer() },
  )

  @Serializable(with = ModEventLabelSerializer::class)
  @JvmInline
  @SerialName("tools.ozone.moderation.defs#modEventLabel")
  public value class ModEventLabel(
    public val `value`: tools.ozone.moderation.ModEventLabel,
  ) : ModEventViewEventUnion

  public class ModEventAcknowledgeSerializer : KSerializer by valueClassSerializer(
    serialName = "tools.ozone.moderation.defs#modEventAcknowledge",
    constructor = ::ModEventAcknowledge,
    valueProvider = ModEventAcknowledge::value,
    valueSerializerProvider = { tools.ozone.moderation.ModEventAcknowledge.serializer() },
  )

  @Serializable(with = ModEventAcknowledgeSerializer::class)
  @JvmInline
  @SerialName("tools.ozone.moderation.defs#modEventAcknowledge")
  public value class ModEventAcknowledge(
    public val `value`: tools.ozone.moderation.ModEventAcknowledge,
  ) : ModEventViewEventUnion

  public class ModEventEscalateSerializer : KSerializer by valueClassSerializer(
    serialName = "tools.ozone.moderation.defs#modEventEscalate",
    constructor = ::ModEventEscalate,
    valueProvider = ModEventEscalate::value,
    valueSerializerProvider = { tools.ozone.moderation.ModEventEscalate.serializer() },
  )

  @Serializable(with = ModEventEscalateSerializer::class)
  @JvmInline
  @SerialName("tools.ozone.moderation.defs#modEventEscalate")
  public value class ModEventEscalate(
    public val `value`: tools.ozone.moderation.ModEventEscalate,
  ) : ModEventViewEventUnion

  public class ModEventMuteSerializer : KSerializer by valueClassSerializer(
    serialName = "tools.ozone.moderation.defs#modEventMute",
    constructor = ::ModEventMute,
    valueProvider = ModEventMute::value,
    valueSerializerProvider = { tools.ozone.moderation.ModEventMute.serializer() },
  )

  @Serializable(with = ModEventMuteSerializer::class)
  @JvmInline
  @SerialName("tools.ozone.moderation.defs#modEventMute")
  public value class ModEventMute(
    public val `value`: tools.ozone.moderation.ModEventMute,
  ) : ModEventViewEventUnion

  public class ModEventUnmuteSerializer : KSerializer by valueClassSerializer(
    serialName = "tools.ozone.moderation.defs#modEventUnmute",
    constructor = ::ModEventUnmute,
    valueProvider = ModEventUnmute::value,
    valueSerializerProvider = { tools.ozone.moderation.ModEventUnmute.serializer() },
  )

  @Serializable(with = ModEventUnmuteSerializer::class)
  @JvmInline
  @SerialName("tools.ozone.moderation.defs#modEventUnmute")
  public value class ModEventUnmute(
    public val `value`: tools.ozone.moderation.ModEventUnmute,
  ) : ModEventViewEventUnion

  public class ModEventMuteReporterSerializer : KSerializer by valueClassSerializer(
    serialName = "tools.ozone.moderation.defs#modEventMuteReporter",
    constructor = ::ModEventMuteReporter,
    valueProvider = ModEventMuteReporter::value,
    valueSerializerProvider = { tools.ozone.moderation.ModEventMuteReporter.serializer() },
  )

  @Serializable(with = ModEventMuteReporterSerializer::class)
  @JvmInline
  @SerialName("tools.ozone.moderation.defs#modEventMuteReporter")
  public value class ModEventMuteReporter(
    public val `value`: tools.ozone.moderation.ModEventMuteReporter,
  ) : ModEventViewEventUnion

  public class ModEventUnmuteReporterSerializer : KSerializer by valueClassSerializer(
    serialName = "tools.ozone.moderation.defs#modEventUnmuteReporter",
    constructor = ::ModEventUnmuteReporter,
    valueProvider = ModEventUnmuteReporter::value,
    valueSerializerProvider = { tools.ozone.moderation.ModEventUnmuteReporter.serializer() },
  )

  @Serializable(with = ModEventUnmuteReporterSerializer::class)
  @JvmInline
  @SerialName("tools.ozone.moderation.defs#modEventUnmuteReporter")
  public value class ModEventUnmuteReporter(
    public val `value`: tools.ozone.moderation.ModEventUnmuteReporter,
  ) : ModEventViewEventUnion

  public class ModEventEmailSerializer : KSerializer by valueClassSerializer(
    serialName = "tools.ozone.moderation.defs#modEventEmail",
    constructor = ::ModEventEmail,
    valueProvider = ModEventEmail::value,
    valueSerializerProvider = { tools.ozone.moderation.ModEventEmail.serializer() },
  )

  @Serializable(with = ModEventEmailSerializer::class)
  @JvmInline
  @SerialName("tools.ozone.moderation.defs#modEventEmail")
  public value class ModEventEmail(
    public val `value`: tools.ozone.moderation.ModEventEmail,
  ) : ModEventViewEventUnion

  public class ModEventResolveAppealSerializer : KSerializer by valueClassSerializer(
    serialName = "tools.ozone.moderation.defs#modEventResolveAppeal",
    constructor = ::ModEventResolveAppeal,
    valueProvider = ModEventResolveAppeal::value,
    valueSerializerProvider = { tools.ozone.moderation.ModEventResolveAppeal.serializer() },
  )

  @Serializable(with = ModEventResolveAppealSerializer::class)
  @JvmInline
  @SerialName("tools.ozone.moderation.defs#modEventResolveAppeal")
  public value class ModEventResolveAppeal(
    public val `value`: tools.ozone.moderation.ModEventResolveAppeal,
  ) : ModEventViewEventUnion

  public class ModEventDivertSerializer : KSerializer by valueClassSerializer(
    serialName = "tools.ozone.moderation.defs#modEventDivert",
    constructor = ::ModEventDivert,
    valueProvider = ModEventDivert::value,
    valueSerializerProvider = { tools.ozone.moderation.ModEventDivert.serializer() },
  )

  @Serializable(with = ModEventDivertSerializer::class)
  @JvmInline
  @SerialName("tools.ozone.moderation.defs#modEventDivert")
  public value class ModEventDivert(
    public val `value`: tools.ozone.moderation.ModEventDivert,
  ) : ModEventViewEventUnion

  public class ModEventTagSerializer : KSerializer by valueClassSerializer(
    serialName = "tools.ozone.moderation.defs#modEventTag",
    constructor = ::ModEventTag,
    valueProvider = ModEventTag::value,
    valueSerializerProvider = { tools.ozone.moderation.ModEventTag.serializer() },
  )

  @Serializable(with = ModEventTagSerializer::class)
  @JvmInline
  @SerialName("tools.ozone.moderation.defs#modEventTag")
  public value class ModEventTag(
    public val `value`: tools.ozone.moderation.ModEventTag,
  ) : ModEventViewEventUnion

  public class AccountEventSerializer : KSerializer by valueClassSerializer(
    serialName = "tools.ozone.moderation.defs#accountEvent",
    constructor = ::AccountEvent,
    valueProvider = AccountEvent::value,
    valueSerializerProvider = { tools.ozone.moderation.AccountEvent.serializer() },
  )

  @Serializable(with = AccountEventSerializer::class)
  @JvmInline
  @SerialName("tools.ozone.moderation.defs#accountEvent")
  public value class AccountEvent(
    public val `value`: tools.ozone.moderation.AccountEvent,
  ) : ModEventViewEventUnion

  public class IdentityEventSerializer : KSerializer by valueClassSerializer(
    serialName = "tools.ozone.moderation.defs#identityEvent",
    constructor = ::IdentityEvent,
    valueProvider = IdentityEvent::value,
    valueSerializerProvider = { tools.ozone.moderation.IdentityEvent.serializer() },
  )

  @Serializable(with = IdentityEventSerializer::class)
  @JvmInline
  @SerialName("tools.ozone.moderation.defs#identityEvent")
  public value class IdentityEvent(
    public val `value`: tools.ozone.moderation.IdentityEvent,
  ) : ModEventViewEventUnion

  public class RecordEventSerializer : KSerializer by valueClassSerializer(
    serialName = "tools.ozone.moderation.defs#recordEvent",
    constructor = ::RecordEvent,
    valueProvider = RecordEvent::value,
    valueSerializerProvider = { tools.ozone.moderation.RecordEvent.serializer() },
  )

  @Serializable(with = RecordEventSerializer::class)
  @JvmInline
  @SerialName("tools.ozone.moderation.defs#recordEvent")
  public value class RecordEvent(
    public val `value`: tools.ozone.moderation.RecordEvent,
  ) : ModEventViewEventUnion
}

@Serializable
public sealed interface ModEventViewSubjectUnion {
  public class OmAtprotoAdminRepoRefSerializer : KSerializer by valueClassSerializer(
    serialName = "com.atproto.admin.defs#repoRef",
    constructor = ::OmAtprotoAdminRepoRef,
    valueProvider = OmAtprotoAdminRepoRef::value,
    valueSerializerProvider = { RepoRef.serializer() },
  )

  @Serializable(with = OmAtprotoAdminRepoRefSerializer::class)
  @JvmInline
  @SerialName("com.atproto.admin.defs#repoRef")
  public value class OmAtprotoAdminRepoRef(
    public val `value`: RepoRef,
  ) : ModEventViewSubjectUnion

  public class OmAtprotoRepoStrongRefSerializer : KSerializer by valueClassSerializer(
    serialName = "com.atproto.repo.strongRef",
    constructor = ::OmAtprotoRepoStrongRef,
    valueProvider = OmAtprotoRepoStrongRef::value,
    valueSerializerProvider = { StrongRef.serializer() },
  )

  @Serializable(with = OmAtprotoRepoStrongRefSerializer::class)
  @JvmInline
  @SerialName("com.atproto.repo.strongRef")
  public value class OmAtprotoRepoStrongRef(
    public val `value`: StrongRef,
  ) : ModEventViewSubjectUnion

  public class HatBskyConvoMessageRefSerializer : KSerializer by valueClassSerializer(
    serialName = "chat.bsky.convo.defs#messageRef",
    constructor = ::HatBskyConvoMessageRef,
    valueProvider = HatBskyConvoMessageRef::value,
    valueSerializerProvider = { MessageRef.serializer() },
  )

  @Serializable(with = HatBskyConvoMessageRefSerializer::class)
  @JvmInline
  @SerialName("chat.bsky.convo.defs#messageRef")
  public value class HatBskyConvoMessageRef(
    public val `value`: MessageRef,
  ) : ModEventViewSubjectUnion
}

@Serializable
public data class ModEventView(
  public val id: Long,
  public val event: ModEventViewEventUnion,
  public val subject: ModEventViewSubjectUnion,
  public val subjectBlobCids: ReadOnlyList,
  public val createdBy: Did,
  public val createdAt: Timestamp,
  public val creatorHandle: String? = null,
  public val subjectHandle: String? = null,
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy