// Code generated by glex; DO NOT EDIT. // Lexicon schema: app.bsky.graph.defs package appbsky import ( "io" glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen" comatproto "stream.place/streamplace/pkg/comatproto" ) // GraphDefs_ListItemView is a "listItemView" in the app.bsky.graph.defs schema. type GraphDefs_ListItemView struct { LexiconTypeID string `json:"$type,omitempty"` Subject ActorDefs_ProfileView `json:"subject"` Uri string `json:"uri"` } // RecordTypeID implements glex.Record. func (t *GraphDefs_ListItemView) RecordTypeID() string { return "app.bsky.graph.defs#listItemView" } func (t *GraphDefs_ListItemView) 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.graph.defs#listItemView" return glex.MarshalCBOR(w, &cp) } func (t *GraphDefs_ListItemView) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } // GraphDefs_ListView is a "listView" in the app.bsky.graph.defs schema. type GraphDefs_ListView struct { LexiconTypeID string `json:"$type,omitempty"` Avatar *string `json:"avatar,omitempty"` Cid string `json:"cid"` Creator ActorDefs_ProfileView `json:"creator"` Description *string `json:"description,omitempty"` DescriptionFacets []RichtextFacet `json:"descriptionFacets,omitempty"` IndexedAt string `json:"indexedAt"` Labels []comatproto.LabelDefs_Label `json:"labels,omitempty"` ListItemCount *int64 `json:"listItemCount,omitempty"` Name string `json:"name"` Purpose string `json:"purpose"` Uri string `json:"uri"` Viewer *GraphDefs_ListViewerState `json:"viewer,omitempty"` } // RecordTypeID implements glex.Record. func (t *GraphDefs_ListView) RecordTypeID() string { return "app.bsky.graph.defs#listView" } func (t *GraphDefs_ListView) 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.graph.defs#listView" return glex.MarshalCBOR(w, &cp) } func (t *GraphDefs_ListView) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } // GraphDefs_ListViewBasic is a "listViewBasic" in the app.bsky.graph.defs schema. type GraphDefs_ListViewBasic struct { LexiconTypeID string `json:"$type,omitempty"` Avatar *string `json:"avatar,omitempty"` Cid string `json:"cid"` IndexedAt *string `json:"indexedAt,omitempty"` Labels []comatproto.LabelDefs_Label `json:"labels,omitempty"` ListItemCount *int64 `json:"listItemCount,omitempty"` Name string `json:"name"` Purpose string `json:"purpose"` Uri string `json:"uri"` Viewer *GraphDefs_ListViewerState `json:"viewer,omitempty"` } // RecordTypeID implements glex.Record. func (t *GraphDefs_ListViewBasic) RecordTypeID() string { return "app.bsky.graph.defs#listViewBasic" } func (t *GraphDefs_ListViewBasic) 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.graph.defs#listViewBasic" return glex.MarshalCBOR(w, &cp) } func (t *GraphDefs_ListViewBasic) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } // GraphDefs_ListViewerState is a "listViewerState" in the app.bsky.graph.defs schema. type GraphDefs_ListViewerState struct { LexiconTypeID string `json:"$type,omitempty"` Blocked *string `json:"blocked,omitempty"` Muted *bool `json:"muted,omitempty"` } // RecordTypeID implements glex.Record. func (t *GraphDefs_ListViewerState) RecordTypeID() string { return "app.bsky.graph.defs#listViewerState" } func (t *GraphDefs_ListViewerState) 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.graph.defs#listViewerState" return glex.MarshalCBOR(w, &cp) } func (t *GraphDefs_ListViewerState) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } // GraphDefs_NotFoundActor is a "notFoundActor" in the app.bsky.graph.defs schema. // // indicates that a handle or DID could not be resolved type GraphDefs_NotFoundActor struct { LexiconTypeID string `json:"$type,omitempty"` Actor string `json:"actor"` NotFound bool `json:"notFound"` } // RecordTypeID implements glex.Record. func (t *GraphDefs_NotFoundActor) RecordTypeID() string { return "app.bsky.graph.defs#notFoundActor" } func (t *GraphDefs_NotFoundActor) 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.graph.defs#notFoundActor" return glex.MarshalCBOR(w, &cp) } func (t *GraphDefs_NotFoundActor) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } // GraphDefs_Relationship is a "relationship" in the app.bsky.graph.defs schema. // // lists the bi-directional graph relationships between one actor (not indicated in the object), and the target actors (the DID included in the object) type GraphDefs_Relationship struct { LexiconTypeID string `json:"$type,omitempty"` // blockedBy: if the actor is blocked by this DID, contains the AT-URI of the block record BlockedBy *string `json:"blockedBy,omitempty"` // blockedByList: if the actor is blocked by this DID via a block list, contains the AT-URI of the listblock record BlockedByList *string `json:"blockedByList,omitempty"` // blocking: if the actor blocks this DID, this is the AT-URI of the block record Blocking *string `json:"blocking,omitempty"` // blockingByList: if the actor blocks this DID via a block list, this is the AT-URI of the listblock record BlockingByList *string `json:"blockingByList,omitempty"` Did string `json:"did"` // followedBy: if the actor is followed by this DID, contains the AT-URI of the follow record FollowedBy *string `json:"followedBy,omitempty"` // following: if the actor follows this DID, this is the AT-URI of the follow record Following *string `json:"following,omitempty"` } // RecordTypeID implements glex.Record. func (t *GraphDefs_Relationship) RecordTypeID() string { return "app.bsky.graph.defs#relationship" } func (t *GraphDefs_Relationship) 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.graph.defs#relationship" return glex.MarshalCBOR(w, &cp) } func (t *GraphDefs_Relationship) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } // GraphDefs_StarterPackView is a "starterPackView" in the app.bsky.graph.defs schema. type GraphDefs_StarterPackView struct { LexiconTypeID string `json:"$type,omitempty"` Cid string `json:"cid"` Creator ActorDefs_ProfileViewBasic `json:"creator"` Feeds []FeedDefs_GeneratorView `json:"feeds,omitempty"` IndexedAt string `json:"indexedAt"` JoinedAllTimeCount *int64 `json:"joinedAllTimeCount,omitempty"` JoinedWeekCount *int64 `json:"joinedWeekCount,omitempty"` Labels []comatproto.LabelDefs_Label `json:"labels,omitempty"` List *GraphDefs_ListViewBasic `json:"list,omitempty"` ListItemsSample []GraphDefs_ListItemView `json:"listItemsSample,omitempty"` Record *glex.LexiconTypeDecoder `json:"record"` Uri string `json:"uri"` } // RecordTypeID implements glex.Record. func (t *GraphDefs_StarterPackView) RecordTypeID() string { return "app.bsky.graph.defs#starterPackView" } func (t *GraphDefs_StarterPackView) 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.graph.defs#starterPackView" return glex.MarshalCBOR(w, &cp) } func (t *GraphDefs_StarterPackView) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } // GraphDefs_StarterPackViewBasic is a "starterPackViewBasic" in the app.bsky.graph.defs schema. type GraphDefs_StarterPackViewBasic struct { LexiconTypeID string `json:"$type,omitempty"` Cid string `json:"cid"` Creator ActorDefs_ProfileViewBasic `json:"creator"` IndexedAt string `json:"indexedAt"` JoinedAllTimeCount *int64 `json:"joinedAllTimeCount,omitempty"` JoinedWeekCount *int64 `json:"joinedWeekCount,omitempty"` Labels []comatproto.LabelDefs_Label `json:"labels,omitempty"` ListItemCount *int64 `json:"listItemCount,omitempty"` Record *glex.LexiconTypeDecoder `json:"record"` Uri string `json:"uri"` } // RecordTypeID implements glex.Record. func (t *GraphDefs_StarterPackViewBasic) RecordTypeID() string { return "app.bsky.graph.defs#starterPackViewBasic" } func (t *GraphDefs_StarterPackViewBasic) 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.graph.defs#starterPackViewBasic" return glex.MarshalCBOR(w, &cp) } func (t *GraphDefs_StarterPackViewBasic) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) }