// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT. // Lexicon schema: tools.ozone.moderation.defs package ozone import ( "encoding/json" "fmt" comatproto "github.com/bluesky-social/indigo/api/atproto" chatbsky "github.com/bluesky-social/indigo/api/chat" lexutil "github.com/bluesky-social/indigo/lex/util" ) // ModerationDefs_AccountEvent is a "accountEvent" in the tools.ozone.moderation.defs schema. // // Logs account status related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. type ModerationDefs_AccountEvent struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#accountEvent"` // active: Indicates that the account has a repository which can be fetched from the host that emitted this event. Active bool `json:"active" cborgen:"active"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` Status *string `json:"status,omitempty" cborgen:"status,omitempty"` Timestamp string `json:"timestamp" cborgen:"timestamp"` } // ModerationDefs_AccountHosting is a "accountHosting" in the tools.ozone.moderation.defs schema. type ModerationDefs_AccountHosting struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#accountHosting"` CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` DeactivatedAt *string `json:"deactivatedAt,omitempty" cborgen:"deactivatedAt,omitempty"` DeletedAt *string `json:"deletedAt,omitempty" cborgen:"deletedAt,omitempty"` ReactivatedAt *string `json:"reactivatedAt,omitempty" cborgen:"reactivatedAt,omitempty"` Status string `json:"status" cborgen:"status"` UpdatedAt *string `json:"updatedAt,omitempty" cborgen:"updatedAt,omitempty"` } // ModerationDefs_AccountStats is a "accountStats" in the tools.ozone.moderation.defs schema. // // Statistics about a particular account subject type ModerationDefs_AccountStats struct { // appealCount: Total number of appeals against a moderation action on the account AppealCount *int64 `json:"appealCount,omitempty" cborgen:"appealCount,omitempty"` // escalateCount: Number of times the account was escalated EscalateCount *int64 `json:"escalateCount,omitempty" cborgen:"escalateCount,omitempty"` // reportCount: Total number of reports on the account ReportCount *int64 `json:"reportCount,omitempty" cborgen:"reportCount,omitempty"` // suspendCount: Number of times the account was suspended SuspendCount *int64 `json:"suspendCount,omitempty" cborgen:"suspendCount,omitempty"` // takedownCount: Number of times the account was taken down TakedownCount *int64 `json:"takedownCount,omitempty" cborgen:"takedownCount,omitempty"` } // ModerationDefs_AccountStrike is a "accountStrike" in the tools.ozone.moderation.defs schema. // // Strike information for an account type ModerationDefs_AccountStrike struct { // activeStrikeCount: Current number of active strikes (excluding expired strikes) ActiveStrikeCount *int64 `json:"activeStrikeCount,omitempty" cborgen:"activeStrikeCount,omitempty"` // firstStrikeAt: Timestamp of the first strike received FirstStrikeAt *string `json:"firstStrikeAt,omitempty" cborgen:"firstStrikeAt,omitempty"` // lastStrikeAt: Timestamp of the most recent strike received LastStrikeAt *string `json:"lastStrikeAt,omitempty" cborgen:"lastStrikeAt,omitempty"` // totalStrikeCount: Total number of strikes ever received (including expired strikes) TotalStrikeCount *int64 `json:"totalStrikeCount,omitempty" cborgen:"totalStrikeCount,omitempty"` } // ModerationDefs_AgeAssuranceEvent is a "ageAssuranceEvent" in the tools.ozone.moderation.defs schema. // // Age assurance info coming directly from users. Only works on DID subjects. type ModerationDefs_AgeAssuranceEvent struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#ageAssuranceEvent"` Access *string `json:"access,omitempty" cborgen:"access,omitempty"` // attemptId: The unique identifier for this instance of the age assurance flow, in UUID format. AttemptId string `json:"attemptId" cborgen:"attemptId"` // completeIp: The IP address used when completing the AA flow. CompleteIp *string `json:"completeIp,omitempty" cborgen:"completeIp,omitempty"` // completeUa: The user agent used when completing the AA flow. CompleteUa *string `json:"completeUa,omitempty" cborgen:"completeUa,omitempty"` // countryCode: The ISO 3166-1 alpha-2 country code provided when beginning the Age Assurance flow. CountryCode *string `json:"countryCode,omitempty" cborgen:"countryCode,omitempty"` // createdAt: The date and time of this write operation. CreatedAt string `json:"createdAt" cborgen:"createdAt"` // initIp: The IP address used when initiating the AA flow. InitIp *string `json:"initIp,omitempty" cborgen:"initIp,omitempty"` // initUa: The user agent used when initiating the AA flow. InitUa *string `json:"initUa,omitempty" cborgen:"initUa,omitempty"` // regionCode: The ISO 3166-2 region code provided when beginning the Age Assurance flow. RegionCode *string `json:"regionCode,omitempty" cborgen:"regionCode,omitempty"` // status: The status of the Age Assurance process. Status string `json:"status" cborgen:"status"` } // ModerationDefs_AgeAssuranceOverrideEvent is a "ageAssuranceOverrideEvent" in the tools.ozone.moderation.defs schema. // // Age assurance status override by moderators. Only works on DID subjects. type ModerationDefs_AgeAssuranceOverrideEvent struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#ageAssuranceOverrideEvent"` Access *string `json:"access,omitempty" cborgen:"access,omitempty"` // comment: Comment describing the reason for the override. Comment string `json:"comment" cborgen:"comment"` // status: 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. Status string `json:"status" cborgen:"status"` } // ModerationDefs_AgeAssurancePurgeEvent is a "ageAssurancePurgeEvent" in the tools.ozone.moderation.defs schema. // // Purges all age assurance events for the subject. Only works on DID subjects. Moderator-only. type ModerationDefs_AgeAssurancePurgeEvent struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#ageAssurancePurgeEvent"` // comment: Comment describing the reason for the purge. Comment string `json:"comment" cborgen:"comment"` } // ModerationDefs_BlobView is a "blobView" in the tools.ozone.moderation.defs schema. type ModerationDefs_BlobView struct { Cid string `json:"cid" cborgen:"cid"` CreatedAt string `json:"createdAt" cborgen:"createdAt"` Details *ModerationDefs_BlobView_Details `json:"details,omitempty" cborgen:"details,omitempty"` MimeType string `json:"mimeType" cborgen:"mimeType"` Moderation *ModerationDefs_Moderation `json:"moderation,omitempty" cborgen:"moderation,omitempty"` Size int64 `json:"size" cborgen:"size"` } type ModerationDefs_BlobView_Details struct { ModerationDefs_ImageDetails *ModerationDefs_ImageDetails ModerationDefs_VideoDetails *ModerationDefs_VideoDetails } func (t *ModerationDefs_BlobView_Details) MarshalJSON() ([]byte, error) { if t.ModerationDefs_ImageDetails != nil { t.ModerationDefs_ImageDetails.LexiconTypeID = "tools.ozone.moderation.defs#imageDetails" return json.Marshal(t.ModerationDefs_ImageDetails) } if t.ModerationDefs_VideoDetails != nil { t.ModerationDefs_VideoDetails.LexiconTypeID = "tools.ozone.moderation.defs#videoDetails" return json.Marshal(t.ModerationDefs_VideoDetails) } return nil, fmt.Errorf("can not marshal empty union as JSON") } func (t *ModerationDefs_BlobView_Details) UnmarshalJSON(b []byte) error { typ, err := lexutil.TypeExtract(b) if err != nil { return err } switch typ { case "tools.ozone.moderation.defs#imageDetails": t.ModerationDefs_ImageDetails = new(ModerationDefs_ImageDetails) return json.Unmarshal(b, t.ModerationDefs_ImageDetails) case "tools.ozone.moderation.defs#videoDetails": t.ModerationDefs_VideoDetails = new(ModerationDefs_VideoDetails) return json.Unmarshal(b, t.ModerationDefs_VideoDetails) default: return nil } } // ModerationDefs_CancelScheduledTakedownEvent is a "cancelScheduledTakedownEvent" in the tools.ozone.moderation.defs schema. // // Logs cancellation of a scheduled takedown action for an account. type ModerationDefs_CancelScheduledTakedownEvent struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#cancelScheduledTakedownEvent"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` } // ModerationDefs_ConvoView is a "convoView" in the tools.ozone.moderation.defs schema. type ModerationDefs_ConvoView struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#convoView"` ConvoId string `json:"convoId" cborgen:"convoId"` Did string `json:"did" cborgen:"did"` } // ModerationDefs_IdentityEvent is a "identityEvent" in the tools.ozone.moderation.defs schema. // // Logs identity related events on a repo subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. type ModerationDefs_IdentityEvent struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#identityEvent"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` Handle *string `json:"handle,omitempty" cborgen:"handle,omitempty"` PdsHost *string `json:"pdsHost,omitempty" cborgen:"pdsHost,omitempty"` Timestamp string `json:"timestamp" cborgen:"timestamp"` Tombstone *bool `json:"tombstone,omitempty" cborgen:"tombstone,omitempty"` } // ModerationDefs_ImageDetails is a "imageDetails" in the tools.ozone.moderation.defs schema. type ModerationDefs_ImageDetails struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#imageDetails"` Height int64 `json:"height" cborgen:"height"` Width int64 `json:"width" cborgen:"width"` } // ModerationDefs_ModEventAcknowledge is a "modEventAcknowledge" in the tools.ozone.moderation.defs schema. type ModerationDefs_ModEventAcknowledge struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventAcknowledge"` // acknowledgeAccountSubjects: If true, all other reports on content authored by this account will be resolved (acknowledged). AcknowledgeAccountSubjects *bool `json:"acknowledgeAccountSubjects,omitempty" cborgen:"acknowledgeAccountSubjects,omitempty"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` } // ModerationDefs_ModEventComment is a "modEventComment" in the tools.ozone.moderation.defs schema. // // Add a comment to a subject. An empty comment will clear any previously set sticky comment. type ModerationDefs_ModEventComment struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventComment"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` // sticky: Make the comment persistent on the subject Sticky *bool `json:"sticky,omitempty" cborgen:"sticky,omitempty"` } // ModerationDefs_ModEventDivert is a "modEventDivert" in the tools.ozone.moderation.defs schema. // // Divert a record's blobs to a 3rd party service for further scanning/tagging type ModerationDefs_ModEventDivert struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventDivert"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` } // ModerationDefs_ModEventEmail is a "modEventEmail" in the tools.ozone.moderation.defs schema. // // Keep a log of outgoing email to a user type ModerationDefs_ModEventEmail struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventEmail"` // comment: Additional comment about the outgoing comm. Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` // content: The content of the email sent to the user. Content *string `json:"content,omitempty" cborgen:"content,omitempty"` // isDelivered: Indicates whether the email was successfully delivered to the user's inbox. IsDelivered *bool `json:"isDelivered,omitempty" cborgen:"isDelivered,omitempty"` // policies: Names/Keywords of the policies that necessitated the email. Policies []string `json:"policies,omitempty" cborgen:"policies,omitempty"` // severityLevel: Severity level of the violation. Normally 'sev-1' that adds strike on repeat offense SeverityLevel *string `json:"severityLevel,omitempty" cborgen:"severityLevel,omitempty"` // strikeCount: Number of strikes to assign to the user for this violation. Normally 0 as an indicator of a warning and only added as a strike on a repeat offense. StrikeCount *int64 `json:"strikeCount,omitempty" cborgen:"strikeCount,omitempty"` // strikeExpiresAt: When the strike should expire. If not provided, the strike never expires. StrikeExpiresAt *string `json:"strikeExpiresAt,omitempty" cborgen:"strikeExpiresAt,omitempty"` // subjectLine: The subject line of the email sent to the user. SubjectLine string `json:"subjectLine" cborgen:"subjectLine"` } // ModerationDefs_ModEventEscalate is a "modEventEscalate" in the tools.ozone.moderation.defs schema. type ModerationDefs_ModEventEscalate struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventEscalate"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` } // ModerationDefs_ModEventLabel is a "modEventLabel" in the tools.ozone.moderation.defs schema. // // Apply/Negate labels on a subject type ModerationDefs_ModEventLabel struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventLabel"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` CreateLabelVals []string `json:"createLabelVals" cborgen:"createLabelVals"` // durationInHours: Indicates how long the label will remain on the subject. Only applies on labels that are being added. DurationInHours *int64 `json:"durationInHours,omitempty" cborgen:"durationInHours,omitempty"` NegateLabelVals []string `json:"negateLabelVals" cborgen:"negateLabelVals"` } // ModerationDefs_ModEventMute is a "modEventMute" in the tools.ozone.moderation.defs schema. // // Mute incoming reports on a subject type ModerationDefs_ModEventMute struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventMute"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` // durationInHours: Indicates how long the subject should remain muted. DurationInHours int64 `json:"durationInHours" cborgen:"durationInHours"` } // ModerationDefs_ModEventMuteReporter is a "modEventMuteReporter" in the tools.ozone.moderation.defs schema. // // Mute incoming reports from an account type ModerationDefs_ModEventMuteReporter struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventMuteReporter"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` // durationInHours: Indicates how long the account should remain muted. Falsy value here means a permanent mute. DurationInHours *int64 `json:"durationInHours,omitempty" cborgen:"durationInHours,omitempty"` } // ModerationDefs_ModEventPriorityScore is a "modEventPriorityScore" in the tools.ozone.moderation.defs schema. // // Set priority score of the subject. Higher score means higher priority. type ModerationDefs_ModEventPriorityScore struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventPriorityScore"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` Score int64 `json:"score" cborgen:"score"` } // ModerationDefs_ModEventReport is a "modEventReport" in the tools.ozone.moderation.defs schema. // // Report a subject type ModerationDefs_ModEventReport struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventReport"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` // 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. IsReporterMuted *bool `json:"isReporterMuted,omitempty" cborgen:"isReporterMuted,omitempty"` ReportType *string `json:"reportType" cborgen:"reportType"` } // ModerationDefs_ModEventResolveAppeal is a "modEventResolveAppeal" in the tools.ozone.moderation.defs schema. // // Resolve appeal on a subject type ModerationDefs_ModEventResolveAppeal struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventResolveAppeal"` // comment: Describe resolution. Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` } // ModerationDefs_ModEventReverseTakedown is a "modEventReverseTakedown" in the tools.ozone.moderation.defs schema. // // Revert take down action on a subject type ModerationDefs_ModEventReverseTakedown struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventReverseTakedown"` // comment: Describe reasoning behind the reversal. Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` // policies: Names/Keywords of the policy infraction for which takedown is being reversed. Policies []string `json:"policies,omitempty" cborgen:"policies,omitempty"` // severityLevel: Severity level of the violation. Usually set from the last policy infraction's severity. SeverityLevel *string `json:"severityLevel,omitempty" cborgen:"severityLevel,omitempty"` // strikeCount: Number of strikes to subtract from the user's strike count. Usually set from the last policy infraction's severity. StrikeCount *int64 `json:"strikeCount,omitempty" cborgen:"strikeCount,omitempty"` } // ModerationDefs_ModEventTag is a "modEventTag" in the tools.ozone.moderation.defs schema. // // Add/Remove a tag on a subject type ModerationDefs_ModEventTag struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventTag"` // add: Tags to be added to the subject. If already exists, won't be duplicated. Add []string `json:"add" cborgen:"add"` // comment: Additional comment about added/removed tags. Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` // durationInHours: Indicates how long the tags being added should remain before automatically being removed. Only applies to tags being added. DurationInHours *int64 `json:"durationInHours,omitempty" cborgen:"durationInHours,omitempty"` // remove: Tags to be removed to the subject. Ignores a tag If it doesn't exist, won't be duplicated. Remove []string `json:"remove" cborgen:"remove"` } // ModerationDefs_ModEventTakedown is a "modEventTakedown" in the tools.ozone.moderation.defs schema. // // Take down a subject permanently or temporarily type ModerationDefs_ModEventTakedown struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventTakedown"` // acknowledgeAccountSubjects: If true, all other reports on content authored by this account will be resolved (acknowledged). AcknowledgeAccountSubjects *bool `json:"acknowledgeAccountSubjects,omitempty" cborgen:"acknowledgeAccountSubjects,omitempty"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` // durationInHours: Indicates how long the takedown should be in effect before automatically expiring. DurationInHours *int64 `json:"durationInHours,omitempty" cborgen:"durationInHours,omitempty"` // policies: Names/Keywords of the policies that drove the decision. Policies []string `json:"policies,omitempty" cborgen:"policies,omitempty"` // severityLevel: Severity level of the violation (e.g., 'sev-0', 'sev-1', 'sev-2', etc.). SeverityLevel *string `json:"severityLevel,omitempty" cborgen:"severityLevel,omitempty"` // strikeCount: Number of strikes to assign to the user for this violation. StrikeCount *int64 `json:"strikeCount,omitempty" cborgen:"strikeCount,omitempty"` // strikeExpiresAt: When the strike should expire. If not provided, the strike never expires. StrikeExpiresAt *string `json:"strikeExpiresAt,omitempty" cborgen:"strikeExpiresAt,omitempty"` // targetServices: List of services where the takedown should be applied. If empty or not provided, takedown is applied on all configured services. TargetServices []string `json:"targetServices,omitempty" cborgen:"targetServices,omitempty"` } // ModerationDefs_ModEventUnmute is a "modEventUnmute" in the tools.ozone.moderation.defs schema. // // Unmute action on a subject type ModerationDefs_ModEventUnmute struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventUnmute"` // comment: Describe reasoning behind the reversal. Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` } // ModerationDefs_ModEventUnmuteReporter is a "modEventUnmuteReporter" in the tools.ozone.moderation.defs schema. // // Unmute incoming reports from an account type ModerationDefs_ModEventUnmuteReporter struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#modEventUnmuteReporter"` // comment: Describe reasoning behind the reversal. Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` } // ModerationDefs_ModEventView is a "modEventView" in the tools.ozone.moderation.defs schema. type ModerationDefs_ModEventView struct { CreatedAt string `json:"createdAt" cborgen:"createdAt"` CreatedBy string `json:"createdBy" cborgen:"createdBy"` CreatorHandle *string `json:"creatorHandle,omitempty" cborgen:"creatorHandle,omitempty"` Event *ModerationDefs_ModEventView_Event `json:"event" cborgen:"event"` Id int64 `json:"id" cborgen:"id"` ModTool *ModerationDefs_ModTool `json:"modTool,omitempty" cborgen:"modTool,omitempty"` Subject *ModerationDefs_ModEventView_Subject `json:"subject" cborgen:"subject"` SubjectBlobCids []string `json:"subjectBlobCids" cborgen:"subjectBlobCids"` SubjectHandle *string `json:"subjectHandle,omitempty" cborgen:"subjectHandle,omitempty"` } // ModerationDefs_ModEventViewDetail is a "modEventViewDetail" in the tools.ozone.moderation.defs schema. type ModerationDefs_ModEventViewDetail struct { CreatedAt string `json:"createdAt" cborgen:"createdAt"` CreatedBy string `json:"createdBy" cborgen:"createdBy"` Event *ModerationDefs_ModEventViewDetail_Event `json:"event" cborgen:"event"` Id int64 `json:"id" cborgen:"id"` ModTool *ModerationDefs_ModTool `json:"modTool,omitempty" cborgen:"modTool,omitempty"` Subject *ModerationDefs_ModEventViewDetail_Subject `json:"subject" cborgen:"subject"` SubjectBlobs []*ModerationDefs_BlobView `json:"subjectBlobs" cborgen:"subjectBlobs"` } type ModerationDefs_ModEventViewDetail_Event struct { ModerationDefs_ModEventTakedown *ModerationDefs_ModEventTakedown ModerationDefs_ModEventReverseTakedown *ModerationDefs_ModEventReverseTakedown ModerationDefs_ModEventComment *ModerationDefs_ModEventComment ModerationDefs_ModEventReport *ModerationDefs_ModEventReport ModerationDefs_ModEventLabel *ModerationDefs_ModEventLabel ModerationDefs_ModEventAcknowledge *ModerationDefs_ModEventAcknowledge ModerationDefs_ModEventEscalate *ModerationDefs_ModEventEscalate ModerationDefs_ModEventMute *ModerationDefs_ModEventMute ModerationDefs_ModEventUnmute *ModerationDefs_ModEventUnmute ModerationDefs_ModEventMuteReporter *ModerationDefs_ModEventMuteReporter ModerationDefs_ModEventUnmuteReporter *ModerationDefs_ModEventUnmuteReporter ModerationDefs_ModEventEmail *ModerationDefs_ModEventEmail ModerationDefs_ModEventResolveAppeal *ModerationDefs_ModEventResolveAppeal ModerationDefs_ModEventDivert *ModerationDefs_ModEventDivert ModerationDefs_ModEventTag *ModerationDefs_ModEventTag ModerationDefs_AccountEvent *ModerationDefs_AccountEvent ModerationDefs_IdentityEvent *ModerationDefs_IdentityEvent ModerationDefs_RecordEvent *ModerationDefs_RecordEvent ModerationDefs_ModEventPriorityScore *ModerationDefs_ModEventPriorityScore ModerationDefs_AgeAssuranceEvent *ModerationDefs_AgeAssuranceEvent ModerationDefs_AgeAssuranceOverrideEvent *ModerationDefs_AgeAssuranceOverrideEvent ModerationDefs_AgeAssurancePurgeEvent *ModerationDefs_AgeAssurancePurgeEvent ModerationDefs_RevokeAccountCredentialsEvent *ModerationDefs_RevokeAccountCredentialsEvent ModerationDefs_ScheduleTakedownEvent *ModerationDefs_ScheduleTakedownEvent ModerationDefs_CancelScheduledTakedownEvent *ModerationDefs_CancelScheduledTakedownEvent } func (t *ModerationDefs_ModEventViewDetail_Event) MarshalJSON() ([]byte, error) { if t.ModerationDefs_ModEventTakedown != nil { t.ModerationDefs_ModEventTakedown.LexiconTypeID = "tools.ozone.moderation.defs#modEventTakedown" return json.Marshal(t.ModerationDefs_ModEventTakedown) } if t.ModerationDefs_ModEventReverseTakedown != nil { t.ModerationDefs_ModEventReverseTakedown.LexiconTypeID = "tools.ozone.moderation.defs#modEventReverseTakedown" return json.Marshal(t.ModerationDefs_ModEventReverseTakedown) } if t.ModerationDefs_ModEventComment != nil { t.ModerationDefs_ModEventComment.LexiconTypeID = "tools.ozone.moderation.defs#modEventComment" return json.Marshal(t.ModerationDefs_ModEventComment) } if t.ModerationDefs_ModEventReport != nil { t.ModerationDefs_ModEventReport.LexiconTypeID = "tools.ozone.moderation.defs#modEventReport" return json.Marshal(t.ModerationDefs_ModEventReport) } if t.ModerationDefs_ModEventLabel != nil { t.ModerationDefs_ModEventLabel.LexiconTypeID = "tools.ozone.moderation.defs#modEventLabel" return json.Marshal(t.ModerationDefs_ModEventLabel) } if t.ModerationDefs_ModEventAcknowledge != nil { t.ModerationDefs_ModEventAcknowledge.LexiconTypeID = "tools.ozone.moderation.defs#modEventAcknowledge" return json.Marshal(t.ModerationDefs_ModEventAcknowledge) } if t.ModerationDefs_ModEventEscalate != nil { t.ModerationDefs_ModEventEscalate.LexiconTypeID = "tools.ozone.moderation.defs#modEventEscalate" return json.Marshal(t.ModerationDefs_ModEventEscalate) } if t.ModerationDefs_ModEventMute != nil { t.ModerationDefs_ModEventMute.LexiconTypeID = "tools.ozone.moderation.defs#modEventMute" return json.Marshal(t.ModerationDefs_ModEventMute) } if t.ModerationDefs_ModEventUnmute != nil { t.ModerationDefs_ModEventUnmute.LexiconTypeID = "tools.ozone.moderation.defs#modEventUnmute" return json.Marshal(t.ModerationDefs_ModEventUnmute) } if t.ModerationDefs_ModEventMuteReporter != nil { t.ModerationDefs_ModEventMuteReporter.LexiconTypeID = "tools.ozone.moderation.defs#modEventMuteReporter" return json.Marshal(t.ModerationDefs_ModEventMuteReporter) } if t.ModerationDefs_ModEventUnmuteReporter != nil { t.ModerationDefs_ModEventUnmuteReporter.LexiconTypeID = "tools.ozone.moderation.defs#modEventUnmuteReporter" return json.Marshal(t.ModerationDefs_ModEventUnmuteReporter) } if t.ModerationDefs_ModEventEmail != nil { t.ModerationDefs_ModEventEmail.LexiconTypeID = "tools.ozone.moderation.defs#modEventEmail" return json.Marshal(t.ModerationDefs_ModEventEmail) } if t.ModerationDefs_ModEventResolveAppeal != nil { t.ModerationDefs_ModEventResolveAppeal.LexiconTypeID = "tools.ozone.moderation.defs#modEventResolveAppeal" return json.Marshal(t.ModerationDefs_ModEventResolveAppeal) } if t.ModerationDefs_ModEventDivert != nil { t.ModerationDefs_ModEventDivert.LexiconTypeID = "tools.ozone.moderation.defs#modEventDivert" return json.Marshal(t.ModerationDefs_ModEventDivert) } if t.ModerationDefs_ModEventTag != nil { t.ModerationDefs_ModEventTag.LexiconTypeID = "tools.ozone.moderation.defs#modEventTag" return json.Marshal(t.ModerationDefs_ModEventTag) } if t.ModerationDefs_AccountEvent != nil { t.ModerationDefs_AccountEvent.LexiconTypeID = "tools.ozone.moderation.defs#accountEvent" return json.Marshal(t.ModerationDefs_AccountEvent) } if t.ModerationDefs_IdentityEvent != nil { t.ModerationDefs_IdentityEvent.LexiconTypeID = "tools.ozone.moderation.defs#identityEvent" return json.Marshal(t.ModerationDefs_IdentityEvent) } if t.ModerationDefs_RecordEvent != nil { t.ModerationDefs_RecordEvent.LexiconTypeID = "tools.ozone.moderation.defs#recordEvent" return json.Marshal(t.ModerationDefs_RecordEvent) } if t.ModerationDefs_ModEventPriorityScore != nil { t.ModerationDefs_ModEventPriorityScore.LexiconTypeID = "tools.ozone.moderation.defs#modEventPriorityScore" return json.Marshal(t.ModerationDefs_ModEventPriorityScore) } if t.ModerationDefs_AgeAssuranceEvent != nil { t.ModerationDefs_AgeAssuranceEvent.LexiconTypeID = "tools.ozone.moderation.defs#ageAssuranceEvent" return json.Marshal(t.ModerationDefs_AgeAssuranceEvent) } if t.ModerationDefs_AgeAssuranceOverrideEvent != nil { t.ModerationDefs_AgeAssuranceOverrideEvent.LexiconTypeID = "tools.ozone.moderation.defs#ageAssuranceOverrideEvent" return json.Marshal(t.ModerationDefs_AgeAssuranceOverrideEvent) } if t.ModerationDefs_AgeAssurancePurgeEvent != nil { t.ModerationDefs_AgeAssurancePurgeEvent.LexiconTypeID = "tools.ozone.moderation.defs#ageAssurancePurgeEvent" return json.Marshal(t.ModerationDefs_AgeAssurancePurgeEvent) } if t.ModerationDefs_RevokeAccountCredentialsEvent != nil { t.ModerationDefs_RevokeAccountCredentialsEvent.LexiconTypeID = "tools.ozone.moderation.defs#revokeAccountCredentialsEvent" return json.Marshal(t.ModerationDefs_RevokeAccountCredentialsEvent) } if t.ModerationDefs_ScheduleTakedownEvent != nil { t.ModerationDefs_ScheduleTakedownEvent.LexiconTypeID = "tools.ozone.moderation.defs#scheduleTakedownEvent" return json.Marshal(t.ModerationDefs_ScheduleTakedownEvent) } if t.ModerationDefs_CancelScheduledTakedownEvent != nil { t.ModerationDefs_CancelScheduledTakedownEvent.LexiconTypeID = "tools.ozone.moderation.defs#cancelScheduledTakedownEvent" return json.Marshal(t.ModerationDefs_CancelScheduledTakedownEvent) } return nil, fmt.Errorf("can not marshal empty union as JSON") } func (t *ModerationDefs_ModEventViewDetail_Event) UnmarshalJSON(b []byte) error { typ, err := lexutil.TypeExtract(b) if err != nil { return err } switch typ { case "tools.ozone.moderation.defs#modEventTakedown": t.ModerationDefs_ModEventTakedown = new(ModerationDefs_ModEventTakedown) return json.Unmarshal(b, t.ModerationDefs_ModEventTakedown) case "tools.ozone.moderation.defs#modEventReverseTakedown": t.ModerationDefs_ModEventReverseTakedown = new(ModerationDefs_ModEventReverseTakedown) return json.Unmarshal(b, t.ModerationDefs_ModEventReverseTakedown) case "tools.ozone.moderation.defs#modEventComment": t.ModerationDefs_ModEventComment = new(ModerationDefs_ModEventComment) return json.Unmarshal(b, t.ModerationDefs_ModEventComment) case "tools.ozone.moderation.defs#modEventReport": t.ModerationDefs_ModEventReport = new(ModerationDefs_ModEventReport) return json.Unmarshal(b, t.ModerationDefs_ModEventReport) case "tools.ozone.moderation.defs#modEventLabel": t.ModerationDefs_ModEventLabel = new(ModerationDefs_ModEventLabel) return json.Unmarshal(b, t.ModerationDefs_ModEventLabel) case "tools.ozone.moderation.defs#modEventAcknowledge": t.ModerationDefs_ModEventAcknowledge = new(ModerationDefs_ModEventAcknowledge) return json.Unmarshal(b, t.ModerationDefs_ModEventAcknowledge) case "tools.ozone.moderation.defs#modEventEscalate": t.ModerationDefs_ModEventEscalate = new(ModerationDefs_ModEventEscalate) return json.Unmarshal(b, t.ModerationDefs_ModEventEscalate) case "tools.ozone.moderation.defs#modEventMute": t.ModerationDefs_ModEventMute = new(ModerationDefs_ModEventMute) return json.Unmarshal(b, t.ModerationDefs_ModEventMute) case "tools.ozone.moderation.defs#modEventUnmute": t.ModerationDefs_ModEventUnmute = new(ModerationDefs_ModEventUnmute) return json.Unmarshal(b, t.ModerationDefs_ModEventUnmute) case "tools.ozone.moderation.defs#modEventMuteReporter": t.ModerationDefs_ModEventMuteReporter = new(ModerationDefs_ModEventMuteReporter) return json.Unmarshal(b, t.ModerationDefs_ModEventMuteReporter) case "tools.ozone.moderation.defs#modEventUnmuteReporter": t.ModerationDefs_ModEventUnmuteReporter = new(ModerationDefs_ModEventUnmuteReporter) return json.Unmarshal(b, t.ModerationDefs_ModEventUnmuteReporter) case "tools.ozone.moderation.defs#modEventEmail": t.ModerationDefs_ModEventEmail = new(ModerationDefs_ModEventEmail) return json.Unmarshal(b, t.ModerationDefs_ModEventEmail) case "tools.ozone.moderation.defs#modEventResolveAppeal": t.ModerationDefs_ModEventResolveAppeal = new(ModerationDefs_ModEventResolveAppeal) return json.Unmarshal(b, t.ModerationDefs_ModEventResolveAppeal) case "tools.ozone.moderation.defs#modEventDivert": t.ModerationDefs_ModEventDivert = new(ModerationDefs_ModEventDivert) return json.Unmarshal(b, t.ModerationDefs_ModEventDivert) case "tools.ozone.moderation.defs#modEventTag": t.ModerationDefs_ModEventTag = new(ModerationDefs_ModEventTag) return json.Unmarshal(b, t.ModerationDefs_ModEventTag) case "tools.ozone.moderation.defs#accountEvent": t.ModerationDefs_AccountEvent = new(ModerationDefs_AccountEvent) return json.Unmarshal(b, t.ModerationDefs_AccountEvent) case "tools.ozone.moderation.defs#identityEvent": t.ModerationDefs_IdentityEvent = new(ModerationDefs_IdentityEvent) return json.Unmarshal(b, t.ModerationDefs_IdentityEvent) case "tools.ozone.moderation.defs#recordEvent": t.ModerationDefs_RecordEvent = new(ModerationDefs_RecordEvent) return json.Unmarshal(b, t.ModerationDefs_RecordEvent) case "tools.ozone.moderation.defs#modEventPriorityScore": t.ModerationDefs_ModEventPriorityScore = new(ModerationDefs_ModEventPriorityScore) return json.Unmarshal(b, t.ModerationDefs_ModEventPriorityScore) case "tools.ozone.moderation.defs#ageAssuranceEvent": t.ModerationDefs_AgeAssuranceEvent = new(ModerationDefs_AgeAssuranceEvent) return json.Unmarshal(b, t.ModerationDefs_AgeAssuranceEvent) case "tools.ozone.moderation.defs#ageAssuranceOverrideEvent": t.ModerationDefs_AgeAssuranceOverrideEvent = new(ModerationDefs_AgeAssuranceOverrideEvent) return json.Unmarshal(b, t.ModerationDefs_AgeAssuranceOverrideEvent) case "tools.ozone.moderation.defs#ageAssurancePurgeEvent": t.ModerationDefs_AgeAssurancePurgeEvent = new(ModerationDefs_AgeAssurancePurgeEvent) return json.Unmarshal(b, t.ModerationDefs_AgeAssurancePurgeEvent) case "tools.ozone.moderation.defs#revokeAccountCredentialsEvent": t.ModerationDefs_RevokeAccountCredentialsEvent = new(ModerationDefs_RevokeAccountCredentialsEvent) return json.Unmarshal(b, t.ModerationDefs_RevokeAccountCredentialsEvent) case "tools.ozone.moderation.defs#scheduleTakedownEvent": t.ModerationDefs_ScheduleTakedownEvent = new(ModerationDefs_ScheduleTakedownEvent) return json.Unmarshal(b, t.ModerationDefs_ScheduleTakedownEvent) case "tools.ozone.moderation.defs#cancelScheduledTakedownEvent": t.ModerationDefs_CancelScheduledTakedownEvent = new(ModerationDefs_CancelScheduledTakedownEvent) return json.Unmarshal(b, t.ModerationDefs_CancelScheduledTakedownEvent) default: return nil } } type ModerationDefs_ModEventViewDetail_Subject struct { ModerationDefs_RepoView *ModerationDefs_RepoView ModerationDefs_RepoViewNotFound *ModerationDefs_RepoViewNotFound ModerationDefs_RecordView *ModerationDefs_RecordView ModerationDefs_RecordViewNotFound *ModerationDefs_RecordViewNotFound ModerationDefs_ConvoView *ModerationDefs_ConvoView } func (t *ModerationDefs_ModEventViewDetail_Subject) MarshalJSON() ([]byte, error) { if t.ModerationDefs_RepoView != nil { t.ModerationDefs_RepoView.LexiconTypeID = "tools.ozone.moderation.defs#repoView" return json.Marshal(t.ModerationDefs_RepoView) } if t.ModerationDefs_RepoViewNotFound != nil { t.ModerationDefs_RepoViewNotFound.LexiconTypeID = "tools.ozone.moderation.defs#repoViewNotFound" return json.Marshal(t.ModerationDefs_RepoViewNotFound) } if t.ModerationDefs_RecordView != nil { t.ModerationDefs_RecordView.LexiconTypeID = "tools.ozone.moderation.defs#recordView" return json.Marshal(t.ModerationDefs_RecordView) } if t.ModerationDefs_RecordViewNotFound != nil { t.ModerationDefs_RecordViewNotFound.LexiconTypeID = "tools.ozone.moderation.defs#recordViewNotFound" return json.Marshal(t.ModerationDefs_RecordViewNotFound) } if t.ModerationDefs_ConvoView != nil { t.ModerationDefs_ConvoView.LexiconTypeID = "tools.ozone.moderation.defs#convoView" return json.Marshal(t.ModerationDefs_ConvoView) } return nil, fmt.Errorf("can not marshal empty union as JSON") } func (t *ModerationDefs_ModEventViewDetail_Subject) UnmarshalJSON(b []byte) error { typ, err := lexutil.TypeExtract(b) if err != nil { return err } switch typ { case "tools.ozone.moderation.defs#repoView": t.ModerationDefs_RepoView = new(ModerationDefs_RepoView) return json.Unmarshal(b, t.ModerationDefs_RepoView) case "tools.ozone.moderation.defs#repoViewNotFound": t.ModerationDefs_RepoViewNotFound = new(ModerationDefs_RepoViewNotFound) return json.Unmarshal(b, t.ModerationDefs_RepoViewNotFound) case "tools.ozone.moderation.defs#recordView": t.ModerationDefs_RecordView = new(ModerationDefs_RecordView) return json.Unmarshal(b, t.ModerationDefs_RecordView) case "tools.ozone.moderation.defs#recordViewNotFound": t.ModerationDefs_RecordViewNotFound = new(ModerationDefs_RecordViewNotFound) return json.Unmarshal(b, t.ModerationDefs_RecordViewNotFound) case "tools.ozone.moderation.defs#convoView": t.ModerationDefs_ConvoView = new(ModerationDefs_ConvoView) return json.Unmarshal(b, t.ModerationDefs_ConvoView) default: return nil } } type ModerationDefs_ModEventView_Event struct { ModerationDefs_ModEventTakedown *ModerationDefs_ModEventTakedown ModerationDefs_ModEventReverseTakedown *ModerationDefs_ModEventReverseTakedown ModerationDefs_ModEventComment *ModerationDefs_ModEventComment ModerationDefs_ModEventReport *ModerationDefs_ModEventReport ModerationDefs_ModEventLabel *ModerationDefs_ModEventLabel ModerationDefs_ModEventAcknowledge *ModerationDefs_ModEventAcknowledge ModerationDefs_ModEventEscalate *ModerationDefs_ModEventEscalate ModerationDefs_ModEventMute *ModerationDefs_ModEventMute ModerationDefs_ModEventUnmute *ModerationDefs_ModEventUnmute ModerationDefs_ModEventMuteReporter *ModerationDefs_ModEventMuteReporter ModerationDefs_ModEventUnmuteReporter *ModerationDefs_ModEventUnmuteReporter ModerationDefs_ModEventEmail *ModerationDefs_ModEventEmail ModerationDefs_ModEventResolveAppeal *ModerationDefs_ModEventResolveAppeal ModerationDefs_ModEventDivert *ModerationDefs_ModEventDivert ModerationDefs_ModEventTag *ModerationDefs_ModEventTag ModerationDefs_AccountEvent *ModerationDefs_AccountEvent ModerationDefs_IdentityEvent *ModerationDefs_IdentityEvent ModerationDefs_RecordEvent *ModerationDefs_RecordEvent ModerationDefs_ModEventPriorityScore *ModerationDefs_ModEventPriorityScore ModerationDefs_AgeAssuranceEvent *ModerationDefs_AgeAssuranceEvent ModerationDefs_AgeAssuranceOverrideEvent *ModerationDefs_AgeAssuranceOverrideEvent ModerationDefs_AgeAssurancePurgeEvent *ModerationDefs_AgeAssurancePurgeEvent ModerationDefs_RevokeAccountCredentialsEvent *ModerationDefs_RevokeAccountCredentialsEvent ModerationDefs_ScheduleTakedownEvent *ModerationDefs_ScheduleTakedownEvent ModerationDefs_CancelScheduledTakedownEvent *ModerationDefs_CancelScheduledTakedownEvent } func (t *ModerationDefs_ModEventView_Event) MarshalJSON() ([]byte, error) { if t.ModerationDefs_ModEventTakedown != nil { t.ModerationDefs_ModEventTakedown.LexiconTypeID = "tools.ozone.moderation.defs#modEventTakedown" return json.Marshal(t.ModerationDefs_ModEventTakedown) } if t.ModerationDefs_ModEventReverseTakedown != nil { t.ModerationDefs_ModEventReverseTakedown.LexiconTypeID = "tools.ozone.moderation.defs#modEventReverseTakedown" return json.Marshal(t.ModerationDefs_ModEventReverseTakedown) } if t.ModerationDefs_ModEventComment != nil { t.ModerationDefs_ModEventComment.LexiconTypeID = "tools.ozone.moderation.defs#modEventComment" return json.Marshal(t.ModerationDefs_ModEventComment) } if t.ModerationDefs_ModEventReport != nil { t.ModerationDefs_ModEventReport.LexiconTypeID = "tools.ozone.moderation.defs#modEventReport" return json.Marshal(t.ModerationDefs_ModEventReport) } if t.ModerationDefs_ModEventLabel != nil { t.ModerationDefs_ModEventLabel.LexiconTypeID = "tools.ozone.moderation.defs#modEventLabel" return json.Marshal(t.ModerationDefs_ModEventLabel) } if t.ModerationDefs_ModEventAcknowledge != nil { t.ModerationDefs_ModEventAcknowledge.LexiconTypeID = "tools.ozone.moderation.defs#modEventAcknowledge" return json.Marshal(t.ModerationDefs_ModEventAcknowledge) } if t.ModerationDefs_ModEventEscalate != nil { t.ModerationDefs_ModEventEscalate.LexiconTypeID = "tools.ozone.moderation.defs#modEventEscalate" return json.Marshal(t.ModerationDefs_ModEventEscalate) } if t.ModerationDefs_ModEventMute != nil { t.ModerationDefs_ModEventMute.LexiconTypeID = "tools.ozone.moderation.defs#modEventMute" return json.Marshal(t.ModerationDefs_ModEventMute) } if t.ModerationDefs_ModEventUnmute != nil { t.ModerationDefs_ModEventUnmute.LexiconTypeID = "tools.ozone.moderation.defs#modEventUnmute" return json.Marshal(t.ModerationDefs_ModEventUnmute) } if t.ModerationDefs_ModEventMuteReporter != nil { t.ModerationDefs_ModEventMuteReporter.LexiconTypeID = "tools.ozone.moderation.defs#modEventMuteReporter" return json.Marshal(t.ModerationDefs_ModEventMuteReporter) } if t.ModerationDefs_ModEventUnmuteReporter != nil { t.ModerationDefs_ModEventUnmuteReporter.LexiconTypeID = "tools.ozone.moderation.defs#modEventUnmuteReporter" return json.Marshal(t.ModerationDefs_ModEventUnmuteReporter) } if t.ModerationDefs_ModEventEmail != nil { t.ModerationDefs_ModEventEmail.LexiconTypeID = "tools.ozone.moderation.defs#modEventEmail" return json.Marshal(t.ModerationDefs_ModEventEmail) } if t.ModerationDefs_ModEventResolveAppeal != nil { t.ModerationDefs_ModEventResolveAppeal.LexiconTypeID = "tools.ozone.moderation.defs#modEventResolveAppeal" return json.Marshal(t.ModerationDefs_ModEventResolveAppeal) } if t.ModerationDefs_ModEventDivert != nil { t.ModerationDefs_ModEventDivert.LexiconTypeID = "tools.ozone.moderation.defs#modEventDivert" return json.Marshal(t.ModerationDefs_ModEventDivert) } if t.ModerationDefs_ModEventTag != nil { t.ModerationDefs_ModEventTag.LexiconTypeID = "tools.ozone.moderation.defs#modEventTag" return json.Marshal(t.ModerationDefs_ModEventTag) } if t.ModerationDefs_AccountEvent != nil { t.ModerationDefs_AccountEvent.LexiconTypeID = "tools.ozone.moderation.defs#accountEvent" return json.Marshal(t.ModerationDefs_AccountEvent) } if t.ModerationDefs_IdentityEvent != nil { t.ModerationDefs_IdentityEvent.LexiconTypeID = "tools.ozone.moderation.defs#identityEvent" return json.Marshal(t.ModerationDefs_IdentityEvent) } if t.ModerationDefs_RecordEvent != nil { t.ModerationDefs_RecordEvent.LexiconTypeID = "tools.ozone.moderation.defs#recordEvent" return json.Marshal(t.ModerationDefs_RecordEvent) } if t.ModerationDefs_ModEventPriorityScore != nil { t.ModerationDefs_ModEventPriorityScore.LexiconTypeID = "tools.ozone.moderation.defs#modEventPriorityScore" return json.Marshal(t.ModerationDefs_ModEventPriorityScore) } if t.ModerationDefs_AgeAssuranceEvent != nil { t.ModerationDefs_AgeAssuranceEvent.LexiconTypeID = "tools.ozone.moderation.defs#ageAssuranceEvent" return json.Marshal(t.ModerationDefs_AgeAssuranceEvent) } if t.ModerationDefs_AgeAssuranceOverrideEvent != nil { t.ModerationDefs_AgeAssuranceOverrideEvent.LexiconTypeID = "tools.ozone.moderation.defs#ageAssuranceOverrideEvent" return json.Marshal(t.ModerationDefs_AgeAssuranceOverrideEvent) } if t.ModerationDefs_AgeAssurancePurgeEvent != nil { t.ModerationDefs_AgeAssurancePurgeEvent.LexiconTypeID = "tools.ozone.moderation.defs#ageAssurancePurgeEvent" return json.Marshal(t.ModerationDefs_AgeAssurancePurgeEvent) } if t.ModerationDefs_RevokeAccountCredentialsEvent != nil { t.ModerationDefs_RevokeAccountCredentialsEvent.LexiconTypeID = "tools.ozone.moderation.defs#revokeAccountCredentialsEvent" return json.Marshal(t.ModerationDefs_RevokeAccountCredentialsEvent) } if t.ModerationDefs_ScheduleTakedownEvent != nil { t.ModerationDefs_ScheduleTakedownEvent.LexiconTypeID = "tools.ozone.moderation.defs#scheduleTakedownEvent" return json.Marshal(t.ModerationDefs_ScheduleTakedownEvent) } if t.ModerationDefs_CancelScheduledTakedownEvent != nil { t.ModerationDefs_CancelScheduledTakedownEvent.LexiconTypeID = "tools.ozone.moderation.defs#cancelScheduledTakedownEvent" return json.Marshal(t.ModerationDefs_CancelScheduledTakedownEvent) } return nil, fmt.Errorf("can not marshal empty union as JSON") } func (t *ModerationDefs_ModEventView_Event) UnmarshalJSON(b []byte) error { typ, err := lexutil.TypeExtract(b) if err != nil { return err } switch typ { case "tools.ozone.moderation.defs#modEventTakedown": t.ModerationDefs_ModEventTakedown = new(ModerationDefs_ModEventTakedown) return json.Unmarshal(b, t.ModerationDefs_ModEventTakedown) case "tools.ozone.moderation.defs#modEventReverseTakedown": t.ModerationDefs_ModEventReverseTakedown = new(ModerationDefs_ModEventReverseTakedown) return json.Unmarshal(b, t.ModerationDefs_ModEventReverseTakedown) case "tools.ozone.moderation.defs#modEventComment": t.ModerationDefs_ModEventComment = new(ModerationDefs_ModEventComment) return json.Unmarshal(b, t.ModerationDefs_ModEventComment) case "tools.ozone.moderation.defs#modEventReport": t.ModerationDefs_ModEventReport = new(ModerationDefs_ModEventReport) return json.Unmarshal(b, t.ModerationDefs_ModEventReport) case "tools.ozone.moderation.defs#modEventLabel": t.ModerationDefs_ModEventLabel = new(ModerationDefs_ModEventLabel) return json.Unmarshal(b, t.ModerationDefs_ModEventLabel) case "tools.ozone.moderation.defs#modEventAcknowledge": t.ModerationDefs_ModEventAcknowledge = new(ModerationDefs_ModEventAcknowledge) return json.Unmarshal(b, t.ModerationDefs_ModEventAcknowledge) case "tools.ozone.moderation.defs#modEventEscalate": t.ModerationDefs_ModEventEscalate = new(ModerationDefs_ModEventEscalate) return json.Unmarshal(b, t.ModerationDefs_ModEventEscalate) case "tools.ozone.moderation.defs#modEventMute": t.ModerationDefs_ModEventMute = new(ModerationDefs_ModEventMute) return json.Unmarshal(b, t.ModerationDefs_ModEventMute) case "tools.ozone.moderation.defs#modEventUnmute": t.ModerationDefs_ModEventUnmute = new(ModerationDefs_ModEventUnmute) return json.Unmarshal(b, t.ModerationDefs_ModEventUnmute) case "tools.ozone.moderation.defs#modEventMuteReporter": t.ModerationDefs_ModEventMuteReporter = new(ModerationDefs_ModEventMuteReporter) return json.Unmarshal(b, t.ModerationDefs_ModEventMuteReporter) case "tools.ozone.moderation.defs#modEventUnmuteReporter": t.ModerationDefs_ModEventUnmuteReporter = new(ModerationDefs_ModEventUnmuteReporter) return json.Unmarshal(b, t.ModerationDefs_ModEventUnmuteReporter) case "tools.ozone.moderation.defs#modEventEmail": t.ModerationDefs_ModEventEmail = new(ModerationDefs_ModEventEmail) return json.Unmarshal(b, t.ModerationDefs_ModEventEmail) case "tools.ozone.moderation.defs#modEventResolveAppeal": t.ModerationDefs_ModEventResolveAppeal = new(ModerationDefs_ModEventResolveAppeal) return json.Unmarshal(b, t.ModerationDefs_ModEventResolveAppeal) case "tools.ozone.moderation.defs#modEventDivert": t.ModerationDefs_ModEventDivert = new(ModerationDefs_ModEventDivert) return json.Unmarshal(b, t.ModerationDefs_ModEventDivert) case "tools.ozone.moderation.defs#modEventTag": t.ModerationDefs_ModEventTag = new(ModerationDefs_ModEventTag) return json.Unmarshal(b, t.ModerationDefs_ModEventTag) case "tools.ozone.moderation.defs#accountEvent": t.ModerationDefs_AccountEvent = new(ModerationDefs_AccountEvent) return json.Unmarshal(b, t.ModerationDefs_AccountEvent) case "tools.ozone.moderation.defs#identityEvent": t.ModerationDefs_IdentityEvent = new(ModerationDefs_IdentityEvent) return json.Unmarshal(b, t.ModerationDefs_IdentityEvent) case "tools.ozone.moderation.defs#recordEvent": t.ModerationDefs_RecordEvent = new(ModerationDefs_RecordEvent) return json.Unmarshal(b, t.ModerationDefs_RecordEvent) case "tools.ozone.moderation.defs#modEventPriorityScore": t.ModerationDefs_ModEventPriorityScore = new(ModerationDefs_ModEventPriorityScore) return json.Unmarshal(b, t.ModerationDefs_ModEventPriorityScore) case "tools.ozone.moderation.defs#ageAssuranceEvent": t.ModerationDefs_AgeAssuranceEvent = new(ModerationDefs_AgeAssuranceEvent) return json.Unmarshal(b, t.ModerationDefs_AgeAssuranceEvent) case "tools.ozone.moderation.defs#ageAssuranceOverrideEvent": t.ModerationDefs_AgeAssuranceOverrideEvent = new(ModerationDefs_AgeAssuranceOverrideEvent) return json.Unmarshal(b, t.ModerationDefs_AgeAssuranceOverrideEvent) case "tools.ozone.moderation.defs#ageAssurancePurgeEvent": t.ModerationDefs_AgeAssurancePurgeEvent = new(ModerationDefs_AgeAssurancePurgeEvent) return json.Unmarshal(b, t.ModerationDefs_AgeAssurancePurgeEvent) case "tools.ozone.moderation.defs#revokeAccountCredentialsEvent": t.ModerationDefs_RevokeAccountCredentialsEvent = new(ModerationDefs_RevokeAccountCredentialsEvent) return json.Unmarshal(b, t.ModerationDefs_RevokeAccountCredentialsEvent) case "tools.ozone.moderation.defs#scheduleTakedownEvent": t.ModerationDefs_ScheduleTakedownEvent = new(ModerationDefs_ScheduleTakedownEvent) return json.Unmarshal(b, t.ModerationDefs_ScheduleTakedownEvent) case "tools.ozone.moderation.defs#cancelScheduledTakedownEvent": t.ModerationDefs_CancelScheduledTakedownEvent = new(ModerationDefs_CancelScheduledTakedownEvent) return json.Unmarshal(b, t.ModerationDefs_CancelScheduledTakedownEvent) default: return nil } } type ModerationDefs_ModEventView_Subject struct { AdminDefs_RepoRef *comatproto.AdminDefs_RepoRef RepoStrongRef *comatproto.RepoStrongRef ConvoDefs_MessageRef *chatbsky.ConvoDefs_MessageRef ConvoDefs_ConvoRef *chatbsky.ConvoDefs_ConvoRef } func (t *ModerationDefs_ModEventView_Subject) MarshalJSON() ([]byte, error) { if t.AdminDefs_RepoRef != nil { t.AdminDefs_RepoRef.LexiconTypeID = "com.atproto.admin.defs#repoRef" return json.Marshal(t.AdminDefs_RepoRef) } if t.RepoStrongRef != nil { t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef" return json.Marshal(t.RepoStrongRef) } if t.ConvoDefs_MessageRef != nil { t.ConvoDefs_MessageRef.LexiconTypeID = "chat.bsky.convo.defs#messageRef" return json.Marshal(t.ConvoDefs_MessageRef) } if t.ConvoDefs_ConvoRef != nil { t.ConvoDefs_ConvoRef.LexiconTypeID = "chat.bsky.convo.defs#convoRef" return json.Marshal(t.ConvoDefs_ConvoRef) } return nil, fmt.Errorf("can not marshal empty union as JSON") } func (t *ModerationDefs_ModEventView_Subject) UnmarshalJSON(b []byte) error { typ, err := lexutil.TypeExtract(b) if err != nil { return err } switch typ { case "com.atproto.admin.defs#repoRef": t.AdminDefs_RepoRef = new(comatproto.AdminDefs_RepoRef) return json.Unmarshal(b, t.AdminDefs_RepoRef) case "com.atproto.repo.strongRef": t.RepoStrongRef = new(comatproto.RepoStrongRef) return json.Unmarshal(b, t.RepoStrongRef) case "chat.bsky.convo.defs#messageRef": t.ConvoDefs_MessageRef = new(chatbsky.ConvoDefs_MessageRef) return json.Unmarshal(b, t.ConvoDefs_MessageRef) case "chat.bsky.convo.defs#convoRef": t.ConvoDefs_ConvoRef = new(chatbsky.ConvoDefs_ConvoRef) return json.Unmarshal(b, t.ConvoDefs_ConvoRef) default: return nil } } // ModerationDefs_ModTool is a "modTool" in the tools.ozone.moderation.defs schema. // // Moderation tool information for tracing the source of the action type ModerationDefs_ModTool struct { // meta: Additional arbitrary metadata about the source Meta *interface{} `json:"meta,omitempty" cborgen:"meta,omitempty"` // name: Name/identifier of the source (e.g., 'automod', 'ozone/workspace') Name string `json:"name" cborgen:"name"` } // ModerationDefs_Moderation is a "moderation" in the tools.ozone.moderation.defs schema. type ModerationDefs_Moderation struct { SubjectStatus *ModerationDefs_SubjectStatusView `json:"subjectStatus,omitempty" cborgen:"subjectStatus,omitempty"` } // ModerationDefs_ModerationDetail is a "moderationDetail" in the tools.ozone.moderation.defs schema. type ModerationDefs_ModerationDetail struct { SubjectStatus *ModerationDefs_SubjectStatusView `json:"subjectStatus,omitempty" cborgen:"subjectStatus,omitempty"` } // ModerationDefs_RecordEvent is a "recordEvent" in the tools.ozone.moderation.defs schema. // // Logs lifecycle event on a record subject. Normally captured by automod from the firehose and emitted to ozone for historical tracking. type ModerationDefs_RecordEvent struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#recordEvent"` Cid *string `json:"cid,omitempty" cborgen:"cid,omitempty"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` Op string `json:"op" cborgen:"op"` Timestamp string `json:"timestamp" cborgen:"timestamp"` } // ModerationDefs_RecordHosting is a "recordHosting" in the tools.ozone.moderation.defs schema. type ModerationDefs_RecordHosting struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#recordHosting"` CreatedAt *string `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"` DeletedAt *string `json:"deletedAt,omitempty" cborgen:"deletedAt,omitempty"` Status string `json:"status" cborgen:"status"` UpdatedAt *string `json:"updatedAt,omitempty" cborgen:"updatedAt,omitempty"` } // ModerationDefs_RecordView is a "recordView" in the tools.ozone.moderation.defs schema. type ModerationDefs_RecordView struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#recordView"` BlobCids []string `json:"blobCids" cborgen:"blobCids"` Cid string `json:"cid" cborgen:"cid"` IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` Moderation *ModerationDefs_Moderation `json:"moderation" cborgen:"moderation"` Repo *ModerationDefs_RepoView `json:"repo" cborgen:"repo"` Uri string `json:"uri" cborgen:"uri"` Value *lexutil.LexiconTypeDecoder `json:"value" cborgen:"value"` } // ModerationDefs_RecordViewDetail is a "recordViewDetail" in the tools.ozone.moderation.defs schema. type ModerationDefs_RecordViewDetail struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#recordViewDetail"` Blobs []*ModerationDefs_BlobView `json:"blobs" cborgen:"blobs"` Cid string `json:"cid" cborgen:"cid"` IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` Labels []*comatproto.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` Moderation *ModerationDefs_ModerationDetail `json:"moderation" cborgen:"moderation"` Repo *ModerationDefs_RepoView `json:"repo" cborgen:"repo"` Uri string `json:"uri" cborgen:"uri"` Value *lexutil.LexiconTypeDecoder `json:"value" cborgen:"value"` } // ModerationDefs_RecordViewNotFound is a "recordViewNotFound" in the tools.ozone.moderation.defs schema. type ModerationDefs_RecordViewNotFound struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#recordViewNotFound"` Uri string `json:"uri" cborgen:"uri"` } // ModerationDefs_RecordsStats is a "recordsStats" in the tools.ozone.moderation.defs schema. // // Statistics about a set of record subject items type ModerationDefs_RecordsStats struct { // appealedCount: Number of items that were appealed at least once AppealedCount *int64 `json:"appealedCount,omitempty" cborgen:"appealedCount,omitempty"` // escalatedCount: Number of items that were escalated at least once EscalatedCount *int64 `json:"escalatedCount,omitempty" cborgen:"escalatedCount,omitempty"` // pendingCount: Number of item currently in "reviewOpen" or "reviewEscalated" state PendingCount *int64 `json:"pendingCount,omitempty" cborgen:"pendingCount,omitempty"` // processedCount: Number of item currently in "reviewNone" or "reviewClosed" state ProcessedCount *int64 `json:"processedCount,omitempty" cborgen:"processedCount,omitempty"` // reportedCount: Number of items that were reported at least once ReportedCount *int64 `json:"reportedCount,omitempty" cborgen:"reportedCount,omitempty"` // subjectCount: Total number of item in the set SubjectCount *int64 `json:"subjectCount,omitempty" cborgen:"subjectCount,omitempty"` // takendownCount: Number of item currently taken down TakendownCount *int64 `json:"takendownCount,omitempty" cborgen:"takendownCount,omitempty"` // totalReports: Cumulative sum of the number of reports on the items in the set TotalReports *int64 `json:"totalReports,omitempty" cborgen:"totalReports,omitempty"` } // ModerationDefs_RepoView is a "repoView" in the tools.ozone.moderation.defs schema. type ModerationDefs_RepoView struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#repoView"` DeactivatedAt *string `json:"deactivatedAt,omitempty" cborgen:"deactivatedAt,omitempty"` Did string `json:"did" cborgen:"did"` Email *string `json:"email,omitempty" cborgen:"email,omitempty"` Handle string `json:"handle" cborgen:"handle"` IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` InviteNote *string `json:"inviteNote,omitempty" cborgen:"inviteNote,omitempty"` InvitedBy *comatproto.ServerDefs_InviteCode `json:"invitedBy,omitempty" cborgen:"invitedBy,omitempty"` InvitesDisabled *bool `json:"invitesDisabled,omitempty" cborgen:"invitesDisabled,omitempty"` Moderation *ModerationDefs_Moderation `json:"moderation" cborgen:"moderation"` RelatedRecords []*lexutil.LexiconTypeDecoder `json:"relatedRecords" cborgen:"relatedRecords"` ThreatSignatures []*comatproto.AdminDefs_ThreatSignature `json:"threatSignatures,omitempty" cborgen:"threatSignatures,omitempty"` } // ModerationDefs_RepoViewDetail is a "repoViewDetail" in the tools.ozone.moderation.defs schema. type ModerationDefs_RepoViewDetail struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#repoViewDetail"` DeactivatedAt *string `json:"deactivatedAt,omitempty" cborgen:"deactivatedAt,omitempty"` Did string `json:"did" cborgen:"did"` Email *string `json:"email,omitempty" cborgen:"email,omitempty"` EmailConfirmedAt *string `json:"emailConfirmedAt,omitempty" cborgen:"emailConfirmedAt,omitempty"` Handle string `json:"handle" cborgen:"handle"` IndexedAt string `json:"indexedAt" cborgen:"indexedAt"` InviteNote *string `json:"inviteNote,omitempty" cborgen:"inviteNote,omitempty"` InvitedBy *comatproto.ServerDefs_InviteCode `json:"invitedBy,omitempty" cborgen:"invitedBy,omitempty"` Invites []*comatproto.ServerDefs_InviteCode `json:"invites,omitempty" cborgen:"invites,omitempty"` InvitesDisabled *bool `json:"invitesDisabled,omitempty" cborgen:"invitesDisabled,omitempty"` Labels []*comatproto.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"` Moderation *ModerationDefs_ModerationDetail `json:"moderation" cborgen:"moderation"` RelatedRecords []*lexutil.LexiconTypeDecoder `json:"relatedRecords" cborgen:"relatedRecords"` ThreatSignatures []*comatproto.AdminDefs_ThreatSignature `json:"threatSignatures,omitempty" cborgen:"threatSignatures,omitempty"` } // ModerationDefs_RepoViewNotFound is a "repoViewNotFound" in the tools.ozone.moderation.defs schema. type ModerationDefs_RepoViewNotFound struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#repoViewNotFound"` Did string `json:"did" cborgen:"did"` } // ModerationDefs_ReporterStats is a "reporterStats" in the tools.ozone.moderation.defs schema. type ModerationDefs_ReporterStats struct { // accountReportCount: The total number of reports made by the user on accounts. AccountReportCount int64 `json:"accountReportCount" cborgen:"accountReportCount"` Did string `json:"did" cborgen:"did"` // labeledAccountCount: The total number of accounts labeled as a result of the user's reports. LabeledAccountCount int64 `json:"labeledAccountCount" cborgen:"labeledAccountCount"` // labeledRecordCount: The total number of records labeled as a result of the user's reports. LabeledRecordCount int64 `json:"labeledRecordCount" cborgen:"labeledRecordCount"` // recordReportCount: The total number of reports made by the user on records. RecordReportCount int64 `json:"recordReportCount" cborgen:"recordReportCount"` // reportedAccountCount: The total number of accounts reported by the user. ReportedAccountCount int64 `json:"reportedAccountCount" cborgen:"reportedAccountCount"` // reportedRecordCount: The total number of records reported by the user. ReportedRecordCount int64 `json:"reportedRecordCount" cborgen:"reportedRecordCount"` // takendownAccountCount: The total number of accounts taken down as a result of the user's reports. TakendownAccountCount int64 `json:"takendownAccountCount" cborgen:"takendownAccountCount"` // takendownRecordCount: The total number of records taken down as a result of the user's reports. TakendownRecordCount int64 `json:"takendownRecordCount" cborgen:"takendownRecordCount"` } // ModerationDefs_RevokeAccountCredentialsEvent is a "revokeAccountCredentialsEvent" in the tools.ozone.moderation.defs schema. // // Account credentials revocation by moderators. Only works on DID subjects. type ModerationDefs_RevokeAccountCredentialsEvent struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#revokeAccountCredentialsEvent"` // comment: Comment describing the reason for the revocation. Comment string `json:"comment" cborgen:"comment"` } // ModerationDefs_ScheduleTakedownEvent is a "scheduleTakedownEvent" in the tools.ozone.moderation.defs schema. // // Logs a scheduled takedown action for an account. type ModerationDefs_ScheduleTakedownEvent struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#scheduleTakedownEvent"` Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` ExecuteAfter *string `json:"executeAfter,omitempty" cborgen:"executeAfter,omitempty"` ExecuteAt *string `json:"executeAt,omitempty" cborgen:"executeAt,omitempty"` ExecuteUntil *string `json:"executeUntil,omitempty" cborgen:"executeUntil,omitempty"` } // ModerationDefs_ScheduledActionView is a "scheduledActionView" in the tools.ozone.moderation.defs schema. // // View of a scheduled moderation action type ModerationDefs_ScheduledActionView struct { // action: Type of action to be executed Action string `json:"action" cborgen:"action"` // createdAt: When the scheduled action was created CreatedAt string `json:"createdAt" cborgen:"createdAt"` // createdBy: DID of the user who created this scheduled action CreatedBy string `json:"createdBy" cborgen:"createdBy"` // did: Subject DID for the action Did string `json:"did" cborgen:"did"` // eventData: Serialized event object that will be propagated to the event when performed EventData *lexutil.LexiconTypeDecoder `json:"eventData,omitempty" cborgen:"eventData,omitempty"` // executeAfter: Earliest time to execute the action (for randomized scheduling) ExecuteAfter *string `json:"executeAfter,omitempty" cborgen:"executeAfter,omitempty"` // executeAt: Exact time to execute the action ExecuteAt *string `json:"executeAt,omitempty" cborgen:"executeAt,omitempty"` // executeUntil: Latest time to execute the action (for randomized scheduling) ExecuteUntil *string `json:"executeUntil,omitempty" cborgen:"executeUntil,omitempty"` // executionEventId: ID of the moderation event created when action was successfully executed ExecutionEventId *int64 `json:"executionEventId,omitempty" cborgen:"executionEventId,omitempty"` // id: Auto-incrementing row ID Id int64 `json:"id" cborgen:"id"` // lastExecutedAt: When the action was last attempted to be executed LastExecutedAt *string `json:"lastExecutedAt,omitempty" cborgen:"lastExecutedAt,omitempty"` // lastFailureReason: Reason for the last execution failure LastFailureReason *string `json:"lastFailureReason,omitempty" cborgen:"lastFailureReason,omitempty"` // randomizeExecution: Whether execution time should be randomized within the specified range RandomizeExecution *bool `json:"randomizeExecution,omitempty" cborgen:"randomizeExecution,omitempty"` // status: Current status of the scheduled action Status string `json:"status" cborgen:"status"` // updatedAt: When the scheduled action was last updated UpdatedAt *string `json:"updatedAt,omitempty" cborgen:"updatedAt,omitempty"` } // ModerationDefs_SubjectStatusView is a "subjectStatusView" in the tools.ozone.moderation.defs schema. type ModerationDefs_SubjectStatusView struct { // accountStats: Statistics related to the account subject AccountStats *ModerationDefs_AccountStats `json:"accountStats,omitempty" cborgen:"accountStats,omitempty"` // accountStrike: Strike information for the account (account-level only) AccountStrike *ModerationDefs_AccountStrike `json:"accountStrike,omitempty" cborgen:"accountStrike,omitempty"` // ageAssuranceState: Current age assurance state of the subject. AgeAssuranceState *string `json:"ageAssuranceState,omitempty" cborgen:"ageAssuranceState,omitempty"` // ageAssuranceUpdatedBy: Whether or not the last successful update to age assurance was made by the user or admin. AgeAssuranceUpdatedBy *string `json:"ageAssuranceUpdatedBy,omitempty" cborgen:"ageAssuranceUpdatedBy,omitempty"` // 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. Appealed *bool `json:"appealed,omitempty" cborgen:"appealed,omitempty"` // comment: Sticky comment on the subject. Comment *string `json:"comment,omitempty" cborgen:"comment,omitempty"` // createdAt: Timestamp referencing the first moderation status impacting event was emitted on the subject CreatedAt string `json:"createdAt" cborgen:"createdAt"` Hosting *ModerationDefs_SubjectStatusView_Hosting `json:"hosting,omitempty" cborgen:"hosting,omitempty"` Id int64 `json:"id" cborgen:"id"` // lastAppealedAt: Timestamp referencing when the author of the subject appealed a moderation action LastAppealedAt *string `json:"lastAppealedAt,omitempty" cborgen:"lastAppealedAt,omitempty"` LastReportedAt *string `json:"lastReportedAt,omitempty" cborgen:"lastReportedAt,omitempty"` LastReviewedAt *string `json:"lastReviewedAt,omitempty" cborgen:"lastReviewedAt,omitempty"` LastReviewedBy *string `json:"lastReviewedBy,omitempty" cborgen:"lastReviewedBy,omitempty"` MuteReportingUntil *string `json:"muteReportingUntil,omitempty" cborgen:"muteReportingUntil,omitempty"` MuteUntil *string `json:"muteUntil,omitempty" cborgen:"muteUntil,omitempty"` // priorityScore: Numeric value representing the level of priority. Higher score means higher priority. PriorityScore *int64 `json:"priorityScore,omitempty" cborgen:"priorityScore,omitempty"` // recordsStats: Statistics related to the record subjects authored by the subject's account RecordsStats *ModerationDefs_RecordsStats `json:"recordsStats,omitempty" cborgen:"recordsStats,omitempty"` ReviewState *string `json:"reviewState" cborgen:"reviewState"` Subject *ModerationDefs_SubjectStatusView_Subject `json:"subject" cborgen:"subject"` SubjectBlobCids []string `json:"subjectBlobCids,omitempty" cborgen:"subjectBlobCids,omitempty"` SubjectRepoHandle *string `json:"subjectRepoHandle,omitempty" cborgen:"subjectRepoHandle,omitempty"` SuspendUntil *string `json:"suspendUntil,omitempty" cborgen:"suspendUntil,omitempty"` Tags []string `json:"tags,omitempty" cborgen:"tags,omitempty"` Takendown *bool `json:"takendown,omitempty" cborgen:"takendown,omitempty"` // updatedAt: Timestamp referencing when the last update was made to the moderation status of the subject UpdatedAt string `json:"updatedAt" cborgen:"updatedAt"` } type ModerationDefs_SubjectStatusView_Hosting struct { ModerationDefs_AccountHosting *ModerationDefs_AccountHosting ModerationDefs_RecordHosting *ModerationDefs_RecordHosting } func (t *ModerationDefs_SubjectStatusView_Hosting) MarshalJSON() ([]byte, error) { if t.ModerationDefs_AccountHosting != nil { t.ModerationDefs_AccountHosting.LexiconTypeID = "tools.ozone.moderation.defs#accountHosting" return json.Marshal(t.ModerationDefs_AccountHosting) } if t.ModerationDefs_RecordHosting != nil { t.ModerationDefs_RecordHosting.LexiconTypeID = "tools.ozone.moderation.defs#recordHosting" return json.Marshal(t.ModerationDefs_RecordHosting) } return nil, fmt.Errorf("can not marshal empty union as JSON") } func (t *ModerationDefs_SubjectStatusView_Hosting) UnmarshalJSON(b []byte) error { typ, err := lexutil.TypeExtract(b) if err != nil { return err } switch typ { case "tools.ozone.moderation.defs#accountHosting": t.ModerationDefs_AccountHosting = new(ModerationDefs_AccountHosting) return json.Unmarshal(b, t.ModerationDefs_AccountHosting) case "tools.ozone.moderation.defs#recordHosting": t.ModerationDefs_RecordHosting = new(ModerationDefs_RecordHosting) return json.Unmarshal(b, t.ModerationDefs_RecordHosting) default: return nil } } type ModerationDefs_SubjectStatusView_Subject struct { AdminDefs_RepoRef *comatproto.AdminDefs_RepoRef RepoStrongRef *comatproto.RepoStrongRef ConvoDefs_MessageRef *chatbsky.ConvoDefs_MessageRef ConvoDefs_ConvoRef *chatbsky.ConvoDefs_ConvoRef } func (t *ModerationDefs_SubjectStatusView_Subject) MarshalJSON() ([]byte, error) { if t.AdminDefs_RepoRef != nil { t.AdminDefs_RepoRef.LexiconTypeID = "com.atproto.admin.defs#repoRef" return json.Marshal(t.AdminDefs_RepoRef) } if t.RepoStrongRef != nil { t.RepoStrongRef.LexiconTypeID = "com.atproto.repo.strongRef" return json.Marshal(t.RepoStrongRef) } if t.ConvoDefs_MessageRef != nil { t.ConvoDefs_MessageRef.LexiconTypeID = "chat.bsky.convo.defs#messageRef" return json.Marshal(t.ConvoDefs_MessageRef) } if t.ConvoDefs_ConvoRef != nil { t.ConvoDefs_ConvoRef.LexiconTypeID = "chat.bsky.convo.defs#convoRef" return json.Marshal(t.ConvoDefs_ConvoRef) } return nil, fmt.Errorf("can not marshal empty union as JSON") } func (t *ModerationDefs_SubjectStatusView_Subject) UnmarshalJSON(b []byte) error { typ, err := lexutil.TypeExtract(b) if err != nil { return err } switch typ { case "com.atproto.admin.defs#repoRef": t.AdminDefs_RepoRef = new(comatproto.AdminDefs_RepoRef) return json.Unmarshal(b, t.AdminDefs_RepoRef) case "com.atproto.repo.strongRef": t.RepoStrongRef = new(comatproto.RepoStrongRef) return json.Unmarshal(b, t.RepoStrongRef) case "chat.bsky.convo.defs#messageRef": t.ConvoDefs_MessageRef = new(chatbsky.ConvoDefs_MessageRef) return json.Unmarshal(b, t.ConvoDefs_MessageRef) case "chat.bsky.convo.defs#convoRef": t.ConvoDefs_ConvoRef = new(chatbsky.ConvoDefs_ConvoRef) return json.Unmarshal(b, t.ConvoDefs_ConvoRef) default: return nil } } // ModerationDefs_SubjectView is a "subjectView" in the tools.ozone.moderation.defs schema. // // Detailed view of a subject. For record subjects, the author's repo and profile will be returned. type ModerationDefs_SubjectView struct { Profile *lexutil.LexiconTypeDecoder `json:"profile,omitempty" cborgen:"profile,omitempty"` Record *ModerationDefs_RecordViewDetail `json:"record,omitempty" cborgen:"record,omitempty"` Repo *ModerationDefs_RepoViewDetail `json:"repo,omitempty" cborgen:"repo,omitempty"` Status *ModerationDefs_SubjectStatusView `json:"status,omitempty" cborgen:"status,omitempty"` Subject string `json:"subject" cborgen:"subject"` Type *string `json:"type" cborgen:"type"` } // ModerationDefs_VideoDetails is a "videoDetails" in the tools.ozone.moderation.defs schema. type ModerationDefs_VideoDetails struct { LexiconTypeID string `json:"$type" cborgen:"$type,const=tools.ozone.moderation.defs#videoDetails"` Height int64 `json:"height" cborgen:"height"` Length int64 `json:"length" cborgen:"length"` Width int64 `json:"width" cborgen:"width"` }