[WIP] music platform user data scraper
teal-fm atproto
32
fork

Configure Feed

Select the types of activity you want to include in your feed.

at 5eb3ece929aab55a16cf7c19d12a86a2c05b177c 1062 lines 59 kB view raw
1// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. 2 3package ozone 4 5// schema: tools.ozone.moderation.defs 6 7import ( 8 "encoding/json" 9 "fmt" 10 11 comatprototypes "github.com/bluesky-social/indigo/api/atproto" 12 chatbskytypes "github.com/bluesky-social/indigo/api/chat" 13 "github.com/bluesky-social/indigo/lex/util" 14) 15 16// ModerationDefs_AccountEvent is a "accountEvent" in the tools.ozone.moderation.defs schema. 17// 18// Logs account status related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. 19// 20// RECORDTYPE: ModerationDefs_AccountEvent 21type ModerationDefs_AccountEvent struct { 22 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#accountEvent" cborgen:"$type,const=tools.ozone.moderation.defs#accountEvent"` 23 // active: Indicates that the account has a repository which can be fetched from the host that emitted this event. 24 Active bool `json:"active" cborgen:"active"` 25 Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 26 Status *string `json:"status,omitempty" cborgen:"status,omitempty"` 27 Timestamp string `json:"timestamp" cborgen:"timestamp"` 28} 29 30// ModerationDefs_AccountHosting is a "accountHosting" in the tools.ozone.moderation.defs schema. 31// 32// RECORDTYPE: ModerationDefs_AccountHosting 33type ModerationDefs_AccountHosting struct { 34 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#accountHosting" cborgen:"$type,const=tools.ozone.moderation.defs#accountHosting"` 35 CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` 36 DeactivatedAt *string `json:"deactivatedAt,omitempty" cborgen:"deactivatedAt,omitempty"` 37 DeletedAt *string `json:"deletedAt,omitempty" cborgen:"deletedAt,omitempty"` 38 ReactivatedAt *string `json:"reactivatedAt,omitempty" cborgen:"reactivatedAt,omitempty"` 39 Status string `json:"status" cborgen:"status"` 40 UpdatedAt *string `json:"updatedAt,omitempty" cborgen:"updatedAt,omitempty"` 41} 42 43// ModerationDefs_AccountStats is a "accountStats" in the tools.ozone.moderation.defs schema. 44// 45// Statistics about a particular account subject 46type ModerationDefs_AccountStats struct { 47 // appealCount: Total number of appeals against a moderation action on the account 48 AppealCount *int64 `json:"appealCount,omitempty" cborgen:"appealCount,omitempty"` 49 // escalateCount: Number of times the account was escalated 50 EscalateCount *int64 `json:"escalateCount,omitempty" cborgen:"escalateCount,omitempty"` 51 // reportCount: Total number of reports on the account 52 ReportCount *int64 `json:"reportCount,omitempty" cborgen:"reportCount,omitempty"` 53 // suspendCount: Number of times the account was suspended 54 SuspendCount *int64 `json:"suspendCount,omitempty" cborgen:"suspendCount,omitempty"` 55 // takedownCount: Number of times the account was taken down 56 TakedownCount *int64 `json:"takedownCount,omitempty" cborgen:"takedownCount,omitempty"` 57} 58 59// ModerationDefs_BlobView is a "blobView" in the tools.ozone.moderation.defs schema. 60type ModerationDefs_BlobView struct { 61 Cid string `json:"cid" cborgen:"cid"` 62 CreatedAt string `json:"createdAt" cborgen:"createdAt"` 63 Details *ModerationDefs_BlobView_Details `json:"details,omitempty" cborgen:"details,omitempty"` 64 MimeType string `json:"mimeType" cborgen:"mimeType"` 65 Moderation *ModerationDefs_Moderation `json:"moderation,omitempty" cborgen:"moderation,omitempty"` 66 Size int64 `json:"size" cborgen:"size"` 67} 68 69type ModerationDefs_BlobView_Details struct { 70 ModerationDefs_ImageDetails *ModerationDefs_ImageDetails 71 ModerationDefs_VideoDetails *ModerationDefs_VideoDetails 72} 73 74func (t *ModerationDefs_BlobView_Details) MarshalJSON() ([]byte, error) { 75 if t.ModerationDefs_ImageDetails != nil { 76 t.ModerationDefs_ImageDetails.LexiconTypeID = "tools.ozone.moderation.defs#imageDetails" 77 return json.Marshal(t.ModerationDefs_ImageDetails) 78 } 79 if t.ModerationDefs_VideoDetails != nil { 80 t.ModerationDefs_VideoDetails.LexiconTypeID = "tools.ozone.moderation.defs#videoDetails" 81 return json.Marshal(t.ModerationDefs_VideoDetails) 82 } 83 return nil, fmt.Errorf("cannot marshal empty enum") 84} 85func (t *ModerationDefs_BlobView_Details) UnmarshalJSON(b []byte) error { 86 typ, err := util.TypeExtract(b) 87 if err != nil { 88 return err 89 } 90 91 switch typ { 92 case "tools.ozone.moderation.defs#imageDetails": 93 t.ModerationDefs_ImageDetails = new(ModerationDefs_ImageDetails) 94 return json.Unmarshal(b, t.ModerationDefs_ImageDetails) 95 case "tools.ozone.moderation.defs#videoDetails": 96 t.ModerationDefs_VideoDetails = new(ModerationDefs_VideoDetails) 97 return json.Unmarshal(b, t.ModerationDefs_VideoDetails) 98 99 default: 100 return nil 101 } 102} 103 104// ModerationDefs_IdentityEvent is a "identityEvent" in the tools.ozone.moderation.defs schema. 105// 106// Logs identity related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. 107// 108// RECORDTYPE: ModerationDefs_IdentityEvent 109type ModerationDefs_IdentityEvent struct { 110 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#identityEvent" cborgen:"$type,const=tools.ozone.moderation.defs#identityEvent"` 111 Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 112 Handle *string `json:"handle,omitempty" cborgen:"handle,omitempty"` 113 PdsHost *string `json:"pdsHost,omitempty" cborgen:"pdsHost,omitempty"` 114 Timestamp string `json:"timestamp" cborgen:"timestamp"` 115 Tombstone *bool `json:"tombstone,omitempty" cborgen:"tombstone,omitempty"` 116} 117 118// ModerationDefs_ImageDetails is a "imageDetails" in the tools.ozone.moderation.defs schema. 119// 120// RECORDTYPE: ModerationDefs_ImageDetails 121type ModerationDefs_ImageDetails struct { 122 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#imageDetails" cborgen:"$type,const=tools.ozone.moderation.defs#imageDetails"` 123 Height int64 `json:"height" cborgen:"height"` 124 Width int64 `json:"width" cborgen:"width"` 125} 126 127// ModerationDefs_ModEventAcknowledge is a "modEventAcknowledge" in the tools.ozone.moderation.defs schema. 128// 129// RECORDTYPE: ModerationDefs_ModEventAcknowledge 130type ModerationDefs_ModEventAcknowledge struct { 131 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventAcknowledge" cborgen:"$type,const=tools.ozone.moderation.defs#modEventAcknowledge"` 132 // acknowledgeAccountSubjects: If true, all other reports on content authored by this account will be resolved (acknowledged). 133 AcknowledgeAccountSubjects *bool `json:"acknowledgeAccountSubjects,omitempty" cborgen:"acknowledgeAccountSubjects,omitempty"` 134 Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 135} 136 137// ModerationDefs_ModEventComment is a "modEventComment" in the tools.ozone.moderation.defs schema. 138// 139// Add a comment to a subject. An empty comment will clear any previously set sticky comment. 140// 141// RECORDTYPE: ModerationDefs_ModEventComment 142type ModerationDefs_ModEventComment struct { 143 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventComment" cborgen:"$type,const=tools.ozone.moderation.defs#modEventComment"` 144 Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 145 // sticky: Make the comment persistent on the subject 146 Sticky *bool `json:"sticky,omitempty" cborgen:"sticky,omitempty"` 147} 148 149// ModerationDefs_ModEventDivert is a "modEventDivert" in the tools.ozone.moderation.defs schema. 150// 151// Divert a record's blobs to a 3rd party service for further scanning/tagging 152// 153// RECORDTYPE: ModerationDefs_ModEventDivert 154type ModerationDefs_ModEventDivert struct { 155 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventDivert" cborgen:"$type,const=tools.ozone.moderation.defs#modEventDivert"` 156 Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 157} 158 159// ModerationDefs_ModEventEmail is a "modEventEmail" in the tools.ozone.moderation.defs schema. 160// 161// # Keep a log of outgoing email to a user 162// 163// RECORDTYPE: ModerationDefs_ModEventEmail 164type ModerationDefs_ModEventEmail struct { 165 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventEmail" cborgen:"$type,const=tools.ozone.moderation.defs#modEventEmail"` 166 // comment: Additional comment about the outgoing comm. 167 Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 168 // content: The content of the email sent to the user. 169 Content *string `json:"content,omitempty" cborgen:"content,omitempty"` 170 // subjectLine: The subject line of the email sent to the user. 171 SubjectLine string `json:"subjectLine" cborgen:"subjectLine"` 172} 173 174// ModerationDefs_ModEventEscalate is a "modEventEscalate" in the tools.ozone.moderation.defs schema. 175// 176// RECORDTYPE: ModerationDefs_ModEventEscalate 177type ModerationDefs_ModEventEscalate struct { 178 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventEscalate" cborgen:"$type,const=tools.ozone.moderation.defs#modEventEscalate"` 179 Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 180} 181 182// ModerationDefs_ModEventLabel is a "modEventLabel" in the tools.ozone.moderation.defs schema. 183// 184// Apply/Negate labels on a subject 185// 186// RECORDTYPE: ModerationDefs_ModEventLabel 187type ModerationDefs_ModEventLabel struct { 188 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventLabel" cborgen:"$type,const=tools.ozone.moderation.defs#modEventLabel"` 189 Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 190 CreateLabelVals []string `json:"createLabelVals" cborgen:"createLabelVals"` 191 // durationInHours: Indicates how long the label will remain on the subject. Only applies on labels that are being added. 192 DurationInHours *int64 `json:"durationInHours,omitempty" cborgen:"durationInHours,omitempty"` 193 NegateLabelVals []string `json:"negateLabelVals" cborgen:"negateLabelVals"` 194} 195 196// ModerationDefs_ModEventMute is a "modEventMute" in the tools.ozone.moderation.defs schema. 197// 198// # Mute incoming reports on a subject 199// 200// RECORDTYPE: ModerationDefs_ModEventMute 201type ModerationDefs_ModEventMute struct { 202 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventMute" cborgen:"$type,const=tools.ozone.moderation.defs#modEventMute"` 203 Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 204 // durationInHours: Indicates how long the subject should remain muted. 205 DurationInHours int64 `json:"durationInHours" cborgen:"durationInHours"` 206} 207 208// ModerationDefs_ModEventMuteReporter is a "modEventMuteReporter" in the tools.ozone.moderation.defs schema. 209// 210// # Mute incoming reports from an account 211// 212// RECORDTYPE: ModerationDefs_ModEventMuteReporter 213type ModerationDefs_ModEventMuteReporter struct { 214 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventMuteReporter" cborgen:"$type,const=tools.ozone.moderation.defs#modEventMuteReporter"` 215 Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 216 // durationInHours: Indicates how long the account should remain muted. Falsy value here means a permanent mute. 217 DurationInHours *int64 `json:"durationInHours,omitempty" cborgen:"durationInHours,omitempty"` 218} 219 220// ModerationDefs_ModEventPriorityScore is a "modEventPriorityScore" in the tools.ozone.moderation.defs schema. 221// 222// Set priority score of the subject. Higher score means higher priority. 223// 224// RECORDTYPE: ModerationDefs_ModEventPriorityScore 225type ModerationDefs_ModEventPriorityScore struct { 226 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventPriorityScore" cborgen:"$type,const=tools.ozone.moderation.defs#modEventPriorityScore"` 227 Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 228 Score int64 `json:"score" cborgen:"score"` 229} 230 231// ModerationDefs_ModEventReport is a "modEventReport" in the tools.ozone.moderation.defs schema. 232// 233// # Report a subject 234// 235// RECORDTYPE: ModerationDefs_ModEventReport 236type ModerationDefs_ModEventReport struct { 237 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventReport" cborgen:"$type,const=tools.ozone.moderation.defs#modEventReport"` 238 Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 239 // isReporterMuted: 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. 240 IsReporterMuted *bool `json:"isReporterMuted,omitempty" cborgen:"isReporterMuted,omitempty"` 241 ReportType *string `json:"reportType" cborgen:"reportType"` 242} 243 244// ModerationDefs_ModEventResolveAppeal is a "modEventResolveAppeal" in the tools.ozone.moderation.defs schema. 245// 246// # Resolve appeal on a subject 247// 248// RECORDTYPE: ModerationDefs_ModEventResolveAppeal 249type ModerationDefs_ModEventResolveAppeal struct { 250 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventResolveAppeal" cborgen:"$type,const=tools.ozone.moderation.defs#modEventResolveAppeal"` 251 // comment: Describe resolution. 252 Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 253} 254 255// ModerationDefs_ModEventReverseTakedown is a "modEventReverseTakedown" in the tools.ozone.moderation.defs schema. 256// 257// # Revert take down action on a subject 258// 259// RECORDTYPE: ModerationDefs_ModEventReverseTakedown 260type ModerationDefs_ModEventReverseTakedown struct { 261 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventReverseTakedown" cborgen:"$type,const=tools.ozone.moderation.defs#modEventReverseTakedown"` 262 // comment: Describe reasoning behind the reversal. 263 Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 264} 265 266// ModerationDefs_ModEventTag is a "modEventTag" in the tools.ozone.moderation.defs schema. 267// 268// Add/Remove a tag on a subject 269// 270// RECORDTYPE: ModerationDefs_ModEventTag 271type ModerationDefs_ModEventTag struct { 272 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventTag" cborgen:"$type,const=tools.ozone.moderation.defs#modEventTag"` 273 // add: Tags to be added to the subject. If already exists, won't be duplicated. 274 Add []string `json:"add" cborgen:"add"` 275 // comment: Additional comment about added/removed tags. 276 Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 277 // remove: Tags to be removed to the subject. Ignores a tag If it doesn't exist, won't be duplicated. 278 Remove []string `json:"remove" cborgen:"remove"` 279} 280 281// ModerationDefs_ModEventTakedown is a "modEventTakedown" in the tools.ozone.moderation.defs schema. 282// 283// # Take down a subject permanently or temporarily 284// 285// RECORDTYPE: ModerationDefs_ModEventTakedown 286type ModerationDefs_ModEventTakedown struct { 287 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventTakedown" cborgen:"$type,const=tools.ozone.moderation.defs#modEventTakedown"` 288 // acknowledgeAccountSubjects: If true, all other reports on content authored by this account will be resolved (acknowledged). 289 AcknowledgeAccountSubjects *bool `json:"acknowledgeAccountSubjects,omitempty" cborgen:"acknowledgeAccountSubjects,omitempty"` 290 Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 291 // durationInHours: Indicates how long the takedown should be in effect before automatically expiring. 292 DurationInHours *int64 `json:"durationInHours,omitempty" cborgen:"durationInHours,omitempty"` 293 // policies: Names/Keywords of the policies that drove the decision. 294 Policies []string `json:"policies,omitempty" cborgen:"policies,omitempty"` 295} 296 297// ModerationDefs_ModEventUnmute is a "modEventUnmute" in the tools.ozone.moderation.defs schema. 298// 299// # Unmute action on a subject 300// 301// RECORDTYPE: ModerationDefs_ModEventUnmute 302type ModerationDefs_ModEventUnmute struct { 303 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventUnmute" cborgen:"$type,const=tools.ozone.moderation.defs#modEventUnmute"` 304 // comment: Describe reasoning behind the reversal. 305 Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 306} 307 308// ModerationDefs_ModEventUnmuteReporter is a "modEventUnmuteReporter" in the tools.ozone.moderation.defs schema. 309// 310// # Unmute incoming reports from an account 311// 312// RECORDTYPE: ModerationDefs_ModEventUnmuteReporter 313type ModerationDefs_ModEventUnmuteReporter struct { 314 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#modEventUnmuteReporter" cborgen:"$type,const=tools.ozone.moderation.defs#modEventUnmuteReporter"` 315 // comment: Describe reasoning behind the reversal. 316 Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 317} 318 319// ModerationDefs_ModEventView is a "modEventView" in the tools.ozone.moderation.defs schema. 320type ModerationDefs_ModEventView struct { 321 CreatedAt string `json:"createdAt" cborgen:"createdAt"` 322 CreatedBy string `json:"createdBy" cborgen:"createdBy"` 323 CreatorHandle *string `json:"creatorHandle,omitempty" cborgen:"creatorHandle,omitempty"` 324 Event *ModerationDefs_ModEventView_Event `json:"event" cborgen:"event"` 325 Id int64 `json:"id" cborgen:"id"` 326 Subject *ModerationDefs_ModEventView_Subject `json:"subject" cborgen:"subject"` 327 SubjectBlobCids []string `json:"subjectBlobCids" cborgen:"subjectBlobCids"` 328 SubjectHandle *string `json:"subjectHandle,omitempty" cborgen:"subjectHandle,omitempty"` 329} 330 331// ModerationDefs_ModEventViewDetail is a "modEventViewDetail" in the tools.ozone.moderation.defs schema. 332type ModerationDefs_ModEventViewDetail struct { 333 CreatedAt string `json:"createdAt" cborgen:"createdAt"` 334 CreatedBy string `json:"createdBy" cborgen:"createdBy"` 335 Event *ModerationDefs_ModEventViewDetail_Event `json:"event" cborgen:"event"` 336 Id int64 `json:"id" cborgen:"id"` 337 Subject *ModerationDefs_ModEventViewDetail_Subject `json:"subject" cborgen:"subject"` 338 SubjectBlobs []*ModerationDefs_BlobView `json:"subjectBlobs" cborgen:"subjectBlobs"` 339} 340 341type ModerationDefs_ModEventViewDetail_Event struct { 342 ModerationDefs_ModEventTakedown *ModerationDefs_ModEventTakedown 343 ModerationDefs_ModEventReverseTakedown *ModerationDefs_ModEventReverseTakedown 344 ModerationDefs_ModEventComment *ModerationDefs_ModEventComment 345 ModerationDefs_ModEventReport *ModerationDefs_ModEventReport 346 ModerationDefs_ModEventLabel *ModerationDefs_ModEventLabel 347 ModerationDefs_ModEventAcknowledge *ModerationDefs_ModEventAcknowledge 348 ModerationDefs_ModEventEscalate *ModerationDefs_ModEventEscalate 349 ModerationDefs_ModEventMute *ModerationDefs_ModEventMute 350 ModerationDefs_ModEventUnmute *ModerationDefs_ModEventUnmute 351 ModerationDefs_ModEventMuteReporter *ModerationDefs_ModEventMuteReporter 352 ModerationDefs_ModEventUnmuteReporter *ModerationDefs_ModEventUnmuteReporter 353 ModerationDefs_ModEventEmail *ModerationDefs_ModEventEmail 354 ModerationDefs_ModEventResolveAppeal *ModerationDefs_ModEventResolveAppeal 355 ModerationDefs_ModEventDivert *ModerationDefs_ModEventDivert 356 ModerationDefs_ModEventTag *ModerationDefs_ModEventTag 357 ModerationDefs_AccountEvent *ModerationDefs_AccountEvent 358 ModerationDefs_IdentityEvent *ModerationDefs_IdentityEvent 359 ModerationDefs_RecordEvent *ModerationDefs_RecordEvent 360 ModerationDefs_ModEventPriorityScore *ModerationDefs_ModEventPriorityScore 361} 362 363func (t *ModerationDefs_ModEventViewDetail_Event) MarshalJSON() ([]byte, error) { 364 if t.ModerationDefs_ModEventTakedown != nil { 365 t.ModerationDefs_ModEventTakedown.LexiconTypeID = "tools.ozone.moderation.defs#modEventTakedown" 366 return json.Marshal(t.ModerationDefs_ModEventTakedown) 367 } 368 if t.ModerationDefs_ModEventReverseTakedown != nil { 369 t.ModerationDefs_ModEventReverseTakedown.LexiconTypeID = "tools.ozone.moderation.defs#modEventReverseTakedown" 370 return json.Marshal(t.ModerationDefs_ModEventReverseTakedown) 371 } 372 if t.ModerationDefs_ModEventComment != nil { 373 t.ModerationDefs_ModEventComment.LexiconTypeID = "tools.ozone.moderation.defs#modEventComment" 374 return json.Marshal(t.ModerationDefs_ModEventComment) 375 } 376 if t.ModerationDefs_ModEventReport != nil { 377 t.ModerationDefs_ModEventReport.LexiconTypeID = "tools.ozone.moderation.defs#modEventReport" 378 return json.Marshal(t.ModerationDefs_ModEventReport) 379 } 380 if t.ModerationDefs_ModEventLabel != nil { 381 t.ModerationDefs_ModEventLabel.LexiconTypeID = "tools.ozone.moderation.defs#modEventLabel" 382 return json.Marshal(t.ModerationDefs_ModEventLabel) 383 } 384 if t.ModerationDefs_ModEventAcknowledge != nil { 385 t.ModerationDefs_ModEventAcknowledge.LexiconTypeID = "tools.ozone.moderation.defs#modEventAcknowledge" 386 return json.Marshal(t.ModerationDefs_ModEventAcknowledge) 387 } 388 if t.ModerationDefs_ModEventEscalate != nil { 389 t.ModerationDefs_ModEventEscalate.LexiconTypeID = "tools.ozone.moderation.defs#modEventEscalate" 390 return json.Marshal(t.ModerationDefs_ModEventEscalate) 391 } 392 if t.ModerationDefs_ModEventMute != nil { 393 t.ModerationDefs_ModEventMute.LexiconTypeID = "tools.ozone.moderation.defs#modEventMute" 394 return json.Marshal(t.ModerationDefs_ModEventMute) 395 } 396 if t.ModerationDefs_ModEventUnmute != nil { 397 t.ModerationDefs_ModEventUnmute.LexiconTypeID = "tools.ozone.moderation.defs#modEventUnmute" 398 return json.Marshal(t.ModerationDefs_ModEventUnmute) 399 } 400 if t.ModerationDefs_ModEventMuteReporter != nil { 401 t.ModerationDefs_ModEventMuteReporter.LexiconTypeID = "tools.ozone.moderation.defs#modEventMuteReporter" 402 return json.Marshal(t.ModerationDefs_ModEventMuteReporter) 403 } 404 if t.ModerationDefs_ModEventUnmuteReporter != nil { 405 t.ModerationDefs_ModEventUnmuteReporter.LexiconTypeID = "tools.ozone.moderation.defs#modEventUnmuteReporter" 406 return json.Marshal(t.ModerationDefs_ModEventUnmuteReporter) 407 } 408 if t.ModerationDefs_ModEventEmail != nil { 409 t.ModerationDefs_ModEventEmail.LexiconTypeID = "tools.ozone.moderation.defs#modEventEmail" 410 return json.Marshal(t.ModerationDefs_ModEventEmail) 411 } 412 if t.ModerationDefs_ModEventResolveAppeal != nil { 413 t.ModerationDefs_ModEventResolveAppeal.LexiconTypeID = "tools.ozone.moderation.defs#modEventResolveAppeal" 414 return json.Marshal(t.ModerationDefs_ModEventResolveAppeal) 415 } 416 if t.ModerationDefs_ModEventDivert != nil { 417 t.ModerationDefs_ModEventDivert.LexiconTypeID = "tools.ozone.moderation.defs#modEventDivert" 418 return json.Marshal(t.ModerationDefs_ModEventDivert) 419 } 420 if t.ModerationDefs_ModEventTag != nil { 421 t.ModerationDefs_ModEventTag.LexiconTypeID = "tools.ozone.moderation.defs#modEventTag" 422 return json.Marshal(t.ModerationDefs_ModEventTag) 423 } 424 if t.ModerationDefs_AccountEvent != nil { 425 t.ModerationDefs_AccountEvent.LexiconTypeID = "tools.ozone.moderation.defs#accountEvent" 426 return json.Marshal(t.ModerationDefs_AccountEvent) 427 } 428 if t.ModerationDefs_IdentityEvent != nil { 429 t.ModerationDefs_IdentityEvent.LexiconTypeID = "tools.ozone.moderation.defs#identityEvent" 430 return json.Marshal(t.ModerationDefs_IdentityEvent) 431 } 432 if t.ModerationDefs_RecordEvent != nil { 433 t.ModerationDefs_RecordEvent.LexiconTypeID = "tools.ozone.moderation.defs#recordEvent" 434 return json.Marshal(t.ModerationDefs_RecordEvent) 435 } 436 if t.ModerationDefs_ModEventPriorityScore != nil { 437 t.ModerationDefs_ModEventPriorityScore.LexiconTypeID = "tools.ozone.moderation.defs#modEventPriorityScore" 438 return json.Marshal(t.ModerationDefs_ModEventPriorityScore) 439 } 440 return nil, fmt.Errorf("cannot marshal empty enum") 441} 442func (t *ModerationDefs_ModEventViewDetail_Event) UnmarshalJSON(b []byte) error { 443 typ, err := util.TypeExtract(b) 444 if err != nil { 445 return err 446 } 447 448 switch typ { 449 case "tools.ozone.moderation.defs#modEventTakedown": 450 t.ModerationDefs_ModEventTakedown = new(ModerationDefs_ModEventTakedown) 451 return json.Unmarshal(b, t.ModerationDefs_ModEventTakedown) 452 case "tools.ozone.moderation.defs#modEventReverseTakedown": 453 t.ModerationDefs_ModEventReverseTakedown = new(ModerationDefs_ModEventReverseTakedown) 454 return json.Unmarshal(b, t.ModerationDefs_ModEventReverseTakedown) 455 case "tools.ozone.moderation.defs#modEventComment": 456 t.ModerationDefs_ModEventComment = new(ModerationDefs_ModEventComment) 457 return json.Unmarshal(b, t.ModerationDefs_ModEventComment) 458 case "tools.ozone.moderation.defs#modEventReport": 459 t.ModerationDefs_ModEventReport = new(ModerationDefs_ModEventReport) 460 return json.Unmarshal(b, t.ModerationDefs_ModEventReport) 461 case "tools.ozone.moderation.defs#modEventLabel": 462 t.ModerationDefs_ModEventLabel = new(ModerationDefs_ModEventLabel) 463 return json.Unmarshal(b, t.ModerationDefs_ModEventLabel) 464 case "tools.ozone.moderation.defs#modEventAcknowledge": 465 t.ModerationDefs_ModEventAcknowledge = new(ModerationDefs_ModEventAcknowledge) 466 return json.Unmarshal(b, t.ModerationDefs_ModEventAcknowledge) 467 case "tools.ozone.moderation.defs#modEventEscalate": 468 t.ModerationDefs_ModEventEscalate = new(ModerationDefs_ModEventEscalate) 469 return json.Unmarshal(b, t.ModerationDefs_ModEventEscalate) 470 case "tools.ozone.moderation.defs#modEventMute": 471 t.ModerationDefs_ModEventMute = new(ModerationDefs_ModEventMute) 472 return json.Unmarshal(b, t.ModerationDefs_ModEventMute) 473 case "tools.ozone.moderation.defs#modEventUnmute": 474 t.ModerationDefs_ModEventUnmute = new(ModerationDefs_ModEventUnmute) 475 return json.Unmarshal(b, t.ModerationDefs_ModEventUnmute) 476 case "tools.ozone.moderation.defs#modEventMuteReporter": 477 t.ModerationDefs_ModEventMuteReporter = new(ModerationDefs_ModEventMuteReporter) 478 return json.Unmarshal(b, t.ModerationDefs_ModEventMuteReporter) 479 case "tools.ozone.moderation.defs#modEventUnmuteReporter": 480 t.ModerationDefs_ModEventUnmuteReporter = new(ModerationDefs_ModEventUnmuteReporter) 481 return json.Unmarshal(b, t.ModerationDefs_ModEventUnmuteReporter) 482 case "tools.ozone.moderation.defs#modEventEmail": 483 t.ModerationDefs_ModEventEmail = new(ModerationDefs_ModEventEmail) 484 return json.Unmarshal(b, t.ModerationDefs_ModEventEmail) 485 case "tools.ozone.moderation.defs#modEventResolveAppeal": 486 t.ModerationDefs_ModEventResolveAppeal = new(ModerationDefs_ModEventResolveAppeal) 487 return json.Unmarshal(b, t.ModerationDefs_ModEventResolveAppeal) 488 case "tools.ozone.moderation.defs#modEventDivert": 489 t.ModerationDefs_ModEventDivert = new(ModerationDefs_ModEventDivert) 490 return json.Unmarshal(b, t.ModerationDefs_ModEventDivert) 491 case "tools.ozone.moderation.defs#modEventTag": 492 t.ModerationDefs_ModEventTag = new(ModerationDefs_ModEventTag) 493 return json.Unmarshal(b, t.ModerationDefs_ModEventTag) 494 case "tools.ozone.moderation.defs#accountEvent": 495 t.ModerationDefs_AccountEvent = new(ModerationDefs_AccountEvent) 496 return json.Unmarshal(b, t.ModerationDefs_AccountEvent) 497 case "tools.ozone.moderation.defs#identityEvent": 498 t.ModerationDefs_IdentityEvent = new(ModerationDefs_IdentityEvent) 499 return json.Unmarshal(b, t.ModerationDefs_IdentityEvent) 500 case "tools.ozone.moderation.defs#recordEvent": 501 t.ModerationDefs_RecordEvent = new(ModerationDefs_RecordEvent) 502 return json.Unmarshal(b, t.ModerationDefs_RecordEvent) 503 case "tools.ozone.moderation.defs#modEventPriorityScore": 504 t.ModerationDefs_ModEventPriorityScore = new(ModerationDefs_ModEventPriorityScore) 505 return json.Unmarshal(b, t.ModerationDefs_ModEventPriorityScore) 506 507 default: 508 return nil 509 } 510} 511 512type ModerationDefs_ModEventViewDetail_Subject struct { 513 ModerationDefs_RepoView *ModerationDefs_RepoView 514 ModerationDefs_RepoViewNotFound *ModerationDefs_RepoViewNotFound 515 ModerationDefs_RecordView *ModerationDefs_RecordView 516 ModerationDefs_RecordViewNotFound *ModerationDefs_RecordViewNotFound 517} 518 519func (t *ModerationDefs_ModEventViewDetail_Subject) MarshalJSON() ([]byte, error) { 520 if t.ModerationDefs_RepoView != nil { 521 t.ModerationDefs_RepoView.LexiconTypeID = "tools.ozone.moderation.defs#repoView" 522 return json.Marshal(t.ModerationDefs_RepoView) 523 } 524 if t.ModerationDefs_RepoViewNotFound != nil { 525 t.ModerationDefs_RepoViewNotFound.LexiconTypeID = "tools.ozone.moderation.defs#repoViewNotFound" 526 return json.Marshal(t.ModerationDefs_RepoViewNotFound) 527 } 528 if t.ModerationDefs_RecordView != nil { 529 t.ModerationDefs_RecordView.LexiconTypeID = "tools.ozone.moderation.defs#recordView" 530 return json.Marshal(t.ModerationDefs_RecordView) 531 } 532 if t.ModerationDefs_RecordViewNotFound != nil { 533 t.ModerationDefs_RecordViewNotFound.LexiconTypeID = "tools.ozone.moderation.defs#recordViewNotFound" 534 return json.Marshal(t.ModerationDefs_RecordViewNotFound) 535 } 536 return nil, fmt.Errorf("cannot marshal empty enum") 537} 538func (t *ModerationDefs_ModEventViewDetail_Subject) UnmarshalJSON(b []byte) error { 539 typ, err := util.TypeExtract(b) 540 if err != nil { 541 return err 542 } 543 544 switch typ { 545 case "tools.ozone.moderation.defs#repoView": 546 t.ModerationDefs_RepoView = new(ModerationDefs_RepoView) 547 return json.Unmarshal(b, t.ModerationDefs_RepoView) 548 case "tools.ozone.moderation.defs#repoViewNotFound": 549 t.ModerationDefs_RepoViewNotFound = new(ModerationDefs_RepoViewNotFound) 550 return json.Unmarshal(b, t.ModerationDefs_RepoViewNotFound) 551 case "tools.ozone.moderation.defs#recordView": 552 t.ModerationDefs_RecordView = new(ModerationDefs_RecordView) 553 return json.Unmarshal(b, t.ModerationDefs_RecordView) 554 case "tools.ozone.moderation.defs#recordViewNotFound": 555 t.ModerationDefs_RecordViewNotFound = new(ModerationDefs_RecordViewNotFound) 556 return json.Unmarshal(b, t.ModerationDefs_RecordViewNotFound) 557 558 default: 559 return nil 560 } 561} 562 563type ModerationDefs_ModEventView_Event struct { 564 ModerationDefs_ModEventTakedown *ModerationDefs_ModEventTakedown 565 ModerationDefs_ModEventReverseTakedown *ModerationDefs_ModEventReverseTakedown 566 ModerationDefs_ModEventComment *ModerationDefs_ModEventComment 567 ModerationDefs_ModEventReport *ModerationDefs_ModEventReport 568 ModerationDefs_ModEventLabel *ModerationDefs_ModEventLabel 569 ModerationDefs_ModEventAcknowledge *ModerationDefs_ModEventAcknowledge 570 ModerationDefs_ModEventEscalate *ModerationDefs_ModEventEscalate 571 ModerationDefs_ModEventMute *ModerationDefs_ModEventMute 572 ModerationDefs_ModEventUnmute *ModerationDefs_ModEventUnmute 573 ModerationDefs_ModEventMuteReporter *ModerationDefs_ModEventMuteReporter 574 ModerationDefs_ModEventUnmuteReporter *ModerationDefs_ModEventUnmuteReporter 575 ModerationDefs_ModEventEmail *ModerationDefs_ModEventEmail 576 ModerationDefs_ModEventResolveAppeal *ModerationDefs_ModEventResolveAppeal 577 ModerationDefs_ModEventDivert *ModerationDefs_ModEventDivert 578 ModerationDefs_ModEventTag *ModerationDefs_ModEventTag 579 ModerationDefs_AccountEvent *ModerationDefs_AccountEvent 580 ModerationDefs_IdentityEvent *ModerationDefs_IdentityEvent 581 ModerationDefs_RecordEvent *ModerationDefs_RecordEvent 582 ModerationDefs_ModEventPriorityScore *ModerationDefs_ModEventPriorityScore 583} 584 585func (t *ModerationDefs_ModEventView_Event) MarshalJSON() ([]byte, error) { 586 if t.ModerationDefs_ModEventTakedown != nil { 587 t.ModerationDefs_ModEventTakedown.LexiconTypeID = "tools.ozone.moderation.defs#modEventTakedown" 588 return json.Marshal(t.ModerationDefs_ModEventTakedown) 589 } 590 if t.ModerationDefs_ModEventReverseTakedown != nil { 591 t.ModerationDefs_ModEventReverseTakedown.LexiconTypeID = "tools.ozone.moderation.defs#modEventReverseTakedown" 592 return json.Marshal(t.ModerationDefs_ModEventReverseTakedown) 593 } 594 if t.ModerationDefs_ModEventComment != nil { 595 t.ModerationDefs_ModEventComment.LexiconTypeID = "tools.ozone.moderation.defs#modEventComment" 596 return json.Marshal(t.ModerationDefs_ModEventComment) 597 } 598 if t.ModerationDefs_ModEventReport != nil { 599 t.ModerationDefs_ModEventReport.LexiconTypeID = "tools.ozone.moderation.defs#modEventReport" 600 return json.Marshal(t.ModerationDefs_ModEventReport) 601 } 602 if t.ModerationDefs_ModEventLabel != nil { 603 t.ModerationDefs_ModEventLabel.LexiconTypeID = "tools.ozone.moderation.defs#modEventLabel" 604 return json.Marshal(t.ModerationDefs_ModEventLabel) 605 } 606 if t.ModerationDefs_ModEventAcknowledge != nil { 607 t.ModerationDefs_ModEventAcknowledge.LexiconTypeID = "tools.ozone.moderation.defs#modEventAcknowledge" 608 return json.Marshal(t.ModerationDefs_ModEventAcknowledge) 609 } 610 if t.ModerationDefs_ModEventEscalate != nil { 611 t.ModerationDefs_ModEventEscalate.LexiconTypeID = "tools.ozone.moderation.defs#modEventEscalate" 612 return json.Marshal(t.ModerationDefs_ModEventEscalate) 613 } 614 if t.ModerationDefs_ModEventMute != nil { 615 t.ModerationDefs_ModEventMute.LexiconTypeID = "tools.ozone.moderation.defs#modEventMute" 616 return json.Marshal(t.ModerationDefs_ModEventMute) 617 } 618 if t.ModerationDefs_ModEventUnmute != nil { 619 t.ModerationDefs_ModEventUnmute.LexiconTypeID = "tools.ozone.moderation.defs#modEventUnmute" 620 return json.Marshal(t.ModerationDefs_ModEventUnmute) 621 } 622 if t.ModerationDefs_ModEventMuteReporter != nil { 623 t.ModerationDefs_ModEventMuteReporter.LexiconTypeID = "tools.ozone.moderation.defs#modEventMuteReporter" 624 return json.Marshal(t.ModerationDefs_ModEventMuteReporter) 625 } 626 if t.ModerationDefs_ModEventUnmuteReporter != nil { 627 t.ModerationDefs_ModEventUnmuteReporter.LexiconTypeID = "tools.ozone.moderation.defs#modEventUnmuteReporter" 628 return json.Marshal(t.ModerationDefs_ModEventUnmuteReporter) 629 } 630 if t.ModerationDefs_ModEventEmail != nil { 631 t.ModerationDefs_ModEventEmail.LexiconTypeID = "tools.ozone.moderation.defs#modEventEmail" 632 return json.Marshal(t.ModerationDefs_ModEventEmail) 633 } 634 if t.ModerationDefs_ModEventResolveAppeal != nil { 635 t.ModerationDefs_ModEventResolveAppeal.LexiconTypeID = "tools.ozone.moderation.defs#modEventResolveAppeal" 636 return json.Marshal(t.ModerationDefs_ModEventResolveAppeal) 637 } 638 if t.ModerationDefs_ModEventDivert != nil { 639 t.ModerationDefs_ModEventDivert.LexiconTypeID = "tools.ozone.moderation.defs#modEventDivert" 640 return json.Marshal(t.ModerationDefs_ModEventDivert) 641 } 642 if t.ModerationDefs_ModEventTag != nil { 643 t.ModerationDefs_ModEventTag.LexiconTypeID = "tools.ozone.moderation.defs#modEventTag" 644 return json.Marshal(t.ModerationDefs_ModEventTag) 645 } 646 if t.ModerationDefs_AccountEvent != nil { 647 t.ModerationDefs_AccountEvent.LexiconTypeID = "tools.ozone.moderation.defs#accountEvent" 648 return json.Marshal(t.ModerationDefs_AccountEvent) 649 } 650 if t.ModerationDefs_IdentityEvent != nil { 651 t.ModerationDefs_IdentityEvent.LexiconTypeID = "tools.ozone.moderation.defs#identityEvent" 652 return json.Marshal(t.ModerationDefs_IdentityEvent) 653 } 654 if t.ModerationDefs_RecordEvent != nil { 655 t.ModerationDefs_RecordEvent.LexiconTypeID = "tools.ozone.moderation.defs#recordEvent" 656 return json.Marshal(t.ModerationDefs_RecordEvent) 657 } 658 if t.ModerationDefs_ModEventPriorityScore != nil { 659 t.ModerationDefs_ModEventPriorityScore.LexiconTypeID = "tools.ozone.moderation.defs#modEventPriorityScore" 660 return json.Marshal(t.ModerationDefs_ModEventPriorityScore) 661 } 662 return nil, fmt.Errorf("cannot marshal empty enum") 663} 664func (t *ModerationDefs_ModEventView_Event) UnmarshalJSON(b []byte) error { 665 typ, err := util.TypeExtract(b) 666 if err != nil { 667 return err 668 } 669 670 switch typ { 671 case "tools.ozone.moderation.defs#modEventTakedown": 672 t.ModerationDefs_ModEventTakedown = new(ModerationDefs_ModEventTakedown) 673 return json.Unmarshal(b, t.ModerationDefs_ModEventTakedown) 674 case "tools.ozone.moderation.defs#modEventReverseTakedown": 675 t.ModerationDefs_ModEventReverseTakedown = new(ModerationDefs_ModEventReverseTakedown) 676 return json.Unmarshal(b, t.ModerationDefs_ModEventReverseTakedown) 677 case "tools.ozone.moderation.defs#modEventComment": 678 t.ModerationDefs_ModEventComment = new(ModerationDefs_ModEventComment) 679 return json.Unmarshal(b, t.ModerationDefs_ModEventComment) 680 case "tools.ozone.moderation.defs#modEventReport": 681 t.ModerationDefs_ModEventReport = new(ModerationDefs_ModEventReport) 682 return json.Unmarshal(b, t.ModerationDefs_ModEventReport) 683 case "tools.ozone.moderation.defs#modEventLabel": 684 t.ModerationDefs_ModEventLabel = new(ModerationDefs_ModEventLabel) 685 return json.Unmarshal(b, t.ModerationDefs_ModEventLabel) 686 case "tools.ozone.moderation.defs#modEventAcknowledge": 687 t.ModerationDefs_ModEventAcknowledge = new(ModerationDefs_ModEventAcknowledge) 688 return json.Unmarshal(b, t.ModerationDefs_ModEventAcknowledge) 689 case "tools.ozone.moderation.defs#modEventEscalate": 690 t.ModerationDefs_ModEventEscalate = new(ModerationDefs_ModEventEscalate) 691 return json.Unmarshal(b, t.ModerationDefs_ModEventEscalate) 692 case "tools.ozone.moderation.defs#modEventMute": 693 t.ModerationDefs_ModEventMute = new(ModerationDefs_ModEventMute) 694 return json.Unmarshal(b, t.ModerationDefs_ModEventMute) 695 case "tools.ozone.moderation.defs#modEventUnmute": 696 t.ModerationDefs_ModEventUnmute = new(ModerationDefs_ModEventUnmute) 697 return json.Unmarshal(b, t.ModerationDefs_ModEventUnmute) 698 case "tools.ozone.moderation.defs#modEventMuteReporter": 699 t.ModerationDefs_ModEventMuteReporter = new(ModerationDefs_ModEventMuteReporter) 700 return json.Unmarshal(b, t.ModerationDefs_ModEventMuteReporter) 701 case "tools.ozone.moderation.defs#modEventUnmuteReporter": 702 t.ModerationDefs_ModEventUnmuteReporter = new(ModerationDefs_ModEventUnmuteReporter) 703 return json.Unmarshal(b, t.ModerationDefs_ModEventUnmuteReporter) 704 case "tools.ozone.moderation.defs#modEventEmail": 705 t.ModerationDefs_ModEventEmail = new(ModerationDefs_ModEventEmail) 706 return json.Unmarshal(b, t.ModerationDefs_ModEventEmail) 707 case "tools.ozone.moderation.defs#modEventResolveAppeal": 708 t.ModerationDefs_ModEventResolveAppeal = new(ModerationDefs_ModEventResolveAppeal) 709 return json.Unmarshal(b, t.ModerationDefs_ModEventResolveAppeal) 710 case "tools.ozone.moderation.defs#modEventDivert": 711 t.ModerationDefs_ModEventDivert = new(ModerationDefs_ModEventDivert) 712 return json.Unmarshal(b, t.ModerationDefs_ModEventDivert) 713 case "tools.ozone.moderation.defs#modEventTag": 714 t.ModerationDefs_ModEventTag = new(ModerationDefs_ModEventTag) 715 return json.Unmarshal(b, t.ModerationDefs_ModEventTag) 716 case "tools.ozone.moderation.defs#accountEvent": 717 t.ModerationDefs_AccountEvent = new(ModerationDefs_AccountEvent) 718 return json.Unmarshal(b, t.ModerationDefs_AccountEvent) 719 case "tools.ozone.moderation.defs#identityEvent": 720 t.ModerationDefs_IdentityEvent = new(ModerationDefs_IdentityEvent) 721 return json.Unmarshal(b, t.ModerationDefs_IdentityEvent) 722 case "tools.ozone.moderation.defs#recordEvent": 723 t.ModerationDefs_RecordEvent = new(ModerationDefs_RecordEvent) 724 return json.Unmarshal(b, t.ModerationDefs_RecordEvent) 725 case "tools.ozone.moderation.defs#modEventPriorityScore": 726 t.ModerationDefs_ModEventPriorityScore = new(ModerationDefs_ModEventPriorityScore) 727 return json.Unmarshal(b, t.ModerationDefs_ModEventPriorityScore) 728 729 default: 730 return nil 731 } 732} 733 734type ModerationDefs_ModEventView_Subject struct { 735 AdminDefs_RepoRef *comatprototypes.AdminDefs_RepoRef 736 RepoStrongRef *comatprototypes.RepoStrongRef 737 ConvoDefs_MessageRef *chatbskytypes.ConvoDefs_MessageRef 738} 739 740func (t *ModerationDefs_ModEventView_Subject) MarshalJSON() ([]byte, error) { 741 if t.AdminDefs_RepoRef != nil { 742 t.AdminDefs_RepoRef.LexiconTypeID = "com.atproto.admin.defs#repoRef" 743 return json.Marshal(t.AdminDefs_RepoRef) 744 } 745 if t.RepoStrongRef != nil { 746 t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef" 747 return json.Marshal(t.RepoStrongRef) 748 } 749 if t.ConvoDefs_MessageRef != nil { 750 t.ConvoDefs_MessageRef.LexiconTypeID = "chat.bsky.convo.defs#messageRef" 751 return json.Marshal(t.ConvoDefs_MessageRef) 752 } 753 return nil, fmt.Errorf("cannot marshal empty enum") 754} 755func (t *ModerationDefs_ModEventView_Subject) UnmarshalJSON(b []byte) error { 756 typ, err := util.TypeExtract(b) 757 if err != nil { 758 return err 759 } 760 761 switch typ { 762 case "com.atproto.admin.defs#repoRef": 763 t.AdminDefs_RepoRef = new(comatprototypes.AdminDefs_RepoRef) 764 return json.Unmarshal(b, t.AdminDefs_RepoRef) 765 case "com.atproto.repo.strongRef": 766 t.RepoStrongRef = new(comatprototypes.RepoStrongRef) 767 return json.Unmarshal(b, t.RepoStrongRef) 768 case "chat.bsky.convo.defs#messageRef": 769 t.ConvoDefs_MessageRef = new(chatbskytypes.ConvoDefs_MessageRef) 770 return json.Unmarshal(b, t.ConvoDefs_MessageRef) 771 772 default: 773 return nil 774 } 775} 776 777// ModerationDefs_Moderation is a "moderation" in the tools.ozone.moderation.defs schema. 778type ModerationDefs_Moderation struct { 779 SubjectStatus *ModerationDefs_SubjectStatusView `json:"subjectStatus,omitempty" cborgen:"subjectStatus,omitempty"` 780} 781 782// ModerationDefs_ModerationDetail is a "moderationDetail" in the tools.ozone.moderation.defs schema. 783type ModerationDefs_ModerationDetail struct { 784 SubjectStatus *ModerationDefs_SubjectStatusView `json:"subjectStatus,omitempty" cborgen:"subjectStatus,omitempty"` 785} 786 787// ModerationDefs_RecordEvent is a "recordEvent" in the tools.ozone.moderation.defs schema. 788// 789// Logs lifecycle event on a record subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. 790// 791// RECORDTYPE: ModerationDefs_RecordEvent 792type ModerationDefs_RecordEvent struct { 793 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#recordEvent" cborgen:"$type,const=tools.ozone.moderation.defs#recordEvent"` 794 Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"` 795 Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 796 Op string `json:"op" cborgen:"op"` 797 Timestamp string `json:"timestamp" cborgen:"timestamp"` 798} 799 800// ModerationDefs_RecordHosting is a "recordHosting" in the tools.ozone.moderation.defs schema. 801// 802// RECORDTYPE: ModerationDefs_RecordHosting 803type ModerationDefs_RecordHosting struct { 804 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#recordHosting" cborgen:"$type,const=tools.ozone.moderation.defs#recordHosting"` 805 CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` 806 DeletedAt *string `json:"deletedAt,omitempty" cborgen:"deletedAt,omitempty"` 807 Status string `json:"status" cborgen:"status"` 808 UpdatedAt *string `json:"updatedAt,omitempty" cborgen:"updatedAt,omitempty"` 809} 810 811// ModerationDefs_RecordView is a "recordView" in the tools.ozone.moderation.defs schema. 812// 813// RECORDTYPE: ModerationDefs_RecordView 814type ModerationDefs_RecordView struct { 815 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#recordView" cborgen:"$type,const=tools.ozone.moderation.defs#recordView"` 816 BlobCids []string `json:"blobCids" cborgen:"blobCids"` 817 Cid string `json:"cid" cborgen:"cid"` 818 IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 819 Moderation *ModerationDefs_Moderation `json:"moderation" cborgen:"moderation"` 820 Repo *ModerationDefs_RepoView `json:"repo" cborgen:"repo"` 821 Uri string `json:"uri" cborgen:"uri"` 822 Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` 823} 824 825// ModerationDefs_RecordViewDetail is a "recordViewDetail" in the tools.ozone.moderation.defs schema. 826// 827// RECORDTYPE: ModerationDefs_RecordViewDetail 828type ModerationDefs_RecordViewDetail struct { 829 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#recordViewDetail" cborgen:"$type,const=tools.ozone.moderation.defs#recordViewDetail"` 830 Blobs []*ModerationDefs_BlobView `json:"blobs" cborgen:"blobs"` 831 Cid string `json:"cid" cborgen:"cid"` 832 IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 833 Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` 834 Moderation *ModerationDefs_ModerationDetail `json:"moderation" cborgen:"moderation"` 835 Repo *ModerationDefs_RepoView `json:"repo" cborgen:"repo"` 836 Uri string `json:"uri" cborgen:"uri"` 837 Value *util.LexiconTypeDecoder `json:"value" cborgen:"value"` 838} 839 840// ModerationDefs_RecordViewNotFound is a "recordViewNotFound" in the tools.ozone.moderation.defs schema. 841// 842// RECORDTYPE: ModerationDefs_RecordViewNotFound 843type ModerationDefs_RecordViewNotFound struct { 844 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#recordViewNotFound" cborgen:"$type,const=tools.ozone.moderation.defs#recordViewNotFound"` 845 Uri string `json:"uri" cborgen:"uri"` 846} 847 848// ModerationDefs_RecordsStats is a "recordsStats" in the tools.ozone.moderation.defs schema. 849// 850// Statistics about a set of record subject items 851type ModerationDefs_RecordsStats struct { 852 // appealedCount: Number of items that were appealed at least once 853 AppealedCount *int64 `json:"appealedCount,omitempty" cborgen:"appealedCount,omitempty"` 854 // escalatedCount: Number of items that were escalated at least once 855 EscalatedCount *int64 `json:"escalatedCount,omitempty" cborgen:"escalatedCount,omitempty"` 856 // pendingCount: Number of item currently in "reviewOpen" or "reviewEscalated" state 857 PendingCount *int64 `json:"pendingCount,omitempty" cborgen:"pendingCount,omitempty"` 858 // processedCount: Number of item currently in "reviewNone" or "reviewClosed" state 859 ProcessedCount *int64 `json:"processedCount,omitempty" cborgen:"processedCount,omitempty"` 860 // reportedCount: Number of items that were reported at least once 861 ReportedCount *int64 `json:"reportedCount,omitempty" cborgen:"reportedCount,omitempty"` 862 // subjectCount: Total number of item in the set 863 SubjectCount *int64 `json:"subjectCount,omitempty" cborgen:"subjectCount,omitempty"` 864 // takendownCount: Number of item currently taken down 865 TakendownCount *int64 `json:"takendownCount,omitempty" cborgen:"takendownCount,omitempty"` 866 // totalReports: Cumulative sum of the number of reports on the items in the set 867 TotalReports *int64 `json:"totalReports,omitempty" cborgen:"totalReports,omitempty"` 868} 869 870// ModerationDefs_RepoView is a "repoView" in the tools.ozone.moderation.defs schema. 871// 872// RECORDTYPE: ModerationDefs_RepoView 873type ModerationDefs_RepoView struct { 874 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#repoView" cborgen:"$type,const=tools.ozone.moderation.defs#repoView"` 875 DeactivatedAt *string `json:"deactivatedAt,omitempty" cborgen:"deactivatedAt,omitempty"` 876 Did string `json:"did" cborgen:"did"` 877 Email *string `json:"email,omitempty" cborgen:"email,omitempty"` 878 Handle string `json:"handle" cborgen:"handle"` 879 IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 880 InviteNote *string `json:"inviteNote,omitempty" cborgen:"inviteNote,omitempty"` 881 InvitedBy *comatprototypes.ServerDefs_InviteCode `json:"invitedBy,omitempty" cborgen:"invitedBy,omitempty"` 882 InvitesDisabled *bool `json:"invitesDisabled,omitempty" cborgen:"invitesDisabled,omitempty"` 883 Moderation *ModerationDefs_Moderation `json:"moderation" cborgen:"moderation"` 884 RelatedRecords []*util.LexiconTypeDecoder `json:"relatedRecords" cborgen:"relatedRecords"` 885 ThreatSignatures []*comatprototypes.AdminDefs_ThreatSignature `json:"threatSignatures,omitempty" cborgen:"threatSignatures,omitempty"` 886} 887 888// ModerationDefs_RepoViewDetail is a "repoViewDetail" in the tools.ozone.moderation.defs schema. 889// 890// RECORDTYPE: ModerationDefs_RepoViewDetail 891type ModerationDefs_RepoViewDetail struct { 892 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#repoViewDetail" cborgen:"$type,const=tools.ozone.moderation.defs#repoViewDetail"` 893 DeactivatedAt *string `json:"deactivatedAt,omitempty" cborgen:"deactivatedAt,omitempty"` 894 Did string `json:"did" cborgen:"did"` 895 Email *string `json:"email,omitempty" cborgen:"email,omitempty"` 896 EmailConfirmedAt *string `json:"emailConfirmedAt,omitempty" cborgen:"emailConfirmedAt,omitempty"` 897 Handle string `json:"handle" cborgen:"handle"` 898 IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` 899 InviteNote *string `json:"inviteNote,omitempty" cborgen:"inviteNote,omitempty"` 900 InvitedBy *comatprototypes.ServerDefs_InviteCode `json:"invitedBy,omitempty" cborgen:"invitedBy,omitempty"` 901 Invites []*comatprototypes.ServerDefs_InviteCode `json:"invites,omitempty" cborgen:"invites,omitempty"` 902 InvitesDisabled *bool `json:"invitesDisabled,omitempty" cborgen:"invitesDisabled,omitempty"` 903 Labels []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` 904 Moderation *ModerationDefs_ModerationDetail `json:"moderation" cborgen:"moderation"` 905 RelatedRecords []*util.LexiconTypeDecoder `json:"relatedRecords" cborgen:"relatedRecords"` 906 ThreatSignatures []*comatprototypes.AdminDefs_ThreatSignature `json:"threatSignatures,omitempty" cborgen:"threatSignatures,omitempty"` 907} 908 909// ModerationDefs_RepoViewNotFound is a "repoViewNotFound" in the tools.ozone.moderation.defs schema. 910// 911// RECORDTYPE: ModerationDefs_RepoViewNotFound 912type ModerationDefs_RepoViewNotFound struct { 913 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#repoViewNotFound" cborgen:"$type,const=tools.ozone.moderation.defs#repoViewNotFound"` 914 Did string `json:"did" cborgen:"did"` 915} 916 917// ModerationDefs_ReporterStats is a "reporterStats" in the tools.ozone.moderation.defs schema. 918type ModerationDefs_ReporterStats struct { 919 // accountReportCount: The total number of reports made by the user on accounts. 920 AccountReportCount int64 `json:"accountReportCount" cborgen:"accountReportCount"` 921 Did string `json:"did" cborgen:"did"` 922 // labeledAccountCount: The total number of accounts labeled as a result of the user's reports. 923 LabeledAccountCount int64 `json:"labeledAccountCount" cborgen:"labeledAccountCount"` 924 // labeledRecordCount: The total number of records labeled as a result of the user's reports. 925 LabeledRecordCount int64 `json:"labeledRecordCount" cborgen:"labeledRecordCount"` 926 // recordReportCount: The total number of reports made by the user on records. 927 RecordReportCount int64 `json:"recordReportCount" cborgen:"recordReportCount"` 928 // reportedAccountCount: The total number of accounts reported by the user. 929 ReportedAccountCount int64 `json:"reportedAccountCount" cborgen:"reportedAccountCount"` 930 // reportedRecordCount: The total number of records reported by the user. 931 ReportedRecordCount int64 `json:"reportedRecordCount" cborgen:"reportedRecordCount"` 932 // takendownAccountCount: The total number of accounts taken down as a result of the user's reports. 933 TakendownAccountCount int64 `json:"takendownAccountCount" cborgen:"takendownAccountCount"` 934 // takendownRecordCount: The total number of records taken down as a result of the user's reports. 935 TakendownRecordCount int64 `json:"takendownRecordCount" cborgen:"takendownRecordCount"` 936} 937 938// ModerationDefs_SubjectStatusView is a "subjectStatusView" in the tools.ozone.moderation.defs schema. 939type ModerationDefs_SubjectStatusView struct { 940 // accountStats: Statistics related to the account subject 941 AccountStats *ModerationDefs_AccountStats `json:"accountStats,omitempty" cborgen:"accountStats,omitempty"` 942 // appealed: 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. 943 Appealed *bool `json:"appealed,omitempty" cborgen:"appealed,omitempty"` 944 // comment: Sticky comment on the subject. 945 Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` 946 // createdAt: Timestamp referencing the first moderation status impacting event was emitted on the subject 947 CreatedAt string `json:"createdAt" cborgen:"createdAt"` 948 Hosting *ModerationDefs_SubjectStatusView_Hosting `json:"hosting,omitempty" cborgen:"hosting,omitempty"` 949 Id int64 `json:"id" cborgen:"id"` 950 // lastAppealedAt: Timestamp referencing when the author of the subject appealed a moderation action 951 LastAppealedAt *string `json:"lastAppealedAt,omitempty" cborgen:"lastAppealedAt,omitempty"` 952 LastReportedAt *string `json:"lastReportedAt,omitempty" cborgen:"lastReportedAt,omitempty"` 953 LastReviewedAt *string `json:"lastReviewedAt,omitempty" cborgen:"lastReviewedAt,omitempty"` 954 LastReviewedBy *string `json:"lastReviewedBy,omitempty" cborgen:"lastReviewedBy,omitempty"` 955 MuteReportingUntil *string `json:"muteReportingUntil,omitempty" cborgen:"muteReportingUntil,omitempty"` 956 MuteUntil *string `json:"muteUntil,omitempty" cborgen:"muteUntil,omitempty"` 957 // priorityScore: Numeric value representing the level of priority. Higher score means higher priority. 958 PriorityScore *int64 `json:"priorityScore,omitempty" cborgen:"priorityScore,omitempty"` 959 // recordsStats: Statistics related to the record subjects authored by the subject's account 960 RecordsStats *ModerationDefs_RecordsStats `json:"recordsStats,omitempty" cborgen:"recordsStats,omitempty"` 961 ReviewState *string `json:"reviewState" cborgen:"reviewState"` 962 Subject *ModerationDefs_SubjectStatusView_Subject `json:"subject" cborgen:"subject"` 963 SubjectBlobCids []string `json:"subjectBlobCids,omitempty" cborgen:"subjectBlobCids,omitempty"` 964 SubjectRepoHandle *string `json:"subjectRepoHandle,omitempty" cborgen:"subjectRepoHandle,omitempty"` 965 SuspendUntil *string `json:"suspendUntil,omitempty" cborgen:"suspendUntil,omitempty"` 966 Tags []string `json:"tags,omitempty" cborgen:"tags,omitempty"` 967 Takendown *bool `json:"takendown,omitempty" cborgen:"takendown,omitempty"` 968 // updatedAt: Timestamp referencing when the last update was made to the moderation status of the subject 969 UpdatedAt string `json:"updatedAt" cborgen:"updatedAt"` 970} 971 972type ModerationDefs_SubjectStatusView_Hosting struct { 973 ModerationDefs_AccountHosting *ModerationDefs_AccountHosting 974 ModerationDefs_RecordHosting *ModerationDefs_RecordHosting 975} 976 977func (t *ModerationDefs_SubjectStatusView_Hosting) MarshalJSON() ([]byte, error) { 978 if t.ModerationDefs_AccountHosting != nil { 979 t.ModerationDefs_AccountHosting.LexiconTypeID = "tools.ozone.moderation.defs#accountHosting" 980 return json.Marshal(t.ModerationDefs_AccountHosting) 981 } 982 if t.ModerationDefs_RecordHosting != nil { 983 t.ModerationDefs_RecordHosting.LexiconTypeID = "tools.ozone.moderation.defs#recordHosting" 984 return json.Marshal(t.ModerationDefs_RecordHosting) 985 } 986 return nil, fmt.Errorf("cannot marshal empty enum") 987} 988func (t *ModerationDefs_SubjectStatusView_Hosting) UnmarshalJSON(b []byte) error { 989 typ, err := util.TypeExtract(b) 990 if err != nil { 991 return err 992 } 993 994 switch typ { 995 case "tools.ozone.moderation.defs#accountHosting": 996 t.ModerationDefs_AccountHosting = new(ModerationDefs_AccountHosting) 997 return json.Unmarshal(b, t.ModerationDefs_AccountHosting) 998 case "tools.ozone.moderation.defs#recordHosting": 999 t.ModerationDefs_RecordHosting = new(ModerationDefs_RecordHosting) 1000 return json.Unmarshal(b, t.ModerationDefs_RecordHosting) 1001 1002 default: 1003 return nil 1004 } 1005} 1006 1007type ModerationDefs_SubjectStatusView_Subject struct { 1008 AdminDefs_RepoRef *comatprototypes.AdminDefs_RepoRef 1009 RepoStrongRef *comatprototypes.RepoStrongRef 1010} 1011 1012func (t *ModerationDefs_SubjectStatusView_Subject) MarshalJSON() ([]byte, error) { 1013 if t.AdminDefs_RepoRef != nil { 1014 t.AdminDefs_RepoRef.LexiconTypeID = "com.atproto.admin.defs#repoRef" 1015 return json.Marshal(t.AdminDefs_RepoRef) 1016 } 1017 if t.RepoStrongRef != nil { 1018 t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef" 1019 return json.Marshal(t.RepoStrongRef) 1020 } 1021 return nil, fmt.Errorf("cannot marshal empty enum") 1022} 1023func (t *ModerationDefs_SubjectStatusView_Subject) UnmarshalJSON(b []byte) error { 1024 typ, err := util.TypeExtract(b) 1025 if err != nil { 1026 return err 1027 } 1028 1029 switch typ { 1030 case "com.atproto.admin.defs#repoRef": 1031 t.AdminDefs_RepoRef = new(comatprototypes.AdminDefs_RepoRef) 1032 return json.Unmarshal(b, t.AdminDefs_RepoRef) 1033 case "com.atproto.repo.strongRef": 1034 t.RepoStrongRef = new(comatprototypes.RepoStrongRef) 1035 return json.Unmarshal(b, t.RepoStrongRef) 1036 1037 default: 1038 return nil 1039 } 1040} 1041 1042// ModerationDefs_SubjectView is a "subjectView" in the tools.ozone.moderation.defs schema. 1043// 1044// Detailed view of a subject. For record subjects, the author's repo and profile will be returned. 1045type ModerationDefs_SubjectView struct { 1046 Profile *ModerationDefs_SubjectView_Profile `json:"profile,omitempty" cborgen:"profile,omitempty"` 1047 Record *ModerationDefs_RecordViewDetail `json:"record,omitempty" cborgen:"record,omitempty"` 1048 Repo *ModerationDefs_RepoViewDetail `json:"repo,omitempty" cborgen:"repo,omitempty"` 1049 Status *ModerationDefs_SubjectStatusView `json:"status,omitempty" cborgen:"status,omitempty"` 1050 Subject string `json:"subject" cborgen:"subject"` 1051 Type *string `json:"type" cborgen:"type"` 1052} 1053 1054// ModerationDefs_VideoDetails is a "videoDetails" in the tools.ozone.moderation.defs schema. 1055// 1056// RECORDTYPE: ModerationDefs_VideoDetails 1057type ModerationDefs_VideoDetails struct { 1058 LexiconTypeID string `json:"$type,const=tools.ozone.moderation.defs#videoDetails" cborgen:"$type,const=tools.ozone.moderation.defs#videoDetails"` 1059 Height int64 `json:"height" cborgen:"height"` 1060 Length int64 `json:"length" cborgen:"length"` 1061 Width int64 `json:"width" cborgen:"width"` 1062}