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

commonMain.com.atproto.admin.getSubjectStatus.kt Maven / Gradle / Ivy

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

package com.atproto.admin

import com.atproto.repo.StrongRef
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.AtUri
import sh.christian.ozone.api.Cid
import sh.christian.ozone.api.Did
import sh.christian.ozone.api.model.JsonContent
import sh.christian.ozone.api.runtime.valueClassSerializer

@Serializable
public sealed interface GetSubjectStatusResponseSubjectUnion {
  public class AdminRepoRefSerializer : KSerializer by valueClassSerializer(
    serialName = "com.atproto.admin.defs#repoRef",
    constructor = ::AdminRepoRef,
    valueProvider = AdminRepoRef::value,
    valueSerializerProvider = { RepoRef.serializer() },
  )

  @JvmInline
  @Serializable(with = AdminRepoRefSerializer::class)
  @SerialName("com.atproto.admin.defs#repoRef")
  public value class AdminRepoRef(
    public val `value`: RepoRef,
  ) : GetSubjectStatusResponseSubjectUnion

  public class RepoStrongRefSerializer : KSerializer by valueClassSerializer(
    serialName = "com.atproto.repo.strongRef",
    constructor = ::RepoStrongRef,
    valueProvider = RepoStrongRef::value,
    valueSerializerProvider = { StrongRef.serializer() },
  )

  @JvmInline
  @Serializable(with = RepoStrongRefSerializer::class)
  @SerialName("com.atproto.repo.strongRef")
  public value class RepoStrongRef(
    public val `value`: StrongRef,
  ) : GetSubjectStatusResponseSubjectUnion

  public class AdminRepoBlobRefSerializer : KSerializer by valueClassSerializer(
    serialName = "com.atproto.admin.defs#repoBlobRef",
    constructor = ::AdminRepoBlobRef,
    valueProvider = AdminRepoBlobRef::value,
    valueSerializerProvider = { RepoBlobRef.serializer() },
  )

  @JvmInline
  @Serializable(with = AdminRepoBlobRefSerializer::class)
  @SerialName("com.atproto.admin.defs#repoBlobRef")
  public value class AdminRepoBlobRef(
    public val `value`: RepoBlobRef,
  ) : GetSubjectStatusResponseSubjectUnion

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

@Serializable
public data class GetSubjectStatusQueryParams(
  public val did: Did? = null,
  public val uri: AtUri? = null,
  public val blob: Cid? = null,
) {
  public fun asList(): List> = buildList {
    add("did" to did)
    add("uri" to uri)
    add("blob" to blob)
  }
}

@Serializable
public data class GetSubjectStatusResponse(
  public val subject: GetSubjectStatusResponseSubjectUnion,
  public val takedown: StatusAttr? = null,
  public val deactivated: StatusAttr? = null,
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy