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

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

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

package app.bsky.labeler

import kotlin.Any
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmInline
import kotlinx.collections.immutable.toImmutableList
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.runtime.valueClassSerializer

@Serializable
public sealed interface GetServicesResponseViewUnion {
  public class LabelerViewSerializer : KSerializer by valueClassSerializer(
    serialName = "app.bsky.labeler.defs#labelerView",
    constructor = ::LabelerView,
    valueProvider = LabelerView::value,
    valueSerializerProvider = { app.bsky.labeler.LabelerView.serializer() },
  )

  @Serializable(with = LabelerViewSerializer::class)
  @JvmInline
  @SerialName("app.bsky.labeler.defs#labelerView")
  public value class LabelerView(
    public val `value`: app.bsky.labeler.LabelerView,
  ) : GetServicesResponseViewUnion

  public class LabelerViewDetailedSerializer : KSerializer by valueClassSerializer(
    serialName = "app.bsky.labeler.defs#labelerViewDetailed",
    constructor = ::LabelerViewDetailed,
    valueProvider = LabelerViewDetailed::value,
    valueSerializerProvider = { app.bsky.labeler.LabelerViewDetailed.serializer() },
  )

  @Serializable(with = LabelerViewDetailedSerializer::class)
  @JvmInline
  @SerialName("app.bsky.labeler.defs#labelerViewDetailed")
  public value class LabelerViewDetailed(
    public val `value`: app.bsky.labeler.LabelerViewDetailed,
  ) : GetServicesResponseViewUnion
}

@Serializable
public data class GetServicesQueryParams(
  public val dids: ReadOnlyList,
  public val detailed: Boolean? = false,
) {
  public fun asList(): ReadOnlyList> = buildList {
    dids.forEach {
      add("dids" to it)
    }
    add("detailed" to detailed)
  }.toImmutableList()
}

@Serializable
public data class GetServicesResponse(
  public val views: ReadOnlyList,
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy