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

commonMain.app.bsky.labeler.service.kt Maven / Gradle / Ivy

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

package app.bsky.labeler

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.Timestamp
import sh.christian.ozone.api.runtime.valueClassSerializer

@Serializable
public sealed interface ServiceLabelsUnion {
  public class SelfLabelsSerializer : KSerializer by valueClassSerializer(
    serialName = "com.atproto.label.defs#selfLabels",
    constructor = ::SelfLabels,
    valueProvider = SelfLabels::value,
    valueSerializerProvider = { com.atproto.label.SelfLabels.serializer() },
  )

  @Serializable(with = SelfLabelsSerializer::class)
  @JvmInline
  @SerialName("com.atproto.label.defs#selfLabels")
  public value class SelfLabels(
    public val `value`: com.atproto.label.SelfLabels,
  ) : ServiceLabelsUnion
}

@Serializable
public data class Service(
  public val policies: LabelerPolicies,
  public val labels: ServiceLabelsUnion? = null,
  public val createdAt: Timestamp,
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy