// Code generated by cmd/lexgen (see Makefile's lexgen); DO NOT EDIT.

package bsky

// schema: app.bsky.actor.defs

import (
	"encoding/json"
	"fmt"

	comatprototypes "github.com/bluesky-social/indigo/api/atproto"
	"github.com/bluesky-social/indigo/lex/util"
)

// ActorDefs_AdultContentPref is a "adultContentPref" in the app.bsky.actor.defs schema.
//
// RECORDTYPE: ActorDefs_AdultContentPref
type ActorDefs_AdultContentPref struct {
	LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#adultContentPref" cborgen:"$type,const=app.bsky.actor.defs#adultContentPref"`
	Enabled       bool   `json:"enabled" cborgen:"enabled"`
}

// ActorDefs_BskyAppProgressGuide is a "bskyAppProgressGuide" in the app.bsky.actor.defs schema.
//
// If set, an active progress guide. Once completed, can be set to undefined. Should have unspecced fields tracking progress.
type ActorDefs_BskyAppProgressGuide struct {
	Guide string `json:"guide" cborgen:"guide"`
}

// ActorDefs_BskyAppStatePref is a "bskyAppStatePref" in the app.bsky.actor.defs schema.
//
// A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this.
//
// RECORDTYPE: ActorDefs_BskyAppStatePref
type ActorDefs_BskyAppStatePref struct {
	LexiconTypeID       string                          `json:"$type,const=app.bsky.actor.defs#bskyAppStatePref" cborgen:"$type,const=app.bsky.actor.defs#bskyAppStatePref"`
	ActiveProgressGuide *ActorDefs_BskyAppProgressGuide `json:"activeProgressGuide,omitempty" cborgen:"activeProgressGuide,omitempty"`
	// nuxs: Storage for NUXs the user has encountered.
	Nuxs []*ActorDefs_Nux `json:"nuxs,omitempty" cborgen:"nuxs,omitempty"`
	// queuedNudges: An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be shown to the user.
	QueuedNudges []string `json:"queuedNudges,omitempty" cborgen:"queuedNudges,omitempty"`
}

// ActorDefs_ContentLabelPref is a "contentLabelPref" in the app.bsky.actor.defs schema.
//
// RECORDTYPE: ActorDefs_ContentLabelPref
type ActorDefs_ContentLabelPref struct {
	LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#contentLabelPref" cborgen:"$type,const=app.bsky.actor.defs#contentLabelPref"`
	Label         string `json:"label" cborgen:"label"`
	// labelerDid: Which labeler does this preference apply to? If undefined, applies globally.
	LabelerDid *string `json:"labelerDid,omitempty" cborgen:"labelerDid,omitempty"`
	Visibility string  `json:"visibility" cborgen:"visibility"`
}

// ActorDefs_FeedViewPref is a "feedViewPref" in the app.bsky.actor.defs schema.
//
// RECORDTYPE: ActorDefs_FeedViewPref
type ActorDefs_FeedViewPref struct {
	LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#feedViewPref" cborgen:"$type,const=app.bsky.actor.defs#feedViewPref"`
	// feed: The URI of the feed, or an identifier which describes the feed.
	Feed string `json:"feed" cborgen:"feed"`
	// hideQuotePosts: Hide quote posts in the feed.
	HideQuotePosts *bool `json:"hideQuotePosts,omitempty" cborgen:"hideQuotePosts,omitempty"`
	// hideReplies: Hide replies in the feed.
	HideReplies *bool `json:"hideReplies,omitempty" cborgen:"hideReplies,omitempty"`
	// hideRepliesByLikeCount: Hide replies in the feed if they do not have this number of likes.
	HideRepliesByLikeCount *int64 `json:"hideRepliesByLikeCount,omitempty" cborgen:"hideRepliesByLikeCount,omitempty"`
	// hideRepliesByUnfollowed: Hide replies in the feed if they are not by followed users.
	HideRepliesByUnfollowed *bool `json:"hideRepliesByUnfollowed,omitempty" cborgen:"hideRepliesByUnfollowed,omitempty"`
	// hideReposts: Hide reposts in the feed.
	HideReposts *bool `json:"hideReposts,omitempty" cborgen:"hideReposts,omitempty"`
}

// ActorDefs_HiddenPostsPref is a "hiddenPostsPref" in the app.bsky.actor.defs schema.
//
// RECORDTYPE: ActorDefs_HiddenPostsPref
type ActorDefs_HiddenPostsPref struct {
	LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#hiddenPostsPref" cborgen:"$type,const=app.bsky.actor.defs#hiddenPostsPref"`
	// items: A list of URIs of posts the account owner has hidden.
	Items []string `json:"items" cborgen:"items"`
}

// ActorDefs_InterestsPref is a "interestsPref" in the app.bsky.actor.defs schema.
//
// RECORDTYPE: ActorDefs_InterestsPref
type ActorDefs_InterestsPref struct {
	LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#interestsPref" cborgen:"$type,const=app.bsky.actor.defs#interestsPref"`
	// tags: A list of tags which describe the account owner's interests gathered during onboarding.
	Tags []string `json:"tags" cborgen:"tags"`
}

// ActorDefs_KnownFollowers is a "knownFollowers" in the app.bsky.actor.defs schema.
//
// The subject's followers whom you also follow
type ActorDefs_KnownFollowers struct {
	Count     int64                         `json:"count" cborgen:"count"`
	Followers []*ActorDefs_ProfileViewBasic `json:"followers" cborgen:"followers"`
}

// ActorDefs_LabelerPrefItem is a "labelerPrefItem" in the app.bsky.actor.defs schema.
type ActorDefs_LabelerPrefItem struct {
	Did string `json:"did" cborgen:"did"`
}

// ActorDefs_LabelersPref is a "labelersPref" in the app.bsky.actor.defs schema.
//
// RECORDTYPE: ActorDefs_LabelersPref
type ActorDefs_LabelersPref struct {
	LexiconTypeID string                       `json:"$type,const=app.bsky.actor.defs#labelersPref" cborgen:"$type,const=app.bsky.actor.defs#labelersPref"`
	Labelers      []*ActorDefs_LabelerPrefItem `json:"labelers" cborgen:"labelers"`
}

// ActorDefs_MutedWord is a "mutedWord" in the app.bsky.actor.defs schema.
//
// A word that the account owner has muted.
type ActorDefs_MutedWord struct {
	// actorTarget: Groups of users to apply the muted word to. If undefined, applies to all users.
	ActorTarget *string `json:"actorTarget,omitempty" cborgen:"actorTarget,omitempty"`
	// expiresAt: The date and time at which the muted word will expire and no longer be applied.
	ExpiresAt *string `json:"expiresAt,omitempty" cborgen:"expiresAt,omitempty"`
	Id        *string `json:"id,omitempty" cborgen:"id,omitempty"`
	// targets: The intended targets of the muted word.
	Targets []*string `json:"targets" cborgen:"targets"`
	// value: The muted word itself.
	Value string `json:"value" cborgen:"value"`
}

// ActorDefs_MutedWordsPref is a "mutedWordsPref" in the app.bsky.actor.defs schema.
//
// RECORDTYPE: ActorDefs_MutedWordsPref
type ActorDefs_MutedWordsPref struct {
	LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#mutedWordsPref" cborgen:"$type,const=app.bsky.actor.defs#mutedWordsPref"`
	// items: A list of words the account owner has muted.
	Items []*ActorDefs_MutedWord `json:"items" cborgen:"items"`
}

// ActorDefs_Nux is a "nux" in the app.bsky.actor.defs schema.
//
// A new user experiences (NUX) storage object
type ActorDefs_Nux struct {
	Completed bool `json:"completed" cborgen:"completed"`
	// data: Arbitrary data for the NUX. The structure is defined by the NUX itself. Limited to 300 characters.
	Data *string `json:"data,omitempty" cborgen:"data,omitempty"`
	// expiresAt: The date and time at which the NUX will expire and should be considered completed.
	ExpiresAt *string `json:"expiresAt,omitempty" cborgen:"expiresAt,omitempty"`
	Id        string  `json:"id" cborgen:"id"`
}

// ActorDefs_PersonalDetailsPref is a "personalDetailsPref" in the app.bsky.actor.defs schema.
//
// RECORDTYPE: ActorDefs_PersonalDetailsPref
type ActorDefs_PersonalDetailsPref struct {
	LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#personalDetailsPref" cborgen:"$type,const=app.bsky.actor.defs#personalDetailsPref"`
	// birthDate: The birth date of account owner.
	BirthDate *string `json:"birthDate,omitempty" cborgen:"birthDate,omitempty"`
}

// ActorDefs_PostInteractionSettingsPref is a "postInteractionSettingsPref" in the app.bsky.actor.defs schema.
//
// Default post interaction settings for the account. These values should be applied as default values when creating new posts. These refs should mirror the threadgate and postgate records exactly.
//
// RECORDTYPE: ActorDefs_PostInteractionSettingsPref
type ActorDefs_PostInteractionSettingsPref struct {
	LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#postInteractionSettingsPref" cborgen:"$type,const=app.bsky.actor.defs#postInteractionSettingsPref"`
	// postgateEmbeddingRules: Matches postgate record. List of rules defining who can embed this users posts. If value is an empty array or is undefined, no particular rules apply and anyone can embed.
	PostgateEmbeddingRules []*ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem `json:"postgateEmbeddingRules,omitempty" cborgen:"postgateEmbeddingRules,omitempty"`
	// threadgateAllowRules: Matches threadgate record. List of rules defining who can reply to this users posts. If value is an empty array, no one can reply. If value is undefined, anyone can reply.
	ThreadgateAllowRules []*ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem `json:"threadgateAllowRules,omitempty" cborgen:"threadgateAllowRules,omitempty"`
}

type ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem struct {
	FeedPostgate_DisableRule *FeedPostgate_DisableRule
}

func (t *ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem) MarshalJSON() ([]byte, error) {
	if t.FeedPostgate_DisableRule != nil {
		t.FeedPostgate_DisableRule.LexiconTypeID = "app.bsky.feed.postgate#disableRule"
		return json.Marshal(t.FeedPostgate_DisableRule)
	}
	return nil, fmt.Errorf("cannot marshal empty enum")
}
func (t *ActorDefs_PostInteractionSettingsPref_PostgateEmbeddingRules_Elem) UnmarshalJSON(b []byte) error {
	typ, err := util.TypeExtract(b)
	if err != nil {
		return err
	}

	switch typ {
	case "app.bsky.feed.postgate#disableRule":
		t.FeedPostgate_DisableRule = new(FeedPostgate_DisableRule)
		return json.Unmarshal(b, t.FeedPostgate_DisableRule)

	default:
		return nil
	}
}

type ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem struct {
	FeedThreadgate_MentionRule   *FeedThreadgate_MentionRule
	FeedThreadgate_FollowerRule  *FeedThreadgate_FollowerRule
	FeedThreadgate_FollowingRule *FeedThreadgate_FollowingRule
	FeedThreadgate_ListRule      *FeedThreadgate_ListRule
}

func (t *ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem) MarshalJSON() ([]byte, error) {
	if t.FeedThreadgate_MentionRule != nil {
		t.FeedThreadgate_MentionRule.LexiconTypeID = "app.bsky.feed.threadgate#mentionRule"
		return json.Marshal(t.FeedThreadgate_MentionRule)
	}
	if t.FeedThreadgate_FollowerRule != nil {
		t.FeedThreadgate_FollowerRule.LexiconTypeID = "app.bsky.feed.threadgate#followerRule"
		return json.Marshal(t.FeedThreadgate_FollowerRule)
	}
	if t.FeedThreadgate_FollowingRule != nil {
		t.FeedThreadgate_FollowingRule.LexiconTypeID = "app.bsky.feed.threadgate#followingRule"
		return json.Marshal(t.FeedThreadgate_FollowingRule)
	}
	if t.FeedThreadgate_ListRule != nil {
		t.FeedThreadgate_ListRule.LexiconTypeID = "app.bsky.feed.threadgate#listRule"
		return json.Marshal(t.FeedThreadgate_ListRule)
	}
	return nil, fmt.Errorf("cannot marshal empty enum")
}
func (t *ActorDefs_PostInteractionSettingsPref_ThreadgateAllowRules_Elem) UnmarshalJSON(b []byte) error {
	typ, err := util.TypeExtract(b)
	if err != nil {
		return err
	}

	switch typ {
	case "app.bsky.feed.threadgate#mentionRule":
		t.FeedThreadgate_MentionRule = new(FeedThreadgate_MentionRule)
		return json.Unmarshal(b, t.FeedThreadgate_MentionRule)
	case "app.bsky.feed.threadgate#followerRule":
		t.FeedThreadgate_FollowerRule = new(FeedThreadgate_FollowerRule)
		return json.Unmarshal(b, t.FeedThreadgate_FollowerRule)
	case "app.bsky.feed.threadgate#followingRule":
		t.FeedThreadgate_FollowingRule = new(FeedThreadgate_FollowingRule)
		return json.Unmarshal(b, t.FeedThreadgate_FollowingRule)
	case "app.bsky.feed.threadgate#listRule":
		t.FeedThreadgate_ListRule = new(FeedThreadgate_ListRule)
		return json.Unmarshal(b, t.FeedThreadgate_ListRule)

	default:
		return nil
	}
}

type ActorDefs_Preferences_Elem struct {
	ActorDefs_AdultContentPref            *ActorDefs_AdultContentPref
	ActorDefs_ContentLabelPref            *ActorDefs_ContentLabelPref
	ActorDefs_SavedFeedsPref              *ActorDefs_SavedFeedsPref
	ActorDefs_SavedFeedsPrefV2            *ActorDefs_SavedFeedsPrefV2
	ActorDefs_PersonalDetailsPref         *ActorDefs_PersonalDetailsPref
	ActorDefs_FeedViewPref                *ActorDefs_FeedViewPref
	ActorDefs_ThreadViewPref              *ActorDefs_ThreadViewPref
	ActorDefs_InterestsPref               *ActorDefs_InterestsPref
	ActorDefs_MutedWordsPref              *ActorDefs_MutedWordsPref
	ActorDefs_HiddenPostsPref             *ActorDefs_HiddenPostsPref
	ActorDefs_BskyAppStatePref            *ActorDefs_BskyAppStatePref
	ActorDefs_LabelersPref                *ActorDefs_LabelersPref
	ActorDefs_PostInteractionSettingsPref *ActorDefs_PostInteractionSettingsPref
	ActorDefs_VerificationPrefs           *ActorDefs_VerificationPrefs
}

func (t *ActorDefs_Preferences_Elem) MarshalJSON() ([]byte, error) {
	if t.ActorDefs_AdultContentPref != nil {
		t.ActorDefs_AdultContentPref.LexiconTypeID = "app.bsky.actor.defs#adultContentPref"
		return json.Marshal(t.ActorDefs_AdultContentPref)
	}
	if t.ActorDefs_ContentLabelPref != nil {
		t.ActorDefs_ContentLabelPref.LexiconTypeID = "app.bsky.actor.defs#contentLabelPref"
		return json.Marshal(t.ActorDefs_ContentLabelPref)
	}
	if t.ActorDefs_SavedFeedsPref != nil {
		t.ActorDefs_SavedFeedsPref.LexiconTypeID = "app.bsky.actor.defs#savedFeedsPref"
		return json.Marshal(t.ActorDefs_SavedFeedsPref)
	}
	if t.ActorDefs_SavedFeedsPrefV2 != nil {
		t.ActorDefs_SavedFeedsPrefV2.LexiconTypeID = "app.bsky.actor.defs#savedFeedsPrefV2"
		return json.Marshal(t.ActorDefs_SavedFeedsPrefV2)
	}
	if t.ActorDefs_PersonalDetailsPref != nil {
		t.ActorDefs_PersonalDetailsPref.LexiconTypeID = "app.bsky.actor.defs#personalDetailsPref"
		return json.Marshal(t.ActorDefs_PersonalDetailsPref)
	}
	if t.ActorDefs_FeedViewPref != nil {
		t.ActorDefs_FeedViewPref.LexiconTypeID = "app.bsky.actor.defs#feedViewPref"
		return json.Marshal(t.ActorDefs_FeedViewPref)
	}
	if t.ActorDefs_ThreadViewPref != nil {
		t.ActorDefs_ThreadViewPref.LexiconTypeID = "app.bsky.actor.defs#threadViewPref"
		return json.Marshal(t.ActorDefs_ThreadViewPref)
	}
	if t.ActorDefs_InterestsPref != nil {
		t.ActorDefs_InterestsPref.LexiconTypeID = "app.bsky.actor.defs#interestsPref"
		return json.Marshal(t.ActorDefs_InterestsPref)
	}
	if t.ActorDefs_MutedWordsPref != nil {
		t.ActorDefs_MutedWordsPref.LexiconTypeID = "app.bsky.actor.defs#mutedWordsPref"
		return json.Marshal(t.ActorDefs_MutedWordsPref)
	}
	if t.ActorDefs_HiddenPostsPref != nil {
		t.ActorDefs_HiddenPostsPref.LexiconTypeID = "app.bsky.actor.defs#hiddenPostsPref"
		return json.Marshal(t.ActorDefs_HiddenPostsPref)
	}
	if t.ActorDefs_BskyAppStatePref != nil {
		t.ActorDefs_BskyAppStatePref.LexiconTypeID = "app.bsky.actor.defs#bskyAppStatePref"
		return json.Marshal(t.ActorDefs_BskyAppStatePref)
	}
	if t.ActorDefs_LabelersPref != nil {
		t.ActorDefs_LabelersPref.LexiconTypeID = "app.bsky.actor.defs#labelersPref"
		return json.Marshal(t.ActorDefs_LabelersPref)
	}
	if t.ActorDefs_PostInteractionSettingsPref != nil {
		t.ActorDefs_PostInteractionSettingsPref.LexiconTypeID = "app.bsky.actor.defs#postInteractionSettingsPref"
		return json.Marshal(t.ActorDefs_PostInteractionSettingsPref)
	}
	if t.ActorDefs_VerificationPrefs != nil {
		t.ActorDefs_VerificationPrefs.LexiconTypeID = "app.bsky.actor.defs#verificationPrefs"
		return json.Marshal(t.ActorDefs_VerificationPrefs)
	}
	return nil, fmt.Errorf("cannot marshal empty enum")
}
func (t *ActorDefs_Preferences_Elem) UnmarshalJSON(b []byte) error {
	typ, err := util.TypeExtract(b)
	if err != nil {
		return err
	}

	switch typ {
	case "app.bsky.actor.defs#adultContentPref":
		t.ActorDefs_AdultContentPref = new(ActorDefs_AdultContentPref)
		return json.Unmarshal(b, t.ActorDefs_AdultContentPref)
	case "app.bsky.actor.defs#contentLabelPref":
		t.ActorDefs_ContentLabelPref = new(ActorDefs_ContentLabelPref)
		return json.Unmarshal(b, t.ActorDefs_ContentLabelPref)
	case "app.bsky.actor.defs#savedFeedsPref":
		t.ActorDefs_SavedFeedsPref = new(ActorDefs_SavedFeedsPref)
		return json.Unmarshal(b, t.ActorDefs_SavedFeedsPref)
	case "app.bsky.actor.defs#savedFeedsPrefV2":
		t.ActorDefs_SavedFeedsPrefV2 = new(ActorDefs_SavedFeedsPrefV2)
		return json.Unmarshal(b, t.ActorDefs_SavedFeedsPrefV2)
	case "app.bsky.actor.defs#personalDetailsPref":
		t.ActorDefs_PersonalDetailsPref = new(ActorDefs_PersonalDetailsPref)
		return json.Unmarshal(b, t.ActorDefs_PersonalDetailsPref)
	case "app.bsky.actor.defs#feedViewPref":
		t.ActorDefs_FeedViewPref = new(ActorDefs_FeedViewPref)
		return json.Unmarshal(b, t.ActorDefs_FeedViewPref)
	case "app.bsky.actor.defs#threadViewPref":
		t.ActorDefs_ThreadViewPref = new(ActorDefs_ThreadViewPref)
		return json.Unmarshal(b, t.ActorDefs_ThreadViewPref)
	case "app.bsky.actor.defs#interestsPref":
		t.ActorDefs_InterestsPref = new(ActorDefs_InterestsPref)
		return json.Unmarshal(b, t.ActorDefs_InterestsPref)
	case "app.bsky.actor.defs#mutedWordsPref":
		t.ActorDefs_MutedWordsPref = new(ActorDefs_MutedWordsPref)
		return json.Unmarshal(b, t.ActorDefs_MutedWordsPref)
	case "app.bsky.actor.defs#hiddenPostsPref":
		t.ActorDefs_HiddenPostsPref = new(ActorDefs_HiddenPostsPref)
		return json.Unmarshal(b, t.ActorDefs_HiddenPostsPref)
	case "app.bsky.actor.defs#bskyAppStatePref":
		t.ActorDefs_BskyAppStatePref = new(ActorDefs_BskyAppStatePref)
		return json.Unmarshal(b, t.ActorDefs_BskyAppStatePref)
	case "app.bsky.actor.defs#labelersPref":
		t.ActorDefs_LabelersPref = new(ActorDefs_LabelersPref)
		return json.Unmarshal(b, t.ActorDefs_LabelersPref)
	case "app.bsky.actor.defs#postInteractionSettingsPref":
		t.ActorDefs_PostInteractionSettingsPref = new(ActorDefs_PostInteractionSettingsPref)
		return json.Unmarshal(b, t.ActorDefs_PostInteractionSettingsPref)
	case "app.bsky.actor.defs#verificationPrefs":
		t.ActorDefs_VerificationPrefs = new(ActorDefs_VerificationPrefs)
		return json.Unmarshal(b, t.ActorDefs_VerificationPrefs)

	default:
		return nil
	}
}

// ActorDefs_ProfileAssociated is a "profileAssociated" in the app.bsky.actor.defs schema.
type ActorDefs_ProfileAssociated struct {
	ActivitySubscription *ActorDefs_ProfileAssociatedActivitySubscription `json:"activitySubscription,omitempty" cborgen:"activitySubscription,omitempty"`
	Chat                 *ActorDefs_ProfileAssociatedChat                 `json:"chat,omitempty" cborgen:"chat,omitempty"`
	Feedgens             *int64                                           `json:"feedgens,omitempty" cborgen:"feedgens,omitempty"`
	Labeler              *bool                                            `json:"labeler,omitempty" cborgen:"labeler,omitempty"`
	Lists                *int64                                           `json:"lists,omitempty" cborgen:"lists,omitempty"`
	StarterPacks         *int64                                           `json:"starterPacks,omitempty" cborgen:"starterPacks,omitempty"`
}

// ActorDefs_ProfileAssociatedActivitySubscription is a "profileAssociatedActivitySubscription" in the app.bsky.actor.defs schema.
type ActorDefs_ProfileAssociatedActivitySubscription struct {
	AllowSubscriptions string `json:"allowSubscriptions" cborgen:"allowSubscriptions"`
}

// ActorDefs_ProfileAssociatedChat is a "profileAssociatedChat" in the app.bsky.actor.defs schema.
type ActorDefs_ProfileAssociatedChat struct {
	AllowIncoming string `json:"allowIncoming" cborgen:"allowIncoming"`
}

// ActorDefs_ProfileView is a "profileView" in the app.bsky.actor.defs schema.
type ActorDefs_ProfileView struct {
	Associated   *ActorDefs_ProfileAssociated       `json:"associated,omitempty" cborgen:"associated,omitempty"`
	Avatar       *string                            `json:"avatar,omitempty" cborgen:"avatar,omitempty"`
	CreatedAt    *string                            `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"`
	Description  *string                            `json:"description,omitempty" cborgen:"description,omitempty"`
	Did          string                             `json:"did" cborgen:"did"`
	DisplayName  *string                            `json:"displayName,omitempty" cborgen:"displayName,omitempty"`
	Handle       string                             `json:"handle" cborgen:"handle"`
	IndexedAt    *string                            `json:"indexedAt,omitempty" cborgen:"indexedAt,omitempty"`
	Labels       []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"`
	Status       *ActorDefs_StatusView              `json:"status,omitempty" cborgen:"status,omitempty"`
	Verification *ActorDefs_VerificationState       `json:"verification,omitempty" cborgen:"verification,omitempty"`
	Viewer       *ActorDefs_ViewerState             `json:"viewer,omitempty" cborgen:"viewer,omitempty"`
}

// ActorDefs_ProfileViewBasic is a "profileViewBasic" in the app.bsky.actor.defs schema.
type ActorDefs_ProfileViewBasic struct {
	Associated   *ActorDefs_ProfileAssociated       `json:"associated,omitempty" cborgen:"associated,omitempty"`
	Avatar       *string                            `json:"avatar,omitempty" cborgen:"avatar,omitempty"`
	CreatedAt    *string                            `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"`
	Did          string                             `json:"did" cborgen:"did"`
	DisplayName  *string                            `json:"displayName,omitempty" cborgen:"displayName,omitempty"`
	Handle       string                             `json:"handle" cborgen:"handle"`
	Labels       []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"`
	Status       *ActorDefs_StatusView              `json:"status,omitempty" cborgen:"status,omitempty"`
	Verification *ActorDefs_VerificationState       `json:"verification,omitempty" cborgen:"verification,omitempty"`
	Viewer       *ActorDefs_ViewerState             `json:"viewer,omitempty" cborgen:"viewer,omitempty"`
}

// ActorDefs_ProfileViewDetailed is a "profileViewDetailed" in the app.bsky.actor.defs schema.
type ActorDefs_ProfileViewDetailed struct {
	Associated           *ActorDefs_ProfileAssociated       `json:"associated,omitempty" cborgen:"associated,omitempty"`
	Avatar               *string                            `json:"avatar,omitempty" cborgen:"avatar,omitempty"`
	Banner               *string                            `json:"banner,omitempty" cborgen:"banner,omitempty"`
	CreatedAt            *string                            `json:"createdAt,omitempty" cborgen:"createdAt,omitempty"`
	Description          *string                            `json:"description,omitempty" cborgen:"description,omitempty"`
	Did                  string                             `json:"did" cborgen:"did"`
	DisplayName          *string                            `json:"displayName,omitempty" cborgen:"displayName,omitempty"`
	FollowersCount       *int64                             `json:"followersCount,omitempty" cborgen:"followersCount,omitempty"`
	FollowsCount         *int64                             `json:"followsCount,omitempty" cborgen:"followsCount,omitempty"`
	Handle               string                             `json:"handle" cborgen:"handle"`
	IndexedAt            *string                            `json:"indexedAt,omitempty" cborgen:"indexedAt,omitempty"`
	JoinedViaStarterPack *GraphDefs_StarterPackViewBasic    `json:"joinedViaStarterPack,omitempty" cborgen:"joinedViaStarterPack,omitempty"`
	Labels               []*comatprototypes.LabelDefs_Label `json:"labels,omitempty" cborgen:"labels,omitempty"`
	PinnedPost           *comatprototypes.RepoStrongRef     `json:"pinnedPost,omitempty" cborgen:"pinnedPost,omitempty"`
	PostsCount           *int64                             `json:"postsCount,omitempty" cborgen:"postsCount,omitempty"`
	Status               *ActorDefs_StatusView              `json:"status,omitempty" cborgen:"status,omitempty"`
	Verification         *ActorDefs_VerificationState       `json:"verification,omitempty" cborgen:"verification,omitempty"`
	Viewer               *ActorDefs_ViewerState             `json:"viewer,omitempty" cborgen:"viewer,omitempty"`
}

// ActorDefs_SavedFeed is a "savedFeed" in the app.bsky.actor.defs schema.
type ActorDefs_SavedFeed struct {
	Id     string `json:"id" cborgen:"id"`
	Pinned bool   `json:"pinned" cborgen:"pinned"`
	Type   string `json:"type" cborgen:"type"`
	Value  string `json:"value" cborgen:"value"`
}

// ActorDefs_SavedFeedsPref is a "savedFeedsPref" in the app.bsky.actor.defs schema.
//
// RECORDTYPE: ActorDefs_SavedFeedsPref
type ActorDefs_SavedFeedsPref struct {
	LexiconTypeID string   `json:"$type,const=app.bsky.actor.defs#savedFeedsPref" cborgen:"$type,const=app.bsky.actor.defs#savedFeedsPref"`
	Pinned        []string `json:"pinned" cborgen:"pinned"`
	Saved         []string `json:"saved" cborgen:"saved"`
	TimelineIndex *int64   `json:"timelineIndex,omitempty" cborgen:"timelineIndex,omitempty"`
}

// ActorDefs_SavedFeedsPrefV2 is a "savedFeedsPrefV2" in the app.bsky.actor.defs schema.
//
// RECORDTYPE: ActorDefs_SavedFeedsPrefV2
type ActorDefs_SavedFeedsPrefV2 struct {
	LexiconTypeID string                 `json:"$type,const=app.bsky.actor.defs#savedFeedsPrefV2" cborgen:"$type,const=app.bsky.actor.defs#savedFeedsPrefV2"`
	Items         []*ActorDefs_SavedFeed `json:"items" cborgen:"items"`
}

// ActorDefs_StatusView is a "statusView" in the app.bsky.actor.defs schema.
type ActorDefs_StatusView struct {
	// embed: An optional embed associated with the status.
	Embed *ActorDefs_StatusView_Embed `json:"embed,omitempty" cborgen:"embed,omitempty"`
	// expiresAt: The date when this status will expire. The application might choose to no longer return the status after expiration.
	ExpiresAt *string `json:"expiresAt,omitempty" cborgen:"expiresAt,omitempty"`
	// isActive: True if the status is not expired, false if it is expired. Only present if expiration was set.
	IsActive *bool                    `json:"isActive,omitempty" cborgen:"isActive,omitempty"`
	Record   *util.LexiconTypeDecoder `json:"record" cborgen:"record"`
	// status: The status for the account.
	Status string `json:"status" cborgen:"status"`
}

// An optional embed associated with the status.
type ActorDefs_StatusView_Embed struct {
	EmbedExternal_View *EmbedExternal_View
}

func (t *ActorDefs_StatusView_Embed) MarshalJSON() ([]byte, error) {
	if t.EmbedExternal_View != nil {
		t.EmbedExternal_View.LexiconTypeID = "app.bsky.embed.external#view"
		return json.Marshal(t.EmbedExternal_View)
	}
	return nil, fmt.Errorf("cannot marshal empty enum")
}
func (t *ActorDefs_StatusView_Embed) UnmarshalJSON(b []byte) error {
	typ, err := util.TypeExtract(b)
	if err != nil {
		return err
	}

	switch typ {
	case "app.bsky.embed.external#view":
		t.EmbedExternal_View = new(EmbedExternal_View)
		return json.Unmarshal(b, t.EmbedExternal_View)

	default:
		return nil
	}
}

// ActorDefs_ThreadViewPref is a "threadViewPref" in the app.bsky.actor.defs schema.
//
// RECORDTYPE: ActorDefs_ThreadViewPref
type ActorDefs_ThreadViewPref struct {
	LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#threadViewPref" cborgen:"$type,const=app.bsky.actor.defs#threadViewPref"`
	// prioritizeFollowedUsers: Show followed users at the top of all replies.
	PrioritizeFollowedUsers *bool `json:"prioritizeFollowedUsers,omitempty" cborgen:"prioritizeFollowedUsers,omitempty"`
	// sort: Sorting mode for threads.
	Sort *string `json:"sort,omitempty" cborgen:"sort,omitempty"`
}

// ActorDefs_VerificationPrefs is a "verificationPrefs" in the app.bsky.actor.defs schema.
//
// Preferences for how verified accounts appear in the app.
//
// RECORDTYPE: ActorDefs_VerificationPrefs
type ActorDefs_VerificationPrefs struct {
	LexiconTypeID string `json:"$type,const=app.bsky.actor.defs#verificationPrefs" cborgen:"$type,const=app.bsky.actor.defs#verificationPrefs"`
	// hideBadges: Hide the blue check badges for verified accounts and trusted verifiers.
	HideBadges *bool `json:"hideBadges,omitempty" cborgen:"hideBadges,omitempty"`
}

// ActorDefs_VerificationState is a "verificationState" in the app.bsky.actor.defs schema.
//
// Represents the verification information about the user this object is attached to.
type ActorDefs_VerificationState struct {
	// trustedVerifierStatus: The user's status as a trusted verifier.
	TrustedVerifierStatus string `json:"trustedVerifierStatus" cborgen:"trustedVerifierStatus"`
	// verifications: All verifications issued by trusted verifiers on behalf of this user. Verifications by untrusted verifiers are not included.
	Verifications []*ActorDefs_VerificationView `json:"verifications" cborgen:"verifications"`
	// verifiedStatus: The user's status as a verified account.
	VerifiedStatus string `json:"verifiedStatus" cborgen:"verifiedStatus"`
}

// ActorDefs_VerificationView is a "verificationView" in the app.bsky.actor.defs schema.
//
// An individual verification for an associated subject.
type ActorDefs_VerificationView struct {
	// createdAt: Timestamp when the verification was created.
	CreatedAt string `json:"createdAt" cborgen:"createdAt"`
	// isValid: True if the verification passes validation, otherwise false.
	IsValid bool `json:"isValid" cborgen:"isValid"`
	// issuer: The user who issued this verification.
	Issuer string `json:"issuer" cborgen:"issuer"`
	// uri: The AT-URI of the verification record.
	Uri string `json:"uri" cborgen:"uri"`
}

// ActorDefs_ViewerState is a "viewerState" in the app.bsky.actor.defs schema.
//
// Metadata about the requesting account's relationship with the subject account. Only has meaningful content for authed requests.
type ActorDefs_ViewerState struct {
	// activitySubscription: This property is present only in selected cases, as an optimization.
	ActivitySubscription *NotificationDefs_ActivitySubscription `json:"activitySubscription,omitempty" cborgen:"activitySubscription,omitempty"`
	BlockedBy            *bool                                  `json:"blockedBy,omitempty" cborgen:"blockedBy,omitempty"`
	Blocking             *string                                `json:"blocking,omitempty" cborgen:"blocking,omitempty"`
	BlockingByList       *GraphDefs_ListViewBasic               `json:"blockingByList,omitempty" cborgen:"blockingByList,omitempty"`
	FollowedBy           *string                                `json:"followedBy,omitempty" cborgen:"followedBy,omitempty"`
	Following            *string                                `json:"following,omitempty" cborgen:"following,omitempty"`
	// knownFollowers: This property is present only in selected cases, as an optimization.
	KnownFollowers *ActorDefs_KnownFollowers `json:"knownFollowers,omitempty" cborgen:"knownFollowers,omitempty"`
	Muted          *bool                     `json:"muted,omitempty" cborgen:"muted,omitempty"`
	MutedByList    *GraphDefs_ListViewBasic  `json:"mutedByList,omitempty" cborgen:"mutedByList,omitempty"`
}
