#![doc = "Definitions for the `com.atproto.admin.defs` namespace."]
#[doc = "`com.atproto.admin.defs#acknowledge`"]
#[doc = "Moderation action type: Acknowledge. Indicates that the content was reviewed and not considered to violate PDS rules."]
pub struct Acknowledge;
#[doc = "`com.atproto.admin.defs#actionReversal`"]
#[derive(serde :: Serialize, serde :: Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ActionReversal {
pub created_at: String,
pub created_by: String,
pub reason: String,
}
#[doc = "`com.atproto.admin.defs#actionType`"]
pub type ActionType = String;
#[doc = "`com.atproto.admin.defs#actionView`"]
#[derive(serde :: Serialize, serde :: Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ActionView {
pub action: ActionType,
#[serde(skip_serializing_if = "Option::is_none")]
pub create_label_vals: Option<Vec<String>>,
pub created_at: String,
pub created_by: String,
pub id: i32,
#[serde(skip_serializing_if = "Option::is_none")]
pub negate_label_vals: Option<Vec<String>>,
pub reason: String,
pub resolved_report_ids: Vec<i32>,
#[serde(skip_serializing_if = "Option::is_none")]
pub reversal: Option<ActionReversal>,
pub subject: ActionViewSubjectEnum,
pub subject_blob_cids: Vec<String>,
}
#[doc = "`com.atproto.admin.defs#actionViewCurrent`"]
#[derive(serde :: Serialize, serde :: Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ActionViewCurrent {
pub action: ActionType,
pub id: i32,
}
#[doc = "`com.atproto.admin.defs#actionViewDetail`"]
#[derive(serde :: Serialize, serde :: Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ActionViewDetail {
pub action: ActionType,
#[serde(skip_serializing_if = "Option::is_none")]
pub create_label_vals: Option<Vec<String>>,
pub created_at: String,
pub created_by: String,
pub id: i32,
#[serde(skip_serializing_if = "Option::is_none")]
pub negate_label_vals: Option<Vec<String>>,
pub reason: String,
pub resolved_reports: Vec<ReportView>,
#[serde(skip_serializing_if = "Option::is_none")]
pub reversal: Option<ActionReversal>,
pub subject: ActionViewDetailSubjectEnum,
pub subject_blobs: Vec<BlobView>,
}
#[doc = "`com.atproto.admin.defs#blobView`"]
#[derive(serde :: Serialize, serde :: Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct BlobView {
pub cid: String,
pub created_at: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub details: Option<BlobViewDetailsEnum>,
pub mime_type: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub moderation: Option<Moderation>,
pub size: i32,
}
#[doc = "`com.atproto.admin.defs#escalate`"]
#[doc = "Moderation action type: Escalate. Indicates that the content has been flagged for additional review."]
pub struct Escalate;
#[doc = "`com.atproto.admin.defs#flag`"]
#[doc = "Moderation action type: Flag. Indicates that the content was reviewed and considered to violate PDS rules, but may still be served."]
pub struct Flag;
#[doc = "`com.atproto.admin.defs#imageDetails`"]
#[derive(serde :: Serialize, serde :: Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ImageDetails {
pub height: i32,
pub width: i32,
}
#[doc = "`com.atproto.admin.defs#moderation`"]
#[derive(serde :: Serialize, serde :: Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct Moderation {
#[serde(skip_serializing_if = "Option::is_none")]
pub current_action: Option<ActionViewCurrent>,
}
#[doc = "`com.atproto.admin.defs#moderationDetail`"]
#[derive(serde :: Serialize, serde :: Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ModerationDetail {
pub actions: Vec<ActionView>,
#[serde(skip_serializing_if = "Option::is_none")]
pub current_action: Option<ActionViewCurrent>,
pub reports: Vec<ReportView>,
}
#[doc = "`com.atproto.admin.defs#recordView`"]
#[derive(serde :: Serialize, serde :: Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct RecordView {
pub blob_cids: Vec<String>,
pub cid: String,
pub indexed_at: String,
pub moderation: Moderation,
pub repo: RepoView,
pub uri: String,
pub value: crate::records::Record,
}
#[doc = "`com.atproto.admin.defs#recordViewDetail`"]
#[derive(serde :: Serialize, serde :: Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct RecordViewDetail {
pub blobs: Vec<BlobView>,
pub cid: String,
pub indexed_at: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub labels: Option<Vec<crate::com::atproto::label::defs::Label>>,
pub moderation: ModerationDetail,
pub repo: RepoView,
pub uri: String,
pub value: crate::records::Record,
}
#[doc = "`com.atproto.admin.defs#recordViewNotFound`"]
#[derive(serde :: Serialize, serde :: Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct RecordViewNotFound {
pub uri: String,
}
#[doc = "`com.atproto.admin.defs#repoRef`"]
#[derive(serde :: Serialize, serde :: Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct RepoRef {
pub did: String,
}
#[doc = "`com.atproto.admin.defs#repoView`"]
#[derive(serde :: Serialize, serde :: Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct RepoView {
pub did: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
pub handle: String,
pub indexed_at: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub invited_by: Option<crate::com::atproto::server::defs::InviteCode>,
#[serde(skip_serializing_if = "Option::is_none")]
pub invites_disabled: Option<bool>,
pub moderation: Moderation,
pub related_records: Vec<crate::records::Record>,
}
#[doc = "`com.atproto.admin.defs#repoViewDetail`"]
#[derive(serde :: Serialize, serde :: Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct RepoViewDetail {
pub did: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
pub handle: String,
pub indexed_at: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub invited_by: Option<crate::com::atproto::server::defs::InviteCode>,
#[serde(skip_serializing_if = "Option::is_none")]
pub invites: Option<Vec<crate::com::atproto::server::defs::InviteCode>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub invites_disabled: Option<bool>,
#[serde(skip_serializing_if = "Option::is_none")]
pub labels: Option<Vec<crate::com::atproto::label::defs::Label>>,
pub moderation: ModerationDetail,
pub related_records: Vec<crate::records::Record>,
}
#[doc = "`com.atproto.admin.defs#repoViewNotFound`"]
#[derive(serde :: Serialize, serde :: Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct RepoViewNotFound {
pub did: String,
}
#[doc = "`com.atproto.admin.defs#reportView`"]
#[derive(serde :: Serialize, serde :: Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ReportView {
pub created_at: String,
pub id: i32,
#[serde(skip_serializing_if = "Option::is_none")]
pub reason: Option<String>,
pub reason_type: crate::com::atproto::moderation::defs::ReasonType,
pub reported_by: String,
pub resolved_by_action_ids: Vec<i32>,
pub subject: ReportViewSubjectEnum,
}
#[doc = "`com.atproto.admin.defs#reportViewDetail`"]
#[derive(serde :: Serialize, serde :: Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ReportViewDetail {
pub created_at: String,
pub id: i32,
#[serde(skip_serializing_if = "Option::is_none")]
pub reason: Option<String>,
pub reason_type: crate::com::atproto::moderation::defs::ReasonType,
pub reported_by: String,
pub resolved_by_actions: Vec<crate::com::atproto::admin::defs::ActionView>,
pub subject: ReportViewDetailSubjectEnum,
}
#[doc = "`com.atproto.admin.defs#takedown`"]
#[doc = "Moderation action type: Takedown. Indicates that content should not be served by the PDS."]
pub struct Takedown;
#[doc = "`com.atproto.admin.defs#videoDetails`"]
#[derive(serde :: Serialize, serde :: Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct VideoDetails {
pub height: i32,
pub length: i32,
pub width: i32,
}
#[derive(serde :: Serialize, serde :: Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "$type")]
pub enum ActionViewDetailSubjectEnum {
#[serde(rename = "com.atproto.admin.defs#repoView")]
RepoView(Box<RepoView>),
#[serde(rename = "com.atproto.admin.defs#repoViewNotFound")]
RepoViewNotFound(Box<RepoViewNotFound>),
#[serde(rename = "com.atproto.admin.defs#recordView")]
RecordView(Box<RecordView>),
#[serde(rename = "com.atproto.admin.defs#recordViewNotFound")]
RecordViewNotFound(Box<RecordViewNotFound>),
}
#[derive(serde :: Serialize, serde :: Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "$type")]
pub enum ActionViewSubjectEnum {
#[serde(rename = "com.atproto.admin.defs#repoRef")]
RepoRef(Box<RepoRef>),
#[serde(rename = "com.atproto.repo.strongRef")]
ComAtprotoRepoStrongRefMain(Box<crate::com::atproto::repo::strong_ref::Main>),
}
#[derive(serde :: Serialize, serde :: Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "$type")]
pub enum BlobViewDetailsEnum {
#[serde(rename = "com.atproto.admin.defs#imageDetails")]
ImageDetails(Box<ImageDetails>),
#[serde(rename = "com.atproto.admin.defs#videoDetails")]
VideoDetails(Box<VideoDetails>),
}
#[derive(serde :: Serialize, serde :: Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "$type")]
pub enum ReportViewDetailSubjectEnum {
#[serde(rename = "com.atproto.admin.defs#repoView")]
RepoView(Box<RepoView>),
#[serde(rename = "com.atproto.admin.defs#repoViewNotFound")]
RepoViewNotFound(Box<RepoViewNotFound>),
#[serde(rename = "com.atproto.admin.defs#recordView")]
RecordView(Box<RecordView>),
#[serde(rename = "com.atproto.admin.defs#recordViewNotFound")]
RecordViewNotFound(Box<RecordViewNotFound>),
}
#[derive(serde :: Serialize, serde :: Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "$type")]
pub enum ReportViewSubjectEnum {
#[serde(rename = "com.atproto.admin.defs#repoRef")]
RepoRef(Box<RepoRef>),
#[serde(rename = "com.atproto.repo.strongRef")]
ComAtprotoRepoStrongRefMain(Box<crate::com::atproto::repo::strong_ref::Main>),
}