// Code generated by glex; DO NOT EDIT. // Lexicon schema: com.atproto.identity.defs package comatproto import ( "io" glex "github.com/streamplace/glex/runtime" cbg "github.com/whyrusleeping/cbor-gen" ) // IdentityDefs_IdentityInfo is a "identityInfo" in the com.atproto.identity.defs schema. type IdentityDefs_IdentityInfo struct { LexiconTypeID string `json:"$type,omitempty"` Did string `json:"did"` // didDoc: The complete DID document for the identity. DidDoc *glex.LexiconTypeDecoder `json:"didDoc"` // handle: The validated handle of the account; or 'handle.invalid' if the handle did not bi-directionally match the DID document. Handle string `json:"handle"` } // RecordTypeID implements glex.Record. func (t *IdentityDefs_IdentityInfo) RecordTypeID() string { return "com.atproto.identity.defs#identityInfo" } func (t *IdentityDefs_IdentityInfo) 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 = "com.atproto.identity.defs#identityInfo" return glex.MarshalCBOR(w, &cp) } func (t *IdentityDefs_IdentityInfo) UnmarshalCBOR(r io.Reader) error { return glex.UnmarshalCBOR(r, t) }