Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
64 kB · 1636 lines
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637// Code generated by glex; DO NOT EDIT.
// Lexicon schema: app.bsky.actor.defs
package appbsky
import ( "encoding/json" "fmt" "io"
glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen" comatproto "stream.place/streamplace/pkg/comatproto")
// ActorDefs_AdultContentPref is a "adultContentPref" in the app.bsky.actor.defs schema.type ActorDefs_AdultContentPref struct { LexiconTypeID string `json:"$type,omitempty"` Enabled bool `json:"enabled"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_AdultContentPref) RecordTypeID() string { return "app.bsky.actor.defs#adultContentPref"}
func (t *ActorDefs_AdultContentPref) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#adultContentPref" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_AdultContentPref) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_BskyAppProgressGuide is a "bskyAppProgressGuide" in the app.bsky.actor.defs schema.//// If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress.type ActorDefs_BskyAppProgressGuide struct { LexiconTypeID string `json:"$type,omitempty"` Guide string `json:"guide"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_BskyAppProgressGuide) RecordTypeID() string { return "app.bsky.actor.defs#bskyAppProgressGuide"}
func (t *ActorDefs_BskyAppProgressGuide) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#bskyAppProgressGuide" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_BskyAppProgressGuide) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_BskyAppStatePref is a "bskyAppStatePref" in the app.bsky.actor.defs schema.//// A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this.type ActorDefs_BskyAppStatePref struct { LexiconTypeID string `json:"$type,omitempty"` ActiveProgressGuide *ActorDefs_BskyAppProgressGuide `json:"activeProgressGuide,omitempty"` // isBetaUser: Indicates if the user is participating in the beta features program. IsBetaUser *bool `json:"isBetaUser,omitempty"` // nuxs: Storage for NUXs the user has encountered. Nuxs []ActorDefs_Nux `json:"nuxs,omitempty"` // queuedNudges: An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user. QueuedNudges []string `json:"queuedNudges,omitempty"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_BskyAppStatePref) RecordTypeID() string { return "app.bsky.actor.defs#bskyAppStatePref"}
func (t *ActorDefs_BskyAppStatePref) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#bskyAppStatePref" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_BskyAppStatePref) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_ContentLabelPref is a "contentLabelPref" in the app.bsky.actor.defs schema.type ActorDefs_ContentLabelPref struct { LexiconTypeID string `json:"$type,omitempty"` Label string `json:"label"` // labelerDid: Which labeler does this preference apply to? If undefined, applies globally. LabelerDid *string `json:"labelerDid,omitempty"` Visibility string `json:"visibility"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_ContentLabelPref) RecordTypeID() string { return "app.bsky.actor.defs#contentLabelPref"}
func (t *ActorDefs_ContentLabelPref) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#contentLabelPref" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_ContentLabelPref) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_DeclaredAgePref is a "declaredAgePref" in the app.bsky.actor.defs schema.//// Read-only preference containing value(s) inferred from the user's declared birthdate. Absence of this preference object in the response indicates that the user has not made a declaration.type ActorDefs_DeclaredAgePref struct { LexiconTypeID string `json:"$type,omitempty"` // isOverAge13: Indicates if the user has declared that they are over 13 years of age. IsOverAge13 *bool `json:"isOverAge13,omitempty"` // isOverAge16: Indicates if the user has declared that they are over 16 years of age. IsOverAge16 *bool `json:"isOverAge16,omitempty"` // isOverAge18: Indicates if the user has declared that they are over 18 years of age. IsOverAge18 *bool `json:"isOverAge18,omitempty"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_DeclaredAgePref) RecordTypeID() string { return "app.bsky.actor.defs#declaredAgePref"}
func (t *ActorDefs_DeclaredAgePref) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#declaredAgePref" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_DeclaredAgePref) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_FeedViewPref is a "feedViewPref" in the app.bsky.actor.defs schema.type ActorDefs_FeedViewPref struct { LexiconTypeID string `json:"$type,omitempty"` // feed: The URI of the feed, or an identifier which describes the feed. Feed string `json:"feed"` // hideQuotePosts: Hide quote posts in the feed. HideQuotePosts *bool `json:"hideQuotePosts,omitempty"` // hideReplies: Hide replies in the feed. HideReplies *bool `json:"hideReplies,omitempty"` // hideRepliesByLikeCount: Hide replies in the feed if they do not have this number of likes. HideRepliesByLikeCount *int64 `json:"hideRepliesByLikeCount,omitempty"` // hideRepliesByUnfollowed: Hide replies in the feed if they are not by followed users. HideRepliesByUnfollowed *bool `json:"hideRepliesByUnfollowed,omitempty"` // hideReposts: Hide reposts in the feed. HideReposts *bool `json:"hideReposts,omitempty"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_FeedViewPref) RecordTypeID() string { return "app.bsky.actor.defs#feedViewPref" }
func (t *ActorDefs_FeedViewPref) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#feedViewPref" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_FeedViewPref) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_HiddenPostsPref is a "hiddenPostsPref" in the app.bsky.actor.defs schema.type ActorDefs_HiddenPostsPref struct { LexiconTypeID string `json:"$type,omitempty"` // items: A list of URIs of posts the account owner has hidden. Items []string `json:"items"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_HiddenPostsPref) RecordTypeID() string { return "app.bsky.actor.defs#hiddenPostsPref"}
func (t *ActorDefs_HiddenPostsPref) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#hiddenPostsPref" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_HiddenPostsPref) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_InterestsPref is a "interestsPref" in the app.bsky.actor.defs schema.type ActorDefs_InterestsPref struct { LexiconTypeID string `json:"$type,omitempty"` // tags: A list of tags which describe the account owner's interests gathered during onboarding. Tags []string `json:"tags"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_InterestsPref) RecordTypeID() string { return "app.bsky.actor.defs#interestsPref" }
func (t *ActorDefs_InterestsPref) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#interestsPref" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_InterestsPref) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_KnownFollowers is a "knownFollowers" in the app.bsky.actor.defs schema.//// The subject's followers whom you also followtype ActorDefs_KnownFollowers struct { LexiconTypeID string `json:"$type,omitempty"` Count int64 `json:"count"` Followers []ActorDefs_ProfileViewBasic `json:"followers"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_KnownFollowers) RecordTypeID() string { return "app.bsky.actor.defs#knownFollowers" }
func (t *ActorDefs_KnownFollowers) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#knownFollowers" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_KnownFollowers) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_LabelerPrefItem is a "labelerPrefItem" in the app.bsky.actor.defs schema.type ActorDefs_LabelerPrefItem struct { LexiconTypeID string `json:"$type,omitempty"` Did string `json:"did"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_LabelerPrefItem) RecordTypeID() string { return "app.bsky.actor.defs#labelerPrefItem"}
func (t *ActorDefs_LabelerPrefItem) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#labelerPrefItem" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_LabelerPrefItem) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_LabelersPref is a "labelersPref" in the app.bsky.actor.defs schema.type ActorDefs_LabelersPref struct { LexiconTypeID string `json:"$type,omitempty"` Labelers []ActorDefs_LabelerPrefItem `json:"labelers"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_LabelersPref) RecordTypeID() string { return "app.bsky.actor.defs#labelersPref" }
func (t *ActorDefs_LabelersPref) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#labelersPref" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_LabelersPref) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_LiveEventPreferences is a "liveEventPreferences" in the app.bsky.actor.defs schema.//// Preferences for live events.type ActorDefs_LiveEventPreferences struct { LexiconTypeID string `json:"$type,omitempty"` // hiddenFeedIds: A list of feed IDs that the user has hidden from live events. HiddenFeedIds []string `json:"hiddenFeedIds,omitempty"` // hideAllFeeds: Whether to hide all feeds from live events. HideAllFeeds *bool `json:"hideAllFeeds,omitempty"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_LiveEventPreferences) RecordTypeID() string { return "app.bsky.actor.defs#liveEventPreferences"}
func (t *ActorDefs_LiveEventPreferences) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#liveEventPreferences" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_LiveEventPreferences) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_MutedWord is a "mutedWord" in the app.bsky.actor.defs schema.//// A word that the account owner has muted.type ActorDefs_MutedWord struct { LexiconTypeID string `json:"$type,omitempty"` // actorTarget: Groups of users to apply the muted word to. If undefined, applies to all users. ActorTarget *string `json:"actorTarget,omitempty"` // expiresAt: The date and time at which the muted word will expire and no longer be applied. ExpiresAt *string `json:"expiresAt,omitempty"` Id *string `json:"id,omitempty"` // targets: The intended targets of the muted word. Targets []string `json:"targets"` // value: The muted word itself. Value string `json:"value"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_MutedWord) RecordTypeID() string { return "app.bsky.actor.defs#mutedWord" }
func (t *ActorDefs_MutedWord) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#mutedWord" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_MutedWord) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_MutedWordsPref is a "mutedWordsPref" in the app.bsky.actor.defs schema.type ActorDefs_MutedWordsPref struct { LexiconTypeID string `json:"$type,omitempty"` // items: A list of words the account owner has muted. Items []ActorDefs_MutedWord `json:"items"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_MutedWordsPref) RecordTypeID() string { return "app.bsky.actor.defs#mutedWordsPref" }
func (t *ActorDefs_MutedWordsPref) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#mutedWordsPref" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_MutedWordsPref) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_Nux is a "nux" in the app.bsky.actor.defs schema.//// A new user experiences (NUX) storage objecttype ActorDefs_Nux struct { LexiconTypeID string `json:"$type,omitempty"` Completed bool `json:"completed"` // data: Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters. Data *string `json:"data,omitempty"` // expiresAt: The date and time at which the NUX will expire and should be considered completed. ExpiresAt *string `json:"expiresAt,omitempty"` Id string `json:"id"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_Nux) RecordTypeID() string { return "app.bsky.actor.defs#nux" }
func (t *ActorDefs_Nux) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#nux" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_Nux) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_PersonalDetailsPref is a "personalDetailsPref" in the app.bsky.actor.defs schema.type ActorDefs_PersonalDetailsPref struct { LexiconTypeID string `json:"$type,omitempty"` // birthDate: The birth date of account owner. BirthDate *string `json:"birthDate,omitempty"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_PersonalDetailsPref) RecordTypeID() string { return "app.bsky.actor.defs#personalDetailsPref"}
func (t *ActorDefs_PersonalDetailsPref) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#personalDetailsPref" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_PersonalDetailsPref) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_PostInteractionSettingsPref is a "postInteractionSettingsPref" in the app.bsky.actor.defs schema.//// Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly.type ActorDefs_PostInteractionSettingsPref struct { LexiconTypeID string `json:"$type,omitempty"` // postgateEmbeddingRules: Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed. PostgateEmbeddingRules []ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem `json:"postgateEmbeddingRules,omitempty"` // threadgateAllowRules: Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply. ThreadgateAllowRules []ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem `json:"threadgateAllowRules,omitempty"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_PostInteractionSettingsPref) RecordTypeID() string { return "app.bsky.actor.defs#postInteractionSettingsPref"}
func (t *ActorDefs_PostInteractionSettingsPref) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#postInteractionSettingsPref" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_PostInteractionSettingsPref) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
type ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem struct { FeedPostgate_DisableRule *FeedPostgate_DisableRule // Raw preserves a variant whose $type is not in this union's generated // set, so unrecognized variants still round-trip losslessly through // decode/re-encode. Nil when a known variant is set. Raw *glex.RawRecord}
// MarshalJSON emits the set variant, stamped with its $type, per the atproto// union wire format. The value receiver stamps a copy, so the variant is// never mutated and both ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem and *ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem marshal correctly.func (t ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem) MarshalJSON() ([]byte, error) { if t.FeedPostgate_DisableRule != nil { cp := *t.FeedPostgate_DisableRule cp.LexiconTypeID = "app.bsky.feed.postgate#disableRule" return json.Marshal(&cp) } if t.Raw != nil { if t.Raw.Encoding != "json" { return nil, fmt.Errorf("cannot marshal raw %s record as JSON in union ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem", t.Raw.Encoding) } return t.Raw.Bytes, nil } return nil, fmt.Errorf("cannot marshal empty union ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem as JSON")}
func (t *ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem) UnmarshalJSON(b []byte) error { typ, err := glex.TypeExtract(b) if err != nil { return err }
switch typ { case "app.bsky.feed.postgate#disableRule": t.FeedPostgate_DisableRule = new(FeedPostgate_DisableRule) return json.Unmarshal(b, t.FeedPostgate_DisableRule) default: t.Raw = &glex.RawRecord{Type: typ, Encoding: "json", Bytes: append([]byte(nil), b...)} return nil }}
// MarshalCBOR implements drisl.Marshaler, emitting the set variant (stamped// with its $type) per the atproto union wire format. go-dasl invokes this// when the union appears inside another record, so nested unions serialize// correctly.func (t ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem) MarshalCBOR() ([]byte, error) { if t.FeedPostgate_DisableRule != nil { cp := *t.FeedPostgate_DisableRule cp.LexiconTypeID = "app.bsky.feed.postgate#disableRule" return glex.MarshalCBORBytes(&cp) } if t.Raw != nil { if t.Raw.Encoding != "cbor" { return nil, fmt.Errorf("cannot marshal raw %s record as CBOR in union ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem", t.Raw.Encoding) } return t.Raw.Bytes, nil } return nil, fmt.Errorf("cannot marshal empty union ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem as CBOR")}
func (t *ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem) UnmarshalCBOR(b []byte) error { typ, err := glex.CborTypeExtract(b) if err != nil { return err }
switch typ { case "app.bsky.feed.postgate#disableRule": t.FeedPostgate_DisableRule = new(FeedPostgate_DisableRule) return glex.UnmarshalCBORBytes(b, t.FeedPostgate_DisableRule) default: t.Raw = &glex.RawRecord{Type: typ, Encoding: "cbor", Bytes: append([]byte(nil), b...)} return nil }}
type ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem struct { FeedThreadgate_FollowerRule *FeedThreadgate_FollowerRule FeedThreadgate_FollowingRule *FeedThreadgate_FollowingRule FeedThreadgate_ListRule *FeedThreadgate_ListRule FeedThreadgate_MentionRule *FeedThreadgate_MentionRule // Raw preserves a variant whose $type is not in this union's generated // set, so unrecognized variants still round-trip losslessly through // decode/re-encode. Nil when a known variant is set. Raw *glex.RawRecord}
// MarshalJSON emits the set variant, stamped with its $type, per the atproto// union wire format. The value receiver stamps a copy, so the variant is// never mutated and both ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem and *ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem marshal correctly.func (t ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem) MarshalJSON() ([]byte, error) { if t.FeedThreadgate_FollowerRule != nil { cp := *t.FeedThreadgate_FollowerRule cp.LexiconTypeID = "app.bsky.feed.threadgate#followerRule" return json.Marshal(&cp) } if t.FeedThreadgate_FollowingRule != nil { cp := *t.FeedThreadgate_FollowingRule cp.LexiconTypeID = "app.bsky.feed.threadgate#followingRule" return json.Marshal(&cp) } if t.FeedThreadgate_ListRule != nil { cp := *t.FeedThreadgate_ListRule cp.LexiconTypeID = "app.bsky.feed.threadgate#listRule" return json.Marshal(&cp) } if t.FeedThreadgate_MentionRule != nil { cp := *t.FeedThreadgate_MentionRule cp.LexiconTypeID = "app.bsky.feed.threadgate#mentionRule" return json.Marshal(&cp) } if t.Raw != nil { if t.Raw.Encoding != "json" { return nil, fmt.Errorf("cannot marshal raw %s record as JSON in union ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem", t.Raw.Encoding) } return t.Raw.Bytes, nil } return nil, fmt.Errorf("cannot marshal empty union ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem as JSON")}
func (t *ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem) UnmarshalJSON(b []byte) error { typ, err := glex.TypeExtract(b) if err != nil { return err }
switch typ { case "app.bsky.feed.threadgate#followerRule": t.FeedThreadgate_FollowerRule = new(FeedThreadgate_FollowerRule) return json.Unmarshal(b, t.FeedThreadgate_FollowerRule) case "app.bsky.feed.threadgate#followingRule": t.FeedThreadgate_FollowingRule = new(FeedThreadgate_FollowingRule) return json.Unmarshal(b, t.FeedThreadgate_FollowingRule) case "app.bsky.feed.threadgate#listRule": t.FeedThreadgate_ListRule = new(FeedThreadgate_ListRule) return json.Unmarshal(b, t.FeedThreadgate_ListRule) case "app.bsky.feed.threadgate#mentionRule": t.FeedThreadgate_MentionRule = new(FeedThreadgate_MentionRule) return json.Unmarshal(b, t.FeedThreadgate_MentionRule) default: t.Raw = &glex.RawRecord{Type: typ, Encoding: "json", Bytes: append([]byte(nil), b...)} return nil }}
// MarshalCBOR implements drisl.Marshaler, emitting the set variant (stamped// with its $type) per the atproto union wire format. go-dasl invokes this// when the union appears inside another record, so nested unions serialize// correctly.func (t ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem) MarshalCBOR() ([]byte, error) { if t.FeedThreadgate_FollowerRule != nil { cp := *t.FeedThreadgate_FollowerRule cp.LexiconTypeID = "app.bsky.feed.threadgate#followerRule" return glex.MarshalCBORBytes(&cp) } if t.FeedThreadgate_FollowingRule != nil { cp := *t.FeedThreadgate_FollowingRule cp.LexiconTypeID = "app.bsky.feed.threadgate#followingRule" return glex.MarshalCBORBytes(&cp) } if t.FeedThreadgate_ListRule != nil { cp := *t.FeedThreadgate_ListRule cp.LexiconTypeID = "app.bsky.feed.threadgate#listRule" return glex.MarshalCBORBytes(&cp) } if t.FeedThreadgate_MentionRule != nil { cp := *t.FeedThreadgate_MentionRule cp.LexiconTypeID = "app.bsky.feed.threadgate#mentionRule" return glex.MarshalCBORBytes(&cp) } if t.Raw != nil { if t.Raw.Encoding != "cbor" { return nil, fmt.Errorf("cannot marshal raw %s record as CBOR in union ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem", t.Raw.Encoding) } return t.Raw.Bytes, nil } return nil, fmt.Errorf("cannot marshal empty union ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem as CBOR")}
func (t *ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem) UnmarshalCBOR(b []byte) error { typ, err := glex.CborTypeExtract(b) if err != nil { return err }
switch typ { case "app.bsky.feed.threadgate#followerRule": t.FeedThreadgate_FollowerRule = new(FeedThreadgate_FollowerRule) return glex.UnmarshalCBORBytes(b, t.FeedThreadgate_FollowerRule) case "app.bsky.feed.threadgate#followingRule": t.FeedThreadgate_FollowingRule = new(FeedThreadgate_FollowingRule) return glex.UnmarshalCBORBytes(b, t.FeedThreadgate_FollowingRule) case "app.bsky.feed.threadgate#listRule": t.FeedThreadgate_ListRule = new(FeedThreadgate_ListRule) return glex.UnmarshalCBORBytes(b, t.FeedThreadgate_ListRule) case "app.bsky.feed.threadgate#mentionRule": t.FeedThreadgate_MentionRule = new(FeedThreadgate_MentionRule) return glex.UnmarshalCBORBytes(b, t.FeedThreadgate_MentionRule) default: t.Raw = &glex.RawRecord{Type: typ, Encoding: "cbor", Bytes: append([]byte(nil), b...)} return nil }}
type ActorDefs_Preferences struct { ActorDefs_AdultContentPref *ActorDefs_AdultContentPref ActorDefs_BskyAppStatePref *ActorDefs_BskyAppStatePref ActorDefs_ContentLabelPref *ActorDefs_ContentLabelPref ActorDefs_DeclaredAgePref *ActorDefs_DeclaredAgePref ActorDefs_FeedViewPref *ActorDefs_FeedViewPref ActorDefs_HiddenPostsPref *ActorDefs_HiddenPostsPref ActorDefs_InterestsPref *ActorDefs_InterestsPref ActorDefs_LabelersPref *ActorDefs_LabelersPref ActorDefs_LiveEventPreferences *ActorDefs_LiveEventPreferences ActorDefs_MutedWordsPref *ActorDefs_MutedWordsPref ActorDefs_PersonalDetailsPref *ActorDefs_PersonalDetailsPref ActorDefs_PostInteractionSettingsPref *ActorDefs_PostInteractionSettingsPref ActorDefs_SavedFeedsPref *ActorDefs_SavedFeedsPref ActorDefs_SavedFeedsPrefV2 *ActorDefs_SavedFeedsPrefV2 ActorDefs_ThreadViewPref *ActorDefs_ThreadViewPref ActorDefs_VerificationPrefs *ActorDefs_VerificationPrefs // Raw preserves a variant whose $type is not in this union's generated // set, so unrecognized variants still round-trip losslessly through // decode/re-encode. Nil when a known variant is set. Raw *glex.RawRecord}
// MarshalJSON emits the set variant, stamped with its $type, per the atproto// union wire format. The value receiver stamps a copy, so the variant is// never mutated and both ActorDefs_Preferences and *ActorDefs_Preferences marshal correctly.func (t ActorDefs_Preferences) MarshalJSON() ([]byte, error) { if t.ActorDefs_AdultContentPref != nil { cp := *t.ActorDefs_AdultContentPref cp.LexiconTypeID = "app.bsky.actor.defs#adultContentPref" return json.Marshal(&cp) } if t.ActorDefs_BskyAppStatePref != nil { cp := *t.ActorDefs_BskyAppStatePref cp.LexiconTypeID = "app.bsky.actor.defs#bskyAppStatePref" return json.Marshal(&cp) } if t.ActorDefs_ContentLabelPref != nil { cp := *t.ActorDefs_ContentLabelPref cp.LexiconTypeID = "app.bsky.actor.defs#contentLabelPref" return json.Marshal(&cp) } if t.ActorDefs_DeclaredAgePref != nil { cp := *t.ActorDefs_DeclaredAgePref cp.LexiconTypeID = "app.bsky.actor.defs#declaredAgePref" return json.Marshal(&cp) } if t.ActorDefs_FeedViewPref != nil { cp := *t.ActorDefs_FeedViewPref cp.LexiconTypeID = "app.bsky.actor.defs#feedViewPref" return json.Marshal(&cp) } if t.ActorDefs_HiddenPostsPref != nil { cp := *t.ActorDefs_HiddenPostsPref cp.LexiconTypeID = "app.bsky.actor.defs#hiddenPostsPref" return json.Marshal(&cp) } if t.ActorDefs_InterestsPref != nil { cp := *t.ActorDefs_InterestsPref cp.LexiconTypeID = "app.bsky.actor.defs#interestsPref" return json.Marshal(&cp) } if t.ActorDefs_LabelersPref != nil { cp := *t.ActorDefs_LabelersPref cp.LexiconTypeID = "app.bsky.actor.defs#labelersPref" return json.Marshal(&cp) } if t.ActorDefs_LiveEventPreferences != nil { cp := *t.ActorDefs_LiveEventPreferences cp.LexiconTypeID = "app.bsky.actor.defs#liveEventPreferences" return json.Marshal(&cp) } if t.ActorDefs_MutedWordsPref != nil { cp := *t.ActorDefs_MutedWordsPref cp.LexiconTypeID = "app.bsky.actor.defs#mutedWordsPref" return json.Marshal(&cp) } if t.ActorDefs_PersonalDetailsPref != nil { cp := *t.ActorDefs_PersonalDetailsPref cp.LexiconTypeID = "app.bsky.actor.defs#personalDetailsPref" return json.Marshal(&cp) } if t.ActorDefs_PostInteractionSettingsPref != nil { cp := *t.ActorDefs_PostInteractionSettingsPref cp.LexiconTypeID = "app.bsky.actor.defs#postInteractionSettingsPref" return json.Marshal(&cp) } if t.ActorDefs_SavedFeedsPref != nil { cp := *t.ActorDefs_SavedFeedsPref cp.LexiconTypeID = "app.bsky.actor.defs#savedFeedsPref" return json.Marshal(&cp) } if t.ActorDefs_SavedFeedsPrefV2 != nil { cp := *t.ActorDefs_SavedFeedsPrefV2 cp.LexiconTypeID = "app.bsky.actor.defs#savedFeedsPrefV2" return json.Marshal(&cp) } if t.ActorDefs_ThreadViewPref != nil { cp := *t.ActorDefs_ThreadViewPref cp.LexiconTypeID = "app.bsky.actor.defs#threadViewPref" return json.Marshal(&cp) } if t.ActorDefs_VerificationPrefs != nil { cp := *t.ActorDefs_VerificationPrefs cp.LexiconTypeID = "app.bsky.actor.defs#verificationPrefs" return json.Marshal(&cp) } if t.Raw != nil { if t.Raw.Encoding != "json" { return nil, fmt.Errorf("cannot marshal raw %s record as JSON in union ActorDefs_Preferences", t.Raw.Encoding) } return t.Raw.Bytes, nil } return nil, fmt.Errorf("cannot marshal empty union ActorDefs_Preferences as JSON")}
func (t *ActorDefs_Preferences) UnmarshalJSON(b []byte) error { typ, err := glex.TypeExtract(b) if err != nil { return err }
switch typ { case "app.bsky.actor.defs#adultContentPref": t.ActorDefs_AdultContentPref = new(ActorDefs_AdultContentPref) return json.Unmarshal(b, t.ActorDefs_AdultContentPref) case "app.bsky.actor.defs#bskyAppStatePref": t.ActorDefs_BskyAppStatePref = new(ActorDefs_BskyAppStatePref) return json.Unmarshal(b, t.ActorDefs_BskyAppStatePref) case "app.bsky.actor.defs#contentLabelPref": t.ActorDefs_ContentLabelPref = new(ActorDefs_ContentLabelPref) return json.Unmarshal(b, t.ActorDefs_ContentLabelPref) case "app.bsky.actor.defs#declaredAgePref": t.ActorDefs_DeclaredAgePref = new(ActorDefs_DeclaredAgePref) return json.Unmarshal(b, t.ActorDefs_DeclaredAgePref) case "app.bsky.actor.defs#feedViewPref": t.ActorDefs_FeedViewPref = new(ActorDefs_FeedViewPref) return json.Unmarshal(b, t.ActorDefs_FeedViewPref) case "app.bsky.actor.defs#hiddenPostsPref": t.ActorDefs_HiddenPostsPref = new(ActorDefs_HiddenPostsPref) return json.Unmarshal(b, t.ActorDefs_HiddenPostsPref) case "app.bsky.actor.defs#interestsPref": t.ActorDefs_InterestsPref = new(ActorDefs_InterestsPref) return json.Unmarshal(b, t.ActorDefs_InterestsPref) case "app.bsky.actor.defs#labelersPref": t.ActorDefs_LabelersPref = new(ActorDefs_LabelersPref) return json.Unmarshal(b, t.ActorDefs_LabelersPref) case "app.bsky.actor.defs#liveEventPreferences": t.ActorDefs_LiveEventPreferences = new(ActorDefs_LiveEventPreferences) return json.Unmarshal(b, t.ActorDefs_LiveEventPreferences) case "app.bsky.actor.defs#mutedWordsPref": t.ActorDefs_MutedWordsPref = new(ActorDefs_MutedWordsPref) return json.Unmarshal(b, t.ActorDefs_MutedWordsPref) case "app.bsky.actor.defs#personalDetailsPref": t.ActorDefs_PersonalDetailsPref = new(ActorDefs_PersonalDetailsPref) return json.Unmarshal(b, t.ActorDefs_PersonalDetailsPref) case "app.bsky.actor.defs#postInteractionSettingsPref": t.ActorDefs_PostInteractionSettingsPref = new(ActorDefs_PostInteractionSettingsPref) return json.Unmarshal(b, t.ActorDefs_PostInteractionSettingsPref) case "app.bsky.actor.defs#savedFeedsPref": t.ActorDefs_SavedFeedsPref = new(ActorDefs_SavedFeedsPref) return json.Unmarshal(b, t.ActorDefs_SavedFeedsPref) case "app.bsky.actor.defs#savedFeedsPrefV2": t.ActorDefs_SavedFeedsPrefV2 = new(ActorDefs_SavedFeedsPrefV2) return json.Unmarshal(b, t.ActorDefs_SavedFeedsPrefV2) case "app.bsky.actor.defs#threadViewPref": t.ActorDefs_ThreadViewPref = new(ActorDefs_ThreadViewPref) return json.Unmarshal(b, t.ActorDefs_ThreadViewPref) case "app.bsky.actor.defs#verificationPrefs": t.ActorDefs_VerificationPrefs = new(ActorDefs_VerificationPrefs) return json.Unmarshal(b, t.ActorDefs_VerificationPrefs) default: t.Raw = &glex.RawRecord{Type: typ, Encoding: "json", Bytes: append([]byte(nil), b...)} return nil }}
// MarshalCBOR implements drisl.Marshaler, emitting the set variant (stamped// with its $type) per the atproto union wire format. go-dasl invokes this// when the union appears inside another record, so nested unions serialize// correctly.func (t ActorDefs_Preferences) MarshalCBOR() ([]byte, error) { if t.ActorDefs_AdultContentPref != nil { cp := *t.ActorDefs_AdultContentPref cp.LexiconTypeID = "app.bsky.actor.defs#adultContentPref" return glex.MarshalCBORBytes(&cp) } if t.ActorDefs_BskyAppStatePref != nil { cp := *t.ActorDefs_BskyAppStatePref cp.LexiconTypeID = "app.bsky.actor.defs#bskyAppStatePref" return glex.MarshalCBORBytes(&cp) } if t.ActorDefs_ContentLabelPref != nil { cp := *t.ActorDefs_ContentLabelPref cp.LexiconTypeID = "app.bsky.actor.defs#contentLabelPref" return glex.MarshalCBORBytes(&cp) } if t.ActorDefs_DeclaredAgePref != nil { cp := *t.ActorDefs_DeclaredAgePref cp.LexiconTypeID = "app.bsky.actor.defs#declaredAgePref" return glex.MarshalCBORBytes(&cp) } if t.ActorDefs_FeedViewPref != nil { cp := *t.ActorDefs_FeedViewPref cp.LexiconTypeID = "app.bsky.actor.defs#feedViewPref" return glex.MarshalCBORBytes(&cp) } if t.ActorDefs_HiddenPostsPref != nil { cp := *t.ActorDefs_HiddenPostsPref cp.LexiconTypeID = "app.bsky.actor.defs#hiddenPostsPref" return glex.MarshalCBORBytes(&cp) } if t.ActorDefs_InterestsPref != nil { cp := *t.ActorDefs_InterestsPref cp.LexiconTypeID = "app.bsky.actor.defs#interestsPref" return glex.MarshalCBORBytes(&cp) } if t.ActorDefs_LabelersPref != nil { cp := *t.ActorDefs_LabelersPref cp.LexiconTypeID = "app.bsky.actor.defs#labelersPref" return glex.MarshalCBORBytes(&cp) } if t.ActorDefs_LiveEventPreferences != nil { cp := *t.ActorDefs_LiveEventPreferences cp.LexiconTypeID = "app.bsky.actor.defs#liveEventPreferences" return glex.MarshalCBORBytes(&cp) } if t.ActorDefs_MutedWordsPref != nil { cp := *t.ActorDefs_MutedWordsPref cp.LexiconTypeID = "app.bsky.actor.defs#mutedWordsPref" return glex.MarshalCBORBytes(&cp) } if t.ActorDefs_PersonalDetailsPref != nil { cp := *t.ActorDefs_PersonalDetailsPref cp.LexiconTypeID = "app.bsky.actor.defs#personalDetailsPref" return glex.MarshalCBORBytes(&cp) } if t.ActorDefs_PostInteractionSettingsPref != nil { cp := *t.ActorDefs_PostInteractionSettingsPref cp.LexiconTypeID = "app.bsky.actor.defs#postInteractionSettingsPref" return glex.MarshalCBORBytes(&cp) } if t.ActorDefs_SavedFeedsPref != nil { cp := *t.ActorDefs_SavedFeedsPref cp.LexiconTypeID = "app.bsky.actor.defs#savedFeedsPref" return glex.MarshalCBORBytes(&cp) } if t.ActorDefs_SavedFeedsPrefV2 != nil { cp := *t.ActorDefs_SavedFeedsPrefV2 cp.LexiconTypeID = "app.bsky.actor.defs#savedFeedsPrefV2" return glex.MarshalCBORBytes(&cp) } if t.ActorDefs_ThreadViewPref != nil { cp := *t.ActorDefs_ThreadViewPref cp.LexiconTypeID = "app.bsky.actor.defs#threadViewPref" return glex.MarshalCBORBytes(&cp) } if t.ActorDefs_VerificationPrefs != nil { cp := *t.ActorDefs_VerificationPrefs cp.LexiconTypeID = "app.bsky.actor.defs#verificationPrefs" return glex.MarshalCBORBytes(&cp) } if t.Raw != nil { if t.Raw.Encoding != "cbor" { return nil, fmt.Errorf("cannot marshal raw %s record as CBOR in union ActorDefs_Preferences", t.Raw.Encoding) } return t.Raw.Bytes, nil } return nil, fmt.Errorf("cannot marshal empty union ActorDefs_Preferences as CBOR")}
func (t *ActorDefs_Preferences) UnmarshalCBOR(b []byte) error { typ, err := glex.CborTypeExtract(b) if err != nil { return err }
switch typ { case "app.bsky.actor.defs#adultContentPref": t.ActorDefs_AdultContentPref = new(ActorDefs_AdultContentPref) return glex.UnmarshalCBORBytes(b, t.ActorDefs_AdultContentPref) case "app.bsky.actor.defs#bskyAppStatePref": t.ActorDefs_BskyAppStatePref = new(ActorDefs_BskyAppStatePref) return glex.UnmarshalCBORBytes(b, t.ActorDefs_BskyAppStatePref) case "app.bsky.actor.defs#contentLabelPref": t.ActorDefs_ContentLabelPref = new(ActorDefs_ContentLabelPref) return glex.UnmarshalCBORBytes(b, t.ActorDefs_ContentLabelPref) case "app.bsky.actor.defs#declaredAgePref": t.ActorDefs_DeclaredAgePref = new(ActorDefs_DeclaredAgePref) return glex.UnmarshalCBORBytes(b, t.ActorDefs_DeclaredAgePref) case "app.bsky.actor.defs#feedViewPref": t.ActorDefs_FeedViewPref = new(ActorDefs_FeedViewPref) return glex.UnmarshalCBORBytes(b, t.ActorDefs_FeedViewPref) case "app.bsky.actor.defs#hiddenPostsPref": t.ActorDefs_HiddenPostsPref = new(ActorDefs_HiddenPostsPref) return glex.UnmarshalCBORBytes(b, t.ActorDefs_HiddenPostsPref) case "app.bsky.actor.defs#interestsPref": t.ActorDefs_InterestsPref = new(ActorDefs_InterestsPref) return glex.UnmarshalCBORBytes(b, t.ActorDefs_InterestsPref) case "app.bsky.actor.defs#labelersPref": t.ActorDefs_LabelersPref = new(ActorDefs_LabelersPref) return glex.UnmarshalCBORBytes(b, t.ActorDefs_LabelersPref) case "app.bsky.actor.defs#liveEventPreferences": t.ActorDefs_LiveEventPreferences = new(ActorDefs_LiveEventPreferences) return glex.UnmarshalCBORBytes(b, t.ActorDefs_LiveEventPreferences) case "app.bsky.actor.defs#mutedWordsPref": t.ActorDefs_MutedWordsPref = new(ActorDefs_MutedWordsPref) return glex.UnmarshalCBORBytes(b, t.ActorDefs_MutedWordsPref) case "app.bsky.actor.defs#personalDetailsPref": t.ActorDefs_PersonalDetailsPref = new(ActorDefs_PersonalDetailsPref) return glex.UnmarshalCBORBytes(b, t.ActorDefs_PersonalDetailsPref) case "app.bsky.actor.defs#postInteractionSettingsPref": t.ActorDefs_PostInteractionSettingsPref = new(ActorDefs_PostInteractionSettingsPref) return glex.UnmarshalCBORBytes(b, t.ActorDefs_PostInteractionSettingsPref) case "app.bsky.actor.defs#savedFeedsPref": t.ActorDefs_SavedFeedsPref = new(ActorDefs_SavedFeedsPref) return glex.UnmarshalCBORBytes(b, t.ActorDefs_SavedFeedsPref) case "app.bsky.actor.defs#savedFeedsPrefV2": t.ActorDefs_SavedFeedsPrefV2 = new(ActorDefs_SavedFeedsPrefV2) return glex.UnmarshalCBORBytes(b, t.ActorDefs_SavedFeedsPrefV2) case "app.bsky.actor.defs#threadViewPref": t.ActorDefs_ThreadViewPref = new(ActorDefs_ThreadViewPref) return glex.UnmarshalCBORBytes(b, t.ActorDefs_ThreadViewPref) case "app.bsky.actor.defs#verificationPrefs": t.ActorDefs_VerificationPrefs = new(ActorDefs_VerificationPrefs) return glex.UnmarshalCBORBytes(b, t.ActorDefs_VerificationPrefs) default: t.Raw = &glex.RawRecord{Type: typ, Encoding: "cbor", Bytes: append([]byte(nil), b...)} return nil }}
// ActorDefs_ProfileAssociated is a "profileAssociated" in the app.bsky.actor.defs schema.type ActorDefs_ProfileAssociated struct { LexiconTypeID string `json:"$type,omitempty"` ActivitySubscription *ActorDefs_ProfileAssociatedActivitySubscription `json:"activitySubscription,omitempty"` Chat *ActorDefs_ProfileAssociatedChat `json:"chat,omitempty"` Feedgens *int64 `json:"feedgens,omitempty"` Germ *ActorDefs_ProfileAssociatedGerm `json:"germ,omitempty"` Labeler *bool `json:"labeler,omitempty"` Lists *int64 `json:"lists,omitempty"` StarterPacks *int64 `json:"starterPacks,omitempty"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_ProfileAssociated) RecordTypeID() string { return "app.bsky.actor.defs#profileAssociated"}
func (t *ActorDefs_ProfileAssociated) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#profileAssociated" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_ProfileAssociated) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_ProfileAssociatedActivitySubscription is a "profileAssociatedActivitySubscription" in the app.bsky.actor.defs schema.type ActorDefs_ProfileAssociatedActivitySubscription struct { LexiconTypeID string `json:"$type,omitempty"` AllowSubscriptions string `json:"allowSubscriptions"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_ProfileAssociatedActivitySubscription) RecordTypeID() string { return "app.bsky.actor.defs#profileAssociatedActivitySubscription"}
func (t *ActorDefs_ProfileAssociatedActivitySubscription) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#profileAssociatedActivitySubscription" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_ProfileAssociatedActivitySubscription) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_ProfileAssociatedChat is a "profileAssociatedChat" in the app.bsky.actor.defs schema.type ActorDefs_ProfileAssociatedChat struct { LexiconTypeID string `json:"$type,omitempty"` AllowGroupInvites *string `json:"allowGroupInvites,omitempty"` AllowIncoming string `json:"allowIncoming"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_ProfileAssociatedChat) RecordTypeID() string { return "app.bsky.actor.defs#profileAssociatedChat"}
func (t *ActorDefs_ProfileAssociatedChat) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#profileAssociatedChat" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_ProfileAssociatedChat) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_ProfileAssociatedGerm is a "profileAssociatedGerm" in the app.bsky.actor.defs schema.type ActorDefs_ProfileAssociatedGerm struct { LexiconTypeID string `json:"$type,omitempty"` MessageMeUrl string `json:"messageMeUrl"` ShowButtonTo string `json:"showButtonTo"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_ProfileAssociatedGerm) RecordTypeID() string { return "app.bsky.actor.defs#profileAssociatedGerm"}
func (t *ActorDefs_ProfileAssociatedGerm) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#profileAssociatedGerm" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_ProfileAssociatedGerm) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_ProfileView is a "profileView" in the app.bsky.actor.defs schema.type ActorDefs_ProfileView struct { LexiconTypeID string `json:"$type,omitempty"` Associated *ActorDefs_ProfileAssociated `json:"associated,omitempty"` Avatar *string `json:"avatar,omitempty"` CreatedAt *string `json:"createdAt,omitempty"` // debug: Debug information for internal development Debug *glex.LexiconTypeDecoder `json:"debug,omitempty"` Description *string `json:"description,omitempty"` Did string `json:"did"` DisplayName *string `json:"displayName,omitempty"` Handle string `json:"handle"` IndexedAt *string `json:"indexedAt,omitempty"` Labels []comatproto.LabelDefs_Label `json:"labels,omitempty"` Pronouns *string `json:"pronouns,omitempty"` Status *ActorDefs_StatusView `json:"status,omitempty"` Verification *ActorDefs_VerificationState `json:"verification,omitempty"` Viewer *ActorDefs_ViewerState `json:"viewer,omitempty"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_ProfileView) RecordTypeID() string { return "app.bsky.actor.defs#profileView" }
func (t *ActorDefs_ProfileView) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#profileView" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_ProfileView) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_ProfileViewBasic is a "profileViewBasic" in the app.bsky.actor.defs schema.type ActorDefs_ProfileViewBasic struct { LexiconTypeID string `json:"$type,omitempty"` Associated *ActorDefs_ProfileAssociated `json:"associated,omitempty"` Avatar *string `json:"avatar,omitempty"` CreatedAt *string `json:"createdAt,omitempty"` // debug: Debug information for internal development Debug *glex.LexiconTypeDecoder `json:"debug,omitempty"` Did string `json:"did"` DisplayName *string `json:"displayName,omitempty"` Handle string `json:"handle"` Labels []comatproto.LabelDefs_Label `json:"labels,omitempty"` Pronouns *string `json:"pronouns,omitempty"` Status *ActorDefs_StatusView `json:"status,omitempty"` Verification *ActorDefs_VerificationState `json:"verification,omitempty"` Viewer *ActorDefs_ViewerState `json:"viewer,omitempty"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_ProfileViewBasic) RecordTypeID() string { return "app.bsky.actor.defs#profileViewBasic"}
func (t *ActorDefs_ProfileViewBasic) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#profileViewBasic" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_ProfileViewBasic) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_ProfileViewDetailed is a "profileViewDetailed" in the app.bsky.actor.defs schema.type ActorDefs_ProfileViewDetailed struct { LexiconTypeID string `json:"$type,omitempty"` Associated *ActorDefs_ProfileAssociated `json:"associated,omitempty"` Avatar *string `json:"avatar,omitempty"` Banner *string `json:"banner,omitempty"` CreatedAt *string `json:"createdAt,omitempty"` // debug: Debug information for internal development Debug *glex.LexiconTypeDecoder `json:"debug,omitempty"` Description *string `json:"description,omitempty"` Did string `json:"did"` DisplayName *string `json:"displayName,omitempty"` FollowersCount *int64 `json:"followersCount,omitempty"` FollowsCount *int64 `json:"followsCount,omitempty"` Handle string `json:"handle"` IndexedAt *string `json:"indexedAt,omitempty"` JoinedViaStarterPack *GraphDefs_StarterPackViewBasic `json:"joinedViaStarterPack,omitempty"` Labels []comatproto.LabelDefs_Label `json:"labels,omitempty"` PinnedPost *comatproto.RepoStrongRef `json:"pinnedPost,omitempty"` PostsCount *int64 `json:"postsCount,omitempty"` Pronouns *string `json:"pronouns,omitempty"` Status *ActorDefs_StatusView `json:"status,omitempty"` Verification *ActorDefs_VerificationState `json:"verification,omitempty"` Viewer *ActorDefs_ViewerState `json:"viewer,omitempty"` Website *string `json:"website,omitempty"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_ProfileViewDetailed) RecordTypeID() string { return "app.bsky.actor.defs#profileViewDetailed"}
func (t *ActorDefs_ProfileViewDetailed) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#profileViewDetailed" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_ProfileViewDetailed) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_SavedFeed is a "savedFeed" in the app.bsky.actor.defs schema.type ActorDefs_SavedFeed struct { LexiconTypeID string `json:"$type,omitempty"` Id string `json:"id"` Pinned bool `json:"pinned"` Type string `json:"type"` Value string `json:"value"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_SavedFeed) RecordTypeID() string { return "app.bsky.actor.defs#savedFeed" }
func (t *ActorDefs_SavedFeed) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#savedFeed" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_SavedFeed) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_SavedFeedsPref is a "savedFeedsPref" in the app.bsky.actor.defs schema.type ActorDefs_SavedFeedsPref struct { LexiconTypeID string `json:"$type,omitempty"` Pinned []string `json:"pinned"` Saved []string `json:"saved"` TimelineIndex *int64 `json:"timelineIndex,omitempty"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_SavedFeedsPref) RecordTypeID() string { return "app.bsky.actor.defs#savedFeedsPref" }
func (t *ActorDefs_SavedFeedsPref) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#savedFeedsPref" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_SavedFeedsPref) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_SavedFeedsPrefV2 is a "savedFeedsPrefV2" in the app.bsky.actor.defs schema.type ActorDefs_SavedFeedsPrefV2 struct { LexiconTypeID string `json:"$type,omitempty"` Items []ActorDefs_SavedFeed `json:"items"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_SavedFeedsPrefV2) RecordTypeID() string { return "app.bsky.actor.defs#savedFeedsPrefV2"}
func (t *ActorDefs_SavedFeedsPrefV2) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#savedFeedsPrefV2" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_SavedFeedsPrefV2) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_StatusView is a "statusView" in the app.bsky.actor.defs schema.type ActorDefs_StatusView struct { LexiconTypeID string `json:"$type,omitempty"` Cid *string `json:"cid,omitempty"` // embed: An optional embed associated with the status. Embed *ActorDefs_StatusView_Embed `json:"embed,omitempty"` // expiresAt: The date when this status will expire. The application might choose to no longer return the status after expiration. ExpiresAt *string `json:"expiresAt,omitempty"` // isActive: True if the status is not expired, false if it is expired. Only present if expiration was set. IsActive *bool `json:"isActive,omitempty"` // isDisabled: True if the user's go-live access has been disabled by a moderator, false otherwise. IsDisabled *bool `json:"isDisabled,omitempty"` Labels []comatproto.LabelDefs_Label `json:"labels,omitempty"` Record *glex.LexiconTypeDecoder `json:"record"` // status: The status for the account. Status string `json:"status"` Uri *string `json:"uri,omitempty"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_StatusView) RecordTypeID() string { return "app.bsky.actor.defs#statusView" }
func (t *ActorDefs_StatusView) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#statusView" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_StatusView) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// An optional embed associated with the status.type ActorDefs_StatusView_Embed struct { EmbedExternal_View *EmbedExternal_View // Raw preserves a variant whose $type is not in this union's generated // set, so unrecognized variants still round-trip losslessly through // decode/re-encode. Nil when a known variant is set. Raw *glex.RawRecord}
// MarshalJSON emits the set variant, stamped with its $type, per the atproto// union wire format. The value receiver stamps a copy, so the variant is// never mutated and both ActorDefs_StatusView_Embed and *ActorDefs_StatusView_Embed marshal correctly.func (t ActorDefs_StatusView_Embed) MarshalJSON() ([]byte, error) { if t.EmbedExternal_View != nil { cp := *t.EmbedExternal_View cp.LexiconTypeID = "app.bsky.embed.external#view" return json.Marshal(&cp) } if t.Raw != nil { if t.Raw.Encoding != "json" { return nil, fmt.Errorf("cannot marshal raw %s record as JSON in union ActorDefs_StatusView_Embed", t.Raw.Encoding) } return t.Raw.Bytes, nil } return nil, fmt.Errorf("cannot marshal empty union ActorDefs_StatusView_Embed as JSON")}
func (t *ActorDefs_StatusView_Embed) UnmarshalJSON(b []byte) error { typ, err := glex.TypeExtract(b) if err != nil { return err }
switch typ { case "app.bsky.embed.external#view": t.EmbedExternal_View = new(EmbedExternal_View) return json.Unmarshal(b, t.EmbedExternal_View) default: t.Raw = &glex.RawRecord{Type: typ, Encoding: "json", Bytes: append([]byte(nil), b...)} return nil }}
// MarshalCBOR implements drisl.Marshaler, emitting the set variant (stamped// with its $type) per the atproto union wire format. go-dasl invokes this// when the union appears inside another record, so nested unions serialize// correctly.func (t ActorDefs_StatusView_Embed) MarshalCBOR() ([]byte, error) { if t.EmbedExternal_View != nil { cp := *t.EmbedExternal_View cp.LexiconTypeID = "app.bsky.embed.external#view" return glex.MarshalCBORBytes(&cp) } if t.Raw != nil { if t.Raw.Encoding != "cbor" { return nil, fmt.Errorf("cannot marshal raw %s record as CBOR in union ActorDefs_StatusView_Embed", t.Raw.Encoding) } return t.Raw.Bytes, nil } return nil, fmt.Errorf("cannot marshal empty union ActorDefs_StatusView_Embed as CBOR")}
func (t *ActorDefs_StatusView_Embed) UnmarshalCBOR(b []byte) error { typ, err := glex.CborTypeExtract(b) if err != nil { return err }
switch typ { case "app.bsky.embed.external#view": t.EmbedExternal_View = new(EmbedExternal_View) return glex.UnmarshalCBORBytes(b, t.EmbedExternal_View) default: t.Raw = &glex.RawRecord{Type: typ, Encoding: "cbor", Bytes: append([]byte(nil), b...)} return nil }}
// ActorDefs_ThreadViewPref is a "threadViewPref" in the app.bsky.actor.defs schema.type ActorDefs_ThreadViewPref struct { LexiconTypeID string `json:"$type,omitempty"` // sort: Sorting mode for threads. Sort *string `json:"sort,omitempty"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_ThreadViewPref) RecordTypeID() string { return "app.bsky.actor.defs#threadViewPref" }
func (t *ActorDefs_ThreadViewPref) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#threadViewPref" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_ThreadViewPref) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_VerificationPrefs is a "verificationPrefs" in the app.bsky.actor.defs schema.//// Preferences for how verified accounts appear in the app.type ActorDefs_VerificationPrefs struct { LexiconTypeID string `json:"$type,omitempty"` // hideBadges: Hide the blue check badges for verified accounts and trusted verifiers. HideBadges *bool `json:"hideBadges,omitempty"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_VerificationPrefs) RecordTypeID() string { return "app.bsky.actor.defs#verificationPrefs"}
func (t *ActorDefs_VerificationPrefs) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#verificationPrefs" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_VerificationPrefs) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_VerificationState is a "verificationState" in the app.bsky.actor.defs schema.//// Represents the verification information about the user this object is attached to.type ActorDefs_VerificationState struct { LexiconTypeID string `json:"$type,omitempty"` // trustedVerifierStatus: The user's status as a trusted verifier. TrustedVerifierStatus string `json:"trustedVerifierStatus"` // verifications: All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included. Verifications []ActorDefs_VerificationView `json:"verifications"` // verifiedStatus: The user's status as a verified account. VerifiedStatus string `json:"verifiedStatus"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_VerificationState) RecordTypeID() string { return "app.bsky.actor.defs#verificationState"}
func (t *ActorDefs_VerificationState) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#verificationState" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_VerificationState) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_VerificationView is a "verificationView" in the app.bsky.actor.defs schema.//// An individual verification for an associated subject.type ActorDefs_VerificationView struct { LexiconTypeID string `json:"$type,omitempty"` // createdAt: Timestamp when the verification was created. CreatedAt string `json:"createdAt"` // isValid: True if the verification passes validation, otherwise false. IsValid bool `json:"isValid"` // issuer: The user who issued this verification. Issuer string `json:"issuer"` // issuerDisplayName: The display name of the issuer. IssuerDisplayName *string `json:"issuerDisplayName,omitempty"` // issuerHandle: The handle of the issuer. IssuerHandle *string `json:"issuerHandle,omitempty"` // uri: The AT-URI of the verification record. Uri string `json:"uri"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_VerificationView) RecordTypeID() string { return "app.bsky.actor.defs#verificationView"}
func (t *ActorDefs_VerificationView) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#verificationView" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_VerificationView) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}
// ActorDefs_ViewerState is a "viewerState" in the app.bsky.actor.defs schema.//// Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.type ActorDefs_ViewerState struct { LexiconTypeID string `json:"$type,omitempty"` // activitySubscription: This property is present only in selected cases, as an optimization. ActivitySubscription *NotificationDefs_ActivitySubscription `json:"activitySubscription,omitempty"` BlockedBy *bool `json:"blockedBy,omitempty"` Blocking *string `json:"blocking,omitempty"` BlockingByList *GraphDefs_ListViewBasic `json:"blockingByList,omitempty"` FollowedBy *string `json:"followedBy,omitempty"` Following *string `json:"following,omitempty"` // knownFollowers: This property is present only in selected cases, as an optimization. KnownFollowers *ActorDefs_KnownFollowers `json:"knownFollowers,omitempty"` Muted *bool `json:"muted,omitempty"` MutedByList *GraphDefs_ListViewBasic `json:"mutedByList,omitempty"`}
// RecordTypeID implements glex.Record.func (t *ActorDefs_ViewerState) RecordTypeID() string { return "app.bsky.actor.defs#viewerState" }
func (t *ActorDefs_ViewerState) MarshalCBOR(w io.Writer) error { if t == nil { _, err := w.Write(cbg.CborNull) return err } // stamp $type on a copy so marshal never mutates the record cp := *t cp.LexiconTypeID = "app.bsky.actor.defs#viewerState" return glex.MarshalCBOR(w, &cp)}
func (t *ActorDefs_ViewerState) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t)}