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

commonMain.chat.bsky.convo.getLog.kt Maven / Gradle / Ivy

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

package chat.bsky.convo

import kotlin.Any
import kotlin.Pair
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.model.JsonContent
import sh.christian.ozone.api.runtime.valueClassSerializer

@Serializable
public sealed interface GetLogResponseLogUnion {
  public class BeginConvoSerializer : KSerializer by valueClassSerializer(
    serialName = "chat.bsky.convo.defs#logBeginConvo",
    constructor = ::BeginConvo,
    valueProvider = BeginConvo::value,
    valueSerializerProvider = { LogBeginConvo.serializer() },
  )

  @JvmInline
  @Serializable(with = BeginConvoSerializer::class)
  @SerialName("chat.bsky.convo.defs#logBeginConvo")
  public value class BeginConvo(
    public val `value`: LogBeginConvo,
  ) : GetLogResponseLogUnion

  public class LeaveConvoSerializer : KSerializer by valueClassSerializer(
    serialName = "chat.bsky.convo.defs#logLeaveConvo",
    constructor = ::LeaveConvo,
    valueProvider = LeaveConvo::value,
    valueSerializerProvider = { LogLeaveConvo.serializer() },
  )

  @JvmInline
  @Serializable(with = LeaveConvoSerializer::class)
  @SerialName("chat.bsky.convo.defs#logLeaveConvo")
  public value class LeaveConvo(
    public val `value`: LogLeaveConvo,
  ) : GetLogResponseLogUnion

  public class CreateMessageSerializer : KSerializer by valueClassSerializer(
    serialName = "chat.bsky.convo.defs#logCreateMessage",
    constructor = ::CreateMessage,
    valueProvider = CreateMessage::value,
    valueSerializerProvider = { LogCreateMessage.serializer() },
  )

  @JvmInline
  @Serializable(with = CreateMessageSerializer::class)
  @SerialName("chat.bsky.convo.defs#logCreateMessage")
  public value class CreateMessage(
    public val `value`: LogCreateMessage,
  ) : GetLogResponseLogUnion

  public class DeleteMessageSerializer : KSerializer by valueClassSerializer(
    serialName = "chat.bsky.convo.defs#logDeleteMessage",
    constructor = ::DeleteMessage,
    valueProvider = DeleteMessage::value,
    valueSerializerProvider = { LogDeleteMessage.serializer() },
  )

  @JvmInline
  @Serializable(with = DeleteMessageSerializer::class)
  @SerialName("chat.bsky.convo.defs#logDeleteMessage")
  public value class DeleteMessage(
    public val `value`: LogDeleteMessage,
  ) : GetLogResponseLogUnion

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

@Serializable
public data class GetLogQueryParams(
  public val cursor: String? = null,
) {
  public fun asList(): List> = buildList {
    add("cursor" to cursor)
  }
}

@Serializable
public data class GetLogResponse(
  public val cursor: String? = null,
  public val logs: List,
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy