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

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

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

package com.atproto.admin

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

@Serializable
public sealed interface UpdateSubjectStatusRequestSubjectUnion {
  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,
  ) : UpdateSubjectStatusRequestSubjectUnion

  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,
  ) : UpdateSubjectStatusRequestSubjectUnion

  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,
  ) : UpdateSubjectStatusRequestSubjectUnion

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

@Serializable
public sealed interface UpdateSubjectStatusResponseSubjectUnion {
  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,
  ) : UpdateSubjectStatusResponseSubjectUnion

  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,
  ) : UpdateSubjectStatusResponseSubjectUnion

  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,
  ) : UpdateSubjectStatusResponseSubjectUnion

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

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

@Serializable
public data class UpdateSubjectStatusResponse(
  public val subject: UpdateSubjectStatusResponseSubjectUnion,
  public val takedown: StatusAttr? = null,
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy