// Code generated by glex; DO NOT EDIT. // Lexicon schema: app.bsky.notification.defs package appbsky import ( "io" glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen" ) // NotificationDefs_ActivitySubscription is a "activitySubscription" in the app.bsky.notification.defs schema. type NotificationDefs_ActivitySubscription struct { LexiconTypeID string `json:"$type,omitempty"` Post bool `json:"post"` Reply bool `json:"reply"` } // RecordTypeID implements glex.Record. func (t *NotificationDefs_ActivitySubscription) RecordTypeID() string { return "app.bsky.notification.defs#activitySubscription" } func (t *NotificationDefs_ActivitySubscription) 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.notification.defs#activitySubscription" return glex.MarshalCBOR(w, &cp) } func (t *NotificationDefs_ActivitySubscription) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } // NotificationDefs_ChatPreference is a "chatPreference" in the app.bsky.notification.defs schema. // // Deprecated: use chat.bsky.notification preferences instead. This will only return a default value. type NotificationDefs_ChatPreference struct { LexiconTypeID string `json:"$type,omitempty"` Include string `json:"include"` Push bool `json:"push"` } // RecordTypeID implements glex.Record. func (t *NotificationDefs_ChatPreference) RecordTypeID() string { return "app.bsky.notification.defs#chatPreference" } func (t *NotificationDefs_ChatPreference) 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.notification.defs#chatPreference" return glex.MarshalCBOR(w, &cp) } func (t *NotificationDefs_ChatPreference) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } // NotificationDefs_FilterablePreference is a "filterablePreference" in the app.bsky.notification.defs schema. type NotificationDefs_FilterablePreference struct { LexiconTypeID string `json:"$type,omitempty"` Include string `json:"include"` List bool `json:"list"` Push bool `json:"push"` } // RecordTypeID implements glex.Record. func (t *NotificationDefs_FilterablePreference) RecordTypeID() string { return "app.bsky.notification.defs#filterablePreference" } func (t *NotificationDefs_FilterablePreference) 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.notification.defs#filterablePreference" return glex.MarshalCBOR(w, &cp) } func (t *NotificationDefs_FilterablePreference) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } // NotificationDefs_Preference is a "preference" in the app.bsky.notification.defs schema. type NotificationDefs_Preference struct { LexiconTypeID string `json:"$type,omitempty"` List bool `json:"list"` Push bool `json:"push"` } // RecordTypeID implements glex.Record. func (t *NotificationDefs_Preference) RecordTypeID() string { return "app.bsky.notification.defs#preference" } func (t *NotificationDefs_Preference) 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.notification.defs#preference" return glex.MarshalCBOR(w, &cp) } func (t *NotificationDefs_Preference) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } // NotificationDefs_Preferences is a "preferences" in the app.bsky.notification.defs schema. type NotificationDefs_Preferences struct { LexiconTypeID string `json:"$type,omitempty"` // chat: Deprecated: use chat.bsky.notification preferences instead. This will only return a default value. Chat NotificationDefs_ChatPreference `json:"chat"` Follow NotificationDefs_FilterablePreference `json:"follow"` Like NotificationDefs_FilterablePreference `json:"like"` LikeViaRepost NotificationDefs_FilterablePreference `json:"likeViaRepost"` Mention NotificationDefs_FilterablePreference `json:"mention"` Quote NotificationDefs_FilterablePreference `json:"quote"` Reply NotificationDefs_FilterablePreference `json:"reply"` Repost NotificationDefs_FilterablePreference `json:"repost"` RepostViaRepost NotificationDefs_FilterablePreference `json:"repostViaRepost"` StarterpackJoined NotificationDefs_Preference `json:"starterpackJoined"` SubscribedPost NotificationDefs_Preference `json:"subscribedPost"` Unverified NotificationDefs_Preference `json:"unverified"` Verified NotificationDefs_Preference `json:"verified"` } // RecordTypeID implements glex.Record. func (t *NotificationDefs_Preferences) RecordTypeID() string { return "app.bsky.notification.defs#preferences" } func (t *NotificationDefs_Preferences) 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.notification.defs#preferences" return glex.MarshalCBOR(w, &cp) } func (t *NotificationDefs_Preferences) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } // NotificationDefs_RecordDeleted is a "recordDeleted" in the app.bsky.notification.defs schema. type NotificationDefs_RecordDeleted struct { LexiconTypeID string `json:"$type,omitempty"` } // RecordTypeID implements glex.Record. func (t *NotificationDefs_RecordDeleted) RecordTypeID() string { return "app.bsky.notification.defs#recordDeleted" } func (t *NotificationDefs_RecordDeleted) 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.notification.defs#recordDeleted" return glex.MarshalCBOR(w, &cp) } func (t *NotificationDefs_RecordDeleted) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } // NotificationDefs_SubjectActivitySubscription is a "subjectActivitySubscription" in the app.bsky.notification.defs schema. // // Object used to store activity subscription data in stash. type NotificationDefs_SubjectActivitySubscription struct { LexiconTypeID string `json:"$type,omitempty"` ActivitySubscription NotificationDefs_ActivitySubscription `json:"activitySubscription"` Subject string `json:"subject"` } // RecordTypeID implements glex.Record. func (t *NotificationDefs_SubjectActivitySubscription) RecordTypeID() string { return "app.bsky.notification.defs#subjectActivitySubscription" } func (t *NotificationDefs_SubjectActivitySubscription) 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.notification.defs#subjectActivitySubscription" return glex.MarshalCBOR(w, &cp) } func (t *NotificationDefs_SubjectActivitySubscription) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) }