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.collections.List
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.JsonContent
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() },
  )

  @JvmInline
  @Serializable(with = ModEventTakedownSerializer::class)
  @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() },
  )

  @JvmInline
  @Serializable(with = ModEventReverseTakedownSerializer::class)
  @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() },
  )

  @JvmInline
  @Serializable(with = ModEventCommentSerializer::class)
  @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() },
  )

  @JvmInline
  @Serializable(with = ModEventReportSerializer::class)
  @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() },
  )

  @JvmInline
  @Serializable(with = ModEventLabelSerializer::class)
  @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() },
  )

  @JvmInline
  @Serializable(with = ModEventAcknowledgeSerializer::class)
  @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() },
  )

  @JvmInline
  @Serializable(with = ModEventEscalateSerializer::class)
  @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() },
  )

  @JvmInline
  @Serializable(with = ModEventMuteSerializer::class)
  @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() },
  )

  @JvmInline
  @Serializable(with = ModEventUnmuteSerializer::class)
  @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() },
  )

  @JvmInline
  @Serializable(with = ModEventMuteReporterSerializer::class)
  @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() },
  )

  @JvmInline
  @Serializable(with = ModEventUnmuteReporterSerializer::class)
  @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() },
  )

  @JvmInline
  @Serializable(with = ModEventEmailSerializer::class)
  @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() },
  )

  @JvmInline
  @Serializable(with = ModEventResolveAppealSerializer::class)
  @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() },
  )

  @JvmInline
  @Serializable(with = ModEventDivertSerializer::class)
  @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() },
  )

  @JvmInline
  @Serializable(with = ModEventTagSerializer::class)
  @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() },
  )

  @JvmInline
  @Serializable(with = AccountEventSerializer::class)
  @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() },
  )

  @JvmInline
  @Serializable(with = IdentityEventSerializer::class)
  @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() },
  )

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

  @JvmInline
  @Serializable
  public value class Unknown(
    public val `value`: JsonContent,
  ) : 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() },
  )

  @JvmInline
  @Serializable(with = OmAtprotoAdminRepoRefSerializer::class)
  @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() },
  )

  @JvmInline
  @Serializable(with = OmAtprotoRepoStrongRefSerializer::class)
  @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() },
  )

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

  @JvmInline
  @Serializable
  public value class Unknown(
    public val `value`: JsonContent,
  ) : ModEventViewSubjectUnion
}

@Serializable
public data class ModEventView(
  public val id: Long,
  public val event: ModEventViewEventUnion,
  public val subject: ModEventViewSubjectUnion,
  public val subjectBlobCids: List,
  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