// Code generated by glex; DO NOT EDIT. // Lexicon schema: place.stream.broadcast.defs package placestream import ( "io" glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen" appbsky "stream.place/streamplace/pkg/appbsky" ) // BroadcastDefs_BroadcastOriginView is a "broadcastOriginView" in the place.stream.broadcast.defs schema. type BroadcastDefs_BroadcastOriginView struct { LexiconTypeID string `json:"$type,omitempty"` Author appbsky.ActorDefs_ProfileViewBasic `json:"author"` Cid string `json:"cid"` Record *glex.LexiconTypeDecoder `json:"record"` Uri string `json:"uri"` } // RecordTypeID implements glex.Record. func (t *BroadcastDefs_BroadcastOriginView) RecordTypeID() string { return "place.stream.broadcast.defs#broadcastOriginView" } func (t *BroadcastDefs_BroadcastOriginView) 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 = "place.stream.broadcast.defs#broadcastOriginView" return glex.MarshalCBOR(w, &cp) } func (t *BroadcastDefs_BroadcastOriginView) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) }