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