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

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy