atrium-api 0.25.8

API library for AT Protocol (Bluesky)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
// @generated - This file is generated by atrium-codegen. DO NOT EDIT.
//!Definitions for the `tools.ozone.moderation.defs` namespace.
///Logs account status related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct AccountEventData {
    ///Indicates that the account has a repository which can be fetched from the host that emitted this event.
    pub active: bool,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub comment: core::option::Option<String>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub status: core::option::Option<String>,
    pub timestamp: crate::types::string::Datetime,
}
pub type AccountEvent = crate::types::Object<AccountEventData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct AccountHostingData {
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub created_at: core::option::Option<crate::types::string::Datetime>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub deactivated_at: core::option::Option<crate::types::string::Datetime>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub deleted_at: core::option::Option<crate::types::string::Datetime>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub reactivated_at: core::option::Option<crate::types::string::Datetime>,
    pub status: String,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub updated_at: core::option::Option<crate::types::string::Datetime>,
}
pub type AccountHosting = crate::types::Object<AccountHostingData>;
///Statistics about a particular account subject
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct AccountStatsData {
    ///Total number of appeals against a moderation action on the account
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub appeal_count: core::option::Option<i64>,
    ///Number of times the account was escalated
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub escalate_count: core::option::Option<i64>,
    ///Total number of reports on the account
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub report_count: core::option::Option<i64>,
    ///Number of times the account was suspended
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub suspend_count: core::option::Option<i64>,
    ///Number of times the account was taken down
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub takedown_count: core::option::Option<i64>,
}
pub type AccountStats = crate::types::Object<AccountStatsData>;
///Age assurance info coming directly from users. Only works on DID subjects.
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct AgeAssuranceEventData {
    ///The unique identifier for this instance of the age assurance flow, in UUID format.
    pub attempt_id: String,
    ///The IP address used when completing the AA flow.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub complete_ip: core::option::Option<String>,
    ///The user agent used when completing the AA flow.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub complete_ua: core::option::Option<String>,
    ///The date and time of this write operation.
    pub created_at: crate::types::string::Datetime,
    ///The IP address used when initiating the AA flow.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub init_ip: core::option::Option<String>,
    ///The user agent used when initiating the AA flow.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub init_ua: core::option::Option<String>,
    ///The status of the age assurance process.
    pub status: String,
}
pub type AgeAssuranceEvent = crate::types::Object<AgeAssuranceEventData>;
///Age assurance status override by moderators. Only works on DID subjects.
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct AgeAssuranceOverrideEventData {
    ///Comment describing the reason for the override.
    pub comment: String,
    ///The status to be set for the user decided by a moderator, overriding whatever value the user had previously. Use reset to default to original state.
    pub status: String,
}
pub type AgeAssuranceOverrideEvent = crate::types::Object<AgeAssuranceOverrideEventData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct BlobViewData {
    pub cid: crate::types::string::Cid,
    pub created_at: crate::types::string::Datetime,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub details: core::option::Option<crate::types::Union<BlobViewDetailsRefs>>,
    pub mime_type: String,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub moderation: core::option::Option<Moderation>,
    pub size: i64,
}
pub type BlobView = crate::types::Object<BlobViewData>;
///Logs identity related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct IdentityEventData {
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub comment: core::option::Option<String>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub handle: core::option::Option<crate::types::string::Handle>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub pds_host: core::option::Option<String>,
    pub timestamp: crate::types::string::Datetime,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub tombstone: core::option::Option<bool>,
}
pub type IdentityEvent = crate::types::Object<IdentityEventData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ImageDetailsData {
    pub height: i64,
    pub width: i64,
}
pub type ImageDetails = crate::types::Object<ImageDetailsData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ModEventAcknowledgeData {
    ///If true, all other reports on content authored by this account will be resolved (acknowledged).
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub acknowledge_account_subjects: core::option::Option<bool>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub comment: core::option::Option<String>,
}
pub type ModEventAcknowledge = crate::types::Object<ModEventAcknowledgeData>;
///Add a comment to a subject. An empty comment will clear any previously set sticky comment.
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ModEventCommentData {
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub comment: core::option::Option<String>,
    ///Make the comment persistent on the subject
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub sticky: core::option::Option<bool>,
}
pub type ModEventComment = crate::types::Object<ModEventCommentData>;
///Divert a record's blobs to a 3rd party service for further scanning/tagging
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ModEventDivertData {
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub comment: core::option::Option<String>,
}
pub type ModEventDivert = crate::types::Object<ModEventDivertData>;
///Keep a log of outgoing email to a user
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ModEventEmailData {
    ///Additional comment about the outgoing comm.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub comment: core::option::Option<String>,
    ///The content of the email sent to the user.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub content: core::option::Option<String>,
    ///The subject line of the email sent to the user.
    pub subject_line: String,
}
pub type ModEventEmail = crate::types::Object<ModEventEmailData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ModEventEscalateData {
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub comment: core::option::Option<String>,
}
pub type ModEventEscalate = crate::types::Object<ModEventEscalateData>;
///Apply/Negate labels on a subject
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ModEventLabelData {
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub comment: core::option::Option<String>,
    pub create_label_vals: Vec<String>,
    ///Indicates how long the label will remain on the subject. Only applies on labels that are being added.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub duration_in_hours: core::option::Option<i64>,
    pub negate_label_vals: Vec<String>,
}
pub type ModEventLabel = crate::types::Object<ModEventLabelData>;
///Mute incoming reports on a subject
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ModEventMuteData {
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub comment: core::option::Option<String>,
    ///Indicates how long the subject should remain muted.
    pub duration_in_hours: i64,
}
pub type ModEventMute = crate::types::Object<ModEventMuteData>;
///Mute incoming reports from an account
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ModEventMuteReporterData {
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub comment: core::option::Option<String>,
    ///Indicates how long the account should remain muted. Falsy value here means a permanent mute.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub duration_in_hours: core::option::Option<i64>,
}
pub type ModEventMuteReporter = crate::types::Object<ModEventMuteReporterData>;
///Set priority score of the subject. Higher score means higher priority.
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ModEventPriorityScoreData {
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub comment: core::option::Option<String>,
    pub score: crate::types::LimitedU8<100u8>,
}
pub type ModEventPriorityScore = crate::types::Object<ModEventPriorityScoreData>;
///Report a subject
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ModEventReportData {
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub comment: core::option::Option<String>,
    ///Set to true if the reporter was muted from reporting at the time of the event. These reports won't impact the reviewState of the subject.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub is_reporter_muted: core::option::Option<bool>,
    pub report_type: crate::com::atproto::moderation::defs::ReasonType,
}
pub type ModEventReport = crate::types::Object<ModEventReportData>;
///Resolve appeal on a subject
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ModEventResolveAppealData {
    ///Describe resolution.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub comment: core::option::Option<String>,
}
pub type ModEventResolveAppeal = crate::types::Object<ModEventResolveAppealData>;
///Revert take down action on a subject
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ModEventReverseTakedownData {
    ///Describe reasoning behind the reversal.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub comment: core::option::Option<String>,
}
pub type ModEventReverseTakedown = crate::types::Object<ModEventReverseTakedownData>;
///Add/Remove a tag on a subject
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ModEventTagData {
    ///Tags to be added to the subject. If already exists, won't be duplicated.
    pub add: Vec<String>,
    ///Additional comment about added/removed tags.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub comment: core::option::Option<String>,
    ///Tags to be removed to the subject. Ignores a tag If it doesn't exist, won't be duplicated.
    pub remove: Vec<String>,
}
pub type ModEventTag = crate::types::Object<ModEventTagData>;
///Take down a subject permanently or temporarily
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ModEventTakedownData {
    ///If true, all other reports on content authored by this account will be resolved (acknowledged).
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub acknowledge_account_subjects: core::option::Option<bool>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub comment: core::option::Option<String>,
    ///Indicates how long the takedown should be in effect before automatically expiring.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub duration_in_hours: core::option::Option<i64>,
    ///Names/Keywords of the policies that drove the decision.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub policies: core::option::Option<Vec<String>>,
}
pub type ModEventTakedown = crate::types::Object<ModEventTakedownData>;
///Unmute action on a subject
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ModEventUnmuteData {
    ///Describe reasoning behind the reversal.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub comment: core::option::Option<String>,
}
pub type ModEventUnmute = crate::types::Object<ModEventUnmuteData>;
///Unmute incoming reports from an account
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ModEventUnmuteReporterData {
    ///Describe reasoning behind the reversal.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub comment: core::option::Option<String>,
}
pub type ModEventUnmuteReporter = crate::types::Object<ModEventUnmuteReporterData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ModEventViewData {
    pub created_at: crate::types::string::Datetime,
    pub created_by: crate::types::string::Did,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub creator_handle: core::option::Option<String>,
    pub event: crate::types::Union<ModEventViewEventRefs>,
    pub id: i64,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub mod_tool: core::option::Option<ModTool>,
    pub subject: crate::types::Union<ModEventViewSubjectRefs>,
    pub subject_blob_cids: Vec<String>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub subject_handle: core::option::Option<String>,
}
pub type ModEventView = crate::types::Object<ModEventViewData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ModEventViewDetailData {
    pub created_at: crate::types::string::Datetime,
    pub created_by: crate::types::string::Did,
    pub event: crate::types::Union<ModEventViewDetailEventRefs>,
    pub id: i64,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub mod_tool: core::option::Option<ModTool>,
    pub subject: crate::types::Union<ModEventViewDetailSubjectRefs>,
    pub subject_blobs: Vec<BlobView>,
}
pub type ModEventViewDetail = crate::types::Object<ModEventViewDetailData>;
///Moderation tool information for tracing the source of the action
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ModToolData {
    ///Additional arbitrary metadata about the source
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub meta: core::option::Option<crate::types::Unknown>,
    ///Name/identifier of the source (e.g., 'automod', 'ozone/workspace')
    pub name: String,
}
pub type ModTool = crate::types::Object<ModToolData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ModerationData {
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub subject_status: core::option::Option<SubjectStatusView>,
}
pub type Moderation = crate::types::Object<ModerationData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ModerationDetailData {
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub subject_status: core::option::Option<SubjectStatusView>,
}
pub type ModerationDetail = crate::types::Object<ModerationDetailData>;
///Logs lifecycle event on a record subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking.
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct RecordEventData {
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub cid: core::option::Option<crate::types::string::Cid>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub comment: core::option::Option<String>,
    pub op: String,
    pub timestamp: crate::types::string::Datetime,
}
pub type RecordEvent = crate::types::Object<RecordEventData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct RecordHostingData {
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub created_at: core::option::Option<crate::types::string::Datetime>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub deleted_at: core::option::Option<crate::types::string::Datetime>,
    pub status: String,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub updated_at: core::option::Option<crate::types::string::Datetime>,
}
pub type RecordHosting = crate::types::Object<RecordHostingData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct RecordViewData {
    pub blob_cids: Vec<crate::types::string::Cid>,
    pub cid: crate::types::string::Cid,
    pub indexed_at: crate::types::string::Datetime,
    pub moderation: Moderation,
    pub repo: RepoView,
    pub uri: String,
    pub value: crate::types::Unknown,
}
pub type RecordView = crate::types::Object<RecordViewData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct RecordViewDetailData {
    pub blobs: Vec<BlobView>,
    pub cid: crate::types::string::Cid,
    pub indexed_at: crate::types::string::Datetime,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub labels: core::option::Option<Vec<crate::com::atproto::label::defs::Label>>,
    pub moderation: ModerationDetail,
    pub repo: RepoView,
    pub uri: String,
    pub value: crate::types::Unknown,
}
pub type RecordViewDetail = crate::types::Object<RecordViewDetailData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct RecordViewNotFoundData {
    pub uri: String,
}
pub type RecordViewNotFound = crate::types::Object<RecordViewNotFoundData>;
///Statistics about a set of record subject items
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct RecordsStatsData {
    ///Number of items that were appealed at least once
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub appealed_count: core::option::Option<i64>,
    ///Number of items that were escalated at least once
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub escalated_count: core::option::Option<i64>,
    ///Number of item currently in "reviewOpen" or "reviewEscalated" state
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub pending_count: core::option::Option<i64>,
    ///Number of item currently in "reviewNone" or "reviewClosed" state
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub processed_count: core::option::Option<i64>,
    ///Number of items that were reported at least once
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub reported_count: core::option::Option<i64>,
    ///Total number of item in the set
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub subject_count: core::option::Option<i64>,
    ///Number of item currently taken down
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub takendown_count: core::option::Option<i64>,
    ///Cumulative sum of the number of reports on the items in the set
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub total_reports: core::option::Option<i64>,
}
pub type RecordsStats = crate::types::Object<RecordsStatsData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct RepoViewData {
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub deactivated_at: core::option::Option<crate::types::string::Datetime>,
    pub did: crate::types::string::Did,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub email: core::option::Option<String>,
    pub handle: crate::types::string::Handle,
    pub indexed_at: crate::types::string::Datetime,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub invite_note: core::option::Option<String>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub invited_by: core::option::Option<crate::com::atproto::server::defs::InviteCode>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub invites_disabled: core::option::Option<bool>,
    pub moderation: Moderation,
    pub related_records: Vec<crate::types::Unknown>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub threat_signatures:
        core::option::Option<Vec<crate::com::atproto::admin::defs::ThreatSignature>>,
}
pub type RepoView = crate::types::Object<RepoViewData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct RepoViewDetailData {
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub deactivated_at: core::option::Option<crate::types::string::Datetime>,
    pub did: crate::types::string::Did,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub email: core::option::Option<String>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub email_confirmed_at: core::option::Option<crate::types::string::Datetime>,
    pub handle: crate::types::string::Handle,
    pub indexed_at: crate::types::string::Datetime,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub invite_note: core::option::Option<String>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub invited_by: core::option::Option<crate::com::atproto::server::defs::InviteCode>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub invites: core::option::Option<Vec<crate::com::atproto::server::defs::InviteCode>>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub invites_disabled: core::option::Option<bool>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub labels: core::option::Option<Vec<crate::com::atproto::label::defs::Label>>,
    pub moderation: ModerationDetail,
    pub related_records: Vec<crate::types::Unknown>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub threat_signatures:
        core::option::Option<Vec<crate::com::atproto::admin::defs::ThreatSignature>>,
}
pub type RepoViewDetail = crate::types::Object<RepoViewDetailData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct RepoViewNotFoundData {
    pub did: crate::types::string::Did,
}
pub type RepoViewNotFound = crate::types::Object<RepoViewNotFoundData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct ReporterStatsData {
    ///The total number of reports made by the user on accounts.
    pub account_report_count: i64,
    pub did: crate::types::string::Did,
    ///The total number of accounts labeled as a result of the user's reports.
    pub labeled_account_count: i64,
    ///The total number of records labeled as a result of the user's reports.
    pub labeled_record_count: i64,
    ///The total number of reports made by the user on records.
    pub record_report_count: i64,
    ///The total number of accounts reported by the user.
    pub reported_account_count: i64,
    ///The total number of records reported by the user.
    pub reported_record_count: i64,
    ///The total number of accounts taken down as a result of the user's reports.
    pub takendown_account_count: i64,
    ///The total number of records taken down as a result of the user's reports.
    pub takendown_record_count: i64,
}
pub type ReporterStats = crate::types::Object<ReporterStatsData>;
///Moderator review status of a subject: Closed. Indicates that the subject was already reviewed and resolved by a moderator
pub const REVIEW_CLOSED: &str = "tools.ozone.moderation.defs#reviewClosed";
///Moderator review status of a subject: Escalated. Indicates that the subject was escalated for review by a moderator
pub const REVIEW_ESCALATED: &str = "tools.ozone.moderation.defs#reviewEscalated";
///Moderator review status of a subject: Unnecessary. Indicates that the subject does not need a review at the moment but there is probably some moderation related metadata available for it
pub const REVIEW_NONE: &str = "tools.ozone.moderation.defs#reviewNone";
///Moderator review status of a subject: Open. Indicates that the subject needs to be reviewed by a moderator
pub const REVIEW_OPEN: &str = "tools.ozone.moderation.defs#reviewOpen";
///Account credentials revocation by moderators. Only works on DID subjects.
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct RevokeAccountCredentialsEventData {
    ///Comment describing the reason for the revocation.
    pub comment: String,
}
pub type RevokeAccountCredentialsEvent = crate::types::Object<RevokeAccountCredentialsEventData>;
pub type SubjectReviewState = String;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct SubjectStatusViewData {
    ///Statistics related to the account subject
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub account_stats: core::option::Option<AccountStats>,
    ///Current age assurance state of the subject.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub age_assurance_state: core::option::Option<String>,
    ///Whether or not the last successful update to age assurance was made by the user or admin.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub age_assurance_updated_by: core::option::Option<String>,
    ///True indicates that the a previously taken moderator action was appealed against, by the author of the content. False indicates last appeal was resolved by moderators.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub appealed: core::option::Option<bool>,
    ///Sticky comment on the subject.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub comment: core::option::Option<String>,
    ///Timestamp referencing the first moderation status impacting event was emitted on the subject
    pub created_at: crate::types::string::Datetime,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub hosting: core::option::Option<crate::types::Union<SubjectStatusViewHostingRefs>>,
    pub id: i64,
    ///Timestamp referencing when the author of the subject appealed a moderation action
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub last_appealed_at: core::option::Option<crate::types::string::Datetime>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub last_reported_at: core::option::Option<crate::types::string::Datetime>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub last_reviewed_at: core::option::Option<crate::types::string::Datetime>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub last_reviewed_by: core::option::Option<crate::types::string::Did>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub mute_reporting_until: core::option::Option<crate::types::string::Datetime>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub mute_until: core::option::Option<crate::types::string::Datetime>,
    ///Numeric value representing the level of priority. Higher score means higher priority.
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub priority_score: core::option::Option<crate::types::LimitedU8<100u8>>,
    ///Statistics related to the record subjects authored by the subject's account
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub records_stats: core::option::Option<RecordsStats>,
    pub review_state: SubjectReviewState,
    pub subject: crate::types::Union<SubjectStatusViewSubjectRefs>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub subject_blob_cids: core::option::Option<Vec<crate::types::string::Cid>>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub subject_repo_handle: core::option::Option<String>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub suspend_until: core::option::Option<crate::types::string::Datetime>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub tags: core::option::Option<Vec<String>>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub takendown: core::option::Option<bool>,
    ///Timestamp referencing when the last update was made to the moderation status of the subject
    pub updated_at: crate::types::string::Datetime,
}
pub type SubjectStatusView = crate::types::Object<SubjectStatusViewData>;
///Detailed view of a subject. For record subjects, the author's repo and profile will be returned.
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct SubjectViewData {
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub profile: core::option::Option<crate::types::Union<SubjectViewProfileRefs>>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub record: core::option::Option<RecordViewDetail>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub repo: core::option::Option<RepoViewDetail>,
    #[serde(skip_serializing_if = "core::option::Option::is_none")]
    pub status: core::option::Option<SubjectStatusView>,
    pub subject: String,
    pub r#type: crate::com::atproto::moderation::defs::SubjectType,
}
pub type SubjectView = crate::types::Object<SubjectViewData>;
///Moderation event timeline event for a PLC create operation
pub const TIMELINE_EVENT_PLC_CREATE: &str = "tools.ozone.moderation.defs#timelineEventPlcCreate";
///Moderation event timeline event for generic PLC operation
pub const TIMELINE_EVENT_PLC_OPERATION: &str =
    "tools.ozone.moderation.defs#timelineEventPlcOperation";
///Moderation event timeline event for a PLC tombstone operation
pub const TIMELINE_EVENT_PLC_TOMBSTONE: &str =
    "tools.ozone.moderation.defs#timelineEventPlcTombstone";
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
pub struct VideoDetailsData {
    pub height: i64,
    pub length: i64,
    pub width: i64,
}
pub type VideoDetails = crate::types::Object<VideoDetailsData>;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "$type")]
pub enum BlobViewDetailsRefs {
    #[serde(rename = "tools.ozone.moderation.defs#imageDetails")]
    ImageDetails(Box<ImageDetails>),
    #[serde(rename = "tools.ozone.moderation.defs#videoDetails")]
    VideoDetails(Box<VideoDetails>),
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "$type")]
pub enum ModEventViewDetailEventRefs {
    #[serde(rename = "tools.ozone.moderation.defs#modEventTakedown")]
    ModEventTakedown(Box<ModEventTakedown>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventReverseTakedown")]
    ModEventReverseTakedown(Box<ModEventReverseTakedown>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventComment")]
    ModEventComment(Box<ModEventComment>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventReport")]
    ModEventReport(Box<ModEventReport>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventLabel")]
    ModEventLabel(Box<ModEventLabel>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventAcknowledge")]
    ModEventAcknowledge(Box<ModEventAcknowledge>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventEscalate")]
    ModEventEscalate(Box<ModEventEscalate>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventMute")]
    ModEventMute(Box<ModEventMute>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventUnmute")]
    ModEventUnmute(Box<ModEventUnmute>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventMuteReporter")]
    ModEventMuteReporter(Box<ModEventMuteReporter>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventUnmuteReporter")]
    ModEventUnmuteReporter(Box<ModEventUnmuteReporter>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventEmail")]
    ModEventEmail(Box<ModEventEmail>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventResolveAppeal")]
    ModEventResolveAppeal(Box<ModEventResolveAppeal>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventDivert")]
    ModEventDivert(Box<ModEventDivert>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventTag")]
    ModEventTag(Box<ModEventTag>),
    #[serde(rename = "tools.ozone.moderation.defs#accountEvent")]
    AccountEvent(Box<AccountEvent>),
    #[serde(rename = "tools.ozone.moderation.defs#identityEvent")]
    IdentityEvent(Box<IdentityEvent>),
    #[serde(rename = "tools.ozone.moderation.defs#recordEvent")]
    RecordEvent(Box<RecordEvent>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventPriorityScore")]
    ModEventPriorityScore(Box<ModEventPriorityScore>),
    #[serde(rename = "tools.ozone.moderation.defs#ageAssuranceEvent")]
    AgeAssuranceEvent(Box<AgeAssuranceEvent>),
    #[serde(rename = "tools.ozone.moderation.defs#ageAssuranceOverrideEvent")]
    AgeAssuranceOverrideEvent(Box<AgeAssuranceOverrideEvent>),
    #[serde(rename = "tools.ozone.moderation.defs#revokeAccountCredentialsEvent")]
    RevokeAccountCredentialsEvent(Box<RevokeAccountCredentialsEvent>),
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "$type")]
pub enum ModEventViewDetailSubjectRefs {
    #[serde(rename = "tools.ozone.moderation.defs#repoView")]
    RepoView(Box<RepoView>),
    #[serde(rename = "tools.ozone.moderation.defs#repoViewNotFound")]
    RepoViewNotFound(Box<RepoViewNotFound>),
    #[serde(rename = "tools.ozone.moderation.defs#recordView")]
    RecordView(Box<RecordView>),
    #[serde(rename = "tools.ozone.moderation.defs#recordViewNotFound")]
    RecordViewNotFound(Box<RecordViewNotFound>),
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "$type")]
pub enum ModEventViewEventRefs {
    #[serde(rename = "tools.ozone.moderation.defs#modEventTakedown")]
    ModEventTakedown(Box<ModEventTakedown>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventReverseTakedown")]
    ModEventReverseTakedown(Box<ModEventReverseTakedown>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventComment")]
    ModEventComment(Box<ModEventComment>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventReport")]
    ModEventReport(Box<ModEventReport>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventLabel")]
    ModEventLabel(Box<ModEventLabel>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventAcknowledge")]
    ModEventAcknowledge(Box<ModEventAcknowledge>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventEscalate")]
    ModEventEscalate(Box<ModEventEscalate>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventMute")]
    ModEventMute(Box<ModEventMute>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventUnmute")]
    ModEventUnmute(Box<ModEventUnmute>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventMuteReporter")]
    ModEventMuteReporter(Box<ModEventMuteReporter>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventUnmuteReporter")]
    ModEventUnmuteReporter(Box<ModEventUnmuteReporter>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventEmail")]
    ModEventEmail(Box<ModEventEmail>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventResolveAppeal")]
    ModEventResolveAppeal(Box<ModEventResolveAppeal>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventDivert")]
    ModEventDivert(Box<ModEventDivert>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventTag")]
    ModEventTag(Box<ModEventTag>),
    #[serde(rename = "tools.ozone.moderation.defs#accountEvent")]
    AccountEvent(Box<AccountEvent>),
    #[serde(rename = "tools.ozone.moderation.defs#identityEvent")]
    IdentityEvent(Box<IdentityEvent>),
    #[serde(rename = "tools.ozone.moderation.defs#recordEvent")]
    RecordEvent(Box<RecordEvent>),
    #[serde(rename = "tools.ozone.moderation.defs#modEventPriorityScore")]
    ModEventPriorityScore(Box<ModEventPriorityScore>),
    #[serde(rename = "tools.ozone.moderation.defs#ageAssuranceEvent")]
    AgeAssuranceEvent(Box<AgeAssuranceEvent>),
    #[serde(rename = "tools.ozone.moderation.defs#ageAssuranceOverrideEvent")]
    AgeAssuranceOverrideEvent(Box<AgeAssuranceOverrideEvent>),
    #[serde(rename = "tools.ozone.moderation.defs#revokeAccountCredentialsEvent")]
    RevokeAccountCredentialsEvent(Box<RevokeAccountCredentialsEvent>),
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "$type")]
pub enum ModEventViewSubjectRefs {
    #[serde(rename = "com.atproto.admin.defs#repoRef")]
    ComAtprotoAdminDefsRepoRef(Box<crate::com::atproto::admin::defs::RepoRef>),
    #[serde(rename = "com.atproto.repo.strongRef")]
    ComAtprotoRepoStrongRefMain(Box<crate::com::atproto::repo::strong_ref::Main>),
    #[serde(rename = "chat.bsky.convo.defs#messageRef")]
    ChatBskyConvoDefsMessageRef(Box<crate::chat::bsky::convo::defs::MessageRef>),
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "$type")]
pub enum SubjectStatusViewHostingRefs {
    #[serde(rename = "tools.ozone.moderation.defs#accountHosting")]
    AccountHosting(Box<AccountHosting>),
    #[serde(rename = "tools.ozone.moderation.defs#recordHosting")]
    RecordHosting(Box<RecordHosting>),
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "$type")]
pub enum SubjectStatusViewSubjectRefs {
    #[serde(rename = "com.atproto.admin.defs#repoRef")]
    ComAtprotoAdminDefsRepoRef(Box<crate::com::atproto::admin::defs::RepoRef>),
    #[serde(rename = "com.atproto.repo.strongRef")]
    ComAtprotoRepoStrongRefMain(Box<crate::com::atproto::repo::strong_ref::Main>),
    #[serde(rename = "chat.bsky.convo.defs#messageRef")]
    ChatBskyConvoDefsMessageRef(Box<crate::chat::bsky::convo::defs::MessageRef>),
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "$type")]
pub enum SubjectViewProfileRefs {}