// Code generated by glex; DO NOT EDIT. // Lexicon schema: app.bsky.labeler.defs package appbsky import ( "io" glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen" comatproto "stream.place/streamplace/pkg/comatproto" ) // LabelerDefs_LabelerPolicies is a "labelerPolicies" in the app.bsky.labeler.defs schema. type LabelerDefs_LabelerPolicies struct { LexiconTypeID string `json:"$type,omitempty"` // labelValueDefinitions: Label values created by this labeler and scoped exclusively to it. Labels defined here will override global label definitions for this labeler. LabelValueDefinitions []comatproto.LabelDefs_LabelValueDefinition `json:"labelValueDefinitions,omitempty"` // labelValues: The label values which this labeler publishes. May include global or custom labels. LabelValues []string `json:"labelValues"` } // RecordTypeID implements glex.Record. func (t *LabelerDefs_LabelerPolicies) RecordTypeID() string { return "app.bsky.labeler.defs#labelerPolicies" } func (t *LabelerDefs_LabelerPolicies) 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.labeler.defs#labelerPolicies" return glex.MarshalCBOR(w, &cp) } func (t *LabelerDefs_LabelerPolicies) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } // LabelerDefs_LabelerView is a "labelerView" in the app.bsky.labeler.defs schema. type LabelerDefs_LabelerView struct { LexiconTypeID string `json:"$type,omitempty"` Cid string `json:"cid"` Creator ActorDefs_ProfileView `json:"creator"` IndexedAt string `json:"indexedAt"` Labels []comatproto.LabelDefs_Label `json:"labels,omitempty"` LikeCount *int64 `json:"likeCount,omitempty"` Uri string `json:"uri"` Viewer *LabelerDefs_LabelerViewerState `json:"viewer,omitempty"` } // RecordTypeID implements glex.Record. func (t *LabelerDefs_LabelerView) RecordTypeID() string { return "app.bsky.labeler.defs#labelerView" } func (t *LabelerDefs_LabelerView) 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.labeler.defs#labelerView" return glex.MarshalCBOR(w, &cp) } func (t *LabelerDefs_LabelerView) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } // LabelerDefs_LabelerViewDetailed is a "labelerViewDetailed" in the app.bsky.labeler.defs schema. type LabelerDefs_LabelerViewDetailed struct { LexiconTypeID string `json:"$type,omitempty"` Cid string `json:"cid"` Creator ActorDefs_ProfileView `json:"creator"` IndexedAt string `json:"indexedAt"` Labels []comatproto.LabelDefs_Label `json:"labels,omitempty"` LikeCount *int64 `json:"likeCount,omitempty"` Policies LabelerDefs_LabelerPolicies `json:"policies"` // reasonTypes: The set of report reason 'codes' which are in-scope for this service to review and action. These usually align to policy categories. If not defined (distinct from empty array), all reason types are allowed. ReasonTypes []string `json:"reasonTypes,omitempty"` // subjectCollections: Set of record types (collection NSIDs) which can be reported to this service. If not defined (distinct from empty array), default is any record type. SubjectCollections []string `json:"subjectCollections,omitempty"` // subjectTypes: The set of subject types (account, record, etc) this service accepts reports on. SubjectTypes []string `json:"subjectTypes,omitempty"` Uri string `json:"uri"` Viewer *LabelerDefs_LabelerViewerState `json:"viewer,omitempty"` } // RecordTypeID implements glex.Record. func (t *LabelerDefs_LabelerViewDetailed) RecordTypeID() string { return "app.bsky.labeler.defs#labelerViewDetailed" } func (t *LabelerDefs_LabelerViewDetailed) 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.labeler.defs#labelerViewDetailed" return glex.MarshalCBOR(w, &cp) } func (t *LabelerDefs_LabelerViewDetailed) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) } // LabelerDefs_LabelerViewerState is a "labelerViewerState" in the app.bsky.labeler.defs schema. type LabelerDefs_LabelerViewerState struct { LexiconTypeID string `json:"$type,omitempty"` Like *string `json:"like,omitempty"` } // RecordTypeID implements glex.Record. func (t *LabelerDefs_LabelerViewerState) RecordTypeID() string { return "app.bsky.labeler.defs#labelerViewerState" } func (t *LabelerDefs_LabelerViewerState) 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.labeler.defs#labelerViewerState" return glex.MarshalCBOR(w, &cp) } func (t *LabelerDefs_LabelerViewerState) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) }